BigW Consortium Gitlab

_merged.html.haml 1.76 KB
Newer Older
1
.mr-state-widget
2
  = render 'projects/merge_requests/widget/heading'
3 4
  .mr-widget-body
    %h4
5
      Merged
6 7 8
      - if @merge_request.merge_event
        by #{link_to_member(@project, @merge_request.merge_event.author, avatar: true)}
        #{time_ago_with_tooltip(@merge_request.merge_event.created_at)}
9 10 11 12 13 14 15 16
    - if !@merge_request.source_branch_exists? || (params[:delete_source] == 'true')
      %p
        The changes were merged into
        #{link_to @merge_request.target_branch, namespace_project_commits_path(@project.namespace, @project, @merge_request.target_branch), class: "label-branch"}.
        The source branch has been removed.
      = render 'projects/merge_requests/widget/merged_buttons'
    - elsif @merge_request.can_remove_source_branch?(current_user)
      .remove_source_branch_widget
17 18 19
        %p
          The changes were merged into
          #{link_to @merge_request.target_branch, namespace_project_commits_path(@project.namespace, @project, @merge_request.target_branch), class: "label-branch"}.
20 21 22 23 24
          You can remove the source branch now.
        = render 'projects/merge_requests/widget/merged_buttons', source_branch_exists: true
      .remove_source_branch_widget.failed.hide
        %p
          Failed to remove source branch '#{@merge_request.source_branch}'.
25

26
      .remove_source_branch_in_progress.hide
27
        %p
28 29 30 31 32 33 34
          = icon('spinner spin')
          Removing source branch '#{@merge_request.source_branch}'. Please wait, this page will be automatically reloaded.
    - else
      %p
        The changes were merged into
        #{link_to @merge_request.target_branch, namespace_project_commits_path(@project.namespace, @project, @merge_request.target_branch), class: "label-branch"}.
      = render 'projects/merge_requests/widget/merged_buttons'