Since we've renamed the class to `Option`, having variables, methods and texts refering to it as `answer` was confusing.
39 lines
1.1 KiB
Plaintext
39 lines
1.1 KiB
Plaintext
<%= render Admin::Poll::Questions::FilterComponent.new(@polls) %>
|
|
|
|
<% if @questions.count == 0 %>
|
|
<div class="callout primary margin-top">
|
|
<%= t("admin.questions.index.no_questions") %>
|
|
</div>
|
|
<% else %>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th><%= t("admin.questions.index.table_question") %></th>
|
|
<th><%= t("admin.questions.index.table_poll") %></th>
|
|
<th><%= t("admin.actions.actions") %></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% @questions.each do |question| %>
|
|
<tr id="<%= dom_id(question) %>">
|
|
<td><%= question.title %></td>
|
|
<td>
|
|
<% if question.poll.present? %>
|
|
<%= question.poll.name %>
|
|
<% else %>
|
|
<em><%= t("admin.questions.index.poll_not_assigned") %></em>
|
|
<% end %>
|
|
</td>
|
|
<td>
|
|
<%= render Admin::TableActionsComponent.new(question) do |actions| %>
|
|
<%= actions.action(:options, text: t("admin.polls.show.edit_answers")) %>
|
|
<% end %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
|
|
<%= paginate @questions %>
|
|
<% end %>
|