Commit b4e4e611 authored by Alfredo Sumaran's avatar Alfredo Sumaran

Show functionality only for users with the ability to edit labels

parent e487b099
- page_title "Labels"
- hide_class = ''
.top-area
.nav-text
......@@ -10,7 +11,7 @@
New label
.labels
- hide_class = ''
- if can?(current_user, :admin_label, @project)
-# 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'
......@@ -22,6 +23,7 @@
- else
%p.empty-message No prioritized labels yet
.other-labels
- if can?(current_user, :admin_label, @project)
%h5{ class: hide_class } Other Labels
- if @labels.present?
%ul.content-list.manage-labels-list.js-other-labels
......
%span.label-row
- if can? current_user, :admin_label, @project
.js-toggle-priority.toggle-priority{ data: { url: remove_priority_namespace_project_label_path(@project.namespace, @project, label),
dom_id: dom_id(label) } }
%button.add-priority.btn.has-tooltip{ title: 'Prioritize', :'data-placement' => 'top' }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment