Sha256: 317756bec454bf1b9b08e73e819575ff95b1222dc30ea42149edb05a37af0ce4

Contents?: true

Size: 1.75 KB

Versions: 16

Compression:

Stored size: 1.75 KB

Contents

<h1><%= @form.title %> Responses</h1>

<ul class="choices">

  <li><%= link_to 'Download Responses', noodall_admin_form_form_responses_path(@form, :csv), :class => 'button download', :title => "Download all of these responses." %></li>

</ul>

<div id="content-table">
 <table border="0" cellspacing="0" cellpadding="0" class="content">
  <thead>
    <tr>
      <th>Name</th>
      <th>Fields</th>
      <th width="100">Date</th>
      <th width="150">Spam</th>
      <th width="45">Delete</th>
    </tr>
  </thead>
  <tbody>
<% @responses.sort_by(&:created_at).reverse.each do |response| %>
    <tr id="form-<%= response.id %>" class="<%=cycle('odd', 'even')%>">
      <td class="edit"><%= mail_to response.email, h(response.name) %></td>
      <td><%= @form.fields.collect{|f| "<strong>#{f.name}:</strong> #{response.string_value(f.underscored_name)}" }.join(",&nbsp;").html_safe %></td>
      <td><%= h response.created_at.to_formatted_s(:long_dot) %></td>
      <td class="spam <%= 'flagged' unless response.approved %>">
        <% if response.approved  %>
          <%= link_to "Spam?", mark_as_spam_noodall_admin_form_form_response_path(@form, response), :method => :put %>
        <% else %>
          <%= link_to "Not Spam?", mark_as_not_spam_noodall_admin_form_form_response_path(@form, response), :method => :put %>
        <% end %>
      </td>
      <td><%= link_to 'Delete', noodall_admin_form_form_response_path(@form, response), :confirm => 'Are you sure?', :method => :delete, :class => 'delete', :title => 'Delete this response' %>
      </td>
    </tr>
<% end %>
  </tbody>
  <tfoot>
    <tr>
      <th>Name</th>
      <th>Fields</th>
      <th width="100">Date</th>
      <th width="150">Spam</th>
      <th width="45">Delete</th>
    </tr>
  </tfoot>
</table>
</div>

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
noodall-form-builder-0.4.2 app/views/noodall/admin/form_responses/index.html.erb
noodall-form-builder-0.4.1 app/views/noodall/admin/form_responses/index.html.erb
noodall-form-builder-0.4.0 app/views/noodall/admin/form_responses/index.html.erb
noodall-form-builder-0.3.3 app/views/noodall/admin/form_responses/index.html.erb
noodall-form-builder-0.2.11 app/views/noodall/admin/form_responses/index.html.erb
noodall-form-builder-0.3.2 app/views/noodall/admin/form_responses/index.html.erb
noodall-form-builder-0.3.1 app/views/noodall/admin/form_responses/index.html.erb
noodall-form-builder-0.3.0 app/views/noodall/admin/form_responses/index.html.erb
noodall-form-builder-0.2.10 app/views/noodall/admin/form_responses/index.html.erb
noodall-form-builder-0.2.9 app/views/noodall/admin/form_responses/index.html.erb
noodall-form-builder-0.2.8 app/views/noodall/admin/form_responses/index.html.erb
noodall-form-builder-0.2.7 app/views/noodall/admin/form_responses/index.html.erb
noodall-form-builder-0.2.5 app/views/noodall/admin/form_responses/index.html.erb
noodall-form-builder-0.2.4 app/views/noodall/admin/form_responses/index.html.erb
noodall-form-builder-0.2.3 app/views/noodall/admin/form_responses/index.html.erb
noodall-form-builder-0.2.2 app/views/noodall/admin/form_responses/index.html.erb