summaryrefslogtreecommitdiff
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
parent58bf485d18fc94e86365e03f24a62cb46977bd50 (diff)
activity markup fixed
-rw-r--r--.gitignore1
-rw-r--r--helper.rb11
2 files changed, 10 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index f138bed..079637f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@ log/*
TODO
documentation/
*.*~
+.sass-cache
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