BigW Consortium Gitlab

_merge_requests.html.haml 1.4 KB
Newer Older
1
- if @merge_requests.any?
2 3
  %h2.merge-requests-title
    = pluralize(@merge_requests.count, 'Related Merge Request')
4
  %ul.unstyled-list.related-merge-requests
5
    - has_any_ci = @merge_requests.any?(&:head_pipeline)
6 7 8
    - @merge_requests.each do |merge_request|
      %li
        %span.merge-request-ci-status
9 10
          - if merge_request.head_pipeline
            = render_pipeline_status(merge_request.head_pipeline)
11 12 13
          - elsif has_any_ci
            = icon('blank fw')
        %span.merge-request-id
Phil Hughes committed
14
          = merge_request.to_reference
15 16 17
        %span.merge-request-info
          %strong
            = link_to_gfm merge_request.title, merge_request_path(merge_request), class: "row_title"
18 19 20 21
          - unless @issue.project.id == merge_request.target_project.id
            in
            - project = merge_request.target_project
            = link_to project.name_with_namespace, namespace_project_path(project.namespace, project)
22 23 24 25 26 27 28 29 30 31 32

        - if merge_request.merged?
          %span.merge-request-status.prepend-left-10.merged
            Merged
        - elsif merge_request.closed?
          %span.merge-request-status.prepend-left-10.closed
            Closed
        - else
          %span.merge-request-status.prepend-left-10.open
            Open

33 34 35
    - if @closed_by_merge_requests.present?
      %li
        = render partial: 'projects/issues/closed_by_box', locals: {merge_request_count: @merge_requests.count}