vegantech/sims

View on GitHub
app/views/checklist_builder/answers/_answer_definition_2.html.erb

Summary

Maintainability
Test Coverage
<h4>Answer Definition <%= answer_definition.position %></h4>
<span style="float:left">
  <%= link_to_remote image_tag("arrow-up.gif", :class => 'button_space_below'), :method => :post,
                   :url => move_checklist_builder_answer_path(:id => answer_definition, :direction => "up") %><br />
                   <%= link_to_remote image_tag("arrow-down.gif"), :method => :post,
                   :url => move_checklist_builder_answer_path(:id => answer_definition, :direction => "down") %>
</span>
<table>
  <tr class="cycle_odd_lvl4">
    <td>Text:</td>
    <td><%=markdown_with_span answer_definition.text %></td>
  </tr>
  <tr class="cycle_even_lvl4">
    <td>Scoring Value:</td>
    <td><%= answer_definition.value %></td>
  </tr>
  <tr>
    <td colspan="2">
      <%= link_to_remote content_tag(:span, "Show Details", :id => dom_id(answer_definition,"show_link")),
                         :url => checklist_builder_answer_path(answer_definition.checklist_definition, answer_definition.question_definition, answer_definition.element_definition, answer_definition),
                         :method => :get %> |
      <%= link_to_remote content_tag(:span, "Edit ", :id => dom_id(answer_definition,"edit_link")),
                         :url => edit_checklist_builder_answer_path(answer_definition.checklist_definition, answer_definition.question_definition, answer_definition.element_definition, answer_definition),
                         :method => :get %> |
      <%= link_to_remote 'Delete', 
                         :url => checklist_builder_answer_path(answer_definition.checklist_definition, answer_definition.question_definition, answer_definition.element_definition, answer_definition),
                         :confirm => 'Are you sure?  This cannot be undone.', 
                         :method => :delete %>
      <%= spinner dom_id(answer_definition) %>
    </td>
  </tr>
</table>
<div id="<%= dom_id(answer_definition,"details") %>" style="display:none"></div>
<div id="<%= dom_id(answer_definition,"edit") %>" style="display:none"></div>