_merge_request.html.haml 2.21 KB
Newer Older
1
%li{ class: mr_css_classes(merge_request) }
2
  .merge-request-title
3
    %span.merge-request-title-text
4
      = link_to_gfm merge_request.title, merge_request_path(merge_request), class: "row_title"
5
    .pull-right.light
6 7
      - if merge_request.ci_commit
        = render_ci_status(merge_request.ci_commit)
8 9
      - if merge_request.merged?
        %span
10
          = icon('check')
11
          MERGED
12 13
      - elsif merge_request.closed?
        %span
14
          = icon('ban')
15
          CLOSED
16
      - note_count = merge_request.mr_and_commit_notes.user.count
Stefan Tatschner's avatar
Stefan Tatschner committed
17 18
      - if merge_request.assignee
         
19
        = link_to_member(merge_request.source_project, merge_request.assignee, name: false, title: "Assigned to :name")
20
      - if note_count > 0
21
         
22 23
        = link_to merge_request_path(merge_request) + "#notes" do
          = icon('comments')
24
          = note_count
Stefan Tatschner's avatar
Stefan Tatschner committed
25 26
      - else
         
27 28
        = link_to merge_request_path(merge_request) + "#notes", class: "merge-request-no-comments" do
          = icon('comments')
Stefan Tatschner's avatar
Stefan Tatschner committed
29 30
          = 0

31
  .merge-request-info
32 33 34
    \##{merge_request.iid} ·
    opened #{time_ago_with_tooltip(merge_request.created_at, placement: 'bottom')}
    by #{link_to_member(@project, merge_request.author, avatar: false)}
35 36
    - if merge_request.target_project.default_branch != merge_request.target_branch
       
Douwe Maan's avatar
Douwe Maan committed
37 38
      = link_to namespace_project_commits_path(merge_request.project.namespace, merge_request.project, merge_request.target_branch) do
        = icon('code-fork')
39
        = merge_request.target_branch
Douwe Maan's avatar
Douwe Maan committed
40
    - if merge_request.milestone
Stefan Tatschner's avatar
Stefan Tatschner committed
41
       
42 43
      = link_to namespace_project_merge_requests_path(merge_request.project.namespace, merge_request.project, milestone_title: merge_request.milestone.title) do
        = icon('clock-o')
44
        = merge_request.milestone.title
45 46 47 48
    - if merge_request.labels.any?
       
      - merge_request.labels.each do |label|
        = link_to_label(label, project: merge_request.project)
49
    - if merge_request.tasks?
50
       
51 52
      %span.task-status
        = merge_request.task_status
53

54
    .pull-right.hidden-xs
55
      %span updated #{time_ago_with_tooltip(merge_request.updated_at, placement: 'bottom', html_class: 'merge_request_updated_ago')}