Merge branch 'milestone-merged-mr-list' into 'master'

Milestone merged mr list

Part of #1207
This commit is contained in:
Dmitriy Zaporozhets 2014-06-05 13:46:13 +00:00
commit 70a6af9328
2 changed files with 12 additions and 5 deletions

View file

@ -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

View file

@ -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