_mr_accept.html.haml 3.44 KB
Newer Older
1
- unless @allowed_to_merge
2
  - if @project.archived?
3
    %p
4 5
      %strong Archived projects cannot be committed to!
  - else
6
    .automerge_widget.cannot_be_merged.hide
7 8
      %strong This request can't be merged automatically. Even if it could be merged, you don't have permission to do so.
    .automerge_widget.work_in_progress.hide
9
      %strong This request can't be accepted because it is marked a Work In Progress. Even if it could be accepted, you don't have permission to do so.
10
    .automerge_widget.can_be_merged.hide
11
      %strong This request can be merged automatically, but you don't have permission to do so.
12 13


14
- if @show_merge_controls
15
  .automerge_widget.can_be_merged.hide
16
    .clearfix
Vinnie Okada's avatar
Vinnie Okada committed
17
      = form_for [:automerge, @project.namespace.becomes(Namespace), @project, @merge_request], remote: true, method: :post do |f|
18 19 20 21
        .accept-merge-holder.clearfix.js-toggle-container
          .accept-action
            = f.submit "Accept Merge Request", class: "btn btn-create accept_merge_request"
          - if can_remove_branch?(@merge_request.source_project, @merge_request.source_branch) && !@merge_request.for_fork?
22
            .accept-control.checkbox
23
              = label_tag :should_remove_source_branch, class: "remove_source_checkbox" do
24 25 26 27 28 29 30 31 32 33
                = check_box_tag :should_remove_source_branch
                Remove source-branch
          .accept-control
            = link_to "#", class: "modify-merge-commit-link js-toggle-button", title: "Modify merge commit message" do
              %i.fa.fa-edit
              Modify commit message
          .js-toggle-content.hide.prepend-top-20
            = render 'shared/commit_message_container', params: params,
                text: @merge_request.merge_commit_message,
                rows: 14, hint: true
34

35
        %br
36 37 38 39
        .light
          If you still want to merge this request manually - use
          %strong
            = link_to "command line", "#modal_merge_info", class: "how_to_merge_link vlink", title: "How To Merge", "data-toggle" => "modal"
40

41

42
  .automerge_widget.no_satellite.hide
43
    %p
44
      %span
45
        %strong This repository does not have satellite. Ask an administrator to fix this issue
46

47
  .automerge_widget.cannot_be_merged.hide
48 49 50 51
    %h4
      This request can't be merged with GitLab.
      You should do it manually with
      %strong
52 53 54 55
        = link_to "#modal_merge_info", class: "underlined-link how_to_merge_link", title: "How To Merge", "data-toggle" => "modal" do
          command line

    %p
56
      %button.btn.disabled{:type => 'button'}
57 58 59
        %i.fa.fa-warning
        Accept Merge Request
       
60
      This usually happens when Git can not resolve conflicts between branches automatically.
61

62 63
  .automerge_widget.work_in_progress.hide
    %h4
64
      This request can't be accepted because it is marked a <strong>Work In Progress</strong>.
65 66

    %p
67
      %button.btn.disabled{:type => 'button'}
68 69 70 71
        %i.fa.fa-warning
        Accept Merge Request
      &nbsp;

72
      When the merge request is ready, remove the "WIP" prefix from the title to allow it to be accepted.
73

74
  .automerge_widget.unchecked
75
    %p
76
      %strong
77
        %i.fa.fa-spinner.fa-spin
78 79
        Checking for ability to automatically merge…

80
  .automerge_widget.already_cannot_be_merged.hide
81
    %p
82
      %strong This merge request can not be merged. Try to reload the page.
83

84
  .merge-in-progress.hide
85
    %p
86
      %i.fa.fa-spinner.fa-spin
87 88
      &nbsp;
      Merge is in progress. Please wait. Page will be automatically reloaded. &nbsp;