Commit d0a56e228018b72b30598ca5b4c744d57d8f1f3e
1 parent
423ffe29
Exists in
spb-stable
and in
3 other branches
Move labels css to gl_bootstrap. Fixed label rendering
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing
4 changed files
with
24 additions
and
21 deletions
Show diff stats
app/assets/stylesheets/generic/common.scss
@@ -85,23 +85,6 @@ pre.well-pre { | @@ -85,23 +85,6 @@ pre.well-pre { | ||
85 | @include box-shadow(inset 0 2px 4px rgba(0,0,0,.15)); | 85 | @include box-shadow(inset 0 2px 4px rgba(0,0,0,.15)); |
86 | } | 86 | } |
87 | 87 | ||
88 | -.label { | ||
89 | - padding: 2px 4px; | ||
90 | - font-size: 12px; | ||
91 | - font-style: normal; | ||
92 | - font-weight: normal; | ||
93 | - | ||
94 | - &.label-gray { | ||
95 | - background-color: #eee; | ||
96 | - color: #999; | ||
97 | - text-shadow: none; | ||
98 | - } | ||
99 | - | ||
100 | - &.label-inverse { | ||
101 | - background-color: #333333; | ||
102 | - } | ||
103 | -} | ||
104 | - | ||
105 | /** Big Labels **/ | 88 | /** Big Labels **/ |
106 | .state-label { | 89 | .state-label { |
107 | font-size: 14px; | 90 | font-size: 14px; |
app/assets/stylesheets/gl_bootstrap.scss
@@ -74,3 +74,22 @@ | @@ -74,3 +74,22 @@ | ||
74 | } | 74 | } |
75 | 75 | ||
76 | @import "bootstrap/responsive-utilities"; | 76 | @import "bootstrap/responsive-utilities"; |
77 | + | ||
78 | +// Labels | ||
79 | +.label { | ||
80 | + padding: 2px 4px; | ||
81 | + font-size: 12px; | ||
82 | + font-style: normal; | ||
83 | + font-weight: normal; | ||
84 | + display: inline-block; | ||
85 | + | ||
86 | + &.label-gray { | ||
87 | + background-color: #eee; | ||
88 | + color: #999; | ||
89 | + text-shadow: none; | ||
90 | + } | ||
91 | + | ||
92 | + &.label-inverse { | ||
93 | + background-color: #333333; | ||
94 | + } | ||
95 | +} |
app/helpers/labels_helper.rb
@@ -16,11 +16,11 @@ module LabelsHelper | @@ -16,11 +16,11 @@ module LabelsHelper | ||
16 | when *klass.warning_labels | 16 | when *klass.warning_labels |
17 | 'label-warning' | 17 | 'label-warning' |
18 | when *klass.neutral_labels | 18 | when *klass.neutral_labels |
19 | - 'label-inverse' | 19 | + 'label-primary' |
20 | when *klass.positive_labels | 20 | when *klass.positive_labels |
21 | 'label-success' | 21 | 'label-success' |
22 | when *klass.important_labels | 22 | when *klass.important_labels |
23 | - 'label-important' | 23 | + 'label-danger' |
24 | else | 24 | else |
25 | 'label-info' | 25 | 'label-info' |
26 | end | 26 | end |
app/views/shared/_project_filter.html.haml
1 | .side-filters.hidden-xs.hidden-sm | 1 | .side-filters.hidden-xs.hidden-sm |
2 | = form_tag project_entities_path, method: 'get' do | 2 | = form_tag project_entities_path, method: 'get' do |
3 | - %fieldset | ||
4 | - - if current_user | 3 | + - if current_user |
4 | + %fieldset | ||
5 | %ul.nav.nav-pills.nav-stacked | 5 | %ul.nav.nav-pills.nav-stacked |
6 | %li{class: ("active" if params[:scope].blank?)} | 6 | %li{class: ("active" if params[:scope].blank?)} |
7 | = link_to project_filter_path(scope: nil) do | 7 | = link_to project_filter_path(scope: nil) do |
@@ -13,6 +13,7 @@ | @@ -13,6 +13,7 @@ | ||
13 | = link_to project_filter_path(scope: 'created-by-me') do | 13 | = link_to project_filter_path(scope: 'created-by-me') do |
14 | Created by me | 14 | Created by me |
15 | 15 | ||
16 | + %fieldset | ||
16 | %ul.nav.nav-pills.nav-stacked | 17 | %ul.nav.nav-pills.nav-stacked |
17 | %li{class: ("active" if params[:state].blank?)} | 18 | %li{class: ("active" if params[:state].blank?)} |
18 | = link_to project_filter_path(state: nil) do | 19 | = link_to project_filter_path(state: nil) do |