Skip to content
Snippets Groups Projects
Commit d83b6700 authored by Sophie Herold's avatar Sophie Herold
Browse files

Hide issues and MRs in labels list if disabled

parent a33b376d
No related branches found
No related tags found
1 merge request!10332Hide issues and MRs in labels list if disabled
This commit is part of merge request !10332. Comments created here will be created in the context of that merge request.
Loading
@@ -11,12 +11,14 @@
Loading
@@ -11,12 +11,14 @@
= icon('caret-down') = icon('caret-down')
.dropdown-menu.dropdown-menu-align-right .dropdown-menu.dropdown-menu-align-right
%ul %ul
%li - if !(defined?(@project) && label.is_a?(ProjectLabel) && !@project.merge_requests_enabled?)
= link_to_label(label, subject: subject, type: :merge_request) do %li
view merge requests = link_to_label(label, subject: subject, type: :merge_request) do
%li view merge requests
= link_to_label(label, subject: subject) do - if !(defined?(@project) && label.is_a?(ProjectLabel) && !@project.issues_enabled?)
view open issues %li
= link_to_label(label, subject: subject) do
view open issues
- if current_user && defined?(@project) - if current_user && defined?(@project)
%li.label-subscription %li.label-subscription
- if label.is_a?(ProjectLabel) - if label.is_a?(ProjectLabel)
Loading
@@ -37,10 +39,12 @@
Loading
@@ -37,10 +39,12 @@
= link_to 'Delete', destroy_label_path(label), title: 'Delete', method: :delete, data: {confirm: 'Remove this label? Are you sure?'} = link_to 'Delete', destroy_label_path(label), title: 'Delete', method: :delete, data: {confirm: 'Remove this label? Are you sure?'}
   
.pull-right.hidden-xs.hidden-sm.hidden-md .pull-right.hidden-xs.hidden-sm.hidden-md
= link_to_label(label, subject: subject, type: :merge_request, css_class: 'btn btn-transparent btn-action') do - if !(defined?(@project) && label.is_a?(ProjectLabel) && !@project.merge_requests_enabled?)
view merge requests = link_to_label(label, subject: subject, type: :merge_request, css_class: 'btn btn-transparent btn-action') do
= link_to_label(label, subject: subject, css_class: 'btn btn-transparent btn-action') do view merge requests
view open issues - if !(defined?(@project) && label.is_a?(ProjectLabel) && !@project.issues_enabled?)
= link_to_label(label, subject: subject, css_class: 'btn btn-transparent btn-action') do
view open issues
   
- if current_user && defined?(@project) - if current_user && defined?(@project)
.label-subscription.inline .label-subscription.inline
Loading
@@ -82,4 +86,4 @@
Loading
@@ -82,4 +86,4 @@
new gl.ProjectLabelSubscription('##{dom_id(label)} .label-subscription'); new gl.ProjectLabelSubscription('##{dom_id(label)} .label-subscription');
- else - else
:javascript :javascript
new gl.GroupLabelSubscription('##{dom_id(label)} .label-subscription'); new gl.GroupLabelSubscription('##{dom_id(label)} .label-subscription');
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment