mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-28 10:04:07 +01:00
replace small partials with helper to improve performance
This commit is contained in:
parent
8cbe077784
commit
05ba6060fc
5 changed files with 25 additions and 27 deletions
|
|
@ -32,8 +32,8 @@ parameters += "&_tag_name=#{@tag_name}" if @source_view == 'tag'
|
|||
<%= 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", :object => todo) if todo.notes? %>
|
||||
<%= render(:partial => "todos/toggle_successors", :object => todo) unless todo.pending_successors.empty? %>
|
||||
<%= collapsed_notes_image(todo) if todo.notes? %>
|
||||
<%= collapsed_successors_image(todo) unless todo.pending_successors.empty? %>
|
||||
</div>
|
||||
</div>
|
||||
<div id="<%= dom_id(todo, 'edit') %>" class="edit-form" style="display:none">
|
||||
|
|
|
|||
|
|
@ -1,6 +0,0 @@
|
|||
<% item = toggle_notes -%>
|
||||
<%= link_to(image_tag( 'blank.png', :width=>'16', :height=>'16', :border=>'0' ), "#", {:class => 'show_notes', :title => 'Show notes'}) %>
|
||||
|
||||
<div class="todo_notes" id="<%= dom_id(item, 'notes') %>" style="display:none">
|
||||
<%= format_note(item.notes) %>
|
||||
</div>
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
<% item = toggle_successors %>
|
||||
<%= 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') %>">
|
||||
<%= render :partial => "todos/successor",
|
||||
:collection => item.pending_successors,
|
||||
:locals => { :parent_container_type => parent_container_type,
|
||||
:suppress_dependencies => true,
|
||||
:predecessor => item }
|
||||
%>
|
||||
</div>
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue