2007-03-30 04:36:52 +00:00
|
|
|
<%
|
2009-03-15 22:35:32 +01:00
|
|
|
@todo = todo
|
|
|
|
|
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
|
2007-03-30 04:36:52 +00:00
|
|
|
%>
|
|
|
|
|
<div id="<%= dom_id(todo) %>" class="item-container">
|
|
|
|
|
<div id="<%= dom_id(todo, 'line') %>">
|
2007-05-25 19:01:08 +00:00
|
|
|
<%= remote_star_icon %>
|
2007-03-30 04:36:52 +00:00
|
|
|
<%= remote_toggle_checkbox unless source_view_is :deferred %>
|
2009-03-19 22:55:03 +01:00
|
|
|
<ul class="sf-menu sf-item-menu"><li style="z-index:<%=@z_index_counter%>"><%= image_tag "downarrow.png", :alt=> "" %><ul id="ul<%= dom_id(todo) %>">
|
2009-03-24 21:06:53 +01:00
|
|
|
<% unless suppress_edit_button %>
|
2009-03-30 21:21:53 +02:00
|
|
|
<li><%= remote_edit_menu_item(parameters, todo) %></li>
|
2009-03-24 21:06:53 +01:00
|
|
|
<% end %>
|
2009-03-30 21:21:53 +02:00
|
|
|
<li><%= remote_delete_menu_item(parameters, todo) %></li>
|
2009-03-24 21:06:53 +01:00
|
|
|
<% unless todo.completed? || todo.deferred? %>
|
2009-03-30 21:21:53 +02:00
|
|
|
<li><%= remote_defer_menu_item(1, todo) %></li>
|
|
|
|
|
<li><%= remote_defer_menu_item(7, todo) %></li>
|
2009-03-24 21:06:53 +01:00
|
|
|
<% end %>
|
2009-03-15 22:35:32 +01:00
|
|
|
</ul></ul>
|
2007-03-30 04:36:52 +00:00
|
|
|
<div class="description<%= staleness_class( todo ) %>">
|
2008-04-10 20:05:55 +00:00
|
|
|
<%= date_span -%>
|
2009-01-11 18:58:36 +00:00
|
|
|
<span class="todo.descr"><%= h sanitize(todo.description) %></span>
|
2009-03-30 21:21:53 +02:00
|
|
|
<%= image_tag_for_recurring_todo(todo) if @todo.from_recurring_todo? %>
|
2007-03-30 04:36:52 +00:00
|
|
|
<%= tag_list %>
|
|
|
|
|
<%= deferred_due_date %>
|
2007-11-27 05:51:38 +00:00
|
|
|
<%= project_and_context_links( parent_container_type, :suppress_context => suppress_context, :suppress_project => suppress_project ) %>
|
2007-03-30 04:36:52 +00:00
|
|
|
<%= render(:partial => "todos/toggle_notes", :locals => { :item => todo }) if todo.notes? %>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div id="<%= dom_id(todo, 'edit') %>" class="edit-form" style="display:none">
|
|
|
|
|
<% form_remote_tag_edit_todo do -%>
|
2009-03-15 22:35:32 +01:00
|
|
|
<% #note: edit form will load here remotely -%>
|
|
|
|
|
<div class="placeholder"> </div>
|
2007-03-30 04:36:52 +00:00
|
|
|
<% end -%>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|