mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-27 12:28:48 +01:00
remove caching from viewing dependencies
this causes stack overflow in some cases
This commit is contained in:
parent
61123ffa42
commit
66f7fe9f2b
1 changed files with 23 additions and 26 deletions
|
|
@ -1,32 +1,29 @@
|
|||
<%
|
||||
@rec_depth ||= 0
|
||||
|
||||
cache [successor, "successor"] do
|
||||
%>
|
||||
<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: 20px">
|
||||
<span class="todo.descr"><%= h sanitize(successor.description) %></span>
|
||||
|
||||
<%= remote_delete_dependency(successor, predecessor) %>
|
||||
|
||||
<% unless successor.pending_successors.empty?
|
||||
if @rec_depth < 8
|
||||
@rec_depth+=1 %>
|
||||
<div class="todo_successors" id="<%= dom_id(successor, 'successors') %>">
|
||||
<%= render :partial => "todos/successor",
|
||||
:collection => successor.pending_successors,
|
||||
:locals => { :todo => successor,
|
||||
:parent_container_type => parent_container_type,
|
||||
:suppress_dependencies => true,
|
||||
:predecessor => successor }
|
||||
%>
|
||||
</div>
|
||||
<% else %>
|
||||
<a title="There are more dependencies that are not shown">[...]</a>
|
||||
<% end %>
|
||||
<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: 20px">
|
||||
<span class="todo.descr"><%= h sanitize(successor.description) %></span>
|
||||
|
||||
<%= remote_delete_dependency(successor, predecessor) %>
|
||||
|
||||
<% unless successor.pending_successors.empty?
|
||||
if @rec_depth < 8
|
||||
@rec_depth+=1 %>
|
||||
<div class="todo_successors" id="<%= dom_id(successor, 'successors') %>">
|
||||
<%= render :partial => "todos/successor",
|
||||
:collection => successor.pending_successors,
|
||||
:locals => { :todo => successor,
|
||||
:parent_container_type => parent_container_type,
|
||||
:suppress_dependencies => true,
|
||||
:predecessor => successor }
|
||||
%>
|
||||
</div>
|
||||
<% else %>
|
||||
<a title="There are more dependencies that are not shown">[...]</a>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue