|
|
|
@ -1,27 +1,169 @@
|
|
|
|
|
<div class="por_hotbar clear">
|
|
|
|
|
<h2 class="por_h2_index clear">网站头条<a href="javascript:void(0);" target="_blank" class="por_more_index fr">更多></a></h2>
|
|
|
|
|
<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 > 0 %>
|
|
|
|
|
<% acts.first(2).each do |activity| %>
|
|
|
|
|
<% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' && activity.org_act_id != @organization.home_id %>
|
|
|
|
|
<% document = activity.org_act %>
|
|
|
|
|
<li>
|
|
|
|
|
<a href="javascript:void(0);" target="_blank" class="por_hot_title "><span class="por_icons_hot fl">热门推荐</span>阿里前副总裁:阿里巴巴给我上的10</a>
|
|
|
|
|
<p class="mt5 mb5"><span class="por_time mr10">1分钟前 </span><a href="javascript:void(0);" target="_blank" class=" por_hot_name"> 窦豆</a></p>
|
|
|
|
|
<p class="por_hot_txt ">本文选自阿本文选自阿里本文选自阿里本文选自阿里本文选自阿里本文选自阿里里巴巴前副总裁、首任美籍高管波特·埃里斯曼《阿里传》在这本书里,波特概括了他在阿里巴巴任职的8年中,学到的40堂课这40堂课简单明了地概括了马云的经营理念,以及阿里终成帝国的必</p>
|
|
|
|
|
<%= link_to "<span class='por_icons_hot fl'>热门推荐</span>#{document.title}".html_safe, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), class: 'por_hot_title', :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", :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>
|
|
|
|
|
<a href="javascript:void(0);" target="_blank" class="por_hot_title "><span class="por_icons_hot fl">热门推荐</span>阿里前副总裁:阿里巴巴给我上的10</a>
|
|
|
|
|
<p class="mt5 mb5"><span class="por_time mr10">1分钟前 </span><a href="javascript:void(0);" target="_blank" class=" por_hot_name"> 窦豆</a></p>
|
|
|
|
|
<p class="por_hot_txt">本文选自阿本文选自阿里本文选自阿里本文选自阿里本文选自阿里本文选自阿里里巴巴前副总裁、首任美籍高管波特·埃里斯曼《阿里传》在这本书里,波特概括了他在阿里巴巴任职的8年中,学到的40堂课这40堂课简单明了地概括了马云的经营理念,以及阿里终成帝国的必</p>
|
|
|
|
|
<%= link_to "<span class='por_icons_hot fl'>热门推荐</span>#{title}".html_safe, board_message_url_in_org(message.board.id,message.id), class: 'por_hot_title', :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", :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>
|
|
|
|
|
<a href="javascript:void(0);" target="_blank" class="por_hot_title ">阿里前副总裁里前副总裁:里前副总裁:里前副总裁::阿里巴巴给我上的10</a>
|
|
|
|
|
<p class="mt5 mb5"><span class="por_time mr10">1分钟前 </span><a href="javascript:void(0);" target="_blank" class=" por_hot_name"> 窦豆</a></p>
|
|
|
|
|
<p class="por_hot_txt">本文选自阿本文选自阿里本文选自阿里本文选自阿里本文选自阿里本文选自阿里里巴巴前副总裁、首任美籍高管波特·埃里斯曼《阿里传》在这本书里,波特概括了他在阿里巴巴任职的8年中,学到的40堂课这40堂课简单明了地概括了马云的经营理念,以及阿里终成帝国的必</p>
|
|
|
|
|
<%= link_to "<span class='por_icons_hot fl'>热门推荐</span>#{title}".html_safe, board_message_path(message.board.id,message.id), class: 'por_hot_title', :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", :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 "<span class='por_icons_hot fl'>热门推荐</span>#{news.title}".html_safe, news_path(news), class: 'por_hot_title', :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", :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 %>
|
|
|
|
|
|
|
|
|
|
<% if acts.count > 2 %>
|
|
|
|
|
<% activity = acts[2] %>
|
|
|
|
|
<% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' && activity.org_act_id != @organization.home_id %>
|
|
|
|
|
<% 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', :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", :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', :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", :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', :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", :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', :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", :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 %>
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
<% if acts.count > 3 %>
|
|
|
|
|
<% activity = acts[3] %>
|
|
|
|
|
<% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' && activity.org_act_id != @organization.home_id %>
|
|
|
|
|
<% 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/left-04.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), :class => 'por_hot_title_r', :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", :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>
|
|
|
|
|
<% 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(document.content).nil? %>
|
|
|
|
|
<%= link_to image_tag("/images/default_blank/left-04.jpg", :width => "299", :height => "246"), board_message_url_in_org(:id => message.id, :organization_id => message.organization.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(:id => message.id, :organization_id => message.organization.id), :target => "_blank" %>
|
|
|
|
|
<% end %>
|
|
|
|
|
<%= link_to title, board_message_url_in_org(:id => message.id, :organization_id => message.organization.id), :class => 'por_hot_title_r', :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", :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>
|
|
|
|
|
<% else %>
|
|
|
|
|
<div class="por_hotbar_right fl">
|
|
|
|
|
<% if get_image_path_from_content(document.content).nil? %>
|
|
|
|
|
<%= link_to image_tag("/images/default_blank/left-04.jpg", :width => "299", :height => "246"), board_message_path(:id => message.id, :organization_id => message.organization.id), :target => "_blank" %>
|
|
|
|
|
<% else %>
|
|
|
|
|
<%= link_to image_tag("/files/uploads/image#{get_image_path_from_content(content)}", :width => "299", :height => "246"), board_message_path(:id => message.id, :organization_id => message.organization.id), :target => "_blank" %>
|
|
|
|
|
<% end %>
|
|
|
|
|
<%= link_to title, board_message_path(:id => message.id, :organization_id => message.organization.id), :class => 'por_hot_title_r', :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", :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>
|
|
|
|
|
<% 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">
|
|
|
|
|
<a href="javascript:void(0);" target="_blank" class=""><img src="/images/org_custom/por_img.jpg" width="299" height="246" alt=""/></a>
|
|
|
|
|
<a href="javascript:void(0);" target="_blank" class="por_hot_title_r ">阿里前副总裁里前副总裁:里前副总裁:里前副总裁::阿里巴巴给我上的10</a>
|
|
|
|
|
<p class="mt5 mb5"><span class="por_time mr10">1分钟前 </span><a href="javascript:void(0);" target="_blank" class=" por_hot_name"> 窦豆</a></p>
|
|
|
|
|
<p class="por_hot_txt_r ">本文选自阿本文选自阿里本文选自阿里本文选自阿里本文选自阿里本文选自阿里里巴巴前副总裁、首任美籍高管波特·埃里斯曼《阿里传》在这本书里,波特概括了他在阿里巴巴任职的8年中,学到的40堂课这40堂课简单明了地概括了马云的经营理念,以及阿里终成帝国的必</p>
|
|
|
|
|
<% if path.nil? %>
|
|
|
|
|
<%= link_to image_tag("/images/default_blank/left-04.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 %>
|
|
|
|
|
<%= link_to news.title, news_path(news), :class => 'por_hot_title_r', :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", :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>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</div><!--por_hotbar end-->
|