Listing users

<% if can? :create, User %> <%= link_to 'New User', new_user_path %> <% end %> <% if current_user.admin? %><% end %> <% if current_user.admin? then %> <% end %> <% if !@users.blank? %> <% @users.each do |user| %> <% if current_user.admin? then %><% end %> <% end %> <% end %>
Name Email CertificationsOrientation?Waiver? Member? Card? Instructor? Admin?
<%= link_to user.name, user %> <%= user.email %> <% user.certifications.each do |c| %> <%= link_to c.name, c %><%= "," unless c.id == user.certifications.last.id %> <% end %> <%= unless user.orientation.blank? then raw("") end %> <%= unless user.waiver.blank? then raw("") end %> <%= raw(user.member_status) %> <%= unless user.cards.blank? then raw("✓") end %> <%= if user.instructor? then raw("✓") end %> <%= if user.admin? then raw("✓") end %> <%= link_to 'Edit', edit_user_path(user) if can? :update, user %> <%= 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 %>