From d0a56e228018b72b30598ca5b4c744d57d8f1f3e Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Fri, 3 Jan 2014 23:28:00 +0200 Subject: [PATCH] Move labels css to gl_bootstrap. Fixed label rendering --- app/assets/stylesheets/generic/common.scss | 17 ----------------- app/assets/stylesheets/gl_bootstrap.scss | 19 +++++++++++++++++++ app/helpers/labels_helper.rb | 4 ++-- app/views/shared/_project_filter.html.haml | 5 +++-- 4 files changed, 24 insertions(+), 21 deletions(-) diff --git a/app/assets/stylesheets/generic/common.scss b/app/assets/stylesheets/generic/common.scss index 156130c..a692628 100644 --- a/app/assets/stylesheets/generic/common.scss +++ b/app/assets/stylesheets/generic/common.scss @@ -85,23 +85,6 @@ pre.well-pre { @include box-shadow(inset 0 2px 4px rgba(0,0,0,.15)); } -.label { - padding: 2px 4px; - font-size: 12px; - font-style: normal; - font-weight: normal; - - &.label-gray { - background-color: #eee; - color: #999; - text-shadow: none; - } - - &.label-inverse { - background-color: #333333; - } -} - /** Big Labels **/ .state-label { font-size: 14px; diff --git a/app/assets/stylesheets/gl_bootstrap.scss b/app/assets/stylesheets/gl_bootstrap.scss index 2f2c3bf..19cb1c4 100644 --- a/app/assets/stylesheets/gl_bootstrap.scss +++ b/app/assets/stylesheets/gl_bootstrap.scss @@ -74,3 +74,22 @@ } @import "bootstrap/responsive-utilities"; + +// Labels +.label { + padding: 2px 4px; + font-size: 12px; + font-style: normal; + font-weight: normal; + display: inline-block; + + &.label-gray { + background-color: #eee; + color: #999; + text-shadow: none; + } + + &.label-inverse { + background-color: #333333; + } +} diff --git a/app/helpers/labels_helper.rb b/app/helpers/labels_helper.rb index 9a6aea8..d1eb380 100644 --- a/app/helpers/labels_helper.rb +++ b/app/helpers/labels_helper.rb @@ -16,11 +16,11 @@ module LabelsHelper when *klass.warning_labels 'label-warning' when *klass.neutral_labels - 'label-inverse' + 'label-primary' when *klass.positive_labels 'label-success' when *klass.important_labels - 'label-important' + 'label-danger' else 'label-info' end diff --git a/app/views/shared/_project_filter.html.haml b/app/views/shared/_project_filter.html.haml index 230076e..0509cd4 100644 --- a/app/views/shared/_project_filter.html.haml +++ b/app/views/shared/_project_filter.html.haml @@ -1,7 +1,7 @@ .side-filters.hidden-xs.hidden-sm = form_tag project_entities_path, method: 'get' do - %fieldset - - if current_user + - if current_user + %fieldset %ul.nav.nav-pills.nav-stacked %li{class: ("active" if params[:scope].blank?)} = link_to project_filter_path(scope: nil) do @@ -13,6 +13,7 @@ = link_to project_filter_path(scope: 'created-by-me') do Created by me + %fieldset %ul.nav.nav-pills.nav-stacked %li{class: ("active" if params[:state].blank?)} = link_to project_filter_path(state: nil) do -- libgit2 0.21.2