末班六定配完成

This commit is contained in:
huang 2016-04-26 18:27:01 +08:00
parent 17b2e82963
commit b589d5b2ff
4 changed files with 298 additions and 51 deletions

View File

@ -137,6 +137,7 @@
<% if field.status.to_i == 1 %>
<%= render :partial => 'organizations/org_subfield_leftT', :locals => {:field => field} %>
<% elsif field.status.to_i == 2 %>
<%#= render :partial => 'organizations/org_subfield_leftM', :locals => {:field => field} %>
<div class="sn-index-leftbox" style="display:<%= field.hide == 0?'block':'none' %>;">
<h2 class="h2-title">业界动态<a href="javascript:void(0);" target="_blank" class="more">更多</a></h2>
<div class="cl"></div>
@ -178,57 +179,7 @@
<div class="cl"></div>
</div>
<% elsif field.status.to_i == 4 %>
<div class="sn-index-leftbox" style="display:<%= field.hide == 0?'block':'none' %>;">
<h2 class="h2-title">北斗资源<a href="javascript:void(0);" target="_blank" class="more">更多</a></h2>
<div class="sn-index-resourcescon">
<div class="sn-index-resourcesbox">
<a href="javascript:void(0);" target="_blank" class="sn-resourcesimg"><img src="/images/resources/img-resources01.jpg" width="185" height="125" alt=""/></a>
<h3><a href="javascript:void(0);" target="_blank" class="resources-title">仪器资源</a></h3>
<div class="resources-tagbox">
<a href="javascript:void(0);" target="_blank" class="resources-tag">测试服务</a>
<a href="javascript:void(0);" target="_blank" class="resources-tag">开放日</a>
<a href="javascript:void(0);" target="_blank" class="resources-tag">仪器共享</a>
<a href="javascript:void(0);" target="_blank" class="resources-tag">定制测试</a>
</div>
<a href="javascript:void(0);" target="_blank" class="more-btn">更多</a>
</div>
<div class="sn-index-resourcesbox">
<a href="javascript:void(0);" target="_blank" class="sn-resourcesimg"><img src="/images/resources/img-resources02.jpg" width="185" height="125" alt=""/></a>
<h3><a href="javascript:void(0);" target="_blank" class="resources-title">数据资源</a></h3>
<div class="resources-tagbox">
<a href="javascript:void(0);" target="_blank" class="resources-tag">仿真数据</a>
<a href="javascript:void(0);" target="_blank" class="resources-tag">实测数据</a>
<a href="javascript:void(0);" target="_blank" class="resources-tag">测试场景</a>
<a href="javascript:void(0);" target="_blank" class="resources-tag">定制测试</a>
</div>
<a href="javascript:void(0);" target="_blank" class="more-btn">更多</a>
</div>
<div class="sn-index-resourcesbox">
<a href="javascript:void(0);" target="_blank" class="sn-resourcesimg"><img src="/images/resources/img-resources03.jpg" width="185" height="125" alt=""/></a>
<h3><a href="javascript:void(0);" target="_blank" class="resources-title">专家资源</a></h3>
<div class="resources-tagbox">
<a href="javascript:void(0);" target="_blank" class="resources-tag">人才培养 </a>
<a href="javascript:void(0);" target="_blank" class="resources-tag">技术咨询</a>
<a href="javascript:void(0);" target="_blank" class="resources-tag">学术活动</a>
<a href="javascript:void(0);" target="_blank" class="resources-tag">教学教材</a>
<a href="javascript:void(0);" target="_blank" class="resources-tag">专家库</a>
</div>
<a href="javascript:void(0);" target="_blank" class="more-btn">更多</a>
</div>
<div class="sn-index-resourcesbox">
<a href="javascript:void(0);" target="_blank" class="sn-resourcesimg"><img src="/images/resources/img-resources04.jpg" width="185" height="125" alt=""/></a>
<h3><a href="javascript:void(0);" target="_blank" class="resources-title">研究资源</a></h3>
<div class="resources-tagbox">
<a href="javascript:void(0);" target="_blank" class="resources-tag">微小课题</a>
<a href="javascript:void(0);" target="_blank" class="resources-tag">开源代码</a>
<a href="javascript:void(0);" target="_blank" class="resources-tag">辅助工具</a>
<a href="javascript:void(0);" target="_blank" class="resources-tag">技术共享</a>
</div>
<a href="javascript:void(0);" target="_blank" class="more-btn">更多</a>
</div>
<div class="cl"></div>
</div>
</div>
<%= render :partial => 'organizations/org_subfield_leftMD', :locals => {:field => field} %>
<% elsif field.status.to_i == 5 %>
<div class="sn-index-leftbox" style="display:<%= field.hide == 0?'block':'none' %>;">
<h2 class="h2-title">合作伙伴<a href="javascript:void(0);" target="_blank" class="more">更多</a></h2>

View File

@ -0,0 +1,27 @@
<div class="sn-news-smallbox fl">
<div class="sn-news-small mb18">
<a href="javascript:void(0)" target="_blank" class="sn-news-smallimg fl"><img src="/images/news/img-news-small01.jpg" width="85" height="85" alt=""/></a>
<h4><a href="javascript:void(0)" target="_blank" class="h4-title fl mt10">北斗开放实验室迎湖南省省直机关领导调研参观</a></h4>
<span class="txt-grey fl">2016-04-08</span>
<div class="cl"></div>
</div>
<div class="sn-news-small mb18">
<a href="javascript:void(0)" target="_blank" class="sn-news-smallimg fl"><img src="/images/news/img-news-small02.jpg" width="85" height="85" alt=""/></a>
<h4><a href="javascript:void(0)" target="_blank" class="h4-title fl mt10">北斗开放实验室迎湖南省省直机关领导调研参观</a></h4>
<span class="txt-grey fl">2016-04-08</span>
<div class="cl"></div>
</div>
<div class="sn-news-small mb18">
<a href="javascript:void(0)" target="_blank" class="sn-news-smallimg fl"><img src="/images/news/img-news-small03.jpg" width="85" height="85" alt=""/></a>
<h4><a href="javascript:void(0)" target="_blank" class="h4-title fl mt10">北斗开放实验室迎湖南省省直机关领导调研参观</a></h4>
<span class="txt-grey fl">2016-04-08</span>
<div class="cl"></div>
</div>
<div class="sn-news-small ">
<a href="javascript:void(0)" target="_blank" class="sn-news-smallimg fl"><img src="/images/news/img-news-small04.jpg" width="85" height="85" alt=""/></a>
<h4><a href="javascript:void(0)" target="_blank" class="h4-title fl mt10">北斗开放实验室迎湖南省省直机关领导调研参观</a></h4>
<span class="txt-grey fl">2016-04-08</span>
<div class="cl"></div>
</div>
</div>
<div class="cl"></div>

View File

@ -0,0 +1,258 @@
<div class="sn-index-leftbox" style="display:<%= field.hide == 0?'block':'none' %>;">
<h2 class="h2-title"><%= field.name %><a href="javascript:void(0);" target="_blank" class="more">更多</a></h2>
<div class="sn-index-resourcescon">
<% if is_default_field?(field) %>
<% case field.name %>
<% when 'course' %>
<% if @course_acts.blank? %>
<%= render :partial => 'organizations/org_subfield_leftMD_default', :locals => {:field => field} %>
<% 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-resourcesbox">
<% if iamge_path.nil? %>
<%= link_to image_tag("/images/default_blank/files-default.jpg", :width => "185", :height => "125"), student_work_index_url_in_org(activity.id), :target => "_blank", :class =>"sn-resourcesimg" %>
<% else %>
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "185", :height => "125"), student_work_index_url_in_org(activity.id), :target => "_blank", :class =>"sn-resourcesimg" %>
<% end %>
<h3>
<%= link_to activity.name.to_s, student_work_index_url_in_org(activity.id), :target => '_blank', :class => "resources-title" %>
</h3>
<div class="resources-tagbox">
<%= link_to activity.description.to_s.html_safe, student_work_index_url_in_org(activity.id), :target => '_blank', :class => "resources-tag" %>
</div>
<a href="javascript:void(0);" target="_blank" class="more-btn">更多</a>
</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-resourcesbox">
<% if iamge_path.nil? %>
<%= link_to image_tag("/images/default_blank/files-default.jpg", :width => "185", :height => "125"), board_message_url_in_org(activity.board_id, activity.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(activity.board_id, activity.id), :target => "_blank", :class =>"sn-resourcesimg" %>
<% 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 => "resources-title" %>
<% else %>
<%= link_to activity.parent.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "resources-title" %>
<% end %>
</h3>
<div class="resources-tagbox">
<%= link_to activity.content.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "resources-tag" %>
</div>
<a href="javascript:void(0);" target="_blank" class="more-btn">更多</a>
</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-resourcesbox">
<% if iamge_path.nil? %>
<%= link_to image_tag("/images/default_blank/files-default.jpg", :width => "185", :height => "125"), news_url_in_org(activity.id), :target => "_blank", :class =>"sn-resourcesimg" %>
<% else %>
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "185", :height => "125"), news_url_in_org(activity.id), :target => "_blank", :class =>"sn-resourcesimg" %>
<% end %>
<h3>
<%= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank', :class => "resources-title" %>
</h3>
<div class="resources-tagbox">
<%= link_to activity.description.to_s.html_safe, news_url_in_org(activity.id), :target => '_blank', :class => "resources-tag" %>
</div>
<a href="javascript:void(0);" target="_blank" class="more-btn">更多</a>
</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-resourcesbox">
<% if iamge_path.nil? %>
<%= link_to image_tag("/images/default_blank/files-default.jpg", :width => "185", :height => "125"), Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => "_blank", :class =>"sn-resourcesimg" %>
<% else %>
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "185", :height => "125"), Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => "_blank", :class =>"sn-resourcesimg" %>
<% end %>
<h3>
<% if has_commit %>
<%= link_to poll_name, Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => '_blank', :class => "resources-title" %>
<% else %>
<%= link_to poll_name, Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => '_blank', :class => "resources-title" %>
<% end %>
</h3>
<div class="resources-tagbox">
<%= link_to activity.polls_description.to_s.html_safe, Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => '_blank', :class => "resources-tag" %>
</div>
<a href="javascript:void(0);" target="_blank" class="more-btn">更多</a>
</div>
<% end %>
<% end %>
<% end %>
<% end %>
<% when 'project' %>
<% if @project_acts.blank? %>
<%= render :partial => 'organizations/org_subfield_leftMD_default', :locals => {:field => field} %>
<% 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-resourcesbox">
<% if iamge_path.nil? %>
<%= link_to image_tag("/images/default_blank/files-default.jpg", :width => "185", :height => "125"), issue_url_in_org(activity.id), :target => "_blank", :class =>"sn-resourcesimg" %>
<% else %>
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "185", :height => "125"), issue_url_in_org(activity.id), :target => "_blank", :class =>"sn-resourcesimg" %>
<% end %>
<h3>
<%= link_to activity.subject.to_s, issue_url_in_org(activity.id), :target => '_blank', :class => "resources-title" %>
</h3>
<div class="resources-tagbox">
<%= link_to activity.description.to_s.html_safe, issue_url_in_org(activity.id), :target => '_blank', :class => "resources-tag" %>
</div>
<a href="javascript:void(0);" target="_blank" class="more-btn">更多</a>
</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-resourcesbox">
<% if iamge_path.nil? %>
<%= link_to image_tag("/images/default_blank/files-default.jpg", :width => "185", :height => "125"), board_message_url_in_org(activity.board_id, activity.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(activity.board_id, activity.id), :target => "_blank", :class =>"sn-resourcesimg" %>
<% 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 => "resources-title" %>
<% else %>
<%= link_to activity.parent.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "resources-title" %>
<% end %>
</h3>
<div class="resources-tagbox">
<%= link_to activity.content.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "resources-tag" %>
</div>
<a href="javascript:void(0);" target="_blank" class="more-btn">更多</a>
</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-resourcesbox">
<% if iamge_path.nil? %>
<%= link_to image_tag("/images/default_blank/files-default.jpg", :width => "185", :height => "125"), board_message_url_in_org(activity.board_id, activity.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(activity.board_id, activity.id), :target => "_blank", :class =>"sn-resourcesimg" %>
<% end %>
<h3>
<%= link_to activity.description.to_s.html_safe, news_url_in_org(activity.id), :target => '_blank', :class => "resources-title" %>
</h3>
<div class="resources-tagbox">
<%= link_to activity.content.to_s.html_safe, news_url_in_org(activity.id), :target => '_blank', :class => "resources-tag" %>
</div>
<a href="javascript:void(0);" target="_blank" class="more-btn">更多</a>
</div>
<% end %>
<% end %>
<% 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} %>
<% 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-resourcesbox">
<% if iamge_path.nil? %>
<%= link_to image_tag("/images/default_blank/files-default.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 %>
<h3>
<%= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => '_blank', :class => "resources-title" %>
</h3>
<div class="resources-tagbox">
<%= 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" %>
</div>
<a href="javascript:void(0);" target="_blank" class="more-btn">更多</a>
</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 %>
<% content = message.parent.content%>
<% end %>
<% iamge_path = get_image_path_from_content(content) %>
<% if message.board.org_subfield_id %>
<div class="sn-index-resourcesbox">
<% 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 %>
<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 => "resources-title" %>
<% 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" %>
<% end %>
</h3>
<div class="resources-tagbox">
<%= link_to content.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "resources-tag" %>
</div>
<a href="javascript:void(0);" target="_blank" class="more-btn">更多</a>
</div>
<% else %>
<div class="sn-index-resourcesbox">
<% 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" %>
<% 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 %>
<h3>
<% if message.parent_id.nil? %> <!--+"(帖子标题)"-->
<%= link_to message.subject.to_s.html_safe, board_message_path(message.board,message), :target => '_blank', :class => "resources-title" %>
<% else %>
<%= link_to message.parent.subject.to_s.html_safe, board_message_path(message.board,activity), :target => '_blank', :class => "resources-title" %>
<% end %>
</h3>
<div class="resources-tagbox">
<%= link_to content.to_s.html_safe, board_message_path(message.board,activity), :target => '_blank', :class => "resources-tag" %>
</div>
<a href="javascript:void(0);" target="_blank" class="more-btn">更多</a>
</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-resourcesbox">
<% 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 %>
<h3>
<%= link_to news.title.to_s, news_path(news), :target => '_blank', :class => "resources-title" %>
</h3>
<div class="resources-tagbox">
<%= link_to news.description.to_s.html_safe, news_path(news), :target => '_blank', :class => "resources-tag" %>
</div>
<a href="javascript:void(0);" target="_blank" class="more-btn">更多</a>
</div>
<% end %>
<% end %>
<% end %>
<% end %>
<% end %>
<% end %>
<div class="cl"></div>
</div>
</div>

View File

@ -0,0 +1,11 @@
<div class="sn-index-resourcesbox">
<a href="javascript:void()" target="_blank" class="sn-resourcesimg"><img src="/images/default_blank/files-default.jpg" width="185" height="125" alt=""/></a>
<h3><a href="javascript:void()" target="_blank" class="resources-title">仪器资源</a></h3>
<div class="resources-tagbox">
<a href="javascript:void()" target="_blank" class="resources-tag">测试服务</a>
<a href="javascript:void()" target="_blank" class="resources-tag">开放日</a>
<a href="javascript:void()" target="_blank" class="resources-tag">仪器共享</a>
<a href="javascript:void()" target="_blank" class="resources-tag">定制测试</a>
</div>
<a href="javascript:void()" target="_blank" class="more-btn">更多</a>
</div>