<div class="por_hotbar clear" 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>
      <ul class="por_hotbar_left fl">
        <% if acts.count > 1 %>
            <% acts[1..3].each do |activity| %>
                <% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' %>
                    <% document = activity.org_act %>
                    <li>
                      <%= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), class: 'por_hot_title link-black', :target => "_blank", :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 => document.id, :content=> document.content, :maxheight => 60, :maxwordsnum => 80, :maxwidth => 0, :cl => "por_hot_txt"} %>
                    </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 = activity.org_act %>
                        <% content = message.parent_id.nil? ? message.content : message.parent.content %>
                        <% title = message.parent_id.nil? ? message.subject : message.parent.subject %>
                        <% if message.board.org_subfield_id %>
                            <li>
                              <%= link_to title, board_message_url_in_org(message.board.id,message.id), class: 'por_hot_title link-black', :target => "_blank", :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=> content, :maxheight => 60, :maxwordsnum => 80, :maxwidth => 0, :cl => "por_hot_txt"} %>
                            </li>
                        <% else %>
                            <li>
                              <%= link_to title, board_message_path(message.board.id,message.id), class: 'por_hot_title link-black', :target => "_blank", :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=> content, :maxheight => 60, :maxwordsnum => 80, :maxwidth => 0, :cl => "por_hot_txt"} %>
                            </li>
                        <% end %>
                    <% end %>
                    <% if activity.org_act_type == 'News' and News.where("id=?", activity.org_act_id).count > 0 %>
                        <% news = activity.org_act %>
                        <li>
                          <%= link_to news.title, news_path(news), class: 'por_hot_title link-black', :target => "_blank", :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 => 60, :maxwordsnum => 80, :maxwidth => 0, :cl => "por_hot_txt"} %>
                        </li>
                    <% end %>
                <% end %>
            <% end %>
        <% end %>
      </ul>

      <%# if acts.count > 3 %>
          <% activity = acts.first %>
          <% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment'  %>
              <% document = activity.org_act %>
              <div class="por_hotbar_right fl">
                <% if get_image_path_from_content(document.content).nil? %>
                    <%= link_to image_tag("/images/default_blank/mo-1.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 %>
                <div style="background: #f8fafb; padding:3px 5px">
                  <%= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :class => 'por_hot_title_r link-black', :target => "_blank", :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 => document.id, :content=> document.content, :maxheight => 80, :maxwordsnum => 90, :maxwidth => 0, :cl => "por_hot_txt_r"} %>
                </div>
              </div>
          <% 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 %>
                  <% if message.board.org_subfield_id %>
                      <div class="por_hotbar_right fl">
                        <% if get_image_path_from_content(content).nil? %>
                            <%= link_to image_tag("/images/default_blank/mo-1.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#{get_image_path_from_content(content)}", :width => "299", :height => "246"), board_message_url_in_org(message.board.id, message.id), :target => "_blank" %>
                        <% end %>
                        <div style="background: #f8fafb; padding:3px 5px">
                          <%= link_to title, board_message_url_in_org(message.board.id, message.id), :class => 'por_hot_title_r link-black', :target => "_blank", :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=> content, :maxheight => 80, :maxwordsnum => 90, :maxwidth => 0, :cl => "por_hot_txt_r"} %>
                        </div>
                      </div>
                  <% else %>
                      <div class="por_hotbar_right fl">
                        <% if get_image_path_from_content(document.content).nil? %>
                            <%= link_to image_tag("/images/default_blank/mo-1.jpg", :width => "299", :height => "246"), board_message_path(message.board.id, message.id), :target => "_blank" %>
                        <% else %>
                            <%= link_to image_tag("/files/uploads/image#{get_image_path_from_content(content)}", :width => "299", :height => "246"), board_message_path(message.board.id, message.id), :target => "_blank" %>
                        <% end %>
                        <div style="background: #f8fafb; padding:3px 5px">
                          <%= link_to title, board_message_path(message.board.id, message.id), :class => 'por_hot_title_r link-black', :target => "_blank", :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=> content, :maxheight => 80, :maxwordsnum => 90, :maxwidth => 0, :cl => "por_hot_txt_r"} %>
                        </div>
                      </div>
                  <% end %>
              <% end %>
              <% if activity.org_act_type == 'News' and News.where("id=?", activity.org_act_id).count > 0 %>
                  <% news = activity.org_act %>
                  <% path = get_image_path_from_content(news.description) %>
                  <div class="por_hotbar_right fl">
                    <% if path.nil? %>
                        <%= link_to image_tag("/images/default_blank/mo-1.jpg", :width => "299", :height => "246"), news_path(news), :target => "_blank" %>
                    <% else %>
                        <%= link_to image_tag("/files/uploads/image#{path}", :width => "299", :height => "246"), news_path(news), :target => "_blank" %>
                    <% end %>
                    <div style="background: #f8fafb; padding:3px 5px">
                      <%= link_to news.title, news_path(news), :class => 'por_hot_title_r link-black', :target => "_blank", :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 => 80, :maxwordsnum => 90, :maxwidth => 0, :cl => "por_hot_txt_r"} %>
                    </div>
                  </div>
              <% end %>
          <% end %>
      <% end %>

  <%# end %>
  <div class="cl"></div>
</div><!--por_hotbar end-->

<script>
  $(".por_hotbar_left li:last").css("borderBottom","none");
</script>