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/blogposts/index.html.erb
2013-08-02 07:55:32 +02:00

20 lines
664 B
Plaintext

<div id="posts">
<% @posts.each do |p| %>
<div class="post">
<div class="post-title">
<h2><%= link_to truncate(p.title, length: 60, omission: " …"), p %></h2>
<span class="comment-counter">
<%= link_to pluralize(p.comments.count, "Comment"), p %>
</span>
</div>
<span class="post-info">
by <%= link_to p.user.name, p.user %> on <%= p.created_at.strftime("%e. %b %Y") %>
</span>
<div class="post-content">
<%= RbbCode.new.convert(p.text).html_safe %>
</div>
</div>
<% end %>
<%= link_to 'Make new Post', new_blogpost_path if current_user && current_user.rank >= rank_to_int("mod") %>
</div>