+ <%= link_to title, board_message_url_in_org(message.board.id, message.id), :target => '_blank', :class => "por_course_title", :title => title %>
<% if iamge_path.nil? %>
- <%= link_to image_tag("/images/default_blank/left-02.jpg", :width => "380", :height => "165"), board_message_url_in_org(message.board.id,message.id), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %>
+ <%= link_to image_tag("/images/default_blank/left-02.jpg", :width => "140", :height => "100"), board_message_url_in_org(message.board.id, message.id), :target => "_blank", :class =>"fl" %>
<% else %>
- <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "380", :height => "165"), board_message_url_in_org(message.board.id,message.id), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %>
+ <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "140", :height => "100"), board_message_url_in_org(message.board.id, message.id), :target => "_blank", :class =>"fl" %>
<% end %>
-
- <%= link_to message.parent_id.nil? ? message.subject.to_s.html_safe : message.parent.subject.to_s.html_safe, board_message_url_in_org(message.board.id,message.id), :target => '_blank', :class => "h3-title" %>
-
-
<%= format_date message.created_on %>
-
-
<%= content.to_s.html_safe %>
-
-
<%=link_to "查看全文>>", board_message_url_in_org(message.board.id,message.id), :target => "_blank", :class => "sn-link-grey2 sn-fr" %>
+ <%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => message.id, :content=> content, :maxheight => 80, :maxwordsnum => 56, :maxwidth => 0, :cl => "por_course_txt fl"} %>
+
<%= time_from_now message.created_on %>
+
+ <%= link_to title, board_message_path(message.board, message.id), :target => '_blank', :class => "por_course_title", :title => title %>
<% if iamge_path.nil? %>
- <%= link_to image_tag("/images/default_blank/left-02.jpg", :width => "380", :height => "165"), board_message_path(message.board,activity), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %>
+ <%= link_to image_tag("/images/default_blank/left-02.jpg", :width => "140", :height => "100"), board_message_path(message.board.id, message.id), :target => "_blank", :class =>"fl" %>
<% else %>
- <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "380", :height => "165"), board_message_path(message.board,activity), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %>
+ <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "140", :height => "100"), board_message_path(message.board.id, message.id), :target => "_blank", :class =>"fl" %>
<% end %>
-
- <% if message.parent_id.nil? %>
- <%= link_to message.subject.to_s.html_safe, board_message_path(message.board,message), :target => '_blank', :class => "h3-title" %>
- <% else %>
- <%= link_to message.parent.subject.to_s.html_safe, board_message_path(message.board,activity), :target => '_blank', :class => "h3-title" %>
- <% end %>
-
-
<%= format_date message.created_on %>
-
-
<%= content.to_s.html_safe %>
-
-
- <% if message.parent_id.nil? %>
- <%=link_to "查看全文>>", board_message_path(message.board,message), :target => "_blank", :class => "sn-link-grey2 sn-fr" %>
- <% else %>
- <%=link_to "查看全文>>", board_message_path(message.board,activity), :target => "_blank", :class => "sn-link-grey2 sn-fr" %>
- <% end %>
-
+ <%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => message.id, :content=> content, :maxheight => 80, :maxwordsnum => 56, :maxwidth => 0, :cl => "por_course_txt fl"} %>
+
<%= time_from_now message.created_on %>
<% 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) %>
+ <% if activity.org_act_type == 'News' and News.where(:id => activity.org_act_id).count > 0 %>
+ <% news = activity.org_act %>
<% iamge_path = get_image_path_from_content(news.description) %>
-
+
+ <%= link_to news.title, news_path(news), :target => '_blank', :class => "por_course_title", :title => news.title %>
<% if iamge_path.nil? %>
- <%= link_to image_tag("/images/default_blank/left-02.jpg", :width => "380", :height => "165"), news_path(news), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %>
+ <%= link_to image_tag("/images/default_blank/left-02.jpg", :width => "140", :height => "100"), news_path(news), :target => "_blank", :class =>"fl" %>
<% else %>
- <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "380", :height => "165"), news_path(news), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %>
+ <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "140", :height => "100"), news_path(news), :target => "_blank", :class =>"fl" %>
<% end %>
-
- <%= link_to news.title.to_s, news_path(news), :target => '_blank', :class => "h3-title" %>
-
-
<%= format_date news.created_on %>
-
-
<%= news.description.to_s.html_safe %>
-
-
<%=link_to "查看全文>>", news_path(news), :target => "_blank", :class => "sn-link-grey2 sn-fr" %>
+ <%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => news.id, :content=> news.description, :maxheight => 80, :maxwordsnum => 56, :maxwidth => 0, :cl => "por_course_txt fl"} %>
+
<%= time_from_now news.created_on %>
<% end %>
<% end %>
@@ -273,18 +194,5 @@
<% 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 63cb584cc..822aa7f78 100644
--- a/app/views/organizations/_org_custom_left3.html.erb
+++ b/app/views/organizations/_org_custom_left3.html.erb
@@ -16,7 +16,7 @@
<% 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 acts.first.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" %>
+ <%= 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" %>
@@ -24,8 +24,9 @@
<%=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 = Message.find(activity.org_act_id) %>
+ <% 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? %>
@@ -33,11 +34,7 @@
<% 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 %>
- <% if message.parent_id.nil? %>
- <%= link_to message.subject.to_s.html_safe, board_message_url_in_org(message.board.id,message.id), :target => '_blank', :class => "por_post_title" %>
- <% else %>
- <%= link_to message.parent.subject.to_s.html_safe, board_message_url_in_org(message.board.id,message.id), :target => '_blank', :class => "por_post_title" %>
- <% 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" %>
@@ -49,11 +46,7 @@
<% else %>
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "299", :height => "246"), board_message_path(message.board, message), :target => "_blank" %>
<% end %>
- <% if message.parent_id.nil? %>
- <%= link_to message.subject.to_s.html_safe, board_message_path(message.board, message), :target => '_blank', :class => "por_post_title" %>
- <% else %>
- <%= link_to message.parent.subject.to_s.html_safe, board_message_path(message.board, message), :target => '_blank', :class => "por_post_title" %>
- <% 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" %>
@@ -69,7 +62,7 @@
<% else %>
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "299", :height => "246"), news_path(news), :target => "_blank" %>
<% end %>
- <%= link_to news.title.to_s, news_path(news), :target => '_blank', :class => "por_post_title" %>
+ <%= 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, user_path(news.author), :class => "por_hot_name", :target => "_blank" %>