Commit 62a9bb5af70f95bdf1f4d5d2daa22bc0d07b84d3
1 parent
ae90107c
Exists in
master
and in
4 other branches
Restyle admin:teams:show
Showing
1 changed file
with
89 additions
and
86 deletions
Show diff stats
app/views/admin/teams/show.html.haml
1 | %h3.page_title | 1 | %h3.page_title |
2 | Team: #{@team.name} | 2 | Team: #{@team.name} |
3 | 3 | ||
4 | -%br | ||
5 | -%table.zebra-striped | ||
6 | - %thead | ||
7 | - %tr | ||
8 | - %th Team | ||
9 | - %th | ||
10 | - %tr | ||
11 | - %td | ||
12 | - %b | ||
13 | - Name: | ||
14 | - %td | ||
15 | - = @team.name | ||
16 | - | ||
17 | - = link_to edit_admin_team_path(@team), class: "btn btn-small pull-right" do | ||
18 | - %i.icon-edit | ||
19 | - Edit | ||
20 | - %tr | ||
21 | - %td | ||
22 | - %b | ||
23 | - Description: | ||
24 | - %td | ||
25 | - = @team.description | ||
26 | - %tr | ||
27 | - %td | ||
28 | - %b | ||
29 | - Owner: | ||
30 | - %td | ||
31 | - = @team.owner.name | ||
32 | - .pull-right | ||
33 | - = link_to "#", class: "btn btn-small change-owner-link" do | ||
34 | - %i.icon-edit | ||
35 | - Change owner | ||
36 | 4 | ||
37 | - %tr.change-owner-holder.hide | ||
38 | - %td.bgred | ||
39 | - %b.cred | ||
40 | - New Owner: | ||
41 | - %td.bgred | ||
42 | - = form_for @team, url: admin_team_path(@team) do |f| | ||
43 | - = f.select :owner_id, User.all.map { |user| [user.name, user.id] }, {}, {class: 'chosen'} | ||
44 | - %div | ||
45 | - = f.submit 'Change Owner', class: "btn btn-remove" | ||
46 | - = link_to "Cancel", "#", class: "btn change-owner-cancel-link" | 5 | + = link_to edit_admin_team_path(@team), class: "btn btn-small pull-right" do |
6 | + %i.icon-edit | ||
7 | + Edit | ||
8 | +%hr | ||
47 | 9 | ||
48 | -%fieldset | ||
49 | - %legend | ||
50 | - Members (#{@team.members.count}) | ||
51 | - %span= link_to 'Add members', new_admin_team_member_path(@team), class: "btn btn-primary btn-small pull-right", id: :add_members_to_team | ||
52 | - - if @team.members.any? | ||
53 | - %table#members_list | ||
54 | - %thead | ||
55 | - %tr | ||
56 | - %th User name | ||
57 | - %th Default project access | ||
58 | - %th Team access | ||
59 | - %th.cred.span3 Danger Zone! | ||
60 | - - @team.members.each do |member| | ||
61 | - %tr.member{ class: "user_#{member.id}"} | ||
62 | - %td | 10 | + |
11 | +.row | ||
12 | + .span6 | ||
13 | + .ui-box | ||
14 | + %h5.title | ||
15 | + Team info: | ||
16 | + %ul.well-list | ||
17 | + %li | ||
18 | + %span.light Name: | ||
19 | + %strong= @team.name | ||
20 | + %li | ||
21 | + %span.light Path: | ||
22 | + %strong | ||
23 | + = @team.path | ||
24 | + | ||
25 | + %li | ||
26 | + %span.light Description: | ||
27 | + %strong | ||
28 | + = @team.description | ||
29 | + | ||
30 | + %li | ||
31 | + %span.light Owned by: | ||
32 | + %strong | ||
33 | + - if @team.owner | ||
34 | + = link_to @team.owner.name, admin_user_path(@team.owner) | ||
35 | + - else | ||
36 | + (deleted) | ||
37 | + .pull-right | ||
38 | + = link_to "#", class: "btn btn-small change-owner-link" do | ||
39 | + %i.icon-edit | ||
40 | + Change owner | ||
41 | + %li.change-owner-holder.hide.bgred | ||
42 | + .form-holder | ||
43 | + %strong.cred New Owner: | ||
44 | + = form_for @team, url: admin_team_path(@team) do |f| | ||
45 | + = users_select_tag(:"user_team[owner_id]") | ||
46 | + .prepend-top-10 | ||
47 | + = f.submit 'Change Owner', class: "btn btn-remove" | ||
48 | + = link_to "Cancel", "#", class: "btn change-owner-cancel-link" | ||
49 | + | ||
50 | + %li | ||
51 | + %span.light Created at: | ||
52 | + %strong | ||
53 | + = @team.created_at.stamp("March 1, 1999") | ||
54 | + | ||
55 | + .span6 | ||
56 | + .ui-box | ||
57 | + %h5.title | ||
58 | + Members (#{@team.members.count}) | ||
59 | + .pull-right | ||
60 | + = link_to 'Add members', new_admin_team_member_path(@team), class: "btn btn-small", id: :add_members_to_team | ||
61 | + %ul.well-list#members_list | ||
62 | + - @team.members.each do |member| | ||
63 | + %li.member{ class: "user_#{member.id}"} | ||
63 | = link_to [:admin, member] do | 64 | = link_to [:admin, member] do |
64 | - = member.name | ||
65 | - %small= "(#{member.email})" | ||
66 | - %td= @team.human_default_projects_access(member) | ||
67 | - %td= @team.admin?(member) ? "Admin" : "Member" | ||
68 | - %td.bgred | ||
69 | - = link_to 'Edit', edit_admin_team_member_path(@team, member), class: "btn btn-small" | ||
70 | - | ||
71 | - = link_to 'Remove', admin_team_member_path(@team, member), confirm: 'Remove member from team. Are you sure?', method: :delete, class: "btn btn-remove btn-small", id: "remove_member_#{member.id}" | 65 | + %strong |
66 | + = member.name | ||
67 | + .pull-right | ||
68 | + %span.light | ||
69 | + = @team.human_default_projects_access(member) | ||
70 | + - if @team.admin?(member) | ||
71 | + %span.label.label-info Admin | ||
72 | + | ||
73 | + = link_to 'Edit', edit_admin_team_member_path(@team, member), class: "btn btn-small" | ||
74 | + | ||
75 | + = link_to 'Remove', admin_team_member_path(@team, member), confirm: 'Remove member from team. Are you sure?', method: :delete, class: "btn btn-remove btn-small", id: "remove_member_#{member.id}" | ||
76 | + | ||
77 | + | ||
78 | + .ui-box | ||
79 | + %h5.title | ||
80 | + Projects (#{@team.projects.count}) | ||
81 | + .pull-right | ||
82 | + = link_to 'Add projects', new_admin_team_project_path(@team), class: "btn btn-small", id: :assign_projects_to_team | ||
83 | + %ul.well-list#projects_list | ||
84 | + - @team.projects.each do |project| | ||
85 | + %li.project | ||
86 | + = link_to [:admin, project] do | ||
87 | + %strong | ||
88 | + = project.name_with_namespace | ||
72 | 89 | ||
73 | -%fieldset | ||
74 | - %legend | ||
75 | - Projects (#{@team.projects.count}) | ||
76 | - %span= link_to 'Add projects', new_admin_team_project_path(@team), class: "btn btn-primary btn-small pull-right", id: :assign_projects_to_team | ||
77 | - - if @team.projects.any? | ||
78 | - %table#projects_list | ||
79 | - %thead | ||
80 | - %tr | ||
81 | - %th Project name | ||
82 | - %th Max access | ||
83 | - %th.cred.span3 Danger Zone! | ||
84 | - - @team.projects.each do |project| | ||
85 | - %tr.project | ||
86 | - %td | ||
87 | - = link_to project.name_with_namespace, [:admin, project] | ||
88 | - %td | ||
89 | - %span= @team.human_max_project_access(project) | ||
90 | - %td.bgred | ||
91 | - = link_to 'Edit', edit_admin_team_project_path(@team, project), class: "btn btn-small" | ||
92 | - | ||
93 | - = link_to 'Relegate', admin_team_project_path(@team, project), confirm: 'Remove project from team. Are you sure?', method: :delete, class: "btn btn-remove small", id: "relegate_project_#{project.id}" | 90 | + .pull-right |
91 | + %span.light | ||
92 | + = @team.human_max_project_access(project) | ||
93 | + | ||
94 | + = link_to 'Edit', edit_admin_team_project_path(@team, project), class: "btn btn-small" | ||
95 | + | ||
96 | + = link_to 'Relegate', admin_team_project_path(@team, project), confirm: 'Remove project from team. Are you sure?', method: :delete, class: "btn btn-remove small", id: "relegate_project_#{project.id}" |