Applied patch from Jeremy Harper to add the tag name to the span tag surrounding it in the action output. This allows for fun with CSS colors if you're so inclined. Closes #562.

git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@595 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
lukemelia 2007-09-21 05:58:36 +00:00
parent abbe01d115
commit 7728ea00d4

View file

@ -72,7 +72,8 @@ module TodosHelper
end
def tag_list
tag_list = @todo.tags.reject{|t| t.name == Todo::STARRED_TAG_NAME}.collect{|t| "<span class=\"tag\">" + link_to(t.name, :action => "tag", :id => t.name) + "</span>"}.join('')
tags_except_starred = @todo.tags.reject{|t| t.name == Todo::STARRED_TAG_NAME}
tag_list = tags_except_starred.collect{|t| "<span class=\"tag #{t.name.gsub(' ','-')}\">" + link_to(t.name, :action => "tag", :id => t.name) + "</span>"}.join('')
"<span class='tags'>#{tag_list}</span>"
end