debian-mirror-gitlab/app/views/projects/merge_requests/_approvals_count.html.haml

14 lines
602 B
Text
Raw Normal View History

2020-07-28 23:09:34 +05:30
- merge_request = local_assigns.fetch(:merge_request)
- self_approved = merge_request.approved_by?(current_user)
- total = merge_request.approvals.size
- if total > 0
- final_text = n_("%d approver", "%d approvers", total) % total
- final_self_text = n_("%d approver (you've approved)", "%d approvers (you've approved)", total) % total
2020-10-24 23:57:45 +05:30
- approval_icon = sprite_icon((self_approved ? 'approval-solid' : 'approval'), css_class: 'align-middle')
2020-07-28 23:09:34 +05:30
%li.d-none.d-sm-inline-block.has-tooltip.text-success{ title: self_approved ? final_self_text : final_text }
= approval_icon
= _("Approved")