Files
grecia/app/views/admin/poll/questions/index.html.erb
2016-12-14 19:26:55 +01:00

34 lines
1012 B
Plaintext

<h2 class="inline-block"><%= t('admin.questions.index.title') %></h2>
<%= link_to t('admin.questions.index.create'), new_admin_question_path,
class: "button success float-right" %>
<div class="row">
<div class="small-12 medium-6 column">
<%= render 'search' %>
</div>
</div>
<div class="small-12 medium-4 large-3">
<%= render 'filter' %>
</div>
<% if @questions.count == 0 %>
<div class="callout primary margin-top">
<%= t('admin.questions.index.no_questions') %>
</div>
<% else %>
<table>
<% @questions.each do |question| %>
<tr id="<%= dom_id(question) %>">
<td><%= link_to question.title, admin_question_path(question) %></td>
<td class="text-right">
<%= link_to t('shared.edit'), edit_admin_question_path(question), class: "button hollow" %>
<%= link_to t('shared.delete'), admin_question_path(question), class: "button hollow alert", method: :delete %>
</td>
</tr>
<% end %>
</table>
<%= paginate @questions %>
<% end %>