Commit 436e9646 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Nicer icons for enabled/disabled stuff

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent b07c02eb
/** COLORS **/ /** COLORS **/
.cgray { color: gray } .cgray { color: gray }
.clgray { color: #BBB }
.cred { color: #D12F19 } .cred { color: #D12F19 }
.cgreen { color: #4a2 } .cgreen { color: #4a2 }
.cblue { color: #29A } .cblue { color: #29A }
......
module IconsHelper module IconsHelper
def boolean_to_icon(value) def boolean_to_icon(value)
if value.to_s == "true" if value.to_s == "true"
content_tag :i, nil, class: 'icon-circle cgreen' content_tag :i, nil, class: 'icon-ok cgreen'
else else
content_tag :i, nil, class: 'icon-circle cgray' content_tag :i, nil, class: 'icon-off clgray'
end end
end end
......
...@@ -25,7 +25,7 @@ class HipchatService < Service ...@@ -25,7 +25,7 @@ class HipchatService < Service
end end
def description def description
'Simple web-based real-time group chat' 'Private group chat and IM'
end end
def to_param def to_param
......
%h3.page-title %h3.page-title
- if @service.activated?
%span.cgreen
%i.icon-circle
- else
%span.cgray
%i.icon-circle-blank
= @service.title = @service.title
= boolean_to_icon @service.activated?
%p= @service.description %p= @service.description
......
...@@ -6,12 +6,8 @@ ...@@ -6,12 +6,8 @@
- @services.each do |service| - @services.each do |service|
%li %li
%h4 %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 = link_to edit_project_service_path(@project, service.to_param) do
= service.title = service.title
.pull-right
= boolean_to_icon service.activated?
%p= service.description %p= service.description
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment