mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-25 11:38:49 +01:00
40 lines
1.8 KiB
Text
40 lines
1.8 KiB
Text
<%
|
|
@todo = todo
|
|
suppress_context ||= false
|
|
suppress_project ||= false
|
|
suppress_edit_button ||= todo.completed?
|
|
parameters = "_source_view=#{@source_view}"
|
|
parameters += "&_tag_name=#{@tag_name}" if @source_view == 'tag'
|
|
@z_index_counter = @z_index_counter - 1 # for IE z-index bug
|
|
%>
|
|
<div id="<%= dom_id(todo) %>" class="item-container">
|
|
<div id="<%= dom_id(todo, 'line') %>">
|
|
<%= remote_star_icon %>
|
|
<%= remote_toggle_checkbox unless source_view_is :deferred %>
|
|
<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) %>">
|
|
<% unless suppress_edit_button %>
|
|
<li><%= remote_edit_menu_item(parameters, todo) %></li>
|
|
<% end %>
|
|
<li><%= remote_delete_menu_item(parameters, todo) %></li>
|
|
<% unless todo.completed? || todo.deferred? %>
|
|
<li><%= remote_defer_menu_item(1, todo) %></li>
|
|
<li><%= remote_defer_menu_item(7, todo) %></li>
|
|
<% end %>
|
|
</ul></ul>
|
|
<div class="description<%= staleness_class( todo ) %>">
|
|
<%= date_span -%>
|
|
<span class="todo.descr"><%= h sanitize(todo.description) %></span>
|
|
<%= image_tag_for_recurring_todo(todo) if @todo.from_recurring_todo? %>
|
|
<%= tag_list %>
|
|
<%= deferred_due_date %>
|
|
<%= project_and_context_links( parent_container_type, :suppress_context => suppress_context, :suppress_project => suppress_project ) %>
|
|
<%= 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 -%>
|
|
<% #note: edit form will load here remotely -%>
|
|
<div class="placeholder"> </div>
|
|
<% end -%>
|
|
</div>
|
|
</div>
|