模式6没有内容的显示
This commit is contained in:
parent
33bf4fafa6
commit
d86fec6f03
|
@ -76,7 +76,7 @@ class OrganizationsController < ApplicationController
|
|||
|
||||
def show
|
||||
# 组织新类型 show_mode:判断标准 1为新类型,0为旧
|
||||
if @organization.show_mode.t == 1 && params[:org_subfield_id].nil? && params[:list] .nil?
|
||||
if @organization.show_mode.to_i == 1 && params[:org_subfield_id].nil? && params[:list] .nil?
|
||||
if @organization.is_public? || User.current.admin? || User.current.member_of_org?(@organization)
|
||||
# REDO:时间紧,暂时先这样
|
||||
@org_logo_attchment = Attachment.where("container_id =? and container_type =? and attachtype =?", @organization, "Organization", 0).order("created_on desc").first
|
||||
|
|
|
@ -1,223 +1,244 @@
|
|||
<div class="sn-index-activebox" style="display:<%= field.hide == 0?'block':'none' %>;">
|
||||
<h2 class="h2-title mb18"><%= field.name %><a href="javascript:void(0);" target="_blank" class="more">更多</a></h2>
|
||||
<% if is_default_field?(field) %>
|
||||
<% case field.name %>
|
||||
<% when 'course' %>
|
||||
<% if @course_acts.blank? %>
|
||||
<%= render :partial => 'organizations/org_subfield_rightT_default', :locals => {:field => field} %>
|
||||
<div class="sn-index-activebox" style="display:<%= field.hide == 0?'block':'none' %>;">
|
||||
<h2 class="h2-title mb18"><%= field.name %></h2>
|
||||
<%= render :partial => 'organizations/org_subfield_rightT_default', :locals => {:field => field} %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% else %>
|
||||
<% @course_acts.first(4).each do |act| %>
|
||||
<% if act.org_act_type == "HomeworkCommon" %>
|
||||
<% activity = HomeworkCommon.find(act.org_act_id) %>
|
||||
<% iamge_path = get_image_path_from_content(activity.description) %>
|
||||
<div class="sn-index-active">
|
||||
<% if iamge_path.nil? %>
|
||||
<%= link_to image_tag("/images/default_blank/right_top.jpg", :width => "330", :height => "210"), student_work_index_url_in_org(activity.id), :target => "_blank", :class =>"sn-activeimg" %>
|
||||
<% else %>
|
||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "330", :height => "210"), student_work_index_url_in_org(activity.id), :target => "_blank", :class =>"sn-activeimg" %>
|
||||
<% end %>
|
||||
<h3>
|
||||
<%= link_to activity.name.to_s, student_work_index_url_in_org(activity.id), :target => '_blank', :class => "active-title" %>
|
||||
</h3>
|
||||
<span class="txt-grey "><%= format_date activity.updated_at %></span>
|
||||
</div>
|
||||
<% elsif act.org_act_type == "Message" %>
|
||||
<% activity = Message.find(act.org_act_id) %>
|
||||
<% iamge_path = get_image_path_from_content(activity.content) %>
|
||||
<div class="sn-index-active">
|
||||
<% if iamge_path.nil? %>
|
||||
<%= link_to image_tag("/images/default_blank/files-default.jpg", :width => "330", :height => "210"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class =>"sn-activeimg" %>
|
||||
<% else %>
|
||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "330", :height => "210"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class =>"sn-activeimg" %>
|
||||
<% end %>
|
||||
<h3>
|
||||
<% if activity.parent_id.nil? %> <!--+"(帖子标题)"-->
|
||||
<%= link_to activity.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "active-title" %>
|
||||
<div class="sn-index-activebox" style="display:<%= field.hide == 0?'block':'none' %>;">
|
||||
<h2 class="h2-title mb18"><%= field.name %></h2>
|
||||
<% @course_acts.first(4).each do |act| %>
|
||||
<% if act.org_act_type == "HomeworkCommon" %>
|
||||
<% activity = HomeworkCommon.find(act.org_act_id) %>
|
||||
<% iamge_path = get_image_path_from_content(activity.description) %>
|
||||
<div class="sn-index-active">
|
||||
<% if iamge_path.nil? %>
|
||||
<%= link_to image_tag("/images/default_blank/right-01.jpg", :width => "330", :height => "210"), student_work_index_url_in_org(activity.id), :target => "_blank", :class =>"sn-activeimg" %>
|
||||
<% else %>
|
||||
<%= link_to activity.parent.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "active-title" %>
|
||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "330", :height => "210"), student_work_index_url_in_org(activity.id), :target => "_blank", :class =>"sn-activeimg" %>
|
||||
<% end %>
|
||||
</h3>
|
||||
<span class="txt-grey "><%= format_date activity.updated_on %></span>
|
||||
</div>
|
||||
<% elsif act.org_act_type == "News" %>
|
||||
<% activity = News.find(act.org_act_id) %>
|
||||
<% iamge_path = get_image_path_from_content(activity.description) %>
|
||||
<div class="sn-index-active">
|
||||
<% if iamge_path.nil? %>
|
||||
<%= link_to image_tag("/images/default_blank/files-default.jpg", :width => "330", :height => "210"), news_url_in_org(activity.id), :target => "_blank", :class =>"sn-activeimg" %>
|
||||
<% else %>
|
||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "330", :height => "210"), news_url_in_org(activity.id), :target => "_blank", :class =>"sn-activeimg" %>
|
||||
<% end %>
|
||||
<h3>
|
||||
<%= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank', :class => "active-title" %>
|
||||
</h3>
|
||||
<span class="txt-grey "><%= format_date activity.created_on %></span>
|
||||
</div>
|
||||
<% elsif act.org_act_type == "Poll" %>
|
||||
<% activity = Poll.find(act.org_act_id) %>
|
||||
<% has_commit = has_commit_poll?(activity.id ,User.current)%>
|
||||
<% poll_name = activity.polls_name.empty? ? l(:label_poll_new) : activity.polls_name%>
|
||||
<% iamge_path = get_image_path_from_content(activity.polls_description) %>
|
||||
<% if ( activity.polls_status==2) %>
|
||||
<div class="sn-index-active">
|
||||
<% if iamge_path.nil? %>
|
||||
<%= link_to image_tag("/images/default_blank/files-default.jpg", :width => "330", :height => "210"), Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => "_blank", :class =>"sn-activeimg" %>
|
||||
<h3>
|
||||
<%= link_to activity.name.to_s, student_work_index_url_in_org(activity.id), :target => '_blank', :class => "active-title" %>
|
||||
</h3>
|
||||
<span class="txt-grey "><%= format_date activity.updated_at %></span>
|
||||
</div>
|
||||
<% elsif act.org_act_type == "Message" %>
|
||||
<% activity = Message.find(act.org_act_id) %>
|
||||
<% iamge_path = get_image_path_from_content(activity.content) %>
|
||||
<div class="sn-index-active">
|
||||
<% if iamge_path.nil? %>
|
||||
<%= link_to image_tag("/images/default_blank/right-01.jpg", :width => "330", :height => "210"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class =>"sn-activeimg" %>
|
||||
<% else %>
|
||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "330", :height => "210"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class =>"sn-activeimg" %>
|
||||
<% end %>
|
||||
<h3>
|
||||
<% if activity.parent_id.nil? %> <!--+"(帖子标题)"-->
|
||||
<%= link_to activity.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "active-title" %>
|
||||
<% else %>
|
||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "330", :height => "210"), Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => "_blank", :class =>"sn-activeimg" %>
|
||||
<%= link_to activity.parent.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "active-title" %>
|
||||
<% end %>
|
||||
<h3>
|
||||
<% if has_commit %>
|
||||
<%= link_to poll_name, Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => '_blank', :class => "active-title" %>
|
||||
</h3>
|
||||
<span class="txt-grey "><%= format_date activity.updated_on %></span>
|
||||
</div>
|
||||
<% elsif act.org_act_type == "News" %>
|
||||
<% activity = News.find(act.org_act_id) %>
|
||||
<% iamge_path = get_image_path_from_content(activity.description) %>
|
||||
<div class="sn-index-active">
|
||||
<% if iamge_path.nil? %>
|
||||
<%= link_to image_tag("/images/default_blank/right-01.jpg", :width => "330", :height => "210"), news_url_in_org(activity.id), :target => "_blank", :class =>"sn-activeimg" %>
|
||||
<% else %>
|
||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "330", :height => "210"), news_url_in_org(activity.id), :target => "_blank", :class =>"sn-activeimg" %>
|
||||
<% end %>
|
||||
<h3>
|
||||
<%= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank', :class => "active-title" %>
|
||||
</h3>
|
||||
<span class="txt-grey "><%= format_date activity.created_on %></span>
|
||||
</div>
|
||||
<% elsif act.org_act_type == "Poll" %>
|
||||
<% activity = Poll.find(act.org_act_id) %>
|
||||
<% has_commit = has_commit_poll?(activity.id ,User.current)%>
|
||||
<% poll_name = activity.polls_name.empty? ? l(:label_poll_new) : activity.polls_name%>
|
||||
<% iamge_path = get_image_path_from_content(activity.polls_description) %>
|
||||
<% if ( activity.polls_status==2) %>
|
||||
<div class="sn-index-active">
|
||||
<% if iamge_path.nil? %>
|
||||
<%= link_to image_tag("/images/default_blank/right-01.jpg", :width => "330", :height => "210"), Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => "_blank", :class =>"sn-activeimg" %>
|
||||
<% else %>
|
||||
<%= link_to poll_name, Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => '_blank', :class => "active-title" %>
|
||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "330", :height => "210"), Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => "_blank", :class =>"sn-activeimg" %>
|
||||
<% end %>
|
||||
</h3>
|
||||
<span class="txt-grey "><%= format_date activity.published_at %></span>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<h3>
|
||||
<% if has_commit %>
|
||||
<%= link_to poll_name, Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => '_blank', :class => "active-title" %>
|
||||
<% else %>
|
||||
<%= link_to poll_name, Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => '_blank', :class => "active-title" %>
|
||||
<% end %>
|
||||
</h3>
|
||||
<span class="txt-grey "><%= format_date activity.published_at %></span>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
<% when 'project' %>
|
||||
<% if @project_acts.blank? %>
|
||||
<%= render :partial => 'organizations/org_subfield_leftMD_default', :locals => {:field => field} %>
|
||||
<div class="sn-index-activebox" style="display:<%= field.hide == 0?'block':'none' %>;">
|
||||
<h2 class="h2-title mb18"><%= field.name %></h2>
|
||||
<%= render :partial => 'organizations/org_subfield_rightT_default', :locals => {:field => field} %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% else %>
|
||||
<% @project_acts.first(4).each do |act| %>
|
||||
<% if act.org_act_type == "Issue" %>
|
||||
<% activity = Issue.find(act.org_act_id) %>
|
||||
<% iamge_path = get_image_path_from_content(activity.description) %>
|
||||
<div class="sn-index-active">
|
||||
<% if iamge_path.nil? %>
|
||||
<%= link_to image_tag("/images/default_blank/files-default.jpg", :width => "330", :height => "210"), issue_url_in_org(activity.id), :target => "_blank", :class =>"sn-activeimg" %>
|
||||
<% else %>
|
||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "330", :height => "210"), issue_url_in_org(activity.id), :target => "_blank", :class =>"sn-activeimg" %>
|
||||
<% end %>
|
||||
<h3>
|
||||
<%= link_to activity.subject.to_s, issue_url_in_org(activity.id), :target => '_blank', :class => "active-title" %>
|
||||
</h3>
|
||||
<span class="txt-grey "><%= format_date activity.updated_on %></span>
|
||||
</div>
|
||||
<% elsif act.org_act_type == "Message" %>
|
||||
<% activity = Message.find(act.org_act_id) %>
|
||||
<% iamge_path = get_image_path_from_content(activity.content) %>
|
||||
<div class="sn-index-active">
|
||||
<% if iamge_path.nil? %>
|
||||
<%= link_to image_tag("/images/default_blank/files-default.jpg", :width => "330", :height => "210"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class =>"sn-activeimg" %>
|
||||
<% else %>
|
||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "330", :height => "210"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class =>"sn-activeimg" %>
|
||||
<% end %>
|
||||
<h3>
|
||||
<% if activity.parent_id.nil? %> <!--+"(帖子标题)"-->
|
||||
<%= link_to activity.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "active-title" %>
|
||||
<div class="sn-index-activebox" style="display:<%= field.hide == 0?'block':'none' %>;">
|
||||
<h2 class="h2-title mb18"><%= field.name %><a href="javascript:void(0);" target="_blank" class="more">更多</a></h2>
|
||||
<% @project_acts.first(4).each do |act| %>
|
||||
<% if act.org_act_type == "Issue" %>
|
||||
<% activity = Issue.find(act.org_act_id) %>
|
||||
<% iamge_path = get_image_path_from_content(activity.description) %>
|
||||
<div class="sn-index-active">
|
||||
<% if iamge_path.nil? %>
|
||||
<%= link_to image_tag("/images/default_blank/right-01.jpg", :width => "330", :height => "210"), issue_url_in_org(activity.id), :target => "_blank", :class =>"sn-activeimg" %>
|
||||
<% else %>
|
||||
<%= link_to activity.parent.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "active-title" %>
|
||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "330", :height => "210"), issue_url_in_org(activity.id), :target => "_blank", :class =>"sn-activeimg" %>
|
||||
<% end %>
|
||||
</h3>
|
||||
<span class="txt-grey "><%= format_date activity.updated_on %></span>
|
||||
</div>
|
||||
<% elsif act.org_act_type == "News" %>
|
||||
<% activity = News.find(act.org_act_id) %>
|
||||
<% iamge_path = get_image_path_from_content(activity.description) %>
|
||||
<div class="sn-index-active">
|
||||
<% if iamge_path.nil? %>
|
||||
<%= link_to image_tag("/images/default_blank/files-default.jpg", :width => "330", :height => "210"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class =>"sn-activeimg" %>
|
||||
<% else %>
|
||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "330", :height => "210"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class =>"sn-activeimg" %>
|
||||
<% end %>
|
||||
<h3>
|
||||
<%= link_to activity.description.to_s.html_safe, news_url_in_org(activity.id), :target => '_blank', :class => "active-title" %>
|
||||
</h3>
|
||||
<span class="txt-grey "><%= format_date activity.created_on %></span>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<h3>
|
||||
<%= link_to activity.subject.to_s, issue_url_in_org(activity.id), :target => '_blank', :class => "active-title" %>
|
||||
</h3>
|
||||
<span class="txt-grey "><%= format_date activity.updated_on %></span>
|
||||
</div>
|
||||
<% elsif act.org_act_type == "Message" %>
|
||||
<% activity = Message.find(act.org_act_id) %>
|
||||
<% iamge_path = get_image_path_from_content(activity.content) %>
|
||||
<div class="sn-index-active">
|
||||
<% if iamge_path.nil? %>
|
||||
<%= link_to image_tag("/images/default_blank/right-01.jpg", :width => "330", :height => "210"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class =>"sn-activeimg" %>
|
||||
<% else %>
|
||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "330", :height => "210"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class =>"sn-activeimg" %>
|
||||
<% end %>
|
||||
<h3>
|
||||
<% if activity.parent_id.nil? %> <!--+"(帖子标题)"-->
|
||||
<%= link_to activity.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "active-title" %>
|
||||
<% else %>
|
||||
<%= link_to activity.parent.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "active-title" %>
|
||||
<% end %>
|
||||
</h3>
|
||||
<span class="txt-grey "><%= format_date activity.updated_on %></span>
|
||||
</div>
|
||||
<% elsif act.org_act_type == "News" %>
|
||||
<% activity = News.find(act.org_act_id) %>
|
||||
<% iamge_path = get_image_path_from_content(activity.description) %>
|
||||
<div class="sn-index-active">
|
||||
<% if iamge_path.nil? %>
|
||||
<%= link_to image_tag("/images/default_blank/right-01.jpg", :width => "330", :height => "210"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class =>"sn-activeimg" %>
|
||||
<% else %>
|
||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "330", :height => "210"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class =>"sn-activeimg" %>
|
||||
<% end %>
|
||||
<h3>
|
||||
<%= link_to activity.description.to_s.html_safe, news_url_in_org(activity.id), :target => '_blank', :class => "active-title" %>
|
||||
</h3>
|
||||
<span class="txt-grey "><%= format_date activity.created_on %></span>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% if field.field_type == "Post" %>
|
||||
<% org_acts = get_subfield_acts field %>
|
||||
<% if org_acts.blank? %>
|
||||
<%= render :partial => 'organizations/org_subfield_leftMD_default', :locals => {:field => field} %>
|
||||
<div class="sn-index-activebox" style="display:<%= field.hide == 0?'block':'none' %>;">
|
||||
<h2 class="h2-title mb18"><%= field.name %></h2>
|
||||
<%= render :partial => 'organizations/org_subfield_rightT_default', :locals => {:field => field} %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% else %>
|
||||
<% 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) %>
|
||||
<div class="sn-index-active">
|
||||
<% if iamge_path.nil? %>
|
||||
<%= link_to image_tag("/images/default_blank/files-default.jpg", :width => "330", :height => "210"), org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => "_blank", :class =>"sn-activeimg" %>
|
||||
<% else %>
|
||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "330", :height => "210"), org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => "_blank", :class =>"sn-activeimg" %>
|
||||
<% end %>
|
||||
<h3>
|
||||
<%= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => '_blank', :class => "active-title" %>
|
||||
</h3>
|
||||
<span class="txt-grey "><%= format_date document.created_at %></span>
|
||||
</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 = Message.find(activity.org_act_id) %>
|
||||
<% if message.parent_id.nil? %>
|
||||
<% content = message.content%>
|
||||
<div class="sn-index-activebox" style="display:<%= field.hide == 0?'block':'none' %>;">
|
||||
<h2 class="h2-title mb18"><%= field.name %><a href="javascript:void(0);" target="_blank" class="more">更多</a></h2>
|
||||
<% 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) %>
|
||||
<div class="sn-index-active">
|
||||
<% if iamge_path.nil? %>
|
||||
<%= link_to image_tag("/images/default_blank/right-01.jpg", :width => "330", :height => "210"), org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => "_blank", :class =>"sn-activeimg" %>
|
||||
<% else %>
|
||||
<% content = message.parent.content%>
|
||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "330", :height => "210"), org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => "_blank", :class =>"sn-activeimg" %>
|
||||
<% end %>
|
||||
<% iamge_path = get_image_path_from_content(content) %>
|
||||
<% if message.board.org_subfield_id %>
|
||||
<div class="sn-index-active">
|
||||
<% if iamge_path.nil? %>
|
||||
<%= link_to image_tag("/images/default_blank/files-default.jpg", :width => "330", :height => "210"), board_message_url_in_org(message.board.id,message.id), :target => "_blank", :class =>"sn-activeimg" %>
|
||||
<% else %>
|
||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "330", :height => "210"), board_message_url_in_org(message.board.id,message.id), :target => "_blank", :class =>"sn-activeimg" %>
|
||||
<% end %>
|
||||
<h3>
|
||||
<% 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 => "active-title" %>
|
||||
<% else %>
|
||||
<%= link_to message.parent.subject.to_s.html_safe, board_message_url_in_org(message.board.id,message.id), :target => '_blank', :class => "active-title" %>
|
||||
<% end %>
|
||||
</h3>
|
||||
<span class="txt-grey "><%= format_date message.created_on %></span>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="sn-index-active">
|
||||
<% if iamge_path.nil? %>
|
||||
<%= link_to image_tag("/images/default_blank/files-default.jpg", :width => "330", :height => "210"), board_message_path(message.board,activity), :target => "_blank", :class =>"sn-activeimg" %>
|
||||
<% else %>
|
||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "330", :height => "210"), board_message_path(message.board,activity), :target => "_blank", :class =>"sn-activeimg" %>
|
||||
<% end %>
|
||||
<h3>
|
||||
<% if message.parent_id.nil? %> <!--+"(帖子标题)"-->
|
||||
<%= link_to message.subject.to_s.html_safe, board_message_path(message.board,message), :target => '_blank', :class => "active-title" %>
|
||||
<% else %>
|
||||
<%= link_to message.parent.subject.to_s.html_safe, board_message_path(message.board,activity), :target => '_blank', :class => "active-title" %>
|
||||
<% end %>
|
||||
</h3>
|
||||
<span class="txt-grey "><%= format_date message.created_on %></span>
|
||||
</div>
|
||||
<% 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) %>
|
||||
<div class="sn-index-active">
|
||||
<% if iamge_path.nil? %>
|
||||
<%= link_to image_tag("/images/default_blank/files-default.jpg", :width => "330", :height => "210"), news_path(news), :target => "_blank", :class =>"sn-activeimg" %>
|
||||
<h3>
|
||||
<%= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => '_blank', :class => "active-title" %>
|
||||
</h3>
|
||||
<span class="txt-grey "><%= format_date document.created_at %></span>
|
||||
</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 = Message.find(activity.org_act_id) %>
|
||||
<% if message.parent_id.nil? %>
|
||||
<% content = message.content%>
|
||||
<% else %>
|
||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "330", :height => "210"), news_path(news), :target => "_blank", :class =>"sn-activeimg" %>
|
||||
<% content = message.parent.content%>
|
||||
<% end %>
|
||||
<h3>
|
||||
<%= link_to news.title.to_s, news_path(news), :target => '_blank', :class => "active-title" %>
|
||||
</h3>
|
||||
<span class="txt-grey "><%= format_date news.created_on %></span>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% iamge_path = get_image_path_from_content(content) %>
|
||||
<% if message.board.org_subfield_id %>
|
||||
<div class="sn-index-active">
|
||||
<% if iamge_path.nil? %>
|
||||
<%= link_to image_tag("/images/default_blank/right-01.jpg", :width => "330", :height => "210"), board_message_url_in_org(message.board.id,message.id), :target => "_blank", :class =>"sn-activeimg" %>
|
||||
<% else %>
|
||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "330", :height => "210"), board_message_url_in_org(message.board.id,message.id), :target => "_blank", :class =>"sn-activeimg" %>
|
||||
<% end %>
|
||||
<h3>
|
||||
<% 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 => "active-title" %>
|
||||
<% else %>
|
||||
<%= link_to message.parent.subject.to_s.html_safe, board_message_url_in_org(message.board.id,message.id), :target => '_blank', :class => "active-title" %>
|
||||
<% end %>
|
||||
</h3>
|
||||
<span class="txt-grey "><%= format_date message.created_on %></span>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="sn-index-active">
|
||||
<% if iamge_path.nil? %>
|
||||
<%= link_to image_tag("/images/default_blank/right-01.jpg", :width => "330", :height => "210"), board_message_path(message.board,activity), :target => "_blank", :class =>"sn-activeimg" %>
|
||||
<% else %>
|
||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "330", :height => "210"), board_message_path(message.board,activity), :target => "_blank", :class =>"sn-activeimg" %>
|
||||
<% end %>
|
||||
<h3>
|
||||
<% if message.parent_id.nil? %> <!--+"(帖子标题)"-->
|
||||
<%= link_to message.subject.to_s.html_safe, board_message_path(message.board,message), :target => '_blank', :class => "active-title" %>
|
||||
<% else %>
|
||||
<%= link_to message.parent.subject.to_s.html_safe, board_message_path(message.board,activity), :target => '_blank', :class => "active-title" %>
|
||||
<% end %>
|
||||
</h3>
|
||||
<span class="txt-grey "><%= format_date message.created_on %></span>
|
||||
</div>
|
||||
<% 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) %>
|
||||
<div class="sn-index-active">
|
||||
<% if iamge_path.nil? %>
|
||||
<%= link_to image_tag("/images/default_blank/right-01.jpg", :width => "330", :height => "210"), news_path(news), :target => "_blank", :class =>"sn-activeimg" %>
|
||||
<% else %>
|
||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "330", :height => "210"), news_path(news), :target => "_blank", :class =>"sn-activeimg" %>
|
||||
<% end %>
|
||||
<h3>
|
||||
<%= link_to news.title.to_s, news_path(news), :target => '_blank', :class => "active-title" %>
|
||||
</h3>
|
||||
<span class="txt-grey "><%= format_date news.created_on %></span>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
|
@ -0,0 +1,5 @@
|
|||
<div class="sn-index-active">
|
||||
<a href="javascript:void()" target="_blank" class="sn-activeimg"><img src="/images/default_blank/right-01.jpg" width="330" height="210" alt=""/></a>
|
||||
<h3><a href="javascript:void()" target="_blank" class="active-title">北斗第二次工作会议在北京召议在北京召开议在北京召开开</a></h3>
|
||||
<span class="txt-grey ">2016-04-08</span>
|
||||
</div>
|
Loading…
Reference in New Issue