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

26 lines
1.1 KiB
Text
Raw Normal View History

2019-05-18 00:54:41 +05:30
- note_count = @issuable_meta_data[issuable.id].user_notes_count
2017-08-17 22:00:37 +05:30
- 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-11-08 19:23:39 +05:30
%li.issuable-mr.d-none.d-sm-block.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-11-08 19:23:39 +05:30
%li.issuable-upvotes.d-none.d-sm-block.has-tooltip{ title: _('Upvotes') }
2017-08-17 22:00:37 +05:30
= icon('thumbs-up')
= upvotes
- if downvotes > 0
2018-11-08 19:23:39 +05:30
%li.issuable-downvotes.d-none.d-sm-block.has-tooltip{ title: _('Downvotes') }
2017-08-17 22:00:37 +05:30
= icon('thumbs-down')
= downvotes
2018-11-08 19:23:39 +05:30
%li.issuable-comments.d-none.d-sm-block
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