ensl.org/app/views/articles/index.html.erb
Luke Barratt 1e64b50109 Completed restyling:
- Bans
- Articles
- Forums
- Users

Further styling improvements to form elements
2014-04-20 02:29:52 +01:00

26 lines
660 B
Text

<h1>Articles</h1>
<% @categories.each do |category| %>
<h3>
<%= category.name %>
</h3>
<% category.articles.nodrafts.ordered.each do |article| %>
<div class="indented">
<div class="left">
<% if cuser and !article.read_by? cuser %>
<span class="red bold">NEW</span>
<% end %>
<%= namelink article %>
</div>
<div class="right">
(<%= namelink article.user %> on <%= longdate article.created_at %>)
</div>
<br class="clear" />
</div>
<% end %>
<% end %>
<% if Article.new.can_create? cuser %>
<%= link_to 'New Article', new_article_path, class: 'button' %>
<% end %>