better mentioned but not closing message and icon

This commit is contained in:
Gabriel Gizotti 2016-11-25 06:46:16 +10:00
parent 80915c35f4
commit c1515cd865
2 changed files with 2 additions and 9 deletions

View File

@ -63,13 +63,6 @@ module MergeRequestsHelper
@mr_issues_mentioned_but_not_closing ||= @merge_request.issues_mentioned_but_not_closing
end
def mr_issues_mentioned_but_not_closing_message
verb = mr_issues_mentioned_but_not_closing.size > 1 ? 'are' : 'is'
issue_text = 'issue'.pluralize(mr_issues_mentioned_but_not_closing.size)
"The following #{issue_text} #{verb} mentioned but not being closed:"
end
def mr_change_branches_path(merge_request)
new_namespace_project_merge_request_path(
@project.namespace, @project,

View File

@ -33,8 +33,8 @@
- if mr_issues_mentioned_but_not_closing.present?
.mr-widget-footer
%span
%i.fa.fa-warning
= mr_issues_mentioned_but_not_closing_message
%i.fa.fa-info-circle
#{"Issue".pluralize(mr_issues_mentioned_but_not_closing.size)} mentioned but not being closed:
= succeed '.' do
!= markdown issues_sentence(mr_issues_mentioned_but_not_closing), pipeline: :gfm, author: @merge_request.author
= mr_assign_issues_link