mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-27 04:51:14 +00:00
6aa8903c11
Improve news archive
23 lines
709 B
Text
23 lines
709 B
Text
<table class="articles archive striped">
|
|
<tr>
|
|
<th class="title">Title</th>
|
|
<th class="date">Date</th>
|
|
<th class="author">Author</th>
|
|
<th class="actions"></th>
|
|
</tr>
|
|
|
|
<% articles.each do |article| %>
|
|
<tr>
|
|
<td><%= namelink article, 35 %></td>
|
|
<td><%= shortdate article.created_at %></td>
|
|
<td><%= namelink article.user %></td>
|
|
<td class="actions">
|
|
<% if article.can_update? cuser %>
|
|
<%= link_to icon('pencil'), edit_article_path(article) %>
|
|
<% end; if article.can_destroy? cuser %>
|
|
<%= link_to icon('times'), article, confirm: 'Are you sure?', method: :delete %>
|
|
<% end %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</table>
|