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

119 lines
2.5 KiB
Plaintext

<%= image_tag @user.gravatar_url(:default => "http://members.heatsynclabs.org/assets/nil.png") %>
<p>
<b>Name:</b>
<%= @user.name %>
</p>
<p>
<b>Waiver?</b>
<%= @user.waiver.strftime("%B %d %Y") unless @user.waiver.blank? %>
</p>
<p>
<b>Current Member?</b>
<%= raw(@user.member_status_symbol) %>
</p>
<p>
<b>Instructor?</b>
<%= @user.instructor? %>
</p>
<% if current_user.admin? then %>
<p>
<b>Email:</b>
<%= @user.email %>
</p>
<p>
<b>Orientation?</b>
<%= @user.orientation.strftime("%B %d %Y") unless @user.orientation.blank? %>
</p>
<p>
<b>Emergency Name:</b>
<%= @user.emergency_name %>
</p>
<p>
<b>Emergency Phone:</b>
<%= @user.emergency_phone %>
</p>
<p>
<b>Emergency Email:</b>
<%= @user.emergency_email %>
</p>
<p>
<b>Desired Member Level:</b>
<%= @user.member_level %>
</p>
<p>
<b>Payment Method:</b>
<%= @user.payment_method %>
</p>
<p>
<b>Payee:</b>
<%= @user.payee %>
</p>
<p>
<b>Phone:</b>
<%= @user.phone %>
</p>
<% end %>
<p>
<b>Current Skills:</b>
<%= simple_format @user.current_skills %>
</p>
<p>
<b>Desired Skills:</b>
<%= simple_format @user.desired_skills %>
</p>
<% if current_user.admin? then %>
<p>
<b>Found HeatSync via:</b>
<%= simple_format @user.marketing_source %>
</p>
<% end %>
<p>
<b>Card:</b><%= link_to "+ Add", (new_card_path+"?user="+@user.id.to_s), :class => 'btn' if can? :create, Card %>
<% if current_user.admin? then %>
<% @user.cards.each do |c| %>
<%= link_to c.card_number, c %><%= "," unless c == @user.cards.last %>
<% end %>
<% else %>
<%= unless @user.cards.blank? then raw("&#x2713;") end %>
<% end %>
</p>
<b>Certifications:</b><%= link_to "+ Add", (new_user_certification_path+"?user="+@user.id.to_s), :class => 'btn' if can? :create, UserCertification %>
<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 current_user.admin? then %>
<p>
<b>Payments:</b>
<ul>
<% @payments.each do |payment| %>
<li><%= payment.date %></li>
<% end %>
</ul>
</p>
<% end %>
<% if current_user.admin? then %>
<p>
<b>Created:</b>
<%= @user.created_at %>
</p>
<p>
<b>Last signed in:</b>
<%= @user.current_sign_in_at %>
</p>
<% end %>
<% if can? :update, @user then %><%= link_to 'Edit', edit_user_path(@user) %> |<% end %>
<%= link_to 'Back', users_path %>