Commit 51ed8b7e authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'mr-widget-css' into 'master'

Style merge request CI widget to match MR/Issue box

![Screenshot 2014-10-07 15.13.12](https://dev.gitlab.org/uploads/dzaporozhets/gitlabhq/7208a92094/Screenshot_2014-10-07_15.13.12.png)

![Screenshot 2014-10-07 15.13.25](https://dev.gitlab.org/uploads/dzaporozhets/gitlabhq/f04d8d3f7b/Screenshot_2014-10-07_15.13.25.png)

See merge request !1158
parents dd005ca4 593a1b3b
...@@ -119,14 +119,6 @@ class MergeRequest ...@@ -119,14 +119,6 @@ class MergeRequest
else else
$('.ci_widget.ci-error').show() $('.ci_widget.ci-error').show()
switch state
when "success"
$('.mr-state-widget').addClass("panel-success")
when "failed"
$('.mr-state-widget').addClass("panel-danger")
when "running", "pending"
$('.mr-state-widget').addClass("panel-warning")
showCiCoverage: (coverage) -> showCiCoverage: (coverage) ->
cov_html = $('<span>') cov_html = $('<span>')
cov_html.addClass('ci-coverage') cov_html.addClass('ci-coverage')
......
...@@ -104,7 +104,44 @@ ...@@ -104,7 +104,44 @@
} }
.mr-state-widget { .mr-state-widget {
.panel-body { background: #f9f9f9;
margin-bottom: 20px;
@include box-shadow(0 1px 1px rgba(0, 0, 0, 0.09));
.ci_widget {
padding: 10px 15px;
font-size: 15px;
border-bottom: 1px dashed #AAA;
&.ci-success {
color: $bg_success;
border-color: $border_success;
}
&.ci-pending {
color: #548;
border-color: #548;
}
&.ci-running {
color: $bg_warning;
border-color: $border_warning;
}
&.ci-failed {
color: $bg_danger;
border-color: $border_danger;
}
&.ci-error {
color: $bg_danger;
border-color: $border_danger;
}
}
.mr-widget-body {
padding: 10px 15px;
h4 { h4 {
margin-top: 0px; margin-top: 0px;
} }
...@@ -114,6 +151,11 @@ ...@@ -114,6 +151,11 @@
} }
} }
.mr-widget-footer {
padding: 10px 15px;
border-top: 1px solid #EEE;
}
.ci-coverage { .ci-coverage {
float: right; float: right;
} }
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
= link_to "Build page", ci_build_details_path(@merge_request) = link_to "Build page", ci_build_details_path(@merge_request)
.ci_widget .ci_widget
%strong
%i.fa.fa-spinner %i.fa.fa-spinner
Checking for CI status for #{@merge_request.last_commit_short_sha} Checking for CI status for #{@merge_request.last_commit_short_sha}
......
.panel.mr-state-widget.panel-default .mr-state-widget
- if @merge_request.source_project.ci_service && @commits.any? - if @merge_request.source_project.ci_service && @commits.any?
.panel-heading .mr-widget-heading
= render "projects/merge_requests/show/mr_ci" = render "projects/merge_requests/show/mr_ci"
.panel-body .mr-widget-body
- if @merge_request.open? - if @merge_request.open?
- if @merge_request.source_branch_exists? && @merge_request.target_branch_exists? - if @merge_request.source_branch_exists? && @merge_request.target_branch_exists?
= render "projects/merge_requests/show/mr_accept" = render "projects/merge_requests/show/mr_accept"
...@@ -31,8 +31,8 @@ ...@@ -31,8 +31,8 @@
%br %br
Try to use different branches or push new code. Try to use different branches or push new code.
- if !@closes_issues.empty? && @merge_request.open? - if @closes_issues.present? && @merge_request.open?
.panel-footer .mr-widget-footer
%span %span
%i.fa.fa-check %i.fa.fa-check
Accepting this merge request will close #{@closes_issues.size == 1 ? 'issue' : 'issues'} Accepting this merge request will close #{@closes_issues.size == 1 ? 'issue' : 'issues'}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment