<% content_for :page_specific_css do -%> <%= stylesheet_link_tag "lib/group/group-main" %> <%= stylesheet_link_tag "//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" %> <%= stylesheet_link_tag "//cdnjs.cloudflare.com/ajax/libs/animate.css/3.2.6/animate.min.css" %> <% end -%> <% content_for :page_specific_javascript do -%> <%= javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/jquery.cycle2/20140415/jquery.cycle2.min.js" %> <%= javascript_include_tag "lib/jquery.form" %> <%= javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/jquery.cycle2/20140415/jquery.cycle2.center.min.js" %> <%= javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/wow/1.1.2/wow.min.js" %> <%= javascript_include_tag "group.js" %> <% end -%>

<%= @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 %>
<%= @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

<% 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 %>
  1. No comments yet. <%= (user_can_write? ? "Be the first one!" : "") %>
  2. <% end %>