orbit4-5/app/views/admin/groups/_post_comment.html.erb

45 lines
1.7 KiB
Plaintext

<li class="group-show-post-comment card">
<div class="group-show-post-actions action tool-tip-parent">
<button class="group-show-post-dropdown-toggle toggle">
<span class="caret"></span>
</button>
<ul class="group-show-post-dropdown action-dropdown">
<li class="group-show-post-dropdown-item">
<a href="#">
<i class="fa fa-flag-o"></i>
Flag inappropriate</a>
</a>
</li>
<li class="group-show-post-dropdown-item">
<a href="#" class="delete-post-btn">
<i class="fa fa-trash-o"></i>
Delete this post
</a>
</li>
</ul>
</div>
<div class="group-show-post-comment-wrap">
<div class="group-show-post-comment-avatar">
<%
user = post_comment.user rescue nil
if !user.nil?
author = (user.member_profile.name == nil ? user.user_name : user.member_profile.name rescue "")
avatar = (!user.member_profile.avatar.nil? ? user.member_profile.avatar.thumb.url : "/assets/member-pic.png" rescue "/assets/member-pic.png")
end
%>
<img src="<%= avatar %> " alt="Avatar image">
</div>
<div class="group-show-post-comment-body">
<div class="group-show-post-comment-author-wrap">
<div class="group-show-post-comment-author"><%= author %></div>
<% date = DateTime.parse(post_comment.created_at.to_s).strftime("%d %B") %>
<div class="group-show-post-comment-time muted"><%= date %></div>
</div>
<div class="group-show-post-comment-content">
<% content_images = parse_for_images(post_comment.comment) %>
<%= content_images.first %>
<%= content_images.last.html_safe %>
</div>
</div>
</div>
</li>