Most Active Card Last 7 Days: <%= @most_active_card.name unless @most_active_card.blank? %> (<%= @most_active_card.accesses_this_week unless @most_active_card.blank? %> times)
User | Note | DB ID | Card # | Access? | Accesses Last 7 Days | |||
---|---|---|---|---|---|---|---|---|
<% if card.user.nil? %> n/a <% else %> <%= link_to card.user.name , card %> <% end %> | <%= card.name %> | <%= card.id %> | <%= card.card_number %> | <%= if card.card_permissions == 1 then "Access" end %> | <%= card.accesses_this_week unless card.accesses_this_week < 1 %> | <%= link_to 'Upload', upload_path(card) if can? :upload, card %> | <%= link_to 'Edit', edit_card_path(card) if can? :update, card %> | <%= link_to 'Destroy', card, :confirm => 'Are you sure? WARNING: THIS DOES NOT REMOVE THE CARD FROM THE DOOR SYSTEM! DISABLE AND UPLOAD IT FIRST.', :method => :delete if can? :destroy, card %> |