2007-03-30 04:36:52 +00:00
|
|
|
<%
|
2009-03-15 22:35:32 +01:00
|
|
|
suppress_context ||= false
|
|
|
|
|
suppress_project ||= false
|
2009-03-24 21:06:53 +01:00
|
|
|
suppress_edit_button ||= todo.completed?
|
2009-03-15 22:35:32 +01:00
|
|
|
parameters = "_source_view=#{@source_view}"
|
|
|
|
|
parameters += "&_tag_name=#{@tag_name}" if @source_view == 'tag'
|
2009-03-19 22:55:03 +01:00
|
|
|
@z_index_counter = @z_index_counter - 1 # for IE z-index bug
|
2012-06-29 14:08:25 +02:00
|
|
|
@rec_depth=0 # to prevent stack overflow on large dependency trees, see _successor.html.erb
|
2012-08-27 21:00:51 +02:00
|
|
|
|
2012-08-30 10:57:16 +02:00
|
|
|
# invalidate the cache every day because of staleness or
|
|
|
|
|
# rendering of "due in x days" that change without touching updated at of the todo
|
2012-12-05 16:38:39 +01:00
|
|
|
# also make different caches per source_view to handle difference in showing [C] and [P]
|
2013-04-29 09:58:21 +02:00
|
|
|
cache [todo, current_user.date.strftime("%Y%m%d"), @source_view, current_user.prefs.verbose_action_descriptors] do
|
2007-03-30 04:36:52 +00:00
|
|
|
%>
|
2015-04-16 23:10:36 +02:00
|
|
|
<div id="<%= dom_id(todo) %>" class="item-container" data-sort="<%= sort_key(todo) %>">
|
2012-08-27 21:00:51 +02:00
|
|
|
<div id="<%= dom_id(todo, 'line') %>" class="item-show">
|
|
|
|
|
<%= remote_star_icon(todo) %>
|
|
|
|
|
<%= remote_toggle_checkbox(todo) %>
|
|
|
|
|
<%= remote_edit_button(todo) unless suppress_edit_button %>
|
|
|
|
|
<ul class="sf-menu sf-item-menu">
|
2012-09-26 16:17:07 -04:00
|
|
|
<li style="z-index:<%=@z_index_counter%>"><a href="#" class="item-downarrow"><%= image_tag "downarrow.png", :class => "todo-submenu", :alt=> "" %></a>
|
2012-08-27 21:00:51 +02:00
|
|
|
<ul id="ul<%= dom_id(todo) %>" class="todo-submenu">
|
|
|
|
|
<li><%= remote_delete_menu_item(todo) %></li>
|
|
|
|
|
<% unless todo.completed? || todo.deferred? -%>
|
|
|
|
|
<li><%= remote_defer_menu_item(1, todo) %></li>
|
|
|
|
|
<li><%= remote_defer_menu_item(2, todo) %></li>
|
|
|
|
|
<li><%= remote_defer_menu_item(3, todo) %></li>
|
|
|
|
|
<li><%= remote_defer_menu_item(7, todo) %></li>
|
|
|
|
|
<li><%= remote_promote_to_project_menu_item(todo) %></li>
|
|
|
|
|
<% end -%>
|
|
|
|
|
</ul>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
<%= grip_span(todo) %>
|
|
|
|
|
<div class="description<%= staleness_class( todo ) %>">
|
|
|
|
|
<%= date_span(todo) -%>
|
|
|
|
|
<span class="todo.descr"><%= h todo.description %></span>
|
|
|
|
|
<%= image_tag_for_recurring_todo(todo) if todo.from_recurring_todo? %>
|
|
|
|
|
<%= tag_list(todo) %>
|
|
|
|
|
<%= deferred_due_date(todo) %>
|
|
|
|
|
<%= project_and_context_links( todo, parent_container_type, :suppress_context => suppress_context, :suppress_project => suppress_project ) %>
|
2013-09-13 15:40:09 +03:00
|
|
|
<%= collapsed_notes_image(todo) if todo.notes.present? %>
|
2012-08-27 21:00:51 +02:00
|
|
|
<%= collapsed_successors_image(todo) if todo.has_pending_successors %>
|
2015-08-05 13:02:41 +02:00
|
|
|
<%= attachment_image(todo) if todo.attachments.present? %>
|
2012-08-27 21:00:51 +02:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div id="<%= dom_id(todo, 'edit') %>" class="edit-form" style="display:none">
|
|
|
|
|
<% #note: edit form will load here remotely -%>
|
|
|
|
|
<div class="placeholder"> </div>
|
2007-03-30 04:36:52 +00:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2012-09-26 16:17:07 -04:00
|
|
|
<% end %>
|