BigW Consortium Gitlab

_mr_title.html.haml 2.2 KB
Newer Older
1 2
- can_update_merge_request = can?(current_user, :update_merge_request, @merge_request)

3 4
- if @merge_request.closed_without_fork?
  .alert.alert-danger
Katarzyna Kobierska committed
5
    %p The source project of this merge request has been removed.
6

7 8
.clearfix.detail-page-header
  .issuable-header
9
    .issuable-status-box.status-box{ class: status_box_class(@merge_request) }
10
      = icon(@merge_request.state_icon_name, class: "hidden-sm hidden-md hidden-lg")
11
      %span.hidden-xs
12 13 14 15
        = @merge_request.state_human_name

    %a.btn.btn-default.pull-right.visible-xs-block.gutter-toggle.issuable-gutter-toggle.js-sidebar-toggle{ href: "#" }
      = icon('angle-double-left')
16

17
    .issuable-meta
18
      = issuable_meta(@merge_request, @project, "Merge request")
19

20
  .issuable-actions.js-issuable-actions
21 22 23 24 25 26
    .clearfix.issue-btn-group.dropdown
      %button.btn.btn-default.pull-left.hidden-md.hidden-lg{ type: "button", data: { toggle: "dropdown" } }
        Options
        = icon('caret-down')
      .dropdown-menu.dropdown-menu-align-right.hidden-lg
        %ul
27 28
          - if can_update_merge_request
            %li= link_to 'Edit', edit_namespace_project_merge_request_path(@project.namespace, @project, @merge_request), class: 'issuable-edit'
29 30
          - unless current_user == @merge_request.author
            %li= link_to 'Report abuse', new_abuse_report_path(user_id: @merge_request.author.id, ref_url: merge_request_url(@merge_request))
31
          - if can_update_merge_request
32
            %li{ class: merge_request_button_visibility(@merge_request, true) }
33
              = link_to 'Close', merge_request_path(@merge_request, merge_request: { state_event: :close }), method: :put, title: 'Close merge request'
34
            %li{ class: merge_request_button_visibility(@merge_request, false) }
35
              = link_to 'Reopen', merge_request_path(@merge_request, merge_request: {state_event: :reopen }), method: :put, class: 'reopen-mr-link', title: 'Reopen merge request'
36 37 38 39 40

      - if can_update_merge_request
        = link_to 'Edit', edit_project_merge_request_path(@project, @merge_request), class: "hidden-xs hidden-sm btn btn-grouped issuable-edit"

      = render 'shared/issuable/close_reopen_button', issuable: @merge_request, can_update: can_update_merge_request