OSDN Git Service

Move labels css to gl_bootstrap. Fixed label rendering
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Fri, 3 Jan 2014 21:28:00 +0000 (23:28 +0200)
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Fri, 3 Jan 2014 21:28:00 +0000 (23:28 +0200)
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
app/assets/stylesheets/generic/common.scss
app/assets/stylesheets/gl_bootstrap.scss
app/helpers/labels_helper.rb
app/views/shared/_project_filter.html.haml

index 156130c..a692628 100644 (file)
@@ -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;
index 2f2c3bf..19cb1c4 100644 (file)
 }
 
 @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;
+  }
+}
index 9a6aea8..d1eb380 100644 (file)
@@ -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
index 230076e..0509cd4 100644 (file)
@@ -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