mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-11-16 01:41:23 +00:00
31 lines
737 B
Text
31 lines
737 B
Text
<div class="box wide">
|
|
<h2>Articles</h2>
|
|
|
|
<% @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 %>
|
|
<br />
|
|
</div>
|
|
|
|
<% if Article.new.can_create? cuser %>
|
|
<p>
|
|
<%= link_to 'New article', new_article_path %>
|
|
</p>
|
|
<% end %>
|