Allowing nil waiver/orientation dates, adjusting permissions of users
This commit is contained in:
parent
d44ae6a69f
commit
fe283b051f
|
@ -6,7 +6,7 @@ class Ability
|
|||
if user.admin?
|
||||
can :manage, :all
|
||||
else
|
||||
can :read, User, :id => user.id
|
||||
can :read, User
|
||||
can :read, Card, :user_id => user.id
|
||||
end
|
||||
end
|
||||
|
|
|
@ -21,11 +21,11 @@
|
|||
</div>
|
||||
<div class="field">
|
||||
<%= f.label :waiver %><br />
|
||||
<%= f.date_select :waiver %>
|
||||
<%= f.date_select :waiver, :include_blank => 'true', :default => 'nil' %>
|
||||
</div>
|
||||
<div class="field">
|
||||
<%= f.label :orientation %><br />
|
||||
<%= f.date_select :orientation %>
|
||||
<%= f.date_select :orientation, :include_blank => 'true', :default => 'nil' %>
|
||||
</div>
|
||||
<div class="field">
|
||||
<%= f.label :emergency_name %><br />
|
||||
|
|
|
@ -7,7 +7,9 @@
|
|||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Email</th>
|
||||
<th>Cards</th>
|
||||
<% if current_user.admin? then %>
|
||||
<th>Cards</th>
|
||||
<% end %>
|
||||
<th>Active?</th>
|
||||
<th>Waiver?</th>
|
||||
<th>Admin?</th>
|
||||
|
@ -20,11 +22,11 @@
|
|||
<tr>
|
||||
<td><%= user.name %></td>
|
||||
<td><%= user.email %></td>
|
||||
<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>
|
||||
</td><% end %>
|
||||
<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>
|
||||
|
|
Loading…
Reference in New Issue
Block a user