_mr_title.html.haml 1.34 KB
Newer Older
1
2
.detail-page-header
  .status-box{ class: status_box_class(@merge_request) }
3
    = @merge_request.state_human_name
4
5
  %span.identifier
    Merge Request ##{@merge_request.iid}
6
7
  %span.creator
    ·
8
    opened by #{link_to_member(@project, @merge_request.author, size: 24)}
9
    ·
10
    = time_ago_with_tooltip(@merge_request.created_at)
11
12

  .issue-btn-group.pull-right
13
    - if can?(current_user, :update_merge_request, @merge_request)
14
      - if @merge_request.open?
Andriy Dyadyura's avatar
Andriy Dyadyura committed
15
16
        = link_to 'Close', merge_request_path(@merge_request, merge_request: { state_event: :close }), method: :put, class: 'btn btn-nr btn-grouped btn-close', title: 'Close merge request'
        = link_to edit_namespace_project_merge_request_path(@project.namespace, @project, @merge_request), class: 'btn btn-nr btn-grouped issuable-edit', id: 'edit_merge_request' do
17
18
19
          %i.fa.fa-pencil-square-o
          Edit
      - if @merge_request.closed?
20
21
22
        = link_to 'Reopen', merge_request_path(@merge_request, merge_request: {state_event: :reopen }), method: :put, class: 'btn btn-nr btn-grouped btn-reopen reopen-mr-link', title: "Reopen merge request"
      - if @merge_request.merged?
        = link_to 'Revert', revert_namespace_project_merge_request_path(@project.namespace, @project, @merge_request), method: :post, class: "btn btn-grouped btn-close", title: "Revert merge request"