summaryrefslogtreecommitdiff
path: root/helper.rb
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.ch>2011-06-14 15:30:29 +0000
committerChristoph Helma <helma@in-silico.ch>2011-06-14 15:30:29 +0000
commit7b7f8e55b9863a513fad33faf96206a818ff19f2 (patch)
tree59e55234f82edde18ff64f823024307f22c7abdf /helper.rb
parent58bf485d18fc94e86365e03f24a62cb46977bd50 (diff)
activity markup fixed
Diffstat (limited to 'helper.rb')
-rw-r--r--helper.rb11
1 files changed, 9 insertions, 2 deletions
diff --git a/helper.rb b/helper.rb
index 2fe8785..2bbab30 100644
--- a/helper.rb
+++ b/helper.rb
@@ -66,8 +66,15 @@ helpers do
when /Float/
haml ".other #{sprintf('%.03g', activity)}", :layout => false
when /String/
- haml ".other #{activity.to_s}", :layout => false
- else
+ case activity
+ when "true"
+ haml ".active active", :layout => false
+ when "false"
+ haml ".inactive inactive", :layout => false
+ else
+ haml ".other #{activity.to_s}", :layout => false
+ end
+ else
if activity #true
haml ".active active", :layout => false
elsif !activity # false