Remove unnecessary logic from group labels page

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
Dmitriy Zaporozhets 2018-09-05 12:59:55 +03:00
parent 623ef392e5
commit 0ce39d4556

View file

@ -1,7 +1,6 @@
- @no_container = true
- page_title "Labels"
- can_admin_label = can?(current_user, :admin_label, @group)
- hide = @available_labels.empty? || (params[:page].present? && params[:page] != '1')
- issuables = ['issues', 'merge requests']
- search = params[:search]
@ -27,8 +26,7 @@
.labels-container.prepend-top-5
- if @labels.any?
.other-labels
- if can_admin_label
%h5{ class: ('hide' if hide) } Labels
%h5= _('Labels')
%ul.content-list.manage-labels-list.js-other-labels
= render partial: 'shared/label', subject: @group, collection: @labels, as: :label, locals: { use_label_priority: false }
= paginate @labels, theme: 'gitlab'