mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-30 14:31:12 +00:00
34 lines
No EOL
899 B
Text
34 lines
No EOL
899 B
Text
<div id="articles">
|
|
<h1>Articles</h1>
|
|
|
|
<% @categories.each do |category| %>
|
|
<h3 class="title"><%= category.name %></h3>
|
|
|
|
<div class="category">
|
|
<% category.articles.nodrafts.ordered.each do |article| %>
|
|
<div class="article-list">
|
|
<div class="title">
|
|
<% if cuser and !cuser.have_read?(article) %>
|
|
<span class="new">NEW</span>
|
|
<% end %>
|
|
|
|
<%= namelink article %>
|
|
</div>
|
|
<div class="meta">
|
|
<span class="author">
|
|
<%= namelink article.user %>
|
|
</span>
|
|
<span class="date">
|
|
on <%= longdate article.created_at %>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
<% end %>
|
|
|
|
<% if Article.new.can_create? cuser %>
|
|
<%= link_to 'New Article', new_article_path, class: 'button new' %>
|
|
<% end %>
|
|
</div>
|
|
|