30 lines
822 B
Plaintext
30 lines
822 B
Plaintext
<h3><%= @survey.title %></h3>
|
|
<table class="table main-list">
|
|
<thead>
|
|
<tr class="sort-header">
|
|
<% @table_fields.each do |f| %>
|
|
<%= thead(f) %>
|
|
<% end %>
|
|
<th class="span2"></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% @survey_answers.each do |sa| %>
|
|
<tr>
|
|
<% user = sa.user.nil? ? nil : (User.find(sa.user) rescue nil) %>
|
|
<% if !user.nil? %>
|
|
<td><%= user.name %></td>
|
|
<% else %>
|
|
<td>NA</td>
|
|
<% end %>
|
|
<td><%= sa.created_at.strftime("%h %d, %Y - %H:%M") rescue nil %></td>
|
|
<td><a href="/admin/surveys/<%= sa.id.to_s %>/answer_set"><%= t("survey.view_answers") %></a></td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
<%=
|
|
content_tag :div, class: "bottomnav clearfix" do
|
|
content_tag :div, paginate(@survey_answers), class: "pagination pagination-centered"
|
|
end
|
|
%> |