summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredo Sumaran <alfredo@gitlab.com>2017-03-29 20:01:45 +0000
committerAnnabel Dunstone Gray <annabel.dunstone@gmail.com>2017-03-29 20:01:45 +0000
commitfd167f22238fd71a45541b3b7ef450c4e0bb175c (patch)
tree9c62c76adcd3f300f917a36d79d06e9af791a1ce
parent79275ca0a1df485bef73c12c3dc5ab2084185ca2 (diff)
downloadgitlab-ce-fd167f22238fd71a45541b3b7ef450c4e0bb175c.tar.gz
Fix admin projects page in admin area
-rw-r--r--app/assets/stylesheets/framework/mixins.scss12
-rw-r--r--app/assets/stylesheets/pages/groups.scss10
-rw-r--r--app/assets/stylesheets/pages/projects.scss10
-rw-r--r--app/views/admin/projects/_projects.html.haml15
-rw-r--r--app/views/shared/projects/_project.html.haml2
-rw-r--r--changelogs/unreleased/fix-admin-projects.yml4
6 files changed, 36 insertions, 17 deletions
diff --git a/app/assets/stylesheets/framework/mixins.scss b/app/assets/stylesheets/framework/mixins.scss
index df78bbdea51..b3340d41333 100644
--- a/app/assets/stylesheets/framework/mixins.scss
+++ b/app/assets/stylesheets/framework/mixins.scss
@@ -52,6 +52,18 @@
}
}
+@mixin basic-list-stats {
+ .stats {
+ float: right;
+ line-height: $list-text-height;
+ color: $gl-text-color;
+
+ span {
+ margin-right: 15px;
+ }
+ }
+}
+
@mixin bulleted-list {
> ul {
list-style-type: disc;
diff --git a/app/assets/stylesheets/pages/groups.scss b/app/assets/stylesheets/pages/groups.scss
index cf45f0af2aa..73a5889867a 100644
--- a/app/assets/stylesheets/pages/groups.scss
+++ b/app/assets/stylesheets/pages/groups.scss
@@ -17,15 +17,7 @@
}
.group-row {
- .stats {
- float: right;
- line-height: $list-text-height;
- color: $gl-text-color;
-
- span {
- margin-right: 15px;
- }
- }
+ @include basic-list-stats;
}
.ldap-group-links {
diff --git a/app/assets/stylesheets/pages/projects.scss b/app/assets/stylesheets/pages/projects.scss
index 1f62b4429dd..c2c2f371b87 100644
--- a/app/assets/stylesheets/pages/projects.scss
+++ b/app/assets/stylesheets/pages/projects.scss
@@ -573,9 +573,19 @@ pre.light-well {
display: flex;
flex-direction: column;
+ // Disable Flexbox for admin page
+ &.admin-projects {
+ display: block;
+
+ .project-row {
+ display: block;
+ }
+ }
+
.project-row {
display: flex;
align-items: center;
+ @include basic-list-stats;
}
h3 {
diff --git a/app/views/admin/projects/_projects.html.haml b/app/views/admin/projects/_projects.html.haml
index c1a9f8d6ddd..596f367a00d 100644
--- a/app/views/admin/projects/_projects.html.haml
+++ b/app/views/admin/projects/_projects.html.haml
@@ -1,15 +1,16 @@
.js-projects-list-holder
- if @projects.any?
- %ul.projects-list.content-list
+ %ul.projects-list.content-list.admin-projects
- @projects.each_with_index do |project|
- %li.project-row
+ %li.project-row{ class: ('no-description' if project.description.blank?) }
.controls
- - if project.archived
- %span.label.label-warning archived
- %span.badge
- = storage_counter(project.statistics.storage_size)
= link_to 'Edit', edit_namespace_project_path(project.namespace, project), id: "edit_#{dom_id(project)}", class: "btn"
= link_to 'Delete', [project.namespace.becomes(Namespace), project], data: { confirm: remove_project_message(project) }, method: :delete, class: "btn btn-remove"
+ .stats
+ %span.badge
+ = storage_counter(project.statistics.storage_size)
+ - if project.archived
+ %span.label.label-warning archived
.title
= link_to [:admin, project.namespace.becomes(Namespace), project] do
.dash-project-avatar
@@ -20,7 +21,7 @@
- if project.namespace
= project.namespace.human_name
\/
- %span.project-name.filter-title
+ %span.project-name
= project.name
- if project.description.present?
diff --git a/app/views/shared/projects/_project.html.haml b/app/views/shared/projects/_project.html.haml
index 059aeebaf34..761f0b606b5 100644
--- a/app/views/shared/projects/_project.html.haml
+++ b/app/views/shared/projects/_project.html.haml
@@ -24,7 +24,7 @@
- if project.namespace && !skip_namespace
= project.namespace.human_name
\/
- %span.project-name.filter-title
+ %span.project-name
= project.name
- if show_last_commit_as_description
diff --git a/changelogs/unreleased/fix-admin-projects.yml b/changelogs/unreleased/fix-admin-projects.yml
new file mode 100644
index 00000000000..d192f07004c
--- /dev/null
+++ b/changelogs/unreleased/fix-admin-projects.yml
@@ -0,0 +1,4 @@
+---
+title: Fix layout of projects page on admin area
+merge_request:
+author: