From a908edacacb4d6465b3d4cf4b99f3ecaf08eb8be Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Fri, 19 Apr 2013 21:50:37 +0300 Subject: [PATCH] Show CI status even for closed MR. Use green bg for "Merged by username" message and red for closed one --- app/views/merge_requests/show/_mr_box.html.haml | 10 ++++++---- app/views/merge_requests/show/_mr_ci.html.haml | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/app/views/merge_requests/show/_mr_box.html.haml b/app/views/merge_requests/show/_mr_box.html.haml index 3b54f613f58..a9c7e993b05 100644 --- a/app/views/merge_requests/show/_mr_box.html.haml +++ b/app/views/merge_requests/show/_mr_box.html.haml @@ -1,13 +1,13 @@ .ui-box.ui-box-show .ui-box-head %h4.box-title + = gfm escape_once(@merge_request.title) - if @merge_request.merged? .error.status_info %i.icon-ok Merged - elsif @merge_request.closed? .error.status_info Closed - = gfm escape_once(@merge_request.title) .ui-box-body %div @@ -22,13 +22,15 @@ - if @merge_request.closed? - .ui-box-bottom + .ui-box-bottom.alert-error %span + %i.icon-remove Closed by #{link_to_member(@project, @merge_request.closed_event.author)} %small #{time_ago_in_words(@merge_request.closed_event.created_at)} ago. - if @merge_request.merged? - .ui-box-bottom + .ui-box-bottom.alert-success %span + %i.icon-ok Merged by #{link_to_member(@project, @merge_request.merge_event.author)} - %small #{time_ago_in_words(@merge_request.merge_event.created_at)} ago. + #{time_ago_in_words(@merge_request.merge_event.created_at)} ago. diff --git a/app/views/merge_requests/show/_mr_ci.html.haml b/app/views/merge_requests/show/_mr_ci.html.haml index a8faa6ba617..9b15c4526e9 100644 --- a/app/views/merge_requests/show/_mr_ci.html.haml +++ b/app/views/merge_requests/show/_mr_ci.html.haml @@ -1,4 +1,4 @@ -- if @merge_request.opened? && @commits.any? +- if @commits.any? .ci_widget.ci-success{style: "display:none"} .alert.alert-success %i.icon-ok