mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-31 13:15:17 +01:00
add title to recurring todos page and fix for #737
This commit is contained in:
parent
87b383f209
commit
545b4e5c50
5 changed files with 53 additions and 32 deletions
|
|
@ -11,6 +11,8 @@ class RecurringTodosController < ApplicationController
|
|||
@no_recurring_todos = @recurring_todos.size == 0
|
||||
@no_completed_recurring_todos = @completed_recurring_todos.size == 0
|
||||
@count = @recurring_todos.size
|
||||
|
||||
@page_title = "TRACKS::Recurring Actions"
|
||||
end
|
||||
|
||||
def new
|
||||
|
|
|
|||
|
|
@ -333,18 +333,19 @@ class TodosController < ApplicationController
|
|||
@tag_name = params[:name]
|
||||
|
||||
# mobile tags are routed with :name ending on .m. So we need to chomp it
|
||||
if mobile?
|
||||
@tag_name = @tag_name.chomp('.m')
|
||||
end
|
||||
@tag_name = @tag_name.chomp('.m') if mobile?
|
||||
|
||||
@tag = Tag.find_by_name(@tag_name)
|
||||
if @tag.nil?
|
||||
@tag = Tag.new(:name => @tag_name)
|
||||
end
|
||||
@tag = Tag.new(:name => @tag_name) if @tag.nil?
|
||||
|
||||
tag_collection = @tag.todos
|
||||
@not_done_todos = tag_collection.find(:all, :conditions => ['taggings.user_id = ? and state = ?', current_user.id, 'active'])
|
||||
@hidden_todos = current_user.todos.find(:all,
|
||||
:include => [:taggings, :tags, :context],
|
||||
:conditions => ['tags.name = ? AND (todos.state = ? OR (contexts.hide = ? AND todos.state = ?))', @tag_name, 'project_hidden', true, 'active'])
|
||||
#@hidden_todos = tag_collection.find(:all, :conditions => ['taggings.user_id = ? and state = ?', current_user.id, 'project_hidden'])
|
||||
|
||||
@contexts = current_user.contexts.find(:all, :include => [ :todos ])
|
||||
@contexts = current_user.contexts.find(:all)
|
||||
@contexts_to_show = @contexts.reject {|x| x.hide? }
|
||||
|
||||
@deferred = tag_collection.find(:all, :conditions => ['taggings.user_id = ? and state = ?', current_user.id, 'deferred'])
|
||||
|
|
|
|||
|
|
@ -1,18 +1,17 @@
|
|||
<% suffix = append_descriptor ? append_descriptor : '' -%>
|
||||
<div class="container tickler" id="tickler">
|
||||
<h2>
|
||||
<% if collapsible %>
|
||||
<a href="#" class="container_toggle" id="toggle_deferred"><%= image_tag("collapse.png") %></a>
|
||||
<% end %>
|
||||
Deferred actions <%= append_descriptor ? append_descriptor : '' %>
|
||||
</h2>
|
||||
|
||||
<div id="tickleritems" class="items toggle_target">
|
||||
<div id="tickler-empty-nd" style="display:<%= deferred.empty? ? 'block' : 'none'%>;">
|
||||
<div class="message"><p>Currently there are no deferred actions</p></div>
|
||||
</div>
|
||||
|
||||
<%= render :partial => "todos/todo", :collection => deferred, :locals => { :parent_container_type => 'tickler' } %>
|
||||
|
||||
</div><!-- [end:items] -->
|
||||
<div class="container tickler" id="tickler">
|
||||
<h2>
|
||||
<% if collapsible %>
|
||||
<a href="#" class="container_toggle" id="toggle_deferred"><%= image_tag("collapse.png") %></a>
|
||||
<% end %>
|
||||
Deferred actions <%= append_descriptor ? append_descriptor : '' %>
|
||||
</h2>
|
||||
|
||||
<div id="tickleritems" class="items toggle_target">
|
||||
<div id="tickler-empty-nd" style="display:<%= deferred.empty? ? 'block' : 'none'%>;">
|
||||
<div class="message"><p>Currently there are no deferred actions</p></div>
|
||||
</div>
|
||||
|
||||
<%= render :partial => "todos/todo", :collection => deferred, :locals => { :parent_container_type => 'tickler' } %>
|
||||
|
||||
</div><!-- [end:items] -->
|
||||
</div><!-- [end:tickler] -->
|
||||
17
app/views/todos/_hidden.rhtml
Normal file
17
app/views/todos/_hidden.rhtml
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<div class="container hidden" id="hidden">
|
||||
<h2>
|
||||
<% if collapsible %>
|
||||
<a href="#" class="container_toggle" id="toggle_deferred"><%= image_tag("collapse.png") %></a>
|
||||
<% end %>
|
||||
Hidden actions <%= append_descriptor ? append_descriptor : '' %>
|
||||
</h2>
|
||||
|
||||
<div id="hiddenitems" class="items toggle_target">
|
||||
<div id="hidden-empty-nd" style="display:<%= hidden.empty? ? 'block' : 'none'%>;">
|
||||
<div class="message"><p>Currently there are no hidden actions found</p></div>
|
||||
</div>
|
||||
|
||||
<%= render :partial => "todos/todo", :collection => hidden, :locals => { :parent_container_type => 'tag' } %>
|
||||
|
||||
</div><!-- [end:items] -->
|
||||
</div><!-- [end:tickler] -->
|
||||
|
|
@ -1,21 +1,23 @@
|
|||
<div id="display_box">
|
||||
<div class="container context" <%= "style=\"display:none\"" unless @not_done_todos.empty? %>>
|
||||
<h2>
|
||||
No actions found
|
||||
</h2>
|
||||
<div class="container context" <%= "style=\"display:none\"" unless @not_done_todos.empty? %> >
|
||||
<h2>No actions found</h2>
|
||||
<div class="message"><p>Currently there are no incomplete actions with the tag '<%= @tag_name %>'</p></div>
|
||||
</div>
|
||||
|
||||
<%= render :partial => "contexts/context", :collection => @contexts_to_show,
|
||||
:locals => { :collapsible => true } %>
|
||||
|
||||
:locals => { :collapsible => true } %>
|
||||
|
||||
<% unless @deferred.nil? -%>
|
||||
<%= render :partial => "todos/deferred", :locals => { :deferred => @deferred, :collapsible => true, :append_descriptor => "tagged with ‘#{@tag_name}’" } %>
|
||||
<%= render :partial => "todos/deferred", :locals => { :deferred => @deferred, :collapsible => true, :append_descriptor => "tagged with ‘#{@tag_name}’" } %>
|
||||
<% end -%>
|
||||
|
||||
<% unless @hidden_todos.nil? -%>
|
||||
<%= render :partial => "todos/hidden", :locals => { :hidden => @hidden_todos, :collapsible => true, :append_descriptor => "tagged with ‘#{@tag_name}’" } %>
|
||||
<% end -%>
|
||||
|
||||
<% unless @done.nil? -%>
|
||||
<%= render :partial => "todos/completed",
|
||||
:locals => { :done => @done, :collapsible => true, :append_descriptor => "tagged with ‘#{@tag_name}’" } %>
|
||||
:locals => { :done => @done, :collapsible => true, :append_descriptor => "tagged with ‘#{@tag_name}’" } %>
|
||||
<% end -%>
|
||||
</div><!-- End of display_box -->
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue