Open-Source-Access-Control-.../app/views/users/show.html.erb

58 lines
1.0 KiB
Plaintext

<p>
<b>Name:</b>
<%= @user.name %>
</p>
<p>
<b>Email:</b>
<%= @user.email %>
</p>
<p>
<b>Waiver?</b>
<%= @user.waiver.strftime("%B %d %Y") unless @user.waiver.blank? %>
</p>
<% if current_user.admin? then %>
<p>
<b>Orientation?</b>
<%= @user.orientation.strftime("%B %d %Y") unless @user.orientation.blank? %>
</p>
<% end %>
<p>
<b>Member?</b>
<%= raw(@user.member_status) %>
</p>
<p>
<b>Instructor?</b>
<%= @user.instructor? %>
</p>
<p>
<b>Admin?</b>
<%= @user.admin? %>
</p>
<% if current_user.admin? then %>
<p>
<b>Cards:</b>
<% @user.cards.each do |c| %>
<%= link_to c.card_number, c %><%= "," unless c == @user.cards.last %>
<% end %>
</p>
<% end %>
<b>Certifications:</b>
<ul>
<% @user.certifications.each do |certification| %>
<li><%= link_to certification.name, certification %></li>
<% end %>
<% if @user.certifications.blank? %><li>n/a</li><% end %>
</ul>
<% if can? :update, @user then %><%= link_to 'Edit', edit_user_path(@user) %> |<% end %>
<%= link_to 'Back', users_path %>