2014-04-12 01:35:42 +00:00
|
|
|
<div id="post_<%= post.id %>" class="post">
|
|
|
|
<div class="avatar" rowspan="2">
|
|
|
|
<h5>
|
|
|
|
<%= link_to post.user, post.user, class: ("admin" if post.user.admin?) %>
|
|
|
|
</h5>
|
|
|
|
|
|
|
|
<div class="image">
|
|
|
|
<%= image_tag post.user.profile.avatar.url %>
|
|
|
|
</div>
|
2014-03-23 00:22:25 +00:00
|
|
|
|
|
|
|
<% if post.user.team %>
|
2014-04-12 01:35:42 +00:00
|
|
|
<%= namelink post.user.team %>
|
2014-03-23 00:22:25 +00:00
|
|
|
<% end %>
|
|
|
|
|
2014-04-12 01:35:42 +00:00
|
|
|
<%= cascade post.user, [["Posts", "posts.count"], "from", "joined"] %>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="content">
|
|
|
|
<div class="header">
|
|
|
|
<div class="time">
|
|
|
|
<a name="post_<%= post.id %>">
|
|
|
|
<%= longtime(post.created_at) %>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<div class="posts">
|
|
|
|
<%= link_to "##{post.number(@posts, n)}", "#post_#{post.id}" %>
|
|
|
|
</div>
|
2014-03-23 00:22:25 +00:00
|
|
|
</div>
|
|
|
|
|
2014-04-12 01:35:42 +00:00
|
|
|
<div class="text">
|
|
|
|
<%= post.text_parsed.html_safe %>
|
2014-03-23 00:22:25 +00:00
|
|
|
</div>
|
2014-04-12 01:35:42 +00:00
|
|
|
|
|
|
|
<div class="signature">
|
|
|
|
<%= post.user.profile.signature_parsed.html_safe if post.user.profile.signature_parsed %>
|
2014-03-23 00:22:25 +00:00
|
|
|
</div>
|
2014-04-12 01:35:42 +00:00
|
|
|
</div>
|
2014-03-23 00:22:25 +00:00
|
|
|
|
2014-04-12 01:35:42 +00:00
|
|
|
<div class="actions">
|
|
|
|
<div class="user">
|
|
|
|
<%= link_to "Send PM", { controller: "messages", action: "new", id: "User", id2: post.user }, class: 'button tiny' %>
|
2014-03-23 00:22:25 +00:00
|
|
|
</div>
|
2014-04-12 01:35:42 +00:00
|
|
|
|
|
|
|
<div class="reply">
|
|
|
|
<div class="right">
|
|
|
|
<% if post.topic.posts.build.can_create? cuser %>
|
|
|
|
<%= link_to_function 'Quote Reply', "QuoteText(#{post.id}); $('#reply').fadeIn('slow')", class: 'button tiny' %>
|
|
|
|
<% end %>
|
|
|
|
<% if post.can_update? cuser %>
|
|
|
|
<%= link_to 'Edit', edit_post_path(post), class: 'button tiny' %>
|
|
|
|
<% end %>
|
|
|
|
<% if post.can_destroy? cuser %>
|
|
|
|
<%= link_to 'Delete', post, confirm: 'Are you sure?', method: :delete, class: 'button tiny' %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|