mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-11-15 09:21:25 +00:00
32 lines
884 B
Text
32 lines
884 B
Text
<h1>Listing Polls</h1>
|
|
|
|
<table class="polls striped">
|
|
<tr>
|
|
<th class="question">Question</th>
|
|
<th class="date">End date</th>
|
|
<th class="votes">Votes</th>
|
|
<th class="user">User</th>
|
|
<% if cuser and cuser.admin? %>
|
|
<th class="actions"></th>
|
|
<% end %>
|
|
</tr>
|
|
|
|
<% @polls.reverse_each do |poll| %>
|
|
<tr>
|
|
<td><%= link_to (h poll.question), poll %></td>
|
|
<td><%= longtime poll.end_date %></td>
|
|
<td><%=h poll.votes %></td>
|
|
<td><%=h poll.user %></td>
|
|
<% if cuser and cuser.admin? %>
|
|
<td class="actions">
|
|
<%= link_to icon('pencil'), edit_poll_path(poll) %>
|
|
<%= link_to icon('times'), poll, confirm: 'Are you sure?', method: :delete %>
|
|
</td>
|
|
<% end %>
|
|
</tr>
|
|
<% end %>
|
|
</table>
|
|
|
|
<% if cuser and cuser.admin? %>
|
|
<%= link_to 'New Poll', new_poll_path, class: 'button' %>
|
|
<% end %>
|