Add active status to user show/edit.

This commit is contained in:
Matthew Shepard
2012-10-16 22:59:35 -07:00
parent 4ad622e906
commit 0b5978d4ef
4 changed files with 14 additions and 1 deletions

View File

@@ -33,6 +33,10 @@
<a href="?password=edit">Change Password</a>
</div>
<% end %>
<div class="field">
<%= f.label :active, "Active?" %><br />
<%= f.check_box :active %>
</div>
<div class="field">
<%= f.label :admin, "Admin?" %><br />
<%= f.check_box :admin %>

View File

@@ -8,6 +8,8 @@
<th>Name</th>
<th>Email</th>
<th>Cards</th>
<th>Active?</th>
<th>Waiver?</th>
<th>Admin?</th>
<th></th>
<th></th>
@@ -23,6 +25,8 @@
<%= link_to c.card_number, card_url(c) %><%= "," unless c == user.cards.last %>
<% end %>
</td>
<td><%= if user.active? then "Active" end %></td>
<td><%= if user.waiver.blank? then "Not Signed" else "Signed" end %></td>
<td><%= if user.admin? then "Admin" 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>

View File

@@ -9,6 +9,11 @@
<%= @user.email %>
</p>
<p>
<b>Active?</b>
<%= @user.active %>
</p>
<p>
<b>Admin?</b>
<%= @user.admin %>