app/views/checklist_builder/checklists/_show.html.erb
<h1>Showing Checklist Definition <%= checklist_definition.id %></h1>
<table>
<tr class="cycle_odd_lvl1">
<td colspan="2">Active?</td>
<td colspan="2">
<%- if checklist_definition.active? -%>
Yes
<%- else -%>
No
<%- end -%>
</td>
</tr>
<tr class="cycle_even_lvl1">
<td colspan="2">Title:</td>
<td colspan="2"><%=h checklist_definition.text %></td>
</tr>
<tr class="cycle_odd_lvl1">
<td colspan="2">Directions:</td>
<td colspan="2"><%=h checklist_definition.directions %></td>
</tr>
<tr class="cycle_even_lvl1">
<td colspan="2">Creation Date:</td>
<td colspan="2"><%=h checklist_definition.created_at.to_date.to_s(:long) %></td>
</tr>
<tr class="cycle_odd_lvl1">
<td colspan="2">Date of Last Update:</td>
<td colspan="2"><%=h checklist_definition.updated_at.to_date.to_s(:long) %></td>
</tr>
<tr class="cycle_even_lvl1">
<td colspan="2">Attached Document:</td>
<td colspan="2"><%=h checklist_definition.document.original_filename %></td>
</tr>
<tr class="cycle_odd_lvl1">
<td>Recommendation:</td>
<td><%=h checklist_definition.recommendation_definition ? checklist_definition.recommendation_definition.text : "Checklist is optional" %></td>
</tr>
<tr>
<td colspan="4">
<%= link_to 'Preview', preview_checklist_builder_checklist_path(checklist_definition) %> |
<%= link_to "Edit", edit_checklist_builder_checklist_path(checklist_definition) %> |
<%= link_to 'Back', checklist_builder_checklists_path %> |
<%= link_to_remote "Add Question", new_checklist_builder_question_path(checklist_definition),
:id => dom_id(checklist_definition,:add_question_definition_link),
:method => :get %> |
<%= link_to_remote "Show Question Definitions", checklist_builder_questions_path(checklist_definition),
:id => dom_id(checklist_definition,:view_question_definitions_toggle),
:method => :get %>
<%= spinner dom_id(checklist_definition) %>
</td>
</tr>
</table>
<%=div_for(checklist_definition,:preview ,:style=>"display:none"){} %>
<%=div_for( checklist_definition, :edit, :style=>"display:none") {} %>
<%=div_for(checklist_definition,:new_question_definition_notice ,:style=>"display:none"){} %>
<%=div_for(checklist_definition,:new_question_definition ,:style=>"display:none"){} %>
<%=content_tag_for(:ul, checklist_definition, :question_definitions, :style=>"display:none") {} %>