Commit 436e96467dba5ccbaa5ffef21f760f6441fe8a0f

Authored by Dmitriy Zaporozhets
1 parent b07c02eb

Nicer icons for enabled/disabled stuff

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
app/assets/stylesheets/gitlab_bootstrap/common.scss
1 /** COLORS **/ 1 /** COLORS **/
2 .cgray { color: gray } 2 .cgray { color: gray }
  3 +.clgray { color: #BBB }
3 .cred { color: #D12F19 } 4 .cred { color: #D12F19 }
4 .cgreen { color: #4a2 } 5 .cgreen { color: #4a2 }
5 .cblue { color: #29A } 6 .cblue { color: #29A }
app/helpers/icons_helper.rb
1 module IconsHelper 1 module IconsHelper
2 def boolean_to_icon(value) 2 def boolean_to_icon(value)
3 if value.to_s == "true" 3 if value.to_s == "true"
4 - content_tag :i, nil, class: 'icon-circle cgreen' 4 + content_tag :i, nil, class: 'icon-ok cgreen'
5 else 5 else
6 - content_tag :i, nil, class: 'icon-circle cgray' 6 + content_tag :i, nil, class: 'icon-off clgray'
7 end 7 end
8 end 8 end
9 9
app/models/hipchat_service.rb
@@ -25,7 +25,7 @@ class HipchatService &lt; Service @@ -25,7 +25,7 @@ class HipchatService &lt; Service
25 end 25 end
26 26
27 def description 27 def description
28 - 'Simple web-based real-time group chat' 28 + 'Private group chat and IM'
29 end 29 end
30 30
31 def to_param 31 def to_param
app/views/projects/services/_form.html.haml
1 %h3.page-title 1 %h3.page-title
2 - - if @service.activated?  
3 - %span.cgreen  
4 - %i.icon-circle  
5 - - else  
6 - %span.cgray  
7 - %i.icon-circle-blank  
8 = @service.title 2 = @service.title
  3 + = boolean_to_icon @service.activated?
9 4
10 %p= @service.description 5 %p= @service.description
11 6
app/views/projects/services/index.html.haml
@@ -6,12 +6,8 @@ @@ -6,12 +6,8 @@
6 - @services.each do |service| 6 - @services.each do |service|
7 %li 7 %li
8 %h4 8 %h4
9 - - if service.activated?  
10 - %span.cgreen  
11 - %i.icon-circle  
12 - - else  
13 - %span.cgray  
14 - %i.icon-circle-blank  
15 = link_to edit_project_service_path(@project, service.to_param) do 9 = link_to edit_project_service_path(@project, service.to_param) do
16 = service.title 10 = service.title
  11 + .pull-right
  12 + = boolean_to_icon service.activated?
17 %p= service.description 13 %p= service.description