mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-29 21:38:49 +01:00
#300: Displays successors recursively
This commit is contained in:
parent
08d24a1b8f
commit
90d77f37cb
3 changed files with 31 additions and 1 deletions
20
app/views/todos/_successor.html.erb
Normal file
20
app/views/todos/_successor.html.erb
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<%
|
||||
suppress_context ||= false
|
||||
suppress_project ||= false
|
||||
suppress_dependencies ||= false
|
||||
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(successor, 'successor') %>" class="item-container">
|
||||
<div id="<%= dom_id(successor, 'successor_line') %>">
|
||||
<div class="description<%= staleness_class( successor ) %>" style="margin-left: 10px">
|
||||
<%= link_to(image_tag( 'blank.png', :width=>'16', :height=>'16', :border=>'0', :class => 'delete_item' ), "#",
|
||||
{ :class => 'remove_successor', :title => 'Remove successor', :style => "background: transparent;"}) %>
|
||||
<span class="todo.descr"><%= h sanitize(successor.description) %></span>
|
||||
<% #= successors_span %>
|
||||
<%= render(:partial => "todos/toggle_successors", :locals => { :item => successor }) unless successor.pending_successors.empty? %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -25,12 +25,13 @@ parameters += "&_tag_name=#{@tag_name}" if @source_view == 'tag'
|
|||
<%= grip_span %>
|
||||
<%= date_span -%>
|
||||
<span class="todo.descr"><%= h sanitize(todo.description) %></span>
|
||||
<%= successors_span %>
|
||||
<% #= successors_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? %>
|
||||
<%= render(:partial => "todos/toggle_successors", :locals => { :item => todo }) unless todo.pending_successors.empty? %>
|
||||
</div>
|
||||
</div>
|
||||
<div id="<%= dom_id(todo, 'edit') %>" class="edit-form" style="display:none">
|
||||
|
|
|
|||
9
app/views/todos/_toggle_successors.html.erb
Normal file
9
app/views/todos/_toggle_successors.html.erb
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<%= link_to(image_tag( 'blank.png', :width=>'16', :height=>'16', :border=>'0' ), "#", {:class => 'show_successors', :title => 'Show successors'}) %>
|
||||
|
||||
<div class="todo_successors" id="<%= dom_id(item, 'successors') %>" style="display:none">
|
||||
<%= render :partial => "todos/successor",
|
||||
:collection => item.pending_successors,
|
||||
:locals => { :parent_container_type => parent_container_type,
|
||||
:suppress_dependencies => true }
|
||||
%>
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue