ensl.org/app/views/articles/admin.html.erb

31 lines
910 B
Text
Raw Permalink Normal View History

2014-04-27 00:34:38 +00:00
<div class="admin articles">
<h1 class="title">Articles Admin</h1>
2014-04-27 00:34:38 +00:00
<% @articles.each do |key, articles| %>
<h3 class="title"><%=h key %></h3>
2014-04-27 00:34:38 +00:00
<table class="striped">
<tr>
2014-04-27 00:34:38 +00:00
<th class="title">Title</th>
<th class="category">Category</th>
<th class="created">Created</th>
<th class="author">Author</th>
<th class="actions"></th>
</tr>
<% for article in articles %>
2014-04-27 00:34:38 +00:00
<tr>
<td><%= namelink article %></td>
<td><%= h article.category %></td>
<td><%= shorttime article.created_at %></td>
<td><%= namelink article.user %></td>
2014-04-27 00:34:38 +00:00
<td class="actions">
<%= link_to icon('pencil'), edit_article_path(article) %>
<%= link_to icon('times'), article, confirm: 'Are you sure?', method: :delete %>
</td>
</tr>
<% end %>
</table>
2014-04-27 00:34:38 +00:00
<% end %>
</div>