diff options
author | Rubén Dávila <rdavila84@gmail.com> | 2016-02-23 19:53:59 +0300 |
---|---|---|
committer | Rubén Dávila <rdavila84@gmail.com> | 2016-03-05 06:37:03 +0300 |
commit | 37d92d0b7b91c678ce71393e73aa94860051fd5a (patch) | |
tree | 87d3213f93f5b5fbe552ac5f17f6bd412ab57117 /app/views/projects/milestones | |
parent | 70028d36bee51a9ed86d20fe5d6c895772cc476a (diff) |
Refactor Merge Requests tab into a custom partial
Diffstat (limited to 'app/views/projects/milestones')
-rw-r--r-- | app/views/projects/milestones/_merge_request.html.haml | 8 | ||||
-rw-r--r-- | app/views/projects/milestones/_merge_requests.html.haml | 5 | ||||
-rw-r--r-- | app/views/projects/milestones/show.html.haml | 15 |
3 files changed, 1 insertions, 27 deletions
diff --git a/app/views/projects/milestones/_merge_request.html.haml b/app/views/projects/milestones/_merge_request.html.haml deleted file mode 100644 index a1033607c5d..00000000000 --- a/app/views/projects/milestones/_merge_request.html.haml +++ /dev/null @@ -1,8 +0,0 @@ -%li{ id: dom_id(merge_request, 'sortable'), class: 'mr-row', 'data-iid' => merge_request.iid, 'data-url' => merge_request_path(merge_request) } - %span.str-truncated - = link_to [@project.namespace.becomes(Namespace), @project, merge_request] do - %span.cgray ##{merge_request.iid} - = link_to_gfm merge_request.title, [@project.namespace.becomes(Namespace), @project, merge_request], title: merge_request.title - .pull-right.assignee-icon - - if merge_request.assignee - = image_tag avatar_icon(merge_request.assignee, 16), class: "avatar s16", alt: '' diff --git a/app/views/projects/milestones/_merge_requests.html.haml b/app/views/projects/milestones/_merge_requests.html.haml deleted file mode 100644 index 9a5a02af215..00000000000 --- a/app/views/projects/milestones/_merge_requests.html.haml +++ /dev/null @@ -1,5 +0,0 @@ -.panel.panel-default - .panel-heading= title - %ul{ class: "well-list merge_requests-sortable-list", id: "merge_requests-list-#{id}", "data-state" => id } - - merge_requests.sort_by(&:position).each do |merge_request| - = render 'merge_request', merge_request: merge_request diff --git a/app/views/projects/milestones/show.html.haml b/app/views/projects/milestones/show.html.haml index 2322946894e..02f330cce23 100644 --- a/app/views/projects/milestones/show.html.haml +++ b/app/views/projects/milestones/show.html.haml @@ -96,20 +96,7 @@ .tab-pane.active#tab-issues = render 'shared/milestones/issues_tab', unassigned: @issues.opened.unassigned, assigned: @issues.opened.assigned, closed: @issues.closed .tab-pane#tab-merge-requests - .row.prepend-top-default - .col-md-3 - = render('merge_requests', title: 'Work in progress (open and unassigned)', merge_requests: @merge_requests.opened.unassigned, id: 'unassigned') - .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: 'Rejected (closed)', merge_requests: @merge_requests.closed, 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 - + = render 'shared/milestones/merge_requests_tab', unassigned: @merge_requests.opened.unassigned, assigned: @merge_requests.opened.assigned, closed: @merge_requests.closed, merged: @merge_requests.merged .tab-pane#tab-participants %ul.bordered-list - @users.each do |user| |