makes message plural for multiple MRs and removes from loop. Duh.

This commit is contained in:
Jacob Schatz 2016-01-12 20:49:43 -05:00
parent eb3e7bdfd8
commit 0bb37c1ff2
3 changed files with 11 additions and 5 deletions

View file

@ -74,7 +74,7 @@
/** light list with border-bottom between li **/
ul.bordered-list {
ul.bordered-list, ul.unstyled-list {
@include basic-list;
&.top-list {
@ -88,6 +88,10 @@ ul.bordered-list {
}
}
ul.unstyled-list > li {
border-bottom: none;
}
ul.task-list {
li.task-list-item {
list-style-type: none;

View file

@ -1,2 +1,4 @@
.issue-closed-by-widget.second-block
When this merge request is accepted, this issue will be closed automatically.
- pluralized_mr_this = merge_request_count > 1 ? "these" : "this"
- pluralized_mr_is = merge_request_count > 1 ? "are" : "is"
When #{pluralized_mr_this} merge #{"request".pluralize(merge_request_count)} #{pluralized_mr_is} accepted, this issue will be closed automatically.

View file

@ -1,7 +1,7 @@
-if @merge_requests.any?
%h2.merge-requests-title
= pluralize(@merge_requests.count, 'Related Merge Request')
%ul.bordered-list
%ul.unstyled-list
- has_any_ci = @merge_requests.any?(&:ci_commit)
- @merge_requests.each do |merge_request|
%li
@ -25,4 +25,4 @@
- elsif merge_request.closed?
CLOSED
- if @closed_by_merge_requests.present?
= render 'projects/issues/closed_by_box'
= render partial: 'projects/issues/closed_by_box', locals: {merge_request_count: @merge_requests.count}