diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-06-05 17:28:13 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-06-05 17:28:13 +0400 |
commit | ffd50e8cf562b69a897e389a968b9366ee1e6aae (patch) | |
tree | 63c97e0e01503f32dfaa9aeaf59330c4974c1950 | |
parent | 7e41eca38ae4598e083372777c20ff6aa2b491ad (diff) |
Add merged mrs list to milestone page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
-rw-r--r-- | app/models/merge_request.rb | 1 | ||||
-rw-r--r-- | app/views/projects/milestones/show.html.haml | 16 |
2 files changed, 12 insertions, 5 deletions
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb index b7c4a2a923c..a501870115f 100644 --- a/app/models/merge_request.rb +++ b/app/models/merge_request.rb @@ -113,6 +113,7 @@ class MergeRequest < ActiveRecord::Base # Closed scope for merge request should return # both merged and closed mr's scope :closed, -> { with_states(:closed, :merged) } + scope :declined, -> { with_states(:closed) } def validate_branches if target_project == source_project && target_branch == source_branch diff --git a/app/views/projects/milestones/show.html.haml b/app/views/projects/milestones/show.html.haml index 206bf474493..5cf7f332118 100644 --- a/app/views/projects/milestones/show.html.haml +++ b/app/views/projects/milestones/show.html.haml @@ -84,12 +84,18 @@ .tab-pane#tab-merge-requests .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') - .col-md-4 - = render('merge_requests', title: 'Assigned (open and assigned)', merge_requests: @merge_requests.opened.assigned, id: 'ongoing') - .col-md-4 - = render('merge_requests', title: 'Declined (closed)', merge_requests: @merge_requests.closed, id: 'closed') + .col-md-3 + = render('merge_requests', title: 'Waiting for merge (open and assigned)', merge_requests: @merge_requests.opened.assigned, id: 'ongoing') + .col-md-3 + = 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 %ul.bordered-list |