home page renders... sort of

This commit is contained in:
Reinier Balt 2012-04-11 17:36:22 +02:00
parent fde64e0b3d
commit 4605b17d3c
16 changed files with 131 additions and 295 deletions

View file

@ -6,17 +6,19 @@ module ApplicationHelper
# current page. If that matches the url, the link is marked id = "current"
#
def navigation_link(name, options = {}, html_options = nil, *parameters_for_method_reference)
if html_options
html_options = html_options.stringify_keys
convert_options_to_javascript!(html_options)
tag_options = tag_options(html_options)
else
tag_options = nil
end
url = options.is_a?(String) ? options : self.url_for(options, *parameters_for_method_reference)
id_tag = (request.request_uri == url) ? " id=\"current\"" : ""
"<a href=\"#{url}\"#{tag_options}#{id_tag}>#{name || url}</a>"
link_to name, options, html_options
# TODO: check if this needs to be converted
# if html_options
# html_options = html_options.stringify_keys
# convert_options_to_javascript!(html_options)
# tag_options = tag_options(html_options)
# else
# tag_options = nil
# end
# url = options.is_a?(String) ? options : self.url_for(options, *parameters_for_method_reference)
# id_tag = (request.request_uri == url) ? " id=\"current\"" : ""
#
# "<a href=\"#{url}\"#{tag_options}#{id_tag}>#{name || url}</a>"
end
def days_from_today(date)
@ -235,7 +237,7 @@ module ApplicationHelper
end
def determine_done_path
case @controller.controller_name
case controller.controller_name
when "contexts"
done_todos_context_path(@context)
when "projects"
@ -252,7 +254,7 @@ module ApplicationHelper
end
def determine_all_done_path
case @controller.controller_name
case controller.controller_name
when "contexts"
all_done_todos_context_path(@context)
when "projects"