summaryrefslogtreecommitdiff
path: root/app/views/shared/_label.html.haml
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-10-28 00:43:31 -0200
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-10-31 23:27:49 -0200
commitbc7895fff80a038ff14e7319ef303e58474d161c (patch)
treedcfbddb6993b66b74f4f7fffc61f8b073f32aaa3 /app/views/shared/_label.html.haml
parent2525e55ec9bdd4b3a9e3284c71fde978cab6483a (diff)
downloadgitlab-ce-bc7895fff80a038ff14e7319ef303e58474d161c.tar.gz
Use label subject to calculate number of issues/mrs within the group
Diffstat (limited to 'app/views/shared/_label.html.haml')
-rw-r--r--app/views/shared/_label.html.haml12
1 files changed, 6 insertions, 6 deletions
diff --git a/app/views/shared/_label.html.haml b/app/views/shared/_label.html.haml
index 40c8d2af226..e0e58a6b31e 100644
--- a/app/views/shared/_label.html.haml
+++ b/app/views/shared/_label.html.haml
@@ -1,6 +1,6 @@
- label_css_id = dom_id(label)
-- open_issues_count = label.open_issues_count(current_user, @project)
-- open_merge_requests_count = label.open_merge_requests_count(current_user, @project)
+- open_issues_count = label.open_issues_count(current_user)
+- open_merge_requests_count = label.open_merge_requests_count(current_user)
%li{id: label_css_id, data: { id: label.id } }
= render "shared/label_row", label: label
@@ -12,10 +12,10 @@
.dropdown-menu.dropdown-menu-align-right
%ul
%li
- = link_to_label(label, subject: @project, type: :merge_request) do
+ = link_to_label(label, subject: local_assigns[:subject], type: :merge_request) do
= pluralize open_merge_requests_count, 'merge request'
%li
- = link_to_label(label, subject: @project) do
+ = link_to_label(label, subject: local_assigns[:subject]) do
= pluralize open_issues_count, 'open issue'
- if current_user
%li.label-subscription{ data: toggle_subscription_data(label) }
@@ -28,9 +28,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: @project, type: :merge_request, css_class: 'btn btn-transparent btn-action') do
+ = link_to_label(label, subject: local_assigns[:subject], type: :merge_request, css_class: 'btn btn-transparent btn-action') do
= pluralize open_merge_requests_count, 'merge request'
- = link_to_label(label, subject: @project, css_class: 'btn btn-transparent btn-action') do
+ = link_to_label(label, subject: local_assigns[:subject], css_class: 'btn btn-transparent btn-action') do
= pluralize open_issues_count, 'open issue'
- if current_user