fixes & forums started

This commit is contained in:
jomo
2013-08-02 07:55:32 +02:00
parent 45ebd0bd05
commit e052ad8859
39 changed files with 358 additions and 436 deletions

View File

@@ -1,9 +1,8 @@
<h1>Blog</h1>
<div id="posts">
<% @posts.each do |p| %>
<div id="post">
<div id="post-title">
<h2><%= link_to p.title, p %></h2>
<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>
@@ -11,7 +10,7 @@
<span class="post-info">
by <%= link_to p.user.name, p.user %> on <%= p.created_at.strftime("%e. %b %Y") %>
</span>
<div id="post-content">
<div class="post-content">
<%= RbbCode.new.convert(p.text).html_safe %>
</div>
</div>

View File

@@ -1,15 +1,19 @@
<h1><%= @post.title %></h1>
<span class="post-info"><%= link_to @post.author.name, @post.author %> on <%= @post.created_at.strftime("%e. %b %Y") %>
<% if current_user && current_user.rank >= rank_to_int("mod") %>
- <%= link_to "edit", edit_blogpost_path(@post.id) %>
<% end %>
</span>
<div id="post-content">
<%= RbbCode.new.convert(@post.text).html_safe %>
</div>
<div id="comments">
<% @post.comments.each do |c| %>
<%= render "comments/comment", :c => c %>
<% end %>
<%= render "comments/new" %>
<div class="post">
<div class="post-title">
<h1><%= @post.title %></h1>
</div>
<span class="post-info"><%= link_to @post.author.name, @post.author %> on <%= @post.created_at.strftime("%e. %b %Y") %>
<% if current_user && current_user.rank >= rank_to_int("mod") %>
- <%= link_to "edit", edit_blogpost_path(@post.id) %>
<% end %>
</span>
<div class="post-content">
<%= RbbCode.new.convert(@post.text).html_safe %>
</div>
<div id="comments">
<% @post.comments.each do |c| %>
<%= render "comments/comment", :c => c %>
<% end %>
<%= render "comments/new" %>
</div>
</div>