summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredo Sumaran <alfredo@gitlab.com>2016-06-02 16:38:55 -0500
committerAlfredo Sumaran <alfredo@gitlab.com>2016-06-06 11:59:49 -0500
commitd4bcf51692122abaef1272fe80e8897b5be0f178 (patch)
treefaf9b8026adf8c3d4d29b1c08eeed8e811839b27
parent221d2e3aa0f100b9d6da74ebe08dbab35ac5297f (diff)
downloadgitlab-ce-d4bcf51692122abaef1272fe80e8897b5be0f178.tar.gz
Show prioritized labels only on the first page and when there's labels created
-rw-r--r--app/views/projects/labels/index.html.haml5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/views/projects/labels/index.html.haml b/app/views/projects/labels/index.html.haml
index 3ba6ccd443c..82fb6029838 100644
--- a/app/views/projects/labels/index.html.haml
+++ b/app/views/projects/labels/index.html.haml
@@ -10,7 +10,10 @@
New label
.labels
- - hide_class = 'hide' if ((params[:page].present? and params[:page] != '1') or @labels.blank?)
+ - hide_class = ''
+ -# Only show it in the first page
+ - if (params[:page].present? and params[:page] != '1') or @project.labels.blank? or (params[:page] == nil and @project.labels.blank?)
+ - hide_class = 'hide'
.prioritized-labels{ class: hide_class }
%h5 Prioritized Labels
%ul.content-list.manage-labels-list.js-prioritized-labels{ "data-url" => set_priorities_namespace_project_labels_path(@project.namespace, @project) }