Commit b6a609edbc1e46c72980b577e482b76f85dd39fc
1 parent
5cf5c177
Exists in
spb-stable
and in
3 other branches
Truncate long names for admin dashboard with css
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing
2 changed files
with
131 additions
and
126 deletions
Show diff stats
app/assets/stylesheets/sections/admin.scss
app/views/admin/dashboard/index.html.haml
... | ... | @@ -3,136 +3,137 @@ |
3 | 3 | %p.light |
4 | 4 | You can manage projects, users and other GitLab data from here. |
5 | 5 | %hr |
6 | -.admin_dash.row | |
7 | - .col-sm-4 | |
8 | - .light-well | |
9 | - %h4 Projects | |
10 | - .data | |
11 | - = link_to admin_projects_path do | |
12 | - %h1= Project.count | |
13 | - %hr | |
14 | - = link_to 'New Project', new_project_path, class: "btn btn-new" | |
15 | - .col-sm-4 | |
16 | - .light-well | |
17 | - %h4 Users | |
18 | - .data | |
19 | - = link_to admin_users_path do | |
20 | - %h1= User.count | |
21 | - %hr | |
22 | - = link_to 'New User', new_admin_user_path, class: "btn btn-new" | |
23 | - .col-sm-4 | |
24 | - .light-well | |
25 | - %h4 Groups | |
26 | - .data | |
27 | - = link_to admin_groups_path do | |
28 | - %h1= Group.count | |
29 | - %hr | |
30 | - = link_to 'New Group', new_admin_group_path, class: "btn btn-new" | |
6 | +.admin-dashboard | |
7 | + .row | |
8 | + .col-sm-4 | |
9 | + .light-well | |
10 | + %h4 Projects | |
11 | + .data | |
12 | + = link_to admin_projects_path do | |
13 | + %h1= Project.count | |
14 | + %hr | |
15 | + = link_to 'New Project', new_project_path, class: "btn btn-new" | |
16 | + .col-sm-4 | |
17 | + .light-well | |
18 | + %h4 Users | |
19 | + .data | |
20 | + = link_to admin_users_path do | |
21 | + %h1= User.count | |
22 | + %hr | |
23 | + = link_to 'New User', new_admin_user_path, class: "btn btn-new" | |
24 | + .col-sm-4 | |
25 | + .light-well | |
26 | + %h4 Groups | |
27 | + .data | |
28 | + = link_to admin_groups_path do | |
29 | + %h1= Group.count | |
30 | + %hr | |
31 | + = link_to 'New Group', new_admin_group_path, class: "btn btn-new" | |
31 | 32 | |
32 | -.row.prepend-top-10 | |
33 | - .col-md-4 | |
34 | - %h4 Latest projects | |
35 | - %hr | |
36 | - - @projects.each do |project| | |
33 | + .row.prepend-top-10 | |
34 | + .col-md-4 | |
35 | + %h4 Latest projects | |
36 | + %hr | |
37 | + - @projects.each do |project| | |
38 | + %p | |
39 | + = link_to project.name_with_namespace, [:admin, project], class: 'str-truncated' | |
40 | + %span.light.pull-right | |
41 | + #{time_ago_with_tooltip(project.created_at)} | |
42 | + | |
43 | + .col-md-4 | |
44 | + %h4 Latest users | |
45 | + %hr | |
46 | + - @users.each do |user| | |
47 | + %p | |
48 | + = link_to [:admin, user], class: 'str-truncated' do | |
49 | + = user.name | |
50 | + %span.light.pull-right | |
51 | + #{time_ago_with_tooltip(user.created_at)} | |
52 | + | |
53 | + .col-md-4 | |
54 | + %h4 Latest groups | |
55 | + %hr | |
56 | + - @groups.each do |group| | |
57 | + %p | |
58 | + = link_to [:admin, group], class: 'str-truncated' do | |
59 | + = group.name | |
60 | + %span.light.pull-right | |
61 | + #{time_ago_with_tooltip(group.created_at)} | |
62 | + | |
63 | + %br | |
64 | + .row | |
65 | + .col-md-4 | |
66 | + %h4 Stats | |
67 | + %hr | |
37 | 68 | %p |
38 | - = link_to project.name_with_namespace, [:admin, project] | |
69 | + Forks | |
39 | 70 | %span.light.pull-right |
40 | - #{time_ago_with_tooltip(project.created_at)} | |
41 | - | |
42 | - .col-md-4 | |
43 | - %h4 Latest users | |
44 | - %hr | |
45 | - - @users.each do |user| | |
71 | + = ForkedProjectLink.count | |
46 | 72 | %p |
47 | - = link_to [:admin, user] do | |
48 | - = user.name | |
73 | + Issues | |
49 | 74 | %span.light.pull-right |
50 | - #{time_ago_with_tooltip(user.created_at)} | |
51 | - | |
52 | - .col-md-4 | |
53 | - %h4 Latest groups | |
54 | - %hr | |
55 | - - @groups.each do |group| | |
75 | + = Issue.count | |
56 | 76 | %p |
57 | - = link_to [:admin, group] do | |
58 | - = group.name | |
77 | + Merge Requests | |
59 | 78 | %span.light.pull-right |
60 | - #{time_ago_with_tooltip(group.created_at)} | |
61 | - | |
62 | -%br | |
63 | -.row | |
64 | - .col-md-4 | |
65 | - %h4 Stats | |
66 | - %hr | |
67 | - %p | |
68 | - Forks | |
69 | - %span.light.pull-right | |
70 | - = ForkedProjectLink.count | |
71 | - %p | |
72 | - Issues | |
73 | - %span.light.pull-right | |
74 | - = Issue.count | |
75 | - %p | |
76 | - Merge Requests | |
77 | - %span.light.pull-right | |
78 | - = MergeRequest.count | |
79 | - %p | |
80 | - Notes | |
81 | - %span.light.pull-right | |
82 | - = Note.count | |
83 | - %p | |
84 | - Snippets | |
85 | - %span.light.pull-right | |
86 | - = Snippet.count | |
87 | - %p | |
88 | - SSH Keys | |
89 | - %span.light.pull-right | |
90 | - = Key.count | |
91 | - %p | |
92 | - Milestones | |
93 | - %span.light.pull-right | |
94 | - = Milestone.count | |
95 | - .col-md-4 | |
96 | - %h4 | |
97 | - Features | |
98 | - %hr | |
99 | - %p | |
100 | - Sign up | |
101 | - %span.light.pull-right | |
102 | - = boolean_to_icon gitlab_config.signup_enabled | |
103 | - %p | |
104 | - LDAP | |
105 | - %span.light.pull-right | |
106 | - = boolean_to_icon Gitlab.config.ldap.enabled | |
107 | - %p | |
108 | - Gravatar | |
109 | - %span.light.pull-right | |
110 | - = boolean_to_icon Gitlab.config.gravatar.enabled | |
111 | - %p | |
112 | - OmniAuth | |
113 | - %span.light.pull-right | |
114 | - = boolean_to_icon Gitlab.config.omniauth.enabled | |
115 | - .col-md-4 | |
116 | - %h4 Components | |
117 | - %hr | |
118 | - %p | |
119 | - GitLab | |
120 | - %span.pull-right | |
121 | - = Gitlab::VERSION | |
122 | - %p | |
123 | - GitLab Shell | |
124 | - %span.pull-right | |
125 | - = Gitlab::Shell.new.version | |
126 | - %p | |
127 | - GitLab API | |
128 | - %span.pull-right | |
129 | - = API::API::version | |
130 | - %p | |
131 | - Ruby | |
132 | - %span.pull-right | |
133 | - #{RUBY_VERSION}p#{RUBY_PATCHLEVEL} | |
79 | + = MergeRequest.count | |
80 | + %p | |
81 | + Notes | |
82 | + %span.light.pull-right | |
83 | + = Note.count | |
84 | + %p | |
85 | + Snippets | |
86 | + %span.light.pull-right | |
87 | + = Snippet.count | |
88 | + %p | |
89 | + SSH Keys | |
90 | + %span.light.pull-right | |
91 | + = Key.count | |
92 | + %p | |
93 | + Milestones | |
94 | + %span.light.pull-right | |
95 | + = Milestone.count | |
96 | + .col-md-4 | |
97 | + %h4 | |
98 | + Features | |
99 | + %hr | |
100 | + %p | |
101 | + Sign up | |
102 | + %span.light.pull-right | |
103 | + = boolean_to_icon gitlab_config.signup_enabled | |
104 | + %p | |
105 | + LDAP | |
106 | + %span.light.pull-right | |
107 | + = boolean_to_icon Gitlab.config.ldap.enabled | |
108 | + %p | |
109 | + Gravatar | |
110 | + %span.light.pull-right | |
111 | + = boolean_to_icon Gitlab.config.gravatar.enabled | |
112 | + %p | |
113 | + OmniAuth | |
114 | + %span.light.pull-right | |
115 | + = boolean_to_icon Gitlab.config.omniauth.enabled | |
116 | + .col-md-4 | |
117 | + %h4 Components | |
118 | + %hr | |
119 | + %p | |
120 | + GitLab | |
121 | + %span.pull-right | |
122 | + = Gitlab::VERSION | |
123 | + %p | |
124 | + GitLab Shell | |
125 | + %span.pull-right | |
126 | + = Gitlab::Shell.new.version | |
127 | + %p | |
128 | + GitLab API | |
129 | + %span.pull-right | |
130 | + = API::API::version | |
131 | + %p | |
132 | + Ruby | |
133 | + %span.pull-right | |
134 | + #{RUBY_VERSION}p#{RUBY_PATCHLEVEL} | |
134 | 135 | |
135 | - %p | |
136 | - Rails | |
137 | - %span.pull-right | |
138 | - #{Rails::VERSION::STRING} | |
136 | + %p | |
137 | + Rails | |
138 | + %span.pull-right | |
139 | + #{Rails::VERSION::STRING} | ... | ... |