From d1ba46976779d66c558ab0c96eaa76c540c06b47 Mon Sep 17 00:00:00 2001 From: Will Bradley Date: Thu, 29 Aug 2013 01:38:40 -0700 Subject: [PATCH] Adjusting profile display --- app/assets/stylesheets/application.css | 5 +- app/views/user_certifications/index.html.erb | 2 +- app/views/users/show.html.erb | 69 ++++++++++---------- 3 files changed, 39 insertions(+), 37 deletions(-) diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index 6617883..855bf09 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -46,9 +46,12 @@ box-shadow: inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05); cursor: pointer; filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); } -.member-status-symbol { +.member-status-symbol, .social-icon { vertical-align: middle; } +a.social-link:hover { + background: transparent; +} .lined-table td { border-bottom: 1px dashed black; } diff --git a/app/views/user_certifications/index.html.erb b/app/views/user_certifications/index.html.erb index 9996ffe..262eda4 100644 --- a/app/views/user_certifications/index.html.erb +++ b/app/views/user_certifications/index.html.erb @@ -1,6 +1,6 @@

User Certifications

-<%= link_to 'New User Certification', new_user_certification_path %> +<%= link_to 'New User Certification', new_user_certification_path if can? :create, UserCertification %> <% @grouped_user_certs.sort.each do |cert, user_certifications| %>
diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index c3c60c9..9cde252 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -1,16 +1,13 @@ +

<%= @user.name %>

+ <%= image_tag @user.gravatar_url(:default => "http://members.heatsynclabs.org/assets/nil.png") %>

<%= raw(@user.member_status_symbol) %> - <%= link_to image_tag 'twitter.png', @user.twitter_url if @user.twitter_url.present? %> - <%= link_to image_tag 'facebook.png', @user.facebook_url if @user.facebook_url.present? %> - <%= link_to image_tag 'github.png', @user.github_url if @user.github_url.present? %> - <%= link_to image_tag 'website.png', @user.website_url if @user.website_url.present? %> -

- -

- Name: - <%= @user.name %> + <%= 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? %>

<% if current_user.admin? || @user.email_visible %> @@ -26,16 +23,14 @@ <%= @user.phone %>

<% end %> - -

- Waiver? - <%= @user.waiver.strftime("%B %d %Y") unless @user.waiver.blank? %> -

- -

- Instructor? - <%= @user.instructor? %> -

+

+ Current Skills: + <%= simple_format @user.current_skills %> +

+

+ Desired Skills: + <%= simple_format @user.desired_skills %> +

<% if current_user.admin? then %>

@@ -67,14 +62,7 @@ <%= @user.payee %>

<% end %> -

- Current Skills: - <%= simple_format @user.current_skills %> -

-

- Desired Skills: - <%= simple_format @user.desired_skills %> -

+ <% if current_user.admin? then %>

Found HeatSync via: @@ -85,6 +73,14 @@ <%= simple_format @user.exit_reason %>

<% end %> + +Certifications: <%= link_to "+ Add", (new_user_certification_path+"?user="+@user.id.to_s), :class => 'btn' if can? :create, UserCertification %> +

Card: <%= link_to "+ Add", (new_card_path+"?user="+@user.id.to_s), :class => 'btn' if can? :create, Card %> <% if current_user.admin? then %> @@ -98,14 +94,6 @@ <% end %>

-Certifications: <%= link_to "+ Add", (new_user_certification_path+"?user="+@user.id.to_s), :class => 'btn' if can? :create, UserCertification %> - -

<% if current_user.admin? then %> Payments: @@ -124,6 +112,17 @@ <% end %> <% end %>

+ +

+ Waiver? + <%= @user.waiver.strftime("%B %d %Y") unless @user.waiver.blank? %> +

+ +

+ Instructor? + <%= @user.instructor? %> +

+ <% if current_user.admin? then %>