+ <% org_acts.first(4).each do |activity| %>
+ <% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' && activity.org_act_id != @organization.home_id %>
+ <% document = activity.org_act %>
+ <% org_subfield_id = params[:org_subfield_id] %>
+ <% flag = 2 %>
+ <% iamge_path = get_image_path_from_content(document.content) %>
+
+ <% if iamge_path.nil? %>
+ <%= link_to image_tag("/images/default_blank/left-04.jpg", :width => "185", :height => "125"), org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => "_blank", :class =>"sn-resourcesimg" %>
+ <% else %>
+ <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "185", :height => "125"), org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => "_blank", :class =>"sn-resourcesimg" %>
+ <% end %>
+
+ <%= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => '_blank', :class => "resources-title sn-hidden" %>
+
+
+ <%= link_to document.content.to_s.html_safe, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => '_blank', :class => "resources-tag" %>
+
+
更多
+
+ <% 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.parent_id.nil? %>
+ <% content = message.content%>
+ <% else %>
+ <% content = message.parent.content%>
+ <% end %>
+ <% 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 => "185", :height => "125"), board_message_url_in_org(message.board.id,message.id), :target => "_blank", :class =>"sn-resourcesimg" %>
+ <% else %>
+ <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "185", :height => "125"), board_message_url_in_org(message.board.id,message.id), :target => "_blank", :class =>"sn-resourcesimg" %>
+ <% 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 => "resources-title sn-hidden" %>
+ <% else %>
+ <%= link_to message.parent.subject.to_s.html_safe, board_message_url_in_org(message.board.id,message.id), :target => '_blank', :class => "resources-title sn-hidden" %>
+ <% end %>
+
+
+ <%= link_to content.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "resources-tag" %>
+
+
更多
+
+ <% else %>
+
+ <% if iamge_path.nil? %>
+ <%= link_to image_tag("/images/default_blank/left-04.jpg", :width => "185", :height => "125"), board_message_path(message.board,activity), :target => "_blank", :class =>"sn-resourcesimg" %>
+ <% else %>
+ <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "185", :height => "125"), board_message_path(message.board,activity), :target => "_blank", :class =>"sn-resourcesimg" %>
+ <% end %>
+
+ <% if message.parent_id.nil? %>
+ <%= link_to message.subject.to_s.html_safe, board_message_path(message.board,message), :target => '_blank', :class => "resources-title sn-hidden" %>
+ <% else %>
+ <%= link_to message.parent.subject.to_s.html_safe, board_message_path(message.board,activity), :target => '_blank', :class => "resources-title sn-hidden" %>
+ <% end %>
+
+
+ <%= link_to content.to_s.html_safe, board_message_path(message.board,activity), :target => '_blank', :class => "resources-tag" %>
+
+
更多
+
+ <% end %>
<% end %>
- <% 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/files-default.jpg", :width => "185", :height => "125"), board_message_url_in_org(message.board.id,message.id), :target => "_blank", :class =>"sn-resourcesimg" %>
- <% else %>
- <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "185", :height => "125"), board_message_url_in_org(message.board.id,message.id), :target => "_blank", :class =>"sn-resourcesimg" %>
- <% 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 => "resources-title sn-hidden" %>
- <% else %>
- <%= link_to message.parent.subject.to_s.html_safe, board_message_url_in_org(message.board.id,message.id), :target => '_blank', :class => "resources-title sn-hidden" %>
- <% end %>
-
-
- <%= link_to content.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "resources-tag" %>
-
-
更多
-
- <% else %>
+ <% 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/files-default.jpg", :width => "185", :height => "125"), board_message_path(message.board,activity), :target => "_blank", :class =>"sn-resourcesimg" %>
+ <%= link_to image_tag("/images/default_blank/left-04.jpg", :width => "185", :height => "125"), news_path(news), :target => "_blank", :class =>"sn-resourcesimg" %>
<% else %>
- <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "185", :height => "125"), board_message_path(message.board,activity), :target => "_blank", :class =>"sn-resourcesimg" %>
+ <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "185", :height => "125"), news_path(news), :target => "_blank", :class =>"sn-resourcesimg" %>
<% end %>
- <% if message.parent_id.nil? %>
- <%= link_to message.subject.to_s.html_safe, board_message_path(message.board,message), :target => '_blank', :class => "resources-title sn-hidden" %>
- <% else %>
- <%= link_to message.parent.subject.to_s.html_safe, board_message_path(message.board,activity), :target => '_blank', :class => "resources-title sn-hidden" %>
- <% end %>
+ <%= link_to news.title.to_s, news_path(news), :target => '_blank', :class => "resources-title sn-hidden" %>
- <%= link_to content.to_s.html_safe, board_message_path(message.board,activity), :target => '_blank', :class => "resources-tag" %>
+ <%= link_to news.description.to_s.html_safe, news_path(news), :target => '_blank', :class => "resources-tag" %>
更多
<% 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/files-default.jpg", :width => "185", :height => "125"), news_path(news), :target => "_blank", :class =>"sn-resourcesimg" %>
- <% else %>
- <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "185", :height => "125"), news_path(news), :target => "_blank", :class =>"sn-resourcesimg" %>
- <% end %>
-
- <%= link_to news.title.to_s, news_path(news), :target => '_blank', :class => "resources-title sn-hidden" %>
-
-
- <%= link_to news.description.to_s.html_safe, news_path(news), :target => '_blank', :class => "resources-tag" %>
-
-
更多
-
- <% end %>
<% end %>
- <% end %>
+
+