_show.html.haml 1.66 KB
Newer Older
1
.merge-request
2 3 4
  = render "projects/merge_requests/show/mr_title"
  = render "projects/merge_requests/show/how_to_merge"
  = render "projects/merge_requests/show/mr_box"
5 6 7 8 9
  - if @merge_request.opened?
    - if @merge_request.source_branch_exists? && @merge_request.target_branch_exists?
      = render "projects/merge_requests/show/mr_accept"
    - else
      = render "projects/merge_requests/show/no_accept"
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
10
  - if @merge_request.source_project.gitlab_ci?
11 12
    = render "projects/merge_requests/show/mr_ci"
  = render "projects/merge_requests/show/commits"
13

14
  - if @commits.present?
15
    %ul.nav.nav-tabs
16 17 18
      %li.notes-tab{data: {action: 'notes'}}
        = link_to project_merge_request_path(@project, @merge_request) do
          %i.icon-comment
19
          Discussion
20 21 22 23
      %li.diffs-tab{data: {action: 'diffs'}}
        = link_to diffs_project_merge_request_path(@project, @merge_request) do
          %i.icon-list-alt
          Diff
24

25
  .notes.tab-content.voting_notes#notes{ class: (controller.action_name == 'show') ? "" : "hide" }
26
    = render "projects/notes/notes_with_form"
27
  .diffs.tab-content
28 29
    - if current_page?(action: 'diffs')
      = render "projects/merge_requests/show/diffs"
30
  .status
31 32

:javascript
33
  var merge_request;
34

35 36 37 38 39 40 41 42
  merge_request = new MergeRequest({
    url_to_automerge_check: "#{automerge_check_project_merge_request_path(@project, @merge_request)}",
    check_enable: #{@merge_request.unchecked? ? "true" : "false"},
    url_to_ci_check: "#{ci_status_project_merge_request_path(@project, @merge_request)}",
    ci_enable: #{@project.gitlab_ci? ? "true" : "false"},
    current_status: "#{@merge_request.merge_status_name}",
    action: "#{controller.action_name}"
  });