debian-mirror-gitlab/app/views/shared/_issuable_meta_data.html.haml

26 lines
1 KiB
Text
Raw Normal View History

2017-08-17 22:00:37 +05:30
- note_count = @issuable_meta_data[issuable.id].notes_count
- issue_votes = @issuable_meta_data[issuable.id]
- upvotes, downvotes = issue_votes.upvotes, issue_votes.downvotes
- issuable_url = @collection_type == "Issue" ? issue_path(issuable, anchor: 'notes') : merge_request_path(issuable, anchor: 'notes')
- issuable_mr = @issuable_meta_data[issuable.id].merge_requests_count
- if issuable_mr > 0
2018-05-09 12:01:36 +05:30
%li.issuable-mr.hidden-xs.has-tooltip{ title: _('Related merge requests') }
2017-08-17 22:00:37 +05:30
= image_tag('icon-merge-request-unmerged.svg', class: 'icon-merge-request-unmerged')
= issuable_mr
- if upvotes > 0
2018-05-09 12:01:36 +05:30
%li.issuable-upvotes.hidden-xs.has-tooltip{ title: _('Upvotes') }
2017-08-17 22:00:37 +05:30
= icon('thumbs-up')
= upvotes
- if downvotes > 0
2018-05-09 12:01:36 +05:30
%li.issuable-downvotes.hidden-xs.has-tooltip{ title: _('Downvotes') }
2017-08-17 22:00:37 +05:30
= icon('thumbs-down')
= downvotes
2017-09-10 17:25:29 +05:30
%li.issuable-comments.hidden-xs
2018-05-09 12:01:36 +05:30
= link_to issuable_url, class: ['has-tooltip', ('no-comments' if note_count.zero?)], title: _('Comments') do
2017-08-17 22:00:37 +05:30
= icon('comments')
= note_count