Fine tuned abilities and updated how membership is tracked
This commit is contained in:
@@ -74,8 +74,12 @@
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="field">
|
||||
<%= f.label :active, "Active?" %><br />
|
||||
<%= f.check_box :active %>
|
||||
<%= f.label :member, "Member?" %><br />
|
||||
<%= f.select :member, [["No",0],["Inactive",1],["Volunteer",10],["Associate",25],["Basic",50],["Plus",100]] %>
|
||||
</div>
|
||||
<div class="field">
|
||||
<%= f.label :instructor, "Instructor?" %><br />
|
||||
<%= f.check_box :instructor %>
|
||||
</div>
|
||||
<div class="field">
|
||||
<%= f.label :admin, "Admin?" %><br />
|
||||
|
||||
@@ -7,15 +7,14 @@
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Email</th>
|
||||
<% if current_user.admin? then %>
|
||||
<th>Cards</th>
|
||||
<% end %>
|
||||
<th>Certifications</th>
|
||||
<th>Active?</th>
|
||||
<th>Waiver?</th>
|
||||
<% if current_user.admin? then %>
|
||||
<th>Orientation?</th>
|
||||
<% end %>
|
||||
<th>Waiver?</th>
|
||||
<th>Member?</th>
|
||||
<th>Card?</th>
|
||||
<th>Instructor?</th>
|
||||
<th>Admin?</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
@@ -26,19 +25,16 @@
|
||||
<tr>
|
||||
<td><%= link_to user.name, user %></td>
|
||||
<td><%= user.email %></td>
|
||||
<% if current_user.admin? then %><td>
|
||||
<% user.cards.each do |c| %>
|
||||
<%= link_to c.card_number, card_url(c) %><%= "," unless c == user.cards.last %>
|
||||
<% end %>
|
||||
</td><% end %>
|
||||
<td><% user.certifications.each do |c| %>
|
||||
<%= link_to c.name, c %><%= "," unless c == user.certifications.last %>
|
||||
<%= link_to c.name, c %><%= "," unless c.id == user.certifications.last.id %>
|
||||
<% end %></td>
|
||||
<td><%= if user.active? then raw("✓") end %></td>
|
||||
<td><%= unless user.waiver.blank? then raw("<span class='hoverinfo' title='"+user.waiver.strftime("%B %d %Y")+"'>✓</span>") end %></td>
|
||||
<% if current_user.admin? then %><td>
|
||||
<%= unless user.orientation.blank? then raw("<span class='hoverinfo' title='"+user.orientation.strftime("%B %d %Y")+"'>✓</span>") end %>
|
||||
</td><% end %>
|
||||
<td><%= unless user.waiver.blank? then raw("<span class='hoverinfo' title='"+user.waiver.strftime("%B %d %Y")+"'>✓</span>") end %></td>
|
||||
<td><%= raw(user.member_status) %></td>
|
||||
<td><%= unless user.cards.blank? then raw("✓") end %></td>
|
||||
<td><%= if user.instructor? then raw("✓") end %></td>
|
||||
<td><%= if user.admin? then raw("✓") end %></td>
|
||||
<td><%= link_to 'Edit', edit_user_path(user) if can? :update, user %></td>
|
||||
<td><%= link_to 'Destroy', user, :confirm => 'Are you sure? WARNING: THIS DOES NOT REMOVE THE USER FROM THE DOOR SYSTEM! DISABLE THEM FIRST.', :method => :delete if can? :destroy, user %></td>
|
||||
|
||||
@@ -10,8 +10,25 @@
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Active?</b>
|
||||
<%= @user.active %>
|
||||
<b>Waiver?</b>
|
||||
<%= @user.waiver %>
|
||||
</p>
|
||||
|
||||
<% if current_user.admin? then %>
|
||||
<p>
|
||||
<b>Orientation?</b>
|
||||
<%= @user.orientation %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<p>
|
||||
<b>Member?</b>
|
||||
<%= @user.member %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Instructor?</b>
|
||||
<%= @user.instructor %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@@ -19,6 +36,15 @@
|
||||
<%= @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 %>
|
||||
<% end %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<b>Certifications:</b>
|
||||
<ul>
|
||||
<% @user.certifications.each do |certification| %>
|
||||
@@ -27,6 +53,5 @@
|
||||
<% if @user.certifications.blank? %><li>n/a</li><% end %>
|
||||
</ul>
|
||||
|
||||
|
||||
<%= link_to 'Edit', edit_user_path(@user) %> |
|
||||
<%= link_to 'Back', users_path %>
|
||||
|
||||
Reference in New Issue
Block a user