_merge_request.html.haml 1.24 KB
Newer Older
1
%li.wll{ class: mr_css_classes(merge_request) }
2 3
  .right
    .left
4
      - if merge_request.merged?
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
5
        %span.btn.small.disabled.grouped
6 7 8
          %strong
            %i.icon-ok
            = "MERGED"
9
      - if merge_request.notes.any?
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
10
        %span.btn.small.disabled.grouped
randx's avatar
randx committed
11 12
          %i.icon-comment
          = merge_request.notes.count
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
13
      %span.btn.small.disabled.grouped
14 15 16
        = merge_request.source_branch
        →
        = merge_request.target_branch
17
  = image_tag gravatar_icon(merge_request.author_email), class: "avatar"
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
18

19
  %p= link_to_gfm truncate(merge_request.title, length: 80), project_merge_request_path(merge_request.project, merge_request), class: "row_title"
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
20

Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
21
  %span.update-author
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
22 23
    %small.cdark= "##{merge_request.id}"
    authored by #{merge_request.author_name}
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
24 25
    = time_ago_in_words(merge_request.created_at)
    ago
Riyad Preukschas's avatar
Riyad Preukschas committed
26 27 28 29 30 31 32 33 34
    - if merge_request.votes_count > 0
      .votes.votes-inline
        .upvotes= merge_request.upvotes
        .progress
          - up_percent = 100.0/merge_request.votes_count*merge_request.upvotes
          - down_percent = 100.0-up_percent
          .bar.bar-success{style: "width: #{up_percent}%;"}
          .bar.bar-danger{style: "width: #{down_percent}%;"}
        .downvotes= merge_request.downvotes