diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-01-13 09:23:23 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-01-13 09:23:23 +0000 |
commit | 777771db280d512a8eded5e170f1ea3a2356729f (patch) | |
tree | 53df583fb1027565c590e30293458cd5cf57ba21 /app/views | |
parent | 2d865213cba628b5baefc7181bf7cf3a8897f0fd (diff) | |
parent | e74e03fa66d9cfc05ab70a5fef42bdb8f297ed1b (diff) | |
download | gitlab-ce-777771db280d512a8eded5e170f1ea3a2356729f.tar.gz |
Merge branch 'referenced-merge-requests' into 'master'
merge request close message moved and merge request now refered by `!`.
Fixes #4161
![Screen_Shot_2016-01-12_at_8.38.57_AM](/uploads/9390ce0ebd1d14bfc83130ff4913a823/Screen_Shot_2016-01-12_at_8.38.57_AM.png)
See merge request !2387
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/projects/issues/_closed_by_box.html.haml | 6 | ||||
-rw-r--r-- | app/views/projects/issues/_merge_requests.html.haml | 6 | ||||
-rw-r--r-- | app/views/projects/issues/show.html.haml | 3 |
3 files changed, 8 insertions, 7 deletions
diff --git a/app/views/projects/issues/_closed_by_box.html.haml b/app/views/projects/issues/_closed_by_box.html.haml index de415ae51a4..38469ed4774 100644 --- a/app/views/projects/issues/_closed_by_box.html.haml +++ b/app/views/projects/issues/_closed_by_box.html.haml @@ -1,2 +1,4 @@ -.issue-closed-by-widget.gray-content-block.second-block.white - This issue will be closed automatically when merge request #{markdown(merge_requests_sentence(@closed_by_merge_requests), pipeline: :gfm)} is accepted. +.issue-closed-by-widget.second-block + - 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. diff --git a/app/views/projects/issues/_merge_requests.html.haml b/app/views/projects/issues/_merge_requests.html.haml index 254968e4f67..640a1962ffc 100644 --- a/app/views/projects/issues/_merge_requests.html.haml +++ b/app/views/projects/issues/_merge_requests.html.haml @@ -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 @@ -11,7 +11,7 @@ - elsif has_any_ci = icon('blank fw') %span.merge-request-id - \##{merge_request.iid} + \!#{merge_request.iid} %span.merge-request-info %strong = link_to_gfm merge_request.title, merge_request_path(merge_request), class: "row_title" @@ -24,3 +24,5 @@ MERGED - elsif merge_request.closed? CLOSED + - if @closed_by_merge_requests.present? + = render partial: 'projects/issues/closed_by_box', locals: {merge_request_count: @merge_requests.count} diff --git a/app/views/projects/issues/show.html.haml b/app/views/projects/issues/show.html.haml index f931a0d3b92..7ed898ce72f 100644 --- a/app/views/projects/issues/show.html.haml +++ b/app/views/projects/issues/show.html.haml @@ -53,9 +53,6 @@ .gray-content-block.second-block.oneline-block = render 'votes/votes_block', votable: @issue - - if @closed_by_merge_requests.present? - = render 'projects/issues/closed_by_box' - .row %section.col-md-9 .issuable-discussion |