Sha256: b1668b377a3af095fc460ca85a7c742679e210f16a4e8acc1073e7abd7ad66a2

Contents?: true

Size: 1.53 KB

Versions: 5

Compression:

Stored size: 1.53 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="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><%= link_to 'Delete', noodall_admin_form_form_response_path(@form, response), :confirm => 'Are you sure?', :method => :delete, :class => 'delete', :title => 'Delete this response' %>
          <%= link_to('Mark as Spam', mark_as_spam_noodall_admin_form_form_response_path(@form, response), :class => 'spam', :title => 'Mark this response as spam and delete', :confirm => 'Are you sure?') unless response.approved == false %></td>
    </tr>
<% end %>
  </tbody>
  <tfoot>
    <tr>
      <th>Name</th>
      <th>Fields</th>
      <th width="100">Date</th>
      <th width="45">Delete</th>
    </tr>
  </tfoot>
</table>
</div>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
noodall-form-builder-0.2.1 app/views/noodall/admin/form_responses/index.html.erb
noodall-form-builder-0.2.0 app/views/noodall/admin/form_responses/index.html.erb
noodall-form-builder-0.1.3 app/views/noodall/admin/form_responses/index.html.erb
noodall-form-builder-0.1.2 app/views/noodall/admin/form_responses/index.html.erb
noodall-form-builder-0.1.1 app/views/noodall/admin/form_responses/index.html.erb