This repository has been archived on 2024-08-27. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
redstoner.com/app/views/forums/show.html.erb
2014-04-28 03:01:33 +02:00

22 lines
1.0 KiB
Plaintext

<%= link_to @forum.group, forumgroup_path(@forum.group) %> → <%= link_to @forum %>
<h1><%= @forum %></h1>
<% if @forum.can_write?(current_user) %>
<p><%= link_to "New thread", new_forumthread_path(forum: @forum), class: "btn blue" %></p>
<% end %>
<div id="forum_groups">
<% @threads.each do |thread| %>
<div class="item-group with-avatar" id="thread-<%= thread.id %>">
<div class="header">
<%= link_to(image_tag(thread.author.avatar_url(64), class: "avatar"), thread.author, title: thread.author.ign) %>
<%= render partial: "users/username", locals: { user: thread.author } %> <time><%= link_to thread.created_at.strftime("%e. %b %Y, %H:%M"), thread %></time>
<span class="comment-counter">
<%= link_to pluralize(thread.replies.count, "Reply"), thread %>
</span>
</div>
<div class="items bold">
<%= link_to thread.title, forumthread_path(thread), class: "item #{"locked" if thread.locked}#{"sticky" if thread.sticky}" %>
</div>
</div>
<% end %>
</div>