More UI tweaks and sorting
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<% end %>
|
||||
<table>
|
||||
<col />
|
||||
<col />
|
||||
<% if current_user.admin? then %><col /><% end %>
|
||||
<col />
|
||||
<% if current_user.admin? %><col /><% end %>
|
||||
<col class="col_highlight" />
|
||||
@@ -14,17 +14,17 @@
|
||||
<col />
|
||||
<col class="col_highlight" />
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Email</th>
|
||||
<th>Certifications</th>
|
||||
<th><a href="?sort=name">Name</a></th>
|
||||
<% if current_user.admin? then %><th><a href="?sort=email">Email</a></th><% end %>
|
||||
<th><a href="?sort=certifications">Certifications</a></th>
|
||||
<% if current_user.admin? then %>
|
||||
<th>Orientation?</th>
|
||||
<th><a href="?sort=orientation">Orientation?</a></th>
|
||||
<% end %>
|
||||
<th>Waiver?</th>
|
||||
<th>Member?</th>
|
||||
<th>Card?</th>
|
||||
<th>Instructor?</th>
|
||||
<th>Admin?</th>
|
||||
<th><a href="?sort=waiver">Waiver?</a></th>
|
||||
<th><a href="?sort=member">Member?</a></th>
|
||||
<th><a href="?sort=card">Card?</a></th>
|
||||
<th><a href="?sort=instructor">Instructor?</a></th>
|
||||
<th><a href="?sort=admin">Admin?</a></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
@@ -33,7 +33,7 @@
|
||||
<% @users.each do |user| %>
|
||||
<tr>
|
||||
<td><%= link_to user.name, user %></td>
|
||||
<td><%= user.email %></td>
|
||||
<% if current_user.admin? then %><td><%= user.email %></td><% end %>
|
||||
<td><% user.certifications.each do |c| %>
|
||||
<%= link_to c.name, c %><%= "," unless c.id == user.certifications.last.id %>
|
||||
<% end %></td>
|
||||
|
||||
@@ -4,23 +4,37 @@
|
||||
<%= @user.name %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Waiver?</b>
|
||||
<%= @user.waiver.strftime("%B %d %Y") unless @user.waiver.blank? %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Current Member?</b>
|
||||
<%= raw(@user.member_status) %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Instructor?</b>
|
||||
<%= @user.instructor? %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Admin?</b>
|
||||
<%= @user.admin? %>
|
||||
</p>
|
||||
|
||||
|
||||
<% if current_user.admin? then %>
|
||||
<p>
|
||||
<b>Email:</b>
|
||||
<%= @user.email %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Waiver?</b>
|
||||
<%= @user.waiver.strftime("%B %d %Y") unless @user.waiver.blank? %>
|
||||
</p>
|
||||
|
||||
<% if current_user.admin? then %>
|
||||
<p>
|
||||
<b>Orientation?</b>
|
||||
<%= @user.orientation.strftime("%B %d %Y") unless @user.orientation.blank? %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<p>
|
||||
<b>Emergency Name:</b>
|
||||
<%= @user.emergency_name %>
|
||||
@@ -45,6 +59,7 @@
|
||||
<b>Phone:</b>
|
||||
<%= @user.phone %>
|
||||
</p>
|
||||
<% end %>
|
||||
<p>
|
||||
<b>Current Skills:</b>
|
||||
<%= simple_format @user.current_skills %>
|
||||
@@ -53,30 +68,16 @@
|
||||
<b>Desired Skills:</b>
|
||||
<%= simple_format @user.desired_skills %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Current Member?</b>
|
||||
<%= raw(@user.member_status) %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Instructor?</b>
|
||||
<%= @user.instructor? %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Admin?</b>
|
||||
<%= @user.admin? %>
|
||||
</p>
|
||||
|
||||
<% if current_user.admin? then %>
|
||||
<p>
|
||||
<b>Cards:</b>
|
||||
<% @user.cards.each do |c| %>
|
||||
<%= link_to c.card_number, c %><%= "," unless c == @user.cards.last %>
|
||||
<b>Card:</b>
|
||||
<% if current_user.admin? then %>
|
||||
<% @user.cards.each do |c| %>
|
||||
<%= link_to c.card_number, c %><%= "," unless c == @user.cards.last %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= unless @user.cards.blank? then raw("✓") end %>
|
||||
<% end %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<b>Certifications:</b>
|
||||
<ul>
|
||||
|
||||
Reference in New Issue
Block a user