diff --git a/app/views/organizations/_org_custom_left1.html.erb b/app/views/organizations/_org_custom_left1.html.erb index 4410f9545..6a2cea552 100644 --- a/app/views/organizations/_org_custom_left1.html.erb +++ b/app/views/organizations/_org_custom_left1.html.erb @@ -1,27 +1,169 @@ -
-

网站头条更多>

- -
- - 阿里前副总裁里前副总裁:里前副总裁:里前副总裁::阿里巴巴给我上的10 -

1分钟前 窦豆

-

本文选自阿本文选自阿里本文选自阿里本文选自阿里本文选自阿里本文选自阿里里巴巴前副总裁、首任美籍高管波特·埃里斯曼《阿里传》在这本书里,波特概括了他在阿里巴巴任职的8年中,学到的40堂课这40堂课简单明了地概括了马云的经营理念,以及阿里终成帝国的必

-
+
+ <% if acts.blank? %> +

<%= field.name %>

+

该模块暂时没有相关内容

+ <% else %> +

<%= field.name %> + <%= render :partial => 'organizations/link_subfield_more', :locals => {:field => field} %> +

+ + + <% 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 %> +
+ <% 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 %> +

<%= time_from_now(document.created_at) %><%= link_to document.creator.show_name, user_path(document.creator), :class => "por_hot_name", :target => "_blank" %>

+ <%=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"} %> +
+ <% 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 %> +
+ <% 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 %> +

<%= time_from_now(message.created_on) %><%= link_to message.author.show_name, user_path(message.author), :class => "por_hot_name", :target => "_blank" %>

+ <%=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"} %> +
+ <% else %> +
+ <% 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 %> +

<%= time_from_now(message.created_on) %><%= link_to message.author.show_name, user_path(message.author), :class => "por_hot_name", :target => "_blank" %>

+ <%=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"} %> +
+ <% 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) %> +
+ <% 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 %> +

<%= time_from_now(news.created_on) %><%= link_to news.author.show_name, user_path(news.author), :class => "por_hot_name", :target => "_blank" %>

+ <%=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"} %> +
+ <% end %> + <% end %> + <% end %> + + <% end %>
\ No newline at end of file diff --git a/app/views/organizations/_org_custom_left3.html.erb b/app/views/organizations/_org_custom_left3.html.erb index 822aa7f78..cdc4f62f3 100644 --- a/app/views/organizations/_org_custom_left3.html.erb +++ b/app/views/organizations/_org_custom_left3.html.erb @@ -9,67 +9,67 @@
<% activity = acts.first %> - <% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' && activity.org_act_id != @organization.home_id %> - <% document = activity.org_act %> - <% if get_image_path_from_content(acts.first.org_act.content).nil? %> - <%= link_to image_tag("/images/default_blank/left-04.jpg", :width => "299", :height => "246"), org_document_comment_path(:id => acts.first.org_act.id, :organization_id => acts.first.org_act.organization.id), :target => "_blank" %> - <% else %> - <%= link_to image_tag("/files/uploads/image#{get_image_path_from_content(acts.first.org_act.content)}", :width => "299", :height => "246"), org_document_comment_path(:id => acts.first.org_act.id, :organization_id => acts.first.org_act.organization.id), :target => "_blank" %> - <% end %> - <%= link_to activity.org_act.title, org_document_comment_path(:id => acts.first.org_act.id, :organization_id => acts.first.org_act.organization.id), :target => '_blank', :class => "por_post_title", :title => activity.org_act.title %> -

- <%= time_from_now(acts.first.org_act.created_at) %> - <%= link_to acts.first.org_act.creator, user_path(acts.first.org_act.creator), :class => "por_hot_name", :target => "_blank" %> -

- <%=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/left-04.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", :title => title %> -

- <%= time_from_now(message.created_on) %> - <%= link_to message.author, user_path(message.author), :class => "por_hot_name", :target => "_blank" %> -

- <%=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"} %> + <% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' && activity.org_act_id != @organization.home_id %> + <% document = activity.org_act %> + <% 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), :target => '_blank', :class => "por_post_title", :title => document.title %> +

+ <%= time_from_now(document.created_at) %> + <%= link_to document.creator.show_name, user_path(document.creator), :class => "por_hot_name", :target => "_blank" %> +

+ <%=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/left-04.jpg", :width => "299", :height => "246"), board_message_url_in_org(message.board.id,message.id), :target => "_blank" %> <% else %> - <% if iamge_path.nil? %> - <%= link_to image_tag("/images/default_blank/left-04.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", :title => title %> -

- <%= time_from_now(message.created_on) %> - <%= link_to message.author, user_path(message.author), :class => "por_hot_name", :target => "_blank" %> -

- <%=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"} %> + <%= 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 %> - <% 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) %> + <%= link_to title, board_message_url_in_org(message.board.id,message.id), :target => '_blank', :class => "por_post_title", :title => title %> +

+ <%= time_from_now(message.created_on) %> + <%= link_to message.author.show_name, user_path(message.author), :class => "por_hot_name", :target => "_blank" %> +

+ <%=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/left-04.jpg", :width => "299", :height => "246"), news_path(news), :target => "_blank" %> + <%= link_to image_tag("/images/default_blank/left-04.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"), news_path(news), :target => "_blank" %> + <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "299", :height => "246"), board_message_path(message.board, message), :target => "_blank" %> <% end %> - <%= link_to news.title, news_path(news), :target => '_blank', :class => "por_post_title", :title => news.title %> + <%= link_to title, board_message_path(message.board, message), :target => '_blank', :class => "por_post_title", :title => title %>

- <%= time_from_now(news.created_on) %> - <%= link_to news.author, user_path(news.author), :class => "por_hot_name", :target => "_blank" %> + <%= time_from_now(message.created_on) %> + <%= link_to message.author.show_name, user_path(message.author), :class => "por_hot_name", :target => "_blank" %>

- <%=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"} %> + <%=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/left-04.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", :title => news.title %> +

+ <%= time_from_now(news.created_on) %> + <%= link_to news.author.show_name, user_path(news.author), :class => "por_hot_name", :target => "_blank" %> +

+ <%=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 %> <% unless acts[1..5].nil? %> <% acts[1..5].each do |activity| %> diff --git a/app/views/organizations/_show_custom.html.erb b/app/views/organizations/_show_custom.html.erb index 6f5c64379..a7d7f4f78 100644 --- a/app/views/organizations/_show_custom.html.erb +++ b/app/views/organizations/_show_custom.html.erb @@ -1,7 +1,7 @@
<% @subfield_content.each do |field| %> <% if field.status.to_i == 1 %> - <%= render :partial => 'organizations/org_custom_left1', :locals => {:field => field} %> + <%= render :partial => 'organizations/org_custom_left1', :locals => {:field => field, :acts => get_subfield_acts(field) } %> <% elsif field.status.to_i == 2 %> <%= render :partial => 'organizations/org_custom_left2', :locals => {:field => field} %> <% elsif field.status.to_i == 3 %>