diff options
author | Alfredo Sumaran <alfredo@gitlab.com> | 2016-06-02 16:38:55 -0500 |
---|---|---|
committer | Alfredo Sumaran <alfredo@gitlab.com> | 2016-06-06 11:59:49 -0500 |
commit | d4bcf51692122abaef1272fe80e8897b5be0f178 (patch) | |
tree | faf9b8026adf8c3d4d29b1c08eeed8e811839b27 | |
parent | 221d2e3aa0f100b9d6da74ebe08dbab35ac5297f (diff) | |
download | gitlab-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.haml | 5 |
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) } |