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

Reuse existing milestones counting.

parent 58570880
......@@ -44,11 +44,11 @@ module Milestones
end
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
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
def total_items_count
......
%h3.page-title
Milestones
%span.pull-right milestones
%span.pull-right #{@group_milestones.titles.count} milestones
%p.light
Only milestones from
......
......@@ -13,10 +13,8 @@
- if current_user
%span.count= current_user.cared_merge_requests.opened.of_group(@group).count
= nav_link(path: 'groups#milestones') do
= link_to merge_requests_group_path(@group) do
= link_to group_milestones_path(@group) do
Milestones
- if current_user
%span.count= current_user.cared_merge_requests.opened.of_group(@group).count
= nav_link(path: 'groups#members') do
= 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