mirror of
https://github.com/TracksApp/tracks.git
synced 2026-03-14 16:26:32 +01:00
home page renders... sort of
This commit is contained in:
parent
fde64e0b3d
commit
4605b17d3c
16 changed files with 131 additions and 295 deletions
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -2,22 +2,22 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<%= stylesheet_link_tag 'standard','superfish','niftyCorners', 'jquery-ui-1.8.17.custom', :cache => 'tracks-cached' %>
|
||||
<%#= stylesheet_link_tag 'standard','superfish','niftyCorners', 'jquery-ui-1.8.17.custom', :cache => 'tracks-cached' %>
|
||||
<%= stylesheet_link_tag "print", :media => "print" %>
|
||||
<%= javascript_include_tag 'jquery-1.7.1.min', 'jquery-ui-1.8.17.custom.min',
|
||||
<%#= javascript_include_tag 'jquery-1.7.1.min', 'jquery-ui-1.8.17.custom.min',
|
||||
'jquery.truncator','jquery.jeditable.mini', 'jquery.cookie', 'jquery.blockUI',
|
||||
'jquery.form',
|
||||
:cache => 'jquery-cached' %>
|
||||
<%= javascript_tag_for_i18n_datepicker %>
|
||||
<%= javascript_include_tag 'hoverIntent','superfish','application',
|
||||
<%#= javascript_tag_for_i18n_datepicker %>
|
||||
<%#= javascript_include_tag 'hoverIntent','superfish','application',
|
||||
'accesskey-hints','niftycube','swfobject',
|
||||
:cache => 'tracks-cached' %>
|
||||
<%= javascript_include_tag('jquery.simulate.drag-sortable') if ENV['RAILS_ENV']=='cucumber' -%>
|
||||
<% #= javascript_include_tag('jquery.simulate.drag-sortable') if ENV['RAILS_ENV']=='cucumber' -%>
|
||||
<%= javascript_tag "var AUTH_TOKEN = #{form_authenticity_token.inspect};" if protect_against_forgery? %>
|
||||
<%= javascript_tag "var SOURCE_VIEW = '#{@source_view}';" %>
|
||||
<%= javascript_tag "var TAG_NAME = '#{@tag_name}';" if @tag_name %>
|
||||
<%= csrf_meta_tag %>
|
||||
<script type="text/javascript">
|
||||
var SOURCE_VIEW = '<%=@source_view%>';
|
||||
var defaultContexts = <%= default_contexts_for_autocomplete rescue '{}' %>;
|
||||
var defaultTags = <%= default_tags_for_autocomplete rescue '{}' %>;
|
||||
var dateFormat = '<%= date_format_for_date_picker %>';
|
||||
|
|
@ -38,7 +38,7 @@
|
|||
<title><%= @page_title %></title>
|
||||
</head>
|
||||
|
||||
<body class="<%= @controller.controller_name %>">
|
||||
<body class="<%= controller.controller_name %>">
|
||||
|
||||
<div id="topbar">
|
||||
<%= NOTIFY_BAR %>
|
||||
|
|
@ -60,7 +60,7 @@
|
|||
</div>
|
||||
<div id="navcontainer">
|
||||
<ul class="sf-menu">
|
||||
<li><%= navigation_link(t('layouts.navigation.home'), home_path, {:accesskey => "t", :title => t('layouts.navigation.home_title')} ) %></li>
|
||||
<li><%= navigation_link(t('layouts.navigation.home'), root_path, {:accesskey => "t", :title => t('layouts.navigation.home_title')} ) %></li>
|
||||
<li><%= navigation_link(t('layouts.navigation.starred'), tag_path("starred"), :title => t('layouts.navigation.starred_title')) %></li>
|
||||
<li><%= navigation_link(t('common.projects'), projects_path, {:accesskey=>"p", :title=>t('layouts.navigation.projects_title')} ) %></li>
|
||||
<li><%= navigation_link(t('layouts.navigation.tickler'), tickler_path, {:accesskey =>"k", :title => t('layouts.navigation.tickler_title')} ) %></li>
|
||||
|
|
@ -101,7 +101,7 @@
|
|||
<%= render_flash %>
|
||||
</div>
|
||||
|
||||
<div id="content" class="<%= @controller.controller_name %>">
|
||||
<div id="content" class="<%= controller.controller_name %>">
|
||||
<%= yield %>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,15 @@
|
|||
<input id="default_project_name_id" name="default_project_name" type="hidden" value="<%=h @initial_project_name-%>" />
|
||||
<input id="default_context_name_id" name="default_context_name" type="hidden" value="<%=h @initial_context_name-%>" />
|
||||
|
||||
<div id="multiple_error_status"><%= error_messages_for("item", :object_name => 'action') %></div>
|
||||
<div id="multiple_error_status">
|
||||
<% if todo.errors.any? -%>
|
||||
<ul>
|
||||
<% todo.errors.full_messages.each do |msg| %>
|
||||
<li><%= msg %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end -%>
|
||||
</div>
|
||||
|
||||
<label for="todo_notes"><%= t('shared.multiple_next_actions') %></label>
|
||||
<%= text_area_tag( "todo[multiple_todos]", "", :cols => 29, :rows => 6, :tabindex => next_tab_index) %>
|
||||
|
|
@ -6,7 +6,15 @@
|
|||
<input id="default_context_name_id" name="default_context_name" type="hidden" value="<%= h(@initial_context_name)-%>" />
|
||||
<input type="hidden" id="new_todo_starred" name="new_todo_starred" value="false" />
|
||||
|
||||
<div id="error_status"><%= error_messages_for("item", :object_name => 'action') %></div>
|
||||
<div id="error_status">
|
||||
<% if todo.errors.any? -%>
|
||||
<ul>
|
||||
<% todo.errors.full_messages.each do |msg| %>
|
||||
<li><%= msg %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end -%>
|
||||
</div>
|
||||
|
||||
<label for="todo_description" style="float:left"><%= Todo.human_attribute_name('description') %></label>
|
||||
<a href="#" id="new_todo_starred_link" class="undecorated_link" ><%= image_tag("blank.png", :title =>t('todos.star_action'), :class => "todo_star", :style=> "float: right")%></a>
|
||||
|
|
@ -3,10 +3,7 @@
|
|||
<h2><%= t('todos.no_actions_found_title')%></h2>
|
||||
<div class="message"><p><%= t('todos.no_actions_found') %></p></div>
|
||||
</div>
|
||||
<%= render(
|
||||
:partial => "contexts/context",
|
||||
:collection => @contexts_to_show,
|
||||
:locals => { :collapsible => true }) -%>
|
||||
<%= render(:partial => @contexts_to_show, :locals => { :collapsible => true }) -%>
|
||||
<% unless @done.nil? -%>
|
||||
<%= render(
|
||||
:partial => "todos/completed",
|
||||
|
|
|
|||
|
|
@ -4,12 +4,10 @@
|
|||
<div class="message"><p><%= t('todos.no_deferred_actions') %></p></div>
|
||||
</div>
|
||||
|
||||
<%= render :partial => "contexts/context", :collection => @contexts,
|
||||
:locals => { :collapsible => true } %>
|
||||
|
||||
</div><!-- End of display_box -->
|
||||
<%= render :partial => @contexts, :locals => { :collapsible => true } %>
|
||||
|
||||
</div>
|
||||
<div id="input_box">
|
||||
<%= render :partial => "shared/add_new_item_form" %>
|
||||
<%= render :file => "sidebar/sidebar.html.erb" %>
|
||||
</div><!-- End of input box -->
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue