<div class="por_post mt10" style="display:<%= field.hide == 0 ? 'block':'none' %>;">
  <% if acts.blank? %>
      <h2 class="por_h2_index clear"><%= field.name %></h2>
      <p class="fontGrey2 f14 mt10 mb5">该模块暂时没有相关内容</p>
  <% else %>
      <h2 class="por_h2_index clear"><%= field.name %>
        <%= render :partial => 'organizations/link_subfield_more', :locals => {:field => field} %>
      </h2>
      <div class="por_post_left fl">
        <div class="por_post_leftbar ">
          <% activity = acts.first %>
          <% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' %>
              <% document = activity.org_act %>
              <% if get_image_path_from_content(document.content).nil? %>
                  <%= link_to image_tag("/images/default_blank/mo-3.jpg", :width => "299", :height => "246"), org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => "_blank" %>
              <% else %>
                  <%= link_to image_tag("/files/uploads/image#{get_image_path_from_content(document.content)}", :width => "299", :height => "246"), org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => "_blank" %>
              <% end %>
              <%= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => '_blank', :class => "por_post_title link-black", :title => document.title %>
              <p class="mt5 mb5">
                <span class="por_time mr10"><%= time_from_now(document.created_at) %> </span>
                <%= link_to document.creator.show_name, user_path(document.creator), :class => "por_hot_name link-blue", :target => "_blank" %>
              </p>
              <%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => acts.first.org_act.id, :content=> acts.first.org_act.content, :maxheight => 40, :maxwordsnum => 60, :maxwidth => 0, :cl => "por_post_txt"} %>
          <% else activity.container_type == 'OrgSubfield' %>
              <% if activity.org_act_type == 'Message' and activity.org_act_id and Message.where("id=#{activity.org_act_id}").count > 0 %>
                  <% message = activity.org_act %>
                  <% content = message.parent_id.nil? ? message.content : message.parent.content %>
                  <% title = message.parent_id.nil? ? message.subject : message.parent.subject %>
                  <% iamge_path = get_image_path_from_content(content) %>
                  <% if message.board.org_subfield_id %>
                      <% if iamge_path.nil? %>
                          <%= link_to image_tag("/images/default_blank/mo-3.jpg", :width => "299", :height => "246"), board_message_url_in_org(message.board.id,message.id), :target => "_blank" %>
                      <% else %>
                          <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "299", :height => "246"), board_message_url_in_org(message.board.id,message.id), :target => "_blank" %>
                      <% end %>
                      <%= link_to title, board_message_url_in_org(message.board.id,message.id), :target => '_blank', :class => "por_post_title link-black", :title => title %>
                      <p class="mt5 mb5">
                        <span class="por_time mr10"><%= time_from_now(message.created_on) %> </span>
                        <%= link_to message.author.show_name, user_path(message.author), :class => "por_hot_name link-blue", :target => "_blank" %>
                      </p>
                      <%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => message.id, :content=> message.content, :maxheight => 40, :maxwordsnum => 60, :maxwidth => 0, :cl => "por_post_txt"} %>
                  <% else %>
                      <% if iamge_path.nil? %>
                          <%= link_to image_tag("/images/default_blank/mo-3.jpg", :width => "299", :height => "246"), board_message_path(message.board, message), :target => "_blank" %>
                      <% else %>
                          <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "299", :height => "246"), board_message_path(message.board, message), :target => "_blank" %>
                      <% end %>
                      <%= link_to title, board_message_path(message.board, message), :target => '_blank', :class => "por_post_title link-black", :title => title %>
                      <p class="mt5 mb5">
                        <span class="por_time mr10"><%= time_from_now(message.created_on) %> </span>
                        <%= link_to message.author.show_name, user_path(message.author), :class => "por_hot_name link-blue", :target => "_blank" %>
                      </p>
                      <%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => message.id, :content=> message.content, :maxheight => 40, :maxwordsnum => 60, :maxwidth => 0, :cl => "por_post_txt"} %>
                  <% end %>
              <% end %>
              <% if activity.org_act_type == 'News' and News.where("id=?", activity.org_act_id).count > 0 %>
                  <% news = News.find(activity.org_act_id) %>
                  <% iamge_path = get_image_path_from_content(news.description) %>
                  <% if iamge_path.nil? %>
                      <%= link_to image_tag("/images/default_blank/mo-3.jpg", :width => "299", :height => "246"), news_path(news), :target => "_blank" %>
                  <% else %>
                      <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "299", :height => "246"), news_path(news), :target => "_blank" %>
                  <% end %>
                  <%= link_to news.title, news_path(news), :target => '_blank', :class => "por_post_title link-black", :title => news.title %>
                  <p class="mt5 mb5">
                    <span class="por_time mr10"><%= time_from_now(news.created_on) %> </span>
                    <%= link_to news.author.show_name, user_path(news.author), :class => "por_hot_name link-blue", :target => "_blank" %>
                  </p>
                  <%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => news.id, :content=> news.description, :maxheight => 40, :maxwordsnum => 60, :maxwidth => 0, :cl => "por_post_txt"} %>
              <% end %>
          <% end %>
        </div>
        <% unless acts[1..4].blank? %>
            <% acts[1..4].each do |activity| %>
                <% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' %>
                    <% document = activity.org_act %>
                    <ul class="por_post_list">
                      <li><%= link_to "<span class='post_icons_grey fl'></span>#{document.title}".html_safe, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), class: 'por_hidden_w390 link-black', :target => "_blank" %></li>
                    </ul>
                <% else activity.container_type == 'OrgSubfield' %>
                    <% if activity.org_act_type == 'Message' and activity.org_act_id and Message.where("id=#{activity.org_act_id}").count > 0 %>
                        <% message = Message.find(activity.org_act_id) %>
                        <% if message.board.org_subfield_id %>
                            <ul class="por_post_list">
                              <% if message.parent_id.nil? %> <!--+"(帖子标题)"-->
                                  <li><%= link_to "<span class='post_icons_grey fl'></span>#{message.subject}".html_safe, board_message_url_in_org(message.board.id, message.id), class: 'por_hidden_w390 link-black', :target => "_blank" %></li>
                              <% else %>
                                  <li><%= link_to "<span class='post_icons_grey fl'></span>#{message.parent.subject}".html_safe, board_message_url_in_org(message.board.id, message.id), class: 'por_hidden_w390 link-black', :target => "_blank" %></li>
                              <% end %>
                            </ul>
                        <% else %>
                            <ul class="por_post_list">
                              <% if message.parent_id.nil? %> <!--+"(帖子标题)"-->
                                  <li><%= link_to "<span class='post_icons_grey fl'></span>#{message.subject}".html_safe, board_message_path(message.board,message), class: 'por_hidden_w390 link-black', :target => "_blank" %></li>
                              <% else %>
                                  <li><%= link_to "<span class='post_icons_grey fl'></span>#{message.parent.subject}".html_safe, board_message_path(message.board, message), class: 'por_hidden_w390 link-black', :target => "_blank" %></li>
                              <% end %>
                            </ul>
                        <% end %>
                    <% end %>
                    <% if activity.org_act_type == 'News' and News.where("id=?", activity.org_act_id).count > 0 %>
                        <% news = News.find(activity.org_act_id) %>
                        <% iamge_path = get_image_path_from_content(news.description) %>
                        <ul class="por_post_list">
                          <li><%= link_to "<span class='post_icons_grey fl'></span>#{news.title}".html_safe, news_path(news), class: 'por_hidden_w390 link-black', :target => "_blank" %></li>
                        </ul>
                    <% end %>
                <% end %>
            <% end %>
        <% end %>
      </div>
      <% unless acts[5..16].blank? %>
          <div class="fl">
            <ul class="por_post_right por_post_list">
              <% acts[5..16].each do |activity| %>
                  <% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' %>
                      <% document = activity.org_act %>
                      <li><%= link_to "<span class='post_icons_grey fl'></span>#{document.title}".html_safe, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), class: 'por_hidden_w270 link-black', :target => "_blank" %></li>
                  <% else activity.container_type == 'OrgSubfield' %>
                      <% if activity.org_act_type == 'Message' and activity.org_act_id and Message.where("id=#{activity.org_act_id}").count > 0 %>
                          <% message = Message.find(activity.org_act_id) %>
                          <% if message.board.org_subfield_id %>
                              <% if message.parent_id.nil? %> <!--+"(帖子标题)"-->
                                  <li><%= link_to "<span class='post_icons_grey fl'></span>#{message.subject}".html_safe, board_message_url_in_org(message.board.id, message.id), class: 'por_hidden_w270 link-black', :target => "_blank" %></li>
                              <% else %>
                                  <li><%= link_to "<span class='post_icons_grey fl'></span>#{message.parent.subject}".html_safe, board_message_url_in_org(message.board.id, message.id), class: 'por_hidden_w270 link-black', :target => "_blank" %></li>
                              <% end %>
                          <% else %>
                              <% if message.parent_id.nil? %> <!--+"(帖子标题)"-->
                                  <li><%= link_to "<span class='post_icons_grey fl'></span>#{message.subject}".html_safe, board_message_path(message.board,message), class: 'por_hidden_w270 link-black', :target => "_blank" %></li>
                              <% else %>
                                  <li><%= link_to "<span class='post_icons_grey fl'></span>#{message.parent.subject}".html_safe, board_message_path(message.board, message), class: 'por_hidden_w270 link-black', :target => "_blank" %></li>
                              <% end %>
                          <% end %>
                      <% end %>
                      <% if activity.org_act_type == 'News' and News.where("id=?", activity.org_act_id).count > 0 %>
                          <% news = News.find(activity.org_act_id) %>
                          <% iamge_path = get_image_path_from_content(news.description) %>
                          <li><%= link_to "<span class='post_icons_grey fl'></span>#{news.title}".html_safe, news_path(news), class: 'por_hidden_w270 link-black', :target => "_blank" %></li>
                      <% end %>
                  <% end %>
              <% end %>
            </ul>
          </div>
      <% end %>
      <div class="cl"></div>
  <% end %>
</div><!--por_post end-->