_mr_title.html.haml 1.77 KB
Newer Older
1
%h3.page-title
2
3
  = "Merge Request ##{@merge_request.iid}"

4
  %span.pull-right.issue-btn-group
5
    - if can?(current_user, :modify_merge_request, @merge_request)
6
      - if @merge_request.open?
7
8
        .btn-group.pull-left
          %a.btn.btn-grouped.dropdown-toggle{ data: {toggle: :dropdown} }
9
10
11
12
13
14
15
            %i.icon-download-alt
            Download as
            %span.caret
          %ul.dropdown-menu
            %li= link_to "Email Patches", project_merge_request_path(@project, @merge_request, format: :patch)
            %li= link_to "Plain Diff",    project_merge_request_path(@project, @merge_request, format: :diff)

16
        = link_to 'Close', project_merge_request_path(@project, @merge_request, merge_request: { state_event: :close }), method: :put, class: "btn btn-grouped btn-close", title: "Close merge request"
17

18
        = link_to edit_project_merge_request_path(@project, @merge_request), class: "btn btn-grouped", id:"edit_merge_request" do
19
20
          %i.icon-edit
          Edit
21
22
      - if @merge_request.closed?
        = link_to 'Reopen', project_merge_request_path(@project, @merge_request, merge_request: {state_event: :reopen }), method: :put, class: "btn btn-grouped btn-reopen reopen-mr-link", title: "Close merge request"
23

Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
24
.votes-holder.hidden-sm.hidden-xs
25
  #votes= render 'votes/votes_block', votable: @merge_request
26

27
.back-link
28
29
  = link_to project_merge_requests_path(@project) do
    ← To merge requests
30
31
32
33
34
35
36
37
38
39
40
41

  %span.prepend-left-20.monospace
    -if @merge_request.for_fork?
      %span
        %strong
          #{truncate(@merge_request.source_project_path, length: 25)}:
        #{@merge_request.source_branch}
      →
      %span= @merge_request.target_branch
    - else
      %span= @merge_request.source_branch
      →
42
      %span= @merge_request.target_branch