Sha256: a3186054124a03662b86630db294066225f95af81b865af7e094879b4acb637a

Contents?: true

Size: 1.5 KB

Versions: 2

Compression:

Stored size: 1.5 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.respond_to?(f.underscored_name) ? response.send(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' %></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

2 entries across 2 versions & 1 rubygems

Version Path
noodall-form-builder-0.0.13 app/views/noodall/admin/form_responses/index.html.erb
noodall-form-builder-0.0.11 app/views/noodall/admin/form_responses/index.html.erb