<%= image_tag @user.gravatar_url(:default => "http://members.heatsynclabs.org/assets/nil.png"), :class => 'avatar-large' %>
<%= @user.name %>
<%= raw(@user.member_status_symbol) %>
<%= link_to image_tag('/twitter.png', :class => 'social-icon', :title => "Twitter"), @user.twitter_url, :class => 'social-link' if @user.twitter_url.present? %>
<%= link_to image_tag('/facebook.png', :class => 'social-icon', :title => "Facebook"), @user.facebook_url, :class => 'social-link' if @user.facebook_url.present? %>
<%= link_to image_tag('/github.png', :class => 'social-icon', :title => "Github"), @user.github_url, :class => 'social-link' if @user.github_url.present? %>
<%= link_to image_tag('/website.png', :class => 'social-icon', :title => "Website"), @user.website_url, :class => 'social-link' if @user.website_url.present? %>
<%= link_to 'Back', :back, :class => 'btn btn-default' %>
<%= link_to 'Email User', user_compose_email_path(@user), :class => 'btn btn-default' %>
<%= link_to 'Edit', edit_user_path(@user), class: "btn btn-primary" if can? :update, @user %>
<%= link_to 'Destroy', @user, class: "btn btn-danger", :confirm => 'Are you sure? WARNING: THIS DOES NOT REMOVE THE USER FROM THE DOOR SYSTEM! DISABLE THEM FIRST.', :method => :delete if can? :destroy, @user %>
<% if current_user.admin? || @user.email_visible %>
Email:
<%= @user.email %>
<% end %>
<% if current_user.admin? || @user.phone_visible %>
Phone:
<%= @user.phone %>
<% end %>
Current Skills:
<%= simple_format @user.current_skills %>
Desired Skills:
<%= simple_format @user.desired_skills %>
<% if current_user.admin? then %>
Orientation?
<%= @user.orientation.strftime("%B %d %Y") unless @user.orientation.blank? %>
<% unless @user.oriented_by.blank? %>
(recorded by <%= link_to @user.oriented_by.name, @user.oriented_by %>)
<% end %>
Emergency Name:
<%= @user.emergency_name %>
Emergency Phone:
<%= @user.emergency_phone %>
Emergency Email:
<%= @user.emergency_email %>
Desired Member Level:
<%= @user.member_level_string %>
Payment Method:
<%= @user.payment_method %>
Payee:
<%= @user.payee %>
<% end %>
<% if current_user.admin? then %>
Found HeatSync via:
<%= simple_format @user.marketing_source %>
Left HeatSync because:
<%= simple_format @user.exit_reason %>
<% end %>
Certifications: <%= link_to "+ Add", (new_user_certification_path+"?user="+@user.id.to_s), :class => 'btn btn-default' if can? :create, UserCertification %>
<% @user.certifications.each do |certification| %>
- <%= link_to certification.name, certification %>
<% end %>
<% if @user.certifications.blank? %>- n/a
<% end %>
Card: <%= link_to "+ Add", (new_card_path+"?user="+@user.id.to_s), :class => 'btn btn-default' 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("✓") end %>
<% end %>
Computers: <%= link_to "+ Add", new_mac_path, :class => 'btn btn-default' if can? :create, Mac %>
<% @user.macs.each do |mac| %>
- <%= link_to mac.mac, mac %>
<% end %>
<% if @user.macs.blank? %>- n/a
<% end %>
<% if current_user.admin? then %>
Payments:
<% @payments.each do |payment| %>
- <%= link_to payment.date, payment %>
<% end %>
<% else %>
Last Payment:
<% last_payment = @user.delinquency %>
<% if last_payment < 30 %>
Less than a month ago
<% else %>
<%= last_payment/30 %> months ago
<% end %>
<% end %>
Resources: <%= link_to "+ Add", new_resource_path, :class => 'btn btn-default' if can? :create, Resource %>
<%= render @user.resources if @user.resources %>
Waiver?
<%= @user.waiver.strftime("%B %d %Y") unless @user.waiver.blank? %>
Contracts: <%= link_to "+ Add", new_contract_path, :class => 'btn btn-default' if can? :create, Contract %>
<% @user.contracts.each do |contract| %>
-
<% if can? :read, contract %>
<%= link_to contract.signed_at.strftime("%B %d %Y"), contract %>
<% else %>
<%= contract.signed_at.strftime("%B %d %Y") %>
<% end %>
<% end %>
Instructor?
<%= @user.instructor? %>
<% if current_user.admin? then %>
Created:
<%= @user.created_at %>
Last signed in:
<%= @user.current_sign_in_at %>
<% end %>