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