mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-26 12:30:48 +00:00
34 lines
No EOL
896 B
Text
34 lines
No EOL
896 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 !article.read_by? cuser %>
|
|
<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>
|
|
|