Commit 4f953f6f7f0099698a58f54af2a24c5b631fd314

Authored by Dmitriy Zaporozhets
1 parent c5f56ee8

Better styling for admin:teams:index page

app/views/admin/dashboard/index.html.haml
@@ -50,6 +50,14 @@ @@ -50,6 +50,14 @@
50 %h4 Stats 50 %h4 Stats
51 %hr 51 %hr
52 %p 52 %p
  53 + Teams
  54 + %span.light.pull-right
  55 + = UserTeam.count
  56 + %p
  57 + Forks
  58 + %span.light.pull-right
  59 + = ForkedProjectLink.count
  60 + %p
53 Issues 61 Issues
54 %span.light.pull-right 62 %span.light.pull-right
55 = Issue.count 63 = Issue.count
app/views/admin/teams/index.html.haml
1 %h3.page_title 1 %h3.page_title
2 - Teams 2 + Teams (#{@teams.total_count})
3 %small 3 %small
4 allow you to organize groups of people that have a common focus. Use teams to simplify the process of assigning roles to groups of people. 4 allow you to organize groups of people that have a common focus. Use teams to simplify the process of assigning roles to groups of people.
5 5
6 = link_to 'New Team', new_admin_team_path, class: "btn btn-small pull-right" 6 = link_to 'New Team', new_admin_team_path, class: "btn btn-small pull-right"
7 - %br 7 +%br
8 8
9 = form_tag admin_teams_path, method: :get, class: 'form-inline' do 9 = form_tag admin_teams_path, method: :get, class: 'form-inline' do
10 - = text_field_tag :name, params[:name], class: "xlarge" 10 + = text_field_tag :name, params[:name], class: "span6"
11 = submit_tag "Search", class: "btn submit btn-primary" 11 = submit_tag "Search", class: "btn submit btn-primary"
12 12
13 -%table  
14 - %thead  
15 - %tr  
16 - %th  
17 - Name  
18 - %i.icon-sort-down  
19 - %th Description  
20 - %th Path  
21 - %th Projects  
22 - %th Members  
23 - %th Owner  
24 - %th.cred Danger Zone! 13 +%hr
25 14
  15 +%ul.bordered-list
26 - @teams.each do |team| 16 - @teams.each do |team|
27 - %tr  
28 - %td  
29 - %strong= link_to team.name, admin_team_path(team)  
30 - %td= truncate team.description  
31 - %td= team.path  
32 - %td= team.projects.count  
33 - %td= team.members.count  
34 - %td  
35 - - if team.owner  
36 - = link_to team.owner.name, admin_user_path(team.owner)  
37 - - else  
38 - (deleted)  
39 - %td.bgred  
40 - = link_to 'Edit', edit_admin_team_path(team), id: "edit_#{dom_id(team)}", class: "btn btn-small"  
41 - = link_to 'Destroy', admin_team_path(team), confirm: "REMOVE #{team.name}? Are you sure?", method: :delete, class: "btn btn-small btn-remove" 17 + %li
  18 + .clearfix
  19 + .pull-right.prepend-top-10
  20 + = link_to 'Edit', edit_admin_team_path(team), id: "edit_#{dom_id(team)}", class: "btn btn-small"
  21 + = link_to 'Destroy', admin_team_path(team), confirm: "REMOVE #{team.name}? Are you sure?", method: :delete, class: "btn btn-small btn-remove"
  22 +
  23 + %h4
  24 + = link_to admin_team_path(team) do
  25 + %i.icon-group
  26 + = team.name
  27 +
  28 + .clearfix.light.append-bottom-10
  29 + %span
  30 + %b Owner:
  31 + - if team.owner
  32 + = link_to team.owner.name, admin_user_path(team.owner)
  33 + - else
  34 + (deleted)
  35 + \|
  36 + %span
  37 + %b Users:
  38 + %span.badge= team.members.count
  39 + \|
  40 + %span
  41 + %b Projects:
  42 + %span.badge= team.projects.count
  43 +
  44 + .clearfix
  45 + %p
  46 + = truncate team.description, length: 150
42 47
43 = paginate @teams, theme: "gitlab" 48 = paginate @teams, theme: "gitlab"