summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-10-28 16:21:45 -0200
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-10-31 23:27:49 -0200
commit7e1ddfb81b229922c271dd07a278de4dd68b6d75 (patch)
treeaac05edcfef205ed74bda181aa7e7471c9ad78bc
parent37cb2e7868b6551c009793d0c6e273efb5c10ed9 (diff)
downloadgitlab-ce-7e1ddfb81b229922c271dd07a278de4dd68b6d75.tar.gz
Assign local_assigns[:subject] to a variable on the shared label partial
-rw-r--r--app/views/shared/_label.html.haml9
1 files changed, 5 insertions, 4 deletions
diff --git a/app/views/shared/_label.html.haml b/app/views/shared/_label.html.haml
index e0e58a6b31e..6ccdef0df46 100644
--- a/app/views/shared/_label.html.haml
+++ b/app/views/shared/_label.html.haml
@@ -1,6 +1,7 @@
- label_css_id = dom_id(label)
- open_issues_count = label.open_issues_count(current_user)
- open_merge_requests_count = label.open_merge_requests_count(current_user)
+- subject = local_assigns[:subject]
%li{id: label_css_id, data: { id: label.id } }
= render "shared/label_row", label: label
@@ -12,10 +13,10 @@
.dropdown-menu.dropdown-menu-align-right
%ul
%li
- = link_to_label(label, subject: local_assigns[:subject], type: :merge_request) do
+ = link_to_label(label, subject: subject, type: :merge_request) do
= pluralize open_merge_requests_count, 'merge request'
%li
- = link_to_label(label, subject: local_assigns[:subject]) do
+ = link_to_label(label, subject: subject) do
= pluralize open_issues_count, 'open issue'
- if current_user
%li.label-subscription{ data: toggle_subscription_data(label) }
@@ -28,9 +29,9 @@
= link_to 'Delete', destroy_label_path(label), title: 'Delete', method: :delete, remote: true, data: {confirm: 'Remove this label? Are you sure?'}
.pull-right.hidden-xs.hidden-sm.hidden-md
- = link_to_label(label, subject: local_assigns[:subject], type: :merge_request, css_class: 'btn btn-transparent btn-action') do
+ = link_to_label(label, subject: subject, type: :merge_request, css_class: 'btn btn-transparent btn-action') do
= pluralize open_merge_requests_count, 'merge request'
- = link_to_label(label, subject: local_assigns[:subject], css_class: 'btn btn-transparent btn-action') do
+ = link_to_label(label, subject: subject, css_class: 'btn btn-transparent btn-action') do
= pluralize open_issues_count, 'open issue'
- if current_user