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

26 lines
1 KiB
Text
Raw Normal View History

2019-07-07 11:18:12 +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
2019-10-12 21:52:04 +05:30
- issuable_path = issuable_path(issuable, anchor: 'notes')
2019-07-07 11:18:12 +05:30
- issuable_mr = @issuable_meta_data[issuable.id].merge_requests_count(current_user)
2017-08-17 22:00:37 +05:30
- 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
2019-10-12 21:52:04 +05:30
= link_to issuable_path, class: ['has-tooltip', ('no-comments' if note_count.zero?)], title: _('Comments') do
2017-08-17 22:00:37 +05:30
= icon('comments')
= note_count