Sha256: 1354afd0dbd0c09d827223d0a904c20ddb39350030cf02d415806b5daf42f7f3

Contents?: true

Size: 1.84 KB

Versions: 2

Compression:

Stored size: 1.84 KB

Contents

<p>
  <label style='padding: 0px;'>Question:</label>
  &nbsp; <%= @question.details %>
</p>

<h1> Answers </h1>


<table>
  <thead>
  <tr>
    <th>Details</th>
    <th>Active</th>
    <th>Position</th>
    <th></th>
    <th></th>
    <th></th>
  </tr>
  </thead>
  <% for answer in @answers %>
    <tr>
      <td><%= truncate(answer.details, :limit => 55) %></td>
      <td><%= answer.active.to_s %></td>
      <td><%= answer.position %></td>
      <td><%= link_to "Show", [:survey_admin, @question, answer] %></td>
      <td><%= link_to "", edit_survey_admin_question_answer_path(@question, answer),
                          :class => 'ss_sprite ss_application_edit' %></td>
      <td><%= link_to "", [:survey_admin, @question, answer],
                            :confirm  => 'Are you sure?',
                            :method   => :delete,
                            :class    => 'ss_sprite ss_cross' %></td>
    </tr>
    <tbody>
      <tr class='no-divider'>
        <td colspan=6>
          <div class=' row'><label >Properties:</label></div>
          <% if answer.scores.empty? %>
            <%= link_to 'No properties...', edit_survey_admin_question_answer_path(@question, answer) %>
          <% else %>
            <ul class='span7'>
              <% answer.scores.each do |score| %>
               <li style=''>
                    <span class='span4' style='padding:0px 5px 0 0;'>  <%= score.survey_property.name %>:</span>
                    <%= score.value %>
                </li>
              <% end %>
            </ul>
          <% end %>
          <div class='span3'>
            <%= image_tag answer.image unless answer.image.blank? %>
          </div>
        </td>
      </tr>
    </tbody>
  <% end %>
</table>

<%#= will_paginate @answers %>

<p><%= link_to "New Answer", new_survey_admin_question_answer_path(@question), :class => 'button' %></p>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
survey_says-0.0.2 app/views/survey_admin/answers/index.html.erb
survey_says-0.0.1 app/views/survey_admin/answers/index.html.erb