Commit 8e8c0742 authored by Marin Jankovski's avatar Marin Jankovski

Reuse existing milestones counting.

parent 58570880
...@@ -44,11 +44,11 @@ module Milestones ...@@ -44,11 +44,11 @@ module Milestones
end end
def open_items_count def open_items_count
open_issues_count.merge(open_mr_count){ |title,issue,mr| issue + mr } @project_milestones.merge(@project_milestones){ |title, milestone| milestone.map{|m| m.open_items_count }.sum }
end end
def closed_items_count def closed_items_count
closed_issues_count.merge(close_mr_count){ |title,issue,mr| issue + mr } @project_milestones.merge(@project_milestones){ |title, milestone| milestone.map{|m| m.closed_items_count }.sum }
end end
def total_items_count def total_items_count
......
%h3.page-title %h3.page-title
Milestones Milestones
%span.pull-right milestones %span.pull-right #{@group_milestones.titles.count} milestones
%p.light %p.light
Only milestones from Only milestones from
......
...@@ -13,10 +13,8 @@ ...@@ -13,10 +13,8 @@
- if current_user - if current_user
%span.count= current_user.cared_merge_requests.opened.of_group(@group).count %span.count= current_user.cared_merge_requests.opened.of_group(@group).count
= nav_link(path: 'groups#milestones') do = nav_link(path: 'groups#milestones') do
= link_to merge_requests_group_path(@group) do = link_to group_milestones_path(@group) do
Milestones Milestones
- if current_user
%span.count= current_user.cared_merge_requests.opened.of_group(@group).count
= nav_link(path: 'groups#members') do = nav_link(path: 'groups#members') do
= link_to "Members", members_group_path(@group) = link_to "Members", members_group_path(@group)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment