_show.html.haml 2.95 KB
Newer Older
1
- page_title "#{@merge_request.title} (##{@merge_request.iid})", "Merge Requests"
2 3
= render "header_title"

4 5 6
- if params[:view] == 'parallel'
  - fluid_layout true

7
.merge-request{'data-url' => merge_request_path(@merge_request)}
8
  .merge-request-details.issuable-details
9 10
    = render "projects/merge_requests/show/mr_title"
    = render "projects/merge_requests/show/mr_box"
11
    .append-bottom-default.mr-source-target.prepend-top-default
12
      - if @merge_request.open?
13 14 15 16 17 18 19 20 21 22 23 24 25 26
        .pull-right
          - if @merge_request.source_branch_exists?
            = link_to "#modal_merge_info", class: "btn btn-sm", "data-toggle" => "modal" do
              = icon('cloud-download fw')
              Check out branch

          %span.dropdown
            %a.btn.btn-sm.dropdown-toggle{ data: {toggle: :dropdown} }
              = icon('download')
              Download as
              %span.caret
            %ul.dropdown-menu
              %li= link_to "Email Patches", merge_request_path(@merge_request, format: :patch)
              %li= link_to "Plain Diff",    merge_request_path(@merge_request, format: :diff)
27
      .normal
28 29 30 31
        %span Request to merge
        %span.label-branch #{source_branch_with_namespace(@merge_request)}
        %span into
        %span.label-branch #{@merge_request.target_branch}
32

33
    = render "projects/merge_requests/show/how_to_merge"
34
    = render "projects/merge_requests/widget/show.html.haml"
35

36
    - if @merge_request.open? && @merge_request.can_be_merged?
37
      .light.append-bottom-20
38
        You can also accept this merge request manually using the
Douwe Maan's avatar
Douwe Maan committed
39 40
        = succeed '.' do
          = link_to "command line", "#modal_merge_info", class: "how_to_merge_link vlink", title: "How To Merge", "data-toggle" => "modal"
41

42
  - if @commits.present?
43
    %ul.merge-request-tabs.center-top-menu.no-top.no-bottom
44
      %li.notes-tab
45
        = link_to namespace_project_merge_request_path(@project.namespace, @project, @merge_request), data: {target: '#notes', action: 'notes', toggle: 'tab'} do
46
          Discussion
47
          %span.badge= @merge_request.mr_and_commit_notes.user.count
48
      %li.commits-tab
49
        = link_to commits_namespace_project_merge_request_path(@project.namespace, @project, @merge_request), data: {target: '#commits', action: 'commits', toggle: 'tab'} do
50 51
          Commits
          %span.badge= @commits.size
52
      %li.diffs-tab
53
        = link_to diffs_namespace_project_merge_request_path(@project.namespace, @project, @merge_request), data: {target: '#diffs', action: 'diffs', toggle: 'tab'} do
54 55 56
          Changes
          %span.badge= @merge_request.diffs.size

57 58 59 60
  .tab-content
    #notes.notes.tab-pane.voting_notes
      = render "projects/merge_requests/discussion"
    #commits.commits.tab-pane
61
      - # This tab is always loaded via AJAX
62
    #diffs.diffs.tab-pane
63
      - # This tab is always loaded via AJAX
64

65 66
  .mr-loading-status
    = spinner
67

68
:javascript
69
  var merge_request;
70

71 72 73
  merge_request = new MergeRequest({
    action: "#{controller.action_name}"
  });