40 lines
723 B
Plaintext
Executable File
40 lines
723 B
Plaintext
Executable File
<p>
|
|
<b>User:</b>
|
|
<%= link_to @card.user.name, @card.user unless @card.user.blank? %>
|
|
</p>
|
|
|
|
<p>
|
|
<b>Card Note:</b>
|
|
<%= @card.name %>
|
|
</p>
|
|
|
|
<p>
|
|
<b>Card DB ID:</b>
|
|
<%= @card.id %>
|
|
</p>
|
|
|
|
<p>
|
|
<b>Card Number:</b>
|
|
<%= @card.card_number %>
|
|
</p>
|
|
|
|
<p>
|
|
<b>Card Permissions:</b>
|
|
<%= if @card.card_permissions == 1 then "Enabled" else "Disabled" end %>
|
|
</p>
|
|
|
|
<% if can? :read, DoorLog %>
|
|
<p>
|
|
<b>Access attempts:</b>
|
|
<ul>
|
|
<% @door_logs.each do |log| %>
|
|
<li><%= log.created_at %></li>
|
|
<% end %>
|
|
</ul>
|
|
</p>
|
|
<% end %>
|
|
|
|
<%= link_to 'Upload to Door', upload_path(@card) if can? :upload, @card %>
|
|
<% if can? :update, @card then %><%= link_to 'Edit', edit_card_path(@card) %> |<% end %>
|
|
<%= link_to 'Back', cards_path %>
|