Commit fa3cb28cbed677c5cfed0ec004d8a0e6766b2d41
1 parent
aafb9763
Exists in
master
and in
4 other branches
team member show page restyle
Showing
1 changed file
with
70 additions
and
25 deletions
Show diff stats
app/views/team_members/show.html.haml
| 1 | +- allow_admin = can? current_user, :admin_project, @project | ||
| 1 | - user = @team_member.user | 2 | - user = @team_member.user |
| 2 | -.span-2 | ||
| 3 | - = image_tag gravatar_icon(user.email), :class => "left", :width => 60, :style => "padding-right:5px;" | ||
| 4 | -%p | ||
| 5 | - %b Name: | ||
| 6 | - = user.name | ||
| 7 | -%p | ||
| 8 | - %b Email: | ||
| 9 | - = user.email | ||
| 10 | - | ||
| 11 | -%br | ||
| 12 | - | ||
| 13 | -- unless user.skype.empty? | ||
| 14 | - .div | ||
| 15 | - %b Skype: | ||
| 16 | - = user.skype | ||
| 17 | - | ||
| 18 | -- unless user.linkedin.empty? | ||
| 19 | - .div | ||
| 20 | - %b LinkedIn: | ||
| 21 | - = user.linkedin | ||
| 22 | - | ||
| 23 | -- unless user.twitter.empty? | ||
| 24 | - .div | ||
| 25 | - %b Twitter: | ||
| 26 | - = user.twitter | 3 | +%div |
| 4 | + %span.entity-info | ||
| 5 | + = link_to team_project_path(@project) do | ||
| 6 | + .entity-button | ||
| 7 | + Back | ||
| 8 | + %i | ||
| 9 | + | ||
| 10 | + = image_tag gravatar_icon(user.email), :class => "left", :width => 40, :style => "padding-right:5px;" | ||
| 11 | + %span.commit-title | ||
| 12 | + %strong | ||
| 13 | + = user.name | ||
| 14 | + %span.commit-author | ||
| 15 | + %strong | ||
| 16 | + = user.email | ||
| 17 | + %hr | ||
| 18 | + %br | ||
| 19 | + | ||
| 20 | +%table.no-borders | ||
| 21 | + %tr | ||
| 22 | + %td Name | ||
| 23 | + %td= user.name | ||
| 24 | + | ||
| 25 | + %tr | ||
| 26 | + %td Email | ||
| 27 | + %td= user.email | ||
| 28 | + | ||
| 29 | + %tr | ||
| 30 | + %td Member since | ||
| 31 | + %td= @team_member.created_at.stamp("Aug 21, 2011") | ||
| 32 | + | ||
| 33 | + %tr | ||
| 34 | + %td Project Access | ||
| 35 | + %td | ||
| 36 | + = form_for(@team_member, :as => :team_member, :url => project_team_member_path(@project, @team_member)) do |f| | ||
| 37 | + = f.select :project_access, options_for_select(Project.access_options, @team_member.project_access), {}, :class => "project-access-select", :disabled => !allow_admin | ||
| 38 | + | ||
| 39 | + %tr | ||
| 40 | + %td Repository Access | ||
| 41 | + %td | ||
| 42 | + = form_for(@team_member, :as => :team_member, :url => project_team_member_path(@project, @team_member)) do |f| | ||
| 43 | + = f.select :repo_access, options_for_select(Repository.access_options, @team_member.repo_access), {}, :class => "repo-access-select", :disabled => !allow_admin | ||
| 44 | + | ||
| 45 | + | ||
| 46 | + - unless user.skype.empty? | ||
| 47 | + %tr | ||
| 48 | + %td Skype: | ||
| 49 | + %td= user.skype | ||
| 50 | + | ||
| 51 | + - unless user.linkedin.empty? | ||
| 52 | + %tr | ||
| 53 | + %td LinkedIn: | ||
| 54 | + %td= user.linkedin | ||
| 55 | + | ||
| 56 | + - unless user.twitter.empty? | ||
| 57 | + %tr | ||
| 58 | + %td Twitter: | ||
| 59 | + %td= user.twitter | ||
| 60 | + | ||
| 61 | +- if can? current_user, :admin_project, @project | ||
| 62 | + .merge-tabs | ||
| 63 | + .right | ||
| 64 | + = link_to 'Remove from team', [@project, @issue], :confirm => 'Are you sure?', :method => :delete, :class => "red-button" | ||
| 65 | + | ||
| 66 | +:javascript | ||
| 67 | + $(function(){ | ||
| 68 | + $('.repo-access-select, .project-access-select').live("change", function() { | ||
| 69 | + $(this.form).submit(); | ||
| 70 | + }); | ||
| 71 | + }) | ||
| 27 | 72 |