fix #1098 where adding a todo to a hidden context in that hidden context page would not show the todo

This commit is contained in:
Reinier Balt 2011-02-08 17:37:14 +01:00
parent 97fae98791
commit 83b5717460
3 changed files with 20 additions and 13 deletions

View file

@ -224,7 +224,8 @@ module TodosHelper
page.todo { return !@todo.hidden? }
page.deferred { return @todo.deferred? || @todo.pending? }
page.context {
return @todo.context_id==@default_context.id && (!@todo.hidden? && !@todo.context.hidden?)
logger.debug "ci=#{@todo.context_id} dci=#{@default_context.id} th=#{@todo.hidden?} tch=#{@todo.context.hidden?}"
return @todo.context_id==@default_context.id && ( (@todo.hidden? && @todo.context.hidden?) || (!@todo.hidden?) )
}
page.tag {
return ( (@todo.pending? && @todo.has_tag?(@tag_name)) ||