Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-09-20 21:19:57 +0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-10-19 19:58:24 +0300
commit701544fb48a5add0cc7cbba729e6438d7a040385 (patch)
treef446a36740e13ab6f2bc648c2e1de1ccee1b51e7 /app/views
parent2910896b53f107558904e228340009bb9fccca4e (diff)
Hides project/group labels section if there are none
Diffstat (limited to 'app/views')
-rw-r--r--app/views/projects/labels/index.html.haml10
1 files changed, 4 insertions, 6 deletions
diff --git a/app/views/projects/labels/index.html.haml b/app/views/projects/labels/index.html.haml
index 8e6f84fc430..99f8e8095ad 100644
--- a/app/views/projects/labels/index.html.haml
+++ b/app/views/projects/labels/index.html.haml
@@ -18,28 +18,26 @@
-# Only show it in the first page
- hide = params[:page].present? && params[:page] != '1'
- if can?(current_user, :admin_label, @project)
- .prioritized-labels{ class: ('hide' if hide) }
+ .prioritized-labels{ class: ('hidden' if hide) }
%h5 Prioritized Labels
%ul.content-list.manage-labels-list.js-prioritized-labels{ "data-url" => set_priorities_namespace_project_labels_path(@project.namespace, @project) }
%p.empty-message{ class: ('hidden' unless @prioritized_labels.empty?) } No prioritized labels yet
- if @prioritized_labels.present?
= render partial: 'shared/label', collection: @prioritized_labels, as: :label
- .group-labels{ class: ('hide' if hide || @project.group.blank?) }
+ .group-labels{ class: ('hidden' if hide || @project.group.blank? || @group_labels.empty?) }
%h5
= icon('folder-open')
Group Labels
%ul.content-list.manage-labels-list.js-group-labels
- %p.empty-message{ class: ('hidden' unless @group_labels.empty?) } No group labels
- if @group_labels.present?
= render partial: 'shared/label', collection: @group_labels, as: :label
- .project-labels
- %h5{ class: ('hide' if hide) }
+ .project-labels{ class: ('hidden' if @project_labels.empty?) }
+ %h5{ class: ('hidden' if hide) }
= icon('bookmark')
Project Labels
%ul.content-list.manage-labels-list.js-project-labels
- %p.empty-message{ class: ('hidden' unless @project_labels.empty?) } No project labels
- if @project_labels.present?
= render partial: 'shared/label', collection: @project_labels, as: :label
= paginate @project_labels, theme: 'gitlab'