My Groups / <%= @group.title %> / <%= @post.title %> <%= @post.title %> <% user = User.find(@post.author) 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 %> <%= author %> <% date = DateTime.parse(@post.created_at.to_s).strftime("%d %B %H:%M ") %> <%= date %> <% @post.group_post_images.each do |gpi| %> <% end %> <%= @post.content.html_safe %> <% if !@post.group_post_files.blank? %> <% @post.group_post_files.each do |gpf| %> <%= File.basename(gpf.file.path) %> <% end %> <% end %> <% if !@read_by_names.blank? %> Seen by: <%= @read_by_names.count %> <% @read_by_names.each do |name| %> <%= name %> <% end %> <% end %> <% if user_can_write? %> Leave a comment Comment <% else %> Join the group to comment on this post. <% end %> Comments <%= render :partial => "post_comment", :collection => @post.group_post_comments.desc(:created_at) %> <% if @post.group_post_comments.length == 0 %> No comments yet. <%= (user_can_write? ? "Be the first one!" : "") %> <% end %>
Join the group to comment on this post.
Comments
<%= render :partial => "post_comment", :collection => @post.group_post_comments.desc(:created_at) %> <% if @post.group_post_comments.length == 0 %>- No comments yet. <%= (user_can_write? ? "Be the first one!" : "") %>
<% end %>