Commit ffd50e8c authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Add merged mrs list to milestone page

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 7e41eca3
...@@ -113,6 +113,7 @@ class MergeRequest < ActiveRecord::Base ...@@ -113,6 +113,7 @@ class MergeRequest < ActiveRecord::Base
# Closed scope for merge request should return # Closed scope for merge request should return
# both merged and closed mr's # both merged and closed mr's
scope :closed, -> { with_states(:closed, :merged) } scope :closed, -> { with_states(:closed, :merged) }
scope :declined, -> { with_states(:closed) }
def validate_branches def validate_branches
if target_project == source_project && target_branch == source_branch if target_project == source_project && target_branch == source_branch
......
...@@ -84,12 +84,18 @@ ...@@ -84,12 +84,18 @@
.tab-pane#tab-merge-requests .tab-pane#tab-merge-requests
.row .row
.col-md-4 .col-md-3
= render('merge_requests', title: 'Work in progress (open and unassigned)', merge_requests: @merge_requests.opened.unassigned, id: 'unassigned') = render('merge_requests', title: 'Work in progress (open and unassigned)', merge_requests: @merge_requests.opened.unassigned, id: 'unassigned')
.col-md-4 .col-md-3
= render('merge_requests', title: 'Assigned (open and assigned)', merge_requests: @merge_requests.opened.assigned, id: 'ongoing') = render('merge_requests', title: 'Waiting for merge (open and assigned)', merge_requests: @merge_requests.opened.assigned, id: 'ongoing')
.col-md-4 .col-md-3
= render('merge_requests', title: 'Declined (closed)', merge_requests: @merge_requests.closed, id: 'closed') = render('merge_requests', title: 'Declined (closed)', merge_requests: @merge_requests.declined, id: 'closed')
.col-md-3
.panel.panel-primary
.panel-heading Merged
%ul.well-list
- @merge_requests.merged.each do |merge_request|
= render 'merge_request', merge_request: merge_request
.tab-pane#tab-participants .tab-pane#tab-participants
%ul.bordered-list %ul.bordered-list
......
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