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

195 lines
4.9 KiB
Plaintext
Raw Normal View History

2013-08-29 08:42:26 +00:00
<h2>
<%= image_tag @user.gravatar_url(:default => "http://members.heatsynclabs.org/assets/nil.png"), :class => 'avatar-large' %>
<%= @user.name %>
2013-08-29 08:23:21 +00:00
<%= raw(@user.member_status_symbol) %>
2013-08-29 08:38:40 +00:00
<%= 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? %>
2013-10-06 12:51:41 +00:00
<%= link_to "Email User", user_compose_email_path(@user), :class => 'btn' %>
2013-08-29 08:42:26 +00:00
</h2>
2013-08-29 08:23:21 +00:00
<% if current_user.admin? || @user.email_visible %>
<p>
<b>Email:</b>
<%= @user.email %>
</p>
<% end %>
<% if current_user.admin? || @user.phone_visible %>
<p>
<b>Phone:</b>
<%= @user.phone %>
</p>
<% end %>
2013-08-29 08:38:40 +00:00
<p>
<b>Current Skills:</b>
<%= simple_format @user.current_skills %>
</p>
<p>
<b>Desired Skills:</b>
<%= simple_format @user.desired_skills %>
</p>
2013-01-25 18:11:39 +00:00
<% if current_user.admin? then %>
<p>
<b>Orientation?</b>
<%= @user.orientation.strftime("%B %d %Y") unless @user.orientation.blank? %>
</p>
2013-01-25 14:23:06 +00:00
<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>
2013-08-29 08:23:21 +00:00
<%= @user.member_level_string %>
2013-01-25 14:23:06 +00:00
</p>
<p>
<b>Payment Method:</b>
<%= @user.payment_method %>
</p>
2013-02-12 08:58:17 +00:00
<p>
<b>Payee:</b>
<%= @user.payee %>
</p>
2013-01-25 18:11:39 +00:00
<% end %>
2013-08-29 08:38:40 +00:00
<% if current_user.admin? then %>
<p>
<b>Found HeatSync via:</b>
<%= simple_format @user.marketing_source %>
</p>
2013-08-29 08:23:21 +00:00
<p>
<b>Left HeatSync because:</b>
<%= simple_format @user.exit_reason %>
</p>
<% end %>
2013-08-29 08:38:40 +00:00
<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>
<p>
2013-08-28 10:18:47 +00:00
<b>Card: </b><%= link_to "+ Add", (new_card_path+"?user="+@user.id.to_s), :class => 'btn' if can? :create, Card %>
2013-01-25 18:11:39 +00:00
<% if current_user.admin? then %>
2013-08-28 10:18:47 +00:00
<ul>
2013-01-25 18:11:39 +00:00
<% @user.cards.each do |c| %>
2013-08-28 10:18:47 +00:00
<li><%= link_to c.card_number, c %><%= "," unless c == @user.cards.last %></li>
2013-01-25 18:11:39 +00:00
<% end %>
2013-08-28 10:18:47 +00:00
</ul>
2013-01-25 18:11:39 +00:00
<% else %>
<%= unless @user.cards.blank? then raw("&#x2713;") end %>
<% end %>
</p>
<b>Computers: </b><%= link_to "+ Add", new_mac_path, :class => 'btn' if can? :create, Mac %>
<ul>
<% @user.macs.each do |mac| %>
<li><%= link_to mac.mac, mac %></li>
<% end %>
<% if @user.macs.blank? %><li>n/a</li><% end %>
</ul>
<p>
2013-08-29 08:23:21 +00:00
<% if current_user.admin? then %>
<b>Payments:</b>
<ul>
<% @payments.each do |payment| %>
<li><%= link_to payment.date, payment %></li>
<% end %>
</ul>
<% else %>
<b>Last Payment:</b>
<% last_payment = @user.delinquency %>
<% if last_payment < 30 %>
Less than a month ago
<% else %>
<%= last_payment/30 %> months ago
<% end %>
<% end %>
</p>
2014-02-09 12:01:52 +00:00
<p>
<style>
.row {
margin-left: -15px;
margin-right: -15px;
}
.col-sm-2 {
width: 16.666666666666664%;
float: left;
position: relative;
min-height: 1px;
padding-left: 15px;
padding-right: 15px;
}
.thumbnail {
display: block;
padding: 4px;
margin-bottom: 20px;
line-height: 1.428571429;
background-color: #fff;
border: 1px solid #ddd;
border-radius: 4px;
-webkit-transition: all .2s ease-in-out;
transition: all .2s ease-in-out;
}
.thumbnail a>img {
display: block;
max-width: 100%;
height: auto;
margin-left: auto;
margin-right: auto;
}
.thumbnail a:hover { color: black; }
.thumbnail { height: 150px; position: relative; }
.thumbnail .ownership,
.thumbnail .disposed
{ display: none; }
.thumbnail h4 { position: absolute; bottom: 1px; margin-bottom: 1px; }
.clearfix { clear: both }
</style>
<b>Resources: </b><%= link_to "+ Add", new_resource_path, :class => 'btn' if can? :create, Resource %>
<div class="row"><%= render @user.resources if @user.resources %></div>
<div class="clearfix"></div>
</p>
2013-08-29 08:38:40 +00:00
<p>
<b>Waiver?</b>
<%= @user.waiver.strftime("%B %d %Y") unless @user.waiver.blank? %>
</p>
<p>
<b>Instructor?</b>
<%= @user.instructor? %>
</p>
2013-02-12 08:58:17 +00:00
<% 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>
2013-02-12 08:58:17 +00:00
<% end %>
<% if can? :update, @user then %><%= link_to 'Edit', edit_user_path(@user) %> |<% end %>
<%= link_to 'Back', users_path %>