Simplify issue-box style

This commit is contained in:
Dmitriy Zaporozhets 2014-05-31 00:41:11 +03:00
parent e02aec6627
commit 1a97db413b
4 changed files with 23 additions and 38 deletions

View file

@ -17,52 +17,36 @@
&.issue-box-closed {
border-color: $border_danger;
.state {
background-color: $bg_light_danger;
background-color: $bg_danger;
color: #FFF;
border-color: $border_danger;
color: $color_danger;
.state-label {
background-color: $bg_danger;
color: #FFF;
}
}
}
&.issue-box-merged {
border-color: $border_primary;
.state {
background-color: $bg_light_primary;
background-color: $bg_primary;
color: #FFF;
border-color: $border_primary;
color: $color_primary;
.state-label {
background-color: $bg_primary;
color: #FFF;
}
}
}
&.issue-box-open {
border-color: $border_success;
.state {
background-color: $bg_light_success;
border-color: $border_success;
color: $color_success;
.state-label {
background-color: $bg_success;
color: #FFF;
}
background-color: $bg_success;
color: #FFF;
}
}
&.issue-box-expired {
border-color: #cea61b;
.state {
background-color: #fcf8e3;
border-color: #faebcc;
color: #8a6d3b;
.state-label {
background: #cea61b;
color: #FFF;
}
background: #cea61b;
color: #FFF;
}
}
@ -72,7 +56,7 @@
.state {
border-bottom: 1px solid #DDD;
line-height: 32px;
padding: 10px 25px;
}
.title {
@ -115,14 +99,15 @@
.state-label {
font-size: 14px;
padding: 1px 25px;
text-align: center;
text-shadow: none;
display: inline-block;
line-height: 34px;
float: left;
font-weight: bold;
}
.creator {
padding: 2px 15px;
float: right;
a {
color: #FFF;
text-decoration: underline;
}
}
}

View file

@ -32,13 +32,13 @@
.issue-box{ class: issue_box_class(@issue) }
.state.clearfix
.state-label.col-sm-2.col-xs-12
.state-label
- if @issue.closed?
Closed
- else
Open
%span.creator.col-sm-9.col-xs-12
.creator
Created by #{link_to_member(@project, @issue.author)} #{time_ago_with_tooltip(@issue.created_at)}
%h4.title
@ -73,4 +73,4 @@
= label.name
 
.voting_notes#notes= render "projects/notes/notes_with_form"
.voting_notes#notes= render "projects/notes/notes_with_form"

View file

@ -1,6 +1,6 @@
.issue-box{ class: issue_box_class(@merge_request) }
.state.clearfix
%span.state-label.col-sm-2.col-xs-12
.state-label
- if @merge_request.merged?
Merged
- elsif @merge_request.closed?
@ -8,7 +8,7 @@
- else
Open
%span.creator.col-sm-9.col-xs-12
.creator
Created by #{link_to_member(@project, @merge_request.author)} #{time_ago_with_tooltip(@merge_request.created_at)}
%h4.title

View file

@ -22,14 +22,14 @@
.issue-box{ class: issue_box_class(@milestone) }
.state.clearfix
.state-label.col-sm-2.col-xs-12
.state-label
- if @milestone.closed?
Closed
- elsif @milestone.expired?
Expired
- else
Open
%span.creator.col-sm-9.col-xs-12
.creator
= @milestone.expires_at
%h4.title