OSDN Git Service

Nicer icons for enabled/disabled stuff
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Wed, 20 Nov 2013 12:05:42 +0000 (14:05 +0200)
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Wed, 20 Nov 2013 12:05:42 +0000 (14:05 +0200)
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
app/assets/stylesheets/gitlab_bootstrap/common.scss
app/helpers/icons_helper.rb
app/models/hipchat_service.rb
app/views/projects/services/_form.html.haml
app/views/projects/services/index.html.haml

index 018c8d9..c2787af 100644 (file)
@@ -1,5 +1,6 @@
 /** COLORS **/
 .cgray { color: gray }
+.clgray { color: #BBB }
 .cred { color: #D12F19 }
 .cgreen { color: #4a2 }
 .cblue { color: #29A }
index 41249a5..e4dfc23 100644 (file)
@@ -1,9 +1,9 @@
 module IconsHelper
   def boolean_to_icon(value)
     if value.to_s == "true"
-      content_tag :i, nil, class: 'icon-circle cgreen'
+      content_tag :i, nil, class: 'icon-ok cgreen'
     else
-      content_tag :i, nil, class: 'icon-circle cgray'
+      content_tag :i, nil, class: 'icon-off clgray'
     end
   end
 
index 7fec5c4..ea2169f 100644 (file)
@@ -25,7 +25,7 @@ class HipchatService < Service
   end
 
   def description
-    'Simple web-based real-time group chat'
+    'Private group chat and IM'
   end
 
   def to_param
index a099193..202bf32 100644 (file)
@@ -1,11 +1,6 @@
 %h3.page-title
-  - if @service.activated?
-    %span.cgreen
-      %i.icon-circle
-  - else
-    %span.cgray
-      %i.icon-circle-blank
   = @service.title
+  = boolean_to_icon @service.activated?
 
 %p= @service.description
 
index 82b85a1..190aa69 100644 (file)
@@ -6,12 +6,8 @@
   - @services.each do |service|
     %li
       %h4
-        - if service.activated?
-          %span.cgreen
-            %i.icon-circle
-        - else
-          %span.cgray
-            %i.icon-circle-blank
         = link_to edit_project_service_path(@project, service.to_param) do
           = service.title
+        .pull-right
+          = boolean_to_icon service.activated?
       %p= service.description