tracks/app/views/projects/_project.html.erb
Dan Rice bdbb1dd29d Render collapse/expand buttons using CSS instead of JS
Fix #1354
Also clean up some dependent JS unused since c64e1bc
2012-11-14 22:01:43 -05:00

26 lines
1.2 KiB
Text

<%
# invalidate the cache every day because of staleness or
# rendering of "due in x days" that change without touching updated at of the todo
cache [project, current_user.date.strftime("%Y%m%d")] do %>
<div class="container">
<h2 id="project_name_container">
<% if collapsible -%>
<a href="#" class="container_toggle" id="toggle_p<%= project.id %>"><%= image_tag("blank.png", :alt => t('common.collapse_expand')) %></a>
<% end -%>
<div id="project_name" style="width: 100%;"><%= project.name -%></div>
</h2>
<div id="<%= dom_id(project, "container")%>" class="list">
<%= render :partial => "projects/project_settings", :object => project, :locals => { :collapsible => collapsible } %>
</div>
</div>
<div class="container">
<h2><%= t('projects.actions_in_project_title') %></h2>
<div id="p<%= project.id %>items" class="items toggle_target">
<div id="p<%= project.id %>empty-nd" style="display:<%= @not_done.empty? ? 'block' : 'none'%>;">
<div class="message"><p><%= t('projects.no_actions_in_project') %></p></div>
</div>
<%= render :partial => "todos/todo", :collection => @not_done, :locals => { :parent_container_type => "project" } %>
</div>
</div>
<% end %>