diff options
author | Jan Provaznik <jprovaznik@gitlab.com> | 2019-04-23 22:58:20 +0300 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2019-04-23 22:58:20 +0300 |
commit | 8ce4b6093a2e64f21928dded6c58950f180d8c2a (patch) | |
tree | e3478cf58d2119fd2f84572d34acf0c507e75a5b /app/views/shared/_label_row.html.haml | |
parent | be15592a1c1551bb6136081ea995dca49e238c8f (diff) |
Move scoped_label into label presenter
When rendering a label we want to check 'scoped_label' feature
availability on a project/group where label is being used. For
this reason a label presenter is used in UI and information about
context project/group is passed to this presenter.
Diffstat (limited to 'app/views/shared/_label_row.html.haml')
-rw-r--r-- | app/views/shared/_label_row.html.haml | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/app/views/shared/_label_row.html.haml b/app/views/shared/_label_row.html.haml index 9d1648fbf70..a1aab2e6a08 100644 --- a/app/views/shared/_label_row.html.haml +++ b/app/views/shared/_label_row.html.haml @@ -1,4 +1,3 @@ -- subject = local_assigns[:subject] - force_priority = local_assigns.fetch(:force_priority, false) - subject_or_group_defined = defined?(@project) || defined?(@group) - show_label_issues_link = subject_or_group_defined && show_label_issuables_link?(label, :issues, project: @project) @@ -14,11 +13,11 @@ %ul.label-links - if show_label_issues_link %li.label-link-item.inline - = link_to_label(label, subject: subject) { 'Issues' } + = link_to_label(label) { 'Issues' } - if show_label_merge_requests_link · %li.label-link-item.inline - = link_to_label(label, subject: subject, type: :merge_request) { _('Merge requests') } + = link_to_label(label, type: :merge_request) { _('Merge requests') } - if force_priority · %li.label-link-item.priority-badge.js-priority-badge.inline.prepend-left-10 |