mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-23 07:34:08 +01:00
Merge branch 'master' into rails4
Conflicts: Gemfile.lock config/routes.rb
This commit is contained in:
commit
4a485558e2
51 changed files with 5475 additions and 5015 deletions
|
|
@ -3,7 +3,7 @@
|
|||
# invalidate the cache every day because of staleness or
|
||||
# rendering of "due in x days" that change without touching updated at of the todo
|
||||
cache [context, @source_view, current_user.date.strftime("%Y%m%d"), @tag_name] do
|
||||
%>
|
||||
-%>
|
||||
<%=
|
||||
render :partial => 'todos/collection',
|
||||
:object => @not_done,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<div class="list-stategroup-contexts-container" id="list-<%= state %>-contexts-container">
|
||||
<h2>
|
||||
<span id="<%= state %>-contexts-count" class="badge"><%= context_state_group.length %></span>
|
||||
<%= t("states."+ state +"_plural")%> <%= t('common.contexts') %>
|
||||
<%= t("states.contexts."+ state) %>
|
||||
</h2>
|
||||
|
||||
<div id="<%= state%>-contexts-empty-nd" style="<%= no_contexts ? 'display:block' : 'display:none'%>">
|
||||
|
|
|
|||
|
|
@ -2,9 +2,17 @@
|
|||
suffix_completed = t('contexts.last_completed_in_context', :number=>prefs.show_number_completed)
|
||||
deferred_pending_options = {:append_descriptor => nil, :parent_container_type => 'context'}
|
||||
done_todo_options = {:append_descriptor => suffix_completed, :suppress_context => true, :parent_container_type => 'context'}
|
||||
show_empty_containers = (@group_view_by == 'context')
|
||||
-%>
|
||||
<div id="display_box">
|
||||
<%= render :partial => @context, :locals => { :settings => {:collapsible => false, :show_empty_containers => true, :parent_container_type => 'context' }} %>
|
||||
|
||||
<%= empty_message_holder("not_done_project", @not_done_todos.empty?) %>
|
||||
|
||||
<%= show_grouped_todos({:collapsible => false, :show_empty_containers => show_empty_containers, :parent_container_type => 'context'}) %>
|
||||
|
||||
<% if @group_view_by == 'project' -%>
|
||||
<%= show_todos_without_project(@todos_without_project, {:collapsible => false, :parent_container_type => 'context', :title_param => @context.name}) -%>
|
||||
<% end -%>
|
||||
|
||||
<%= show_deferred_pending_todos(@deferred_todos, @pending_todos, deferred_pending_options) %>
|
||||
|
||||
|
|
|
|||
|
|
@ -46,10 +46,6 @@
|
|||
</h1>
|
||||
</div>
|
||||
<div id="minilinks">
|
||||
<%= link_to(t('layouts.toggle_contexts'), "#", {:title => t('layouts.toggle_contexts_title'), :id => "toggle-contexts-nav"}) %>
|
||||
|
|
||||
<%= link_to(t('layouts.toggle_notes'), "#", {:accesskey => "S", :title => t('layouts.toggle_notes_title'), :id => "toggle-notes-nav"}) %>
|
||||
|
|
||||
<%= link_to("#{t('common.logout')} (#{current_user.display_name}) »".html_safe, logout_path) %>
|
||||
</div>
|
||||
<div id="navcontainer">
|
||||
|
|
@ -66,13 +62,15 @@
|
|||
<li><%= navigation_link( t('layouts.navigation.recurring_todos'), {:controller => "recurring_todos", :action => "index"}, :title => t('layouts.navigation.recurring_todos_title')) %></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#"><%= t('layouts.navigation.view') %></a>
|
||||
<li id="menu_view"><a href="#" id="menu_view_link"><%= t('layouts.navigation.view') %></a>
|
||||
<ul>
|
||||
<li><%= navigation_link( t('layouts.navigation.calendar'), calendar_path, :title => t('layouts.navigation.calendar_title')) %></li>
|
||||
<li><%= navigation_link( t('layouts.navigation.completed_tasks'), done_overview_path, {:accesskey=>"d", :title=>t('layouts.navigation.completed_tasks_title')} ) %></li>
|
||||
<li><%= navigation_link( t('layouts.navigation.feeds'), feeds_path, :title => t('layouts.navigation.feeds_title')) %></li>
|
||||
<li><%= navigation_link( t('layouts.navigation.stats'), stats_path, :title => t('layouts.navigation.stats_title')) %></li>
|
||||
<li><hr/></li>
|
||||
<li id="menu_view_toggle_contexts"><%= link_to(t('layouts.toggle_contexts'), "#", {:title => t('layouts.toggle_contexts_title'), :id => "toggle-contexts-nav"}) %></li>
|
||||
<li><%= link_to(t('layouts.toggle_notes'), "#", {:accesskey => "S", :title => t('layouts.toggle_notes_title'), :id => "toggle-notes-nav"}) %></li>
|
||||
<%= group_view_by_menu_entry %>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -2,11 +2,8 @@
|
|||
@not_done = @not_done_todos.select {|t| t.project_id == project.id }
|
||||
# invalidate the cache every day because of staleness or
|
||||
# rendering of "due in x days" that change without touching updated at of the todo
|
||||
cache [project, @source_view, current_user.date.strftime("%Y%m%d")] do
|
||||
cache [project, @source_view, current_user.date.strftime("%Y%m%d"), @tag_name] do
|
||||
-%>
|
||||
<% if source_view_is :project -%>
|
||||
<%= render :partial => "project_settings_container", :locals => {:project => project} %>
|
||||
<% end -%>
|
||||
<%=
|
||||
title = source_view_is(:project) ? t('projects.actions_in_project_title') : show_project_name(project)
|
||||
|
||||
|
|
|
|||
|
|
@ -8,14 +8,9 @@
|
|||
<h2>
|
||||
<span id="<%= state %>-projects-count" class="badge"><%= project_state_group.length%><%= total_count_string%></span>
|
||||
|
||||
<%= t('common.last' ) unless ( ['review','stalled','blocked','current'].include?(state) )%>
|
||||
<% if (I18n.locale == :fr) %>
|
||||
<%= t('common.projects').downcase %>
|
||||
<%= t('states.'+state+'_plural' ).downcase %><%= total_count==-1 ? "" : " (#{link_to(t('common.show_all'), done_projects_path)})".html_safe%>
|
||||
<% else %>
|
||||
<%= t('states.'+state+'_plural' )%>
|
||||
<%= t('common.projects') %><%= total_count==-1 ? "" : " (#{link_to(t('common.show_all'), done_projects_path)})".html_safe%>
|
||||
<% end %>
|
||||
<%= t('common.last' ) if state == 'completed' %>
|
||||
<%= t('states.projects.'+state) %>
|
||||
<%= total_count==-1 ? "" : " (#{link_to(t('common.show_all'), done_projects_path)})".html_safe%>
|
||||
|
||||
</h2>
|
||||
<% unless suppress_sort_menu %>
|
||||
|
|
|
|||
|
|
@ -5,11 +5,19 @@
|
|||
:suppress_project => true,
|
||||
:parent_container_type => 'project'
|
||||
}
|
||||
if @not_done_todos.count == 0
|
||||
# force project view so one empty container will be shown with an empty message
|
||||
@group_view_by = 'project'
|
||||
end
|
||||
-%>
|
||||
<div id="display_box">
|
||||
<%= project_next_prev %>
|
||||
|
||||
<%= render :partial => @project, :locals => {:settings => {:collapsible => false, :show_empty_containers => true, :parent_container_type => 'project' }} %>
|
||||
<%= render :partial => "project_settings_container", :locals => {:project => @project} %>
|
||||
|
||||
<%= empty_message_holder("not_done_context", @not_done_todos.empty?) %>
|
||||
|
||||
<%= show_grouped_todos({:collapsible => false, :show_empty_containers => false, :parent_container_type => 'project' }) %>
|
||||
|
||||
<%= show_deferred_pending_todos(@deferred_todos, @pending_todos, deferred_pending_options) %>
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ function update_project_page() {
|
|||
TracksForm.set_context_name_and_default_context_name("<%= escape_javascript(@project.default_context.name)%>");
|
||||
<% end %>
|
||||
<% if @project.default_tags %>
|
||||
TracksForm.set_tag_list("<%= escape_javascript(@project.default_tags)%>");
|
||||
TracksForm.set_tag_list_and_default_tag_list("<%= escape_javascript(@project.default_tags)%>");
|
||||
<% end %>
|
||||
TracksPages.update_sidebar(html_for_sidebar());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -84,12 +84,12 @@
|
|||
:month => select_tag('recurring_todo[yearly_month_of_year2]', options_for_select(@months_of_year, @recurring_todo.yearly_month_of_year2))) %><br/>
|
||||
</div>
|
||||
<div id="recurring_target">
|
||||
<label><%= t('todos.recurrence.recurrence_on_options') %></label><br/>
|
||||
<%= radio_button_tag('recurring_todo[recurring_target]', 'due_date', @recurring_todo.target == 'due_date')%> <%= t('todos.recurrence.recurrence_on_due_date') %>. <%= t('todos.recurrence.show_options') %>:
|
||||
<%= radio_button_tag('recurring_todo[recurring_show_always]', '1', @recurring_todo.show_always?)%> <%= t('todos.recurrence.show_option_always') %>
|
||||
<label><%= t('todos.recurrence.recurrence_on.options') %></label><br/>
|
||||
<%= radio_button_tag('recurring_todo[recurring_target]', 'due_date', @recurring_todo.target == 'due_date')%> <%= t('todos.recurrence.recurrence_on.due_date') %>. <%= t('todos.recurrence.recurrence_on.show_options') %>:
|
||||
<%= radio_button_tag('recurring_todo[recurring_show_always]', '1', @recurring_todo.show_always?)%> <%= t('todos.recurrence.recurrence_on.show_always') %>
|
||||
<%= radio_button_tag('recurring_todo[recurring_show_always]', '0', !@recurring_todo.show_always?)%>
|
||||
<%= raw t('todos.recurrence.show_days_before', :days => text_field_tag( 'recurring_todo[recurring_show_days_before]', @recurring_todo.show_from_delta, {"size" => 3})) %><br/>
|
||||
<%= radio_button_tag('recurring_todo[recurring_target]', 'show_from_date', @recurring_todo.target == 'show_from_date')%> <%= t('todos.recurrence.from_tickler') %><br/>
|
||||
<%= raw t('todos.recurrence.recurrence_on.show_days_before', :days => text_field_tag( 'recurring_todo[recurring_show_days_before]', @recurring_todo.show_from_delta, {"size" => 3})) %><br/>
|
||||
<%= radio_button_tag('recurring_todo[recurring_target]', 'show_from_date', @recurring_todo.target == 'show_from_date')%> <%= t('todos.recurrence.recurrence_on.from_tickler') %><br/>
|
||||
<br/>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
|
|||
|
|
@ -76,13 +76,13 @@
|
|||
:month => select_tag('recurring_todo[yearly_month_of_year2]', options_for_select(@months_of_year, Time.zone.now.month))) %><br/>
|
||||
</div>
|
||||
<div id="recurring_target">
|
||||
<label><%= t('todos.recurrence.recurrence_on_options') %></label><br/>
|
||||
<%= radio_button_tag('recurring_todo[recurring_target]', 'due_date', true)%> <%= t('todos.recurrence.recurrence_on_due_date') %>. <%= t('todos.recurrence.show_options') %>:
|
||||
<%= radio_button_tag('recurring_todo[recurring_show_always]', '1', true)%> <%= t('todos.recurrence.show_option_always') %>
|
||||
<label><%= t('todos.recurrence.recurrence_on.options') %></label><br/>
|
||||
<%= radio_button_tag('recurring_todo[recurring_target]', 'due_date', true)%> <%= t('todos.recurrence.recurrence_on.due_date') %>. <%= t('todos.recurrence.recurrence_on.show_options') %>:
|
||||
<%= radio_button_tag('recurring_todo[recurring_show_always]', '1', true)%> <%= t('todos.recurrence.recurrence_on.show_always') %>
|
||||
<%= radio_button_tag('recurring_todo[recurring_show_always]', '0', false)%>
|
||||
<%= raw t('todos.recurrence.show_days_before', :days => text_field_tag( 'recurring_todo[recurring_show_days_before]', "0", {"size" => 3})) %>
|
||||
<%= raw t('todos.recurrence.recurrence_on.show_days_before', :days => text_field_tag( 'recurring_todo[recurring_show_days_before]', "0", {"size" => 3})) %>
|
||||
<br/>
|
||||
<%= radio_button_tag('recurring_todo[recurring_target]', 'show_from_date', false)%> <%= t('todos.recurrence.from_tickler') %><br/>
|
||||
<%= radio_button_tag('recurring_todo[recurring_target]', 'show_from_date', false)%> <%= t('todos.recurrence.recurrence_on.from_tickler') %><br/>
|
||||
<br/>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
$('#todo-form-new-action').clearDeps();
|
||||
TracksForm.set_context_name('<%=escape_javascript @initial_context_name%>');
|
||||
TracksForm.set_project_name('<%=escape_javascript @initial_project_name%>');
|
||||
TracksForm.set_tag_list('<%=escape_javascript @initial_tags%>');
|
||||
TracksForm.set_tag_list_and_default_tag_list('<%=escape_javascript @initial_tags%>');
|
||||
$('#todo-form-new-action input:text:first').focus();
|
||||
$('#new_todo_starred_link .todo_star').removeClass('starred');
|
||||
$('#new_todo_starred').val('false');
|
||||
|
|
@ -86,4 +86,4 @@
|
|||
return "<%= @saved ? escape_javascript(render(:partial => @todo, :locals => { :parent_container_type => parent_container_type, :source_view => @source_view })) : "" %>";
|
||||
}
|
||||
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
animation << "add_todo_to_container" unless source_view_is(:done)
|
||||
animation << "block_predecessors"
|
||||
end
|
||||
animation << "update_empty_container" if source_view_is_one_of(:tag, :todo, :deferred)
|
||||
animation << "update_empty_container" if source_view_is_one_of(:tag, :todo, :deferred, :project, :context)
|
||||
animation << "regenerate_predecessor_family"
|
||||
else
|
||||
animation << "replace_todo"
|
||||
|
|
@ -63,15 +63,14 @@ function replace_todo(next_steps) {
|
|||
}
|
||||
|
||||
function add_todo_to_container(next_steps) {
|
||||
// <%= @group_view_by %>
|
||||
$('#<%= item_container_id(@todo) %>_items').append(html_for_todo());
|
||||
<% if should_make_context_visible -%>
|
||||
$('#<%= item_container_id(@todo) %>').slideDown(500, function() {
|
||||
$("#<%= empty_container_msg_div_id %>").slideUp(100);
|
||||
$("#<%= empty_container_msg_div_id %>").slideUp(100);
|
||||
highlight_updated_todo(next_steps);
|
||||
});
|
||||
<% else -%>
|
||||
$("#<%= empty_container_msg_div_id(@todo) %>").slideUp(100);
|
||||
$("#<%= empty_container_msg_div_id(@todo) %>").slideUp(100);
|
||||
highlight_updated_todo(next_steps);
|
||||
<% end -%>
|
||||
<% if @completed_count == 0 -%>
|
||||
|
|
@ -120,7 +119,7 @@ function highlight_updated_todo(next_steps) {
|
|||
|
||||
function activate_pending_todos(next_steps) {
|
||||
<% # Activate pending todos that are successors of the completed
|
||||
if @saved && @pending_to_activate
|
||||
if @pending_to_activate
|
||||
# do not render the js in case of an error or if no todos to activate
|
||||
@pending_to_activate.each do |t|
|
||||
html = escape_javascript(render(:partial => t, :locals => { :parent_container_type => parent_container_type }))
|
||||
|
|
@ -173,7 +172,7 @@ end
|
|||
|
||||
function html_for_recurring_todo() {
|
||||
<%-
|
||||
js = @saved && @new_recurring_todo ? escape_javascript(render(:partial => @new_recurring_todo, :locals => { :parent_container_type => parent_container_type })) : ""
|
||||
js = @new_recurring_todo ? escape_javascript(render(:partial => @new_recurring_todo, :locals => { :parent_container_type => parent_container_type })) : ""
|
||||
-%>
|
||||
return "<%= js %>";
|
||||
}
|
||||
|
|
@ -181,7 +180,7 @@ function html_for_recurring_todo() {
|
|||
function html_for_todo() {
|
||||
<%-
|
||||
js = ""
|
||||
if @saved && !source_view_is(:done)
|
||||
if !source_view_is(:done)
|
||||
js = escape_javascript(render(
|
||||
:partial => @todo,
|
||||
:locals => {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
end
|
||||
animation << "hide_container" if update_needs_to_hide_container
|
||||
animation << "highlight_updated_todo"
|
||||
animation << "update_empty_container" if source_view_is_one_of(:tag, :todo, :deferred)
|
||||
animation << "update_empty_container" if source_view_is_one_of(:tag, :todo, :deferred, :project, :context)
|
||||
animation << "update_predecessors"
|
||||
%>
|
||||
TracksPages.page_notify('notice', '<%=escape_javascript @status_message%>', 5);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue