<%= link_to post.user, post.user, class: ("admin" if post.user.admin?) %>
<%= image_tag post.user.profile.avatar.url %>
<% if post.user.team %>
<%= namelink post.user.team %>
<% end %>
<% if post.user.groups.count > 0 %>
-
<% if post.user.admin?%>
- <%= namelink Group.find(Group::ADMINS) %>
- <%= post.user.groupers.where(:group_id => Group::ADMINS).first.task %>
<% elsif post.user.staff?%>
- <%= namelink Group.find(Group::STAFF) %>
- <%= post.user.groupers.where(:group_id => Group::STAFF).first.task %>
<% elsif post.user.caster?%>
- <%= namelink Group.find(Group::CASTERS) %>
- <%= post.user.groupers.where(:group_id => Group::CASTERS).first.task %>
<% elsif post.user.ref?%>
- <%= namelink Group.find(Group::REFEREES) %>
- <%= post.user.groupers.where(:group_id => Group::REFEREES).first.task %>
<% else %>
- <%= namelink Group.find(post.user.groupers.first.group_id) %>
- <%= post.user.groupers.first.task %>
<% end %>
<% end %>
- Posts
- <%= post.user.posts.count %>
- Location
- <%= post.user.from %>
- Joined
- <%= longdate post.user.created_at %>
<%= post.text_parsed.html_safe %>
<%= link_to "Send PM", { controller: "messages", action: "new", id: "User", id2: post.user }, class: 'button tiny' %>
<%= post.user.profile.signature_parsed.html_safe if post.user.profile.signature_parsed %>
<% if post.topic.posts.build.can_create? cuser %>
<%= link_to '#', data:{on: :click, call: 'QuoteText', args: "#{post.id}"}, 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 %>