From eb3e7bdfd87f97e28f9a0d4cf0ac8b913e0055bf Mon Sep 17 00:00:00 2001 From: Jacob Schatz Date: Tue, 12 Jan 2016 08:40:02 -0500 Subject: merge request close message moved and merge request now refered by `!`. --- app/assets/stylesheets/framework/variables.scss | 1 + app/assets/stylesheets/pages/issues.scss | 5 +++++ app/views/projects/issues/_closed_by_box.html.haml | 4 ++-- app/views/projects/issues/_merge_requests.html.haml | 4 +++- app/views/projects/issues/show.html.haml | 3 --- 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/app/assets/stylesheets/framework/variables.scss b/app/assets/stylesheets/framework/variables.scss index af75123b0af..4c307d705e9 100644 --- a/app/assets/stylesheets/framework/variables.scss +++ b/app/assets/stylesheets/framework/variables.scss @@ -24,6 +24,7 @@ $gl-gray: #5a5a5a; $gl-padding: 16px; $gl-padding-top:10px; $gl-avatar-size: 46px; +$quote-gray: #7f8fa4; /* * Color schema diff --git a/app/assets/stylesheets/pages/issues.scss b/app/assets/stylesheets/pages/issues.scss index a02a3a72e79..30dfc0b3904 100644 --- a/app/assets/stylesheets/pages/issues.scss +++ b/app/assets/stylesheets/pages/issues.scss @@ -144,3 +144,8 @@ form.edit-issue { .issue-form .select2-container { width: 250px !important; } + +.issue-closed-by-widget { + color: $quote-gray; + margin-left: 52px; +} \ No newline at end of file diff --git a/app/views/projects/issues/_closed_by_box.html.haml b/app/views/projects/issues/_closed_by_box.html.haml index de415ae51a4..c434ad41f89 100644 --- a/app/views/projects/issues/_closed_by_box.html.haml +++ b/app/views/projects/issues/_closed_by_box.html.haml @@ -1,2 +1,2 @@ -.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 + When this merge request 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..e3b41bca815 100644 --- a/app/views/projects/issues/_merge_requests.html.haml +++ b/app/views/projects/issues/_merge_requests.html.haml @@ -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 'projects/issues/closed_by_box' 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 -- cgit v1.2.1 From 0bb37c1ff21302c139061e133f8683013b33b155 Mon Sep 17 00:00:00 2001 From: Jacob Schatz Date: Tue, 12 Jan 2016 20:49:43 -0500 Subject: makes message plural for multiple MRs and removes from loop. Duh. --- app/assets/stylesheets/framework/lists.scss | 6 +++++- app/views/projects/issues/_closed_by_box.html.haml | 4 +++- app/views/projects/issues/_merge_requests.html.haml | 6 +++--- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/app/assets/stylesheets/framework/lists.scss b/app/assets/stylesheets/framework/lists.scss index 1c74e525a60..bbdb1c038c5 100644 --- a/app/assets/stylesheets/framework/lists.scss +++ b/app/assets/stylesheets/framework/lists.scss @@ -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; diff --git a/app/views/projects/issues/_closed_by_box.html.haml b/app/views/projects/issues/_closed_by_box.html.haml index c434ad41f89..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.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. diff --git a/app/views/projects/issues/_merge_requests.html.haml b/app/views/projects/issues/_merge_requests.html.haml index e3b41bca815..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 @@ -24,5 +24,5 @@ MERGED - elsif merge_request.closed? CLOSED - - if @closed_by_merge_requests.present? - = render 'projects/issues/closed_by_box' + - if @closed_by_merge_requests.present? + = render partial: 'projects/issues/closed_by_box', locals: {merge_request_count: @merge_requests.count} -- cgit v1.2.1 From e74e03fa66d9cfc05ab70a5fef42bdb8f297ed1b Mon Sep 17 00:00:00 2001 From: Jacob Schatz Date: Tue, 12 Jan 2016 20:51:13 -0500 Subject: changes `$quote-gray` to `$secondary-text` --- app/assets/stylesheets/framework/variables.scss | 2 +- app/assets/stylesheets/pages/issues.scss | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/framework/variables.scss b/app/assets/stylesheets/framework/variables.scss index 4c307d705e9..d0ff3248ce1 100644 --- a/app/assets/stylesheets/framework/variables.scss +++ b/app/assets/stylesheets/framework/variables.scss @@ -24,7 +24,7 @@ $gl-gray: #5a5a5a; $gl-padding: 16px; $gl-padding-top:10px; $gl-avatar-size: 46px; -$quote-gray: #7f8fa4; +$secondary-text: #7f8fa4; /* * Color schema diff --git a/app/assets/stylesheets/pages/issues.scss b/app/assets/stylesheets/pages/issues.scss index 30dfc0b3904..1e1af662850 100644 --- a/app/assets/stylesheets/pages/issues.scss +++ b/app/assets/stylesheets/pages/issues.scss @@ -146,6 +146,6 @@ form.edit-issue { } .issue-closed-by-widget { - color: $quote-gray; + color: $secondary-text; margin-left: 52px; } \ No newline at end of file -- cgit v1.2.1