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-13 11:16:51 +00:00
|
|
|
<strong><%= namelink post.user.team %></strong>
|
2014-03-23 00:22:25 +00:00
|
|
|
<% end %>
|
|
|
|
|
2014-04-13 11:16:51 +00:00
|
|
|
<dl>
|
2015-04-11 10:34:52 +00:00
|
|
|
<% if post.user.groups.count > 0 %>
|
|
|
|
<dd>
|
|
|
|
<% if post.user.admin?%>
|
|
|
|
<dt><%= namelink Group.find(Group::ADMINS) %></dt>
|
|
|
|
<dd><%= post.user.groupers.where(:group_id => Group::ADMINS).first.task %></dd>
|
2015-04-11 13:31:11 +00:00
|
|
|
<% elsif post.user.staff?%>
|
|
|
|
<dt><%= namelink Group.find(Group::STAFF) %></dt>
|
|
|
|
<dd><%= post.user.groupers.where(:group_id => Group::STAFF).first.task %></dd>
|
2015-04-11 10:34:52 +00:00
|
|
|
<% elsif post.user.caster?%>
|
|
|
|
<dt><%= namelink Group.find(Group::CASTERS) %></dt>
|
|
|
|
<dd><%= post.user.groupers.where(:group_id => Group::CASTERS).first.task %></dd>
|
|
|
|
<% elsif post.user.ref?%>
|
|
|
|
<dt><%= namelink Group.find(Group::REFEREES) %></dt>
|
|
|
|
<dd><%= post.user.groupers.where(:group_id => Group::REFEREES).first.task %></dd>
|
|
|
|
<% else %>
|
|
|
|
<dt><%= namelink Group.find(post.user.groupers.first.group_id) %></dt>
|
|
|
|
<dd><%= post.user.groupers.first.task %></dd>
|
|
|
|
<% end %>
|
|
|
|
</dd>
|
|
|
|
<% end %>
|
2014-04-13 11:16:51 +00:00
|
|
|
<dt>Posts</dt>
|
|
|
|
<dd><%= post.user.posts.count %></dd>
|
|
|
|
<dt>Location</dt>
|
|
|
|
<dd><%= post.user.from %></dd>
|
|
|
|
<dt>Joined</dt>
|
2014-04-21 18:19:03 +00:00
|
|
|
<dd><%= longdate post.user.created_at %></dd>
|
2014-04-13 11:16:51 +00:00
|
|
|
</dl>
|
2014-04-12 01:35:42 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="content">
|
|
|
|
<div class="header">
|
|
|
|
<div class="time">
|
2014-04-29 18:18:14 +00:00
|
|
|
<span id="post_<%= post.id %>">
|
2014-04-29 20:02:20 +00:00
|
|
|
<%= longertime post.created_at %>
|
2014-04-29 18:18:14 +00:00
|
|
|
</span>
|
2014-04-12 01:35:42 +00:00
|
|
|
</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>
|
2014-03-23 00:22:25 +00:00
|
|
|
|
2014-05-02 16:43:23 +00:00
|
|
|
<div class="base">
|
2014-04-12 01:35:42 +00:00
|
|
|
<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
|
|
|
|
2014-05-02 16:43:23 +00:00
|
|
|
<div class="signature">
|
|
|
|
<%= post.user.profile.signature_parsed.html_safe if post.user.profile.signature_parsed %>
|
|
|
|
|
|
|
|
<div class="controls">
|
2014-04-12 01:35:42 +00:00
|
|
|
<% if post.topic.posts.build.can_create? cuser %>
|
2019-06-07 15:04:16 +00:00
|
|
|
<%= link_to '#', data:{on: :click, call: 'QuoteText', args: "#{post.id}"}, class: 'button tiny' %>
|
2014-04-12 01:35:42 +00:00
|
|
|
<% 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>
|