Merge branch 'develop' of https://git.trustie.net/jacknudt/trustieforge into develop
commit
b681e3a597
@ -1 +1 @@
|
|||||||
{"access_token":"yFUfEXFu0_Pl_jdojoRv6eA8pmGjyRkRIL1VCB2HZ4kVJhEq6crriyCRCI-_u5QbWgtepiIOvqTHtXpKgzMuaB7Eo7MjlMcXeecqhzTjnvpivK5HUzGhZXBG1dk_BxicJAFlCAARIN","expires_in":7200,"got_token_at":1461934858}
|
{"access_token":"bFlabz0uBcoIBfWL7nBJkgpl26aOWDy-dyCOvH_MjUo_hMOOKG83WV1cCL1MG6H-AE-6eMI0iyLoOoAMv9Y3pFFsLYD-GAGr3UH9fT8OqeHMDlFhXyRTvHv9l2QPHGpcARUcCGANEH","expires_in":7200,"got_token_at":1462934760}
|
@ -0,0 +1,3 @@
|
|||||||
|
# Place all the behaviors and hooks related to the matching controller here.
|
||||||
|
# All this logic will automatically be available in application.js.
|
||||||
|
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
|
@ -0,0 +1,3 @@
|
|||||||
|
# Place all the behaviors and hooks related to the matching controller here.
|
||||||
|
# All this logic will automatically be available in application.js.
|
||||||
|
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
|
@ -0,0 +1,3 @@
|
|||||||
|
// Place all the styles related to the sub_document_comments controller here.
|
||||||
|
// They will automatically be included in application.css.
|
||||||
|
// You can use Sass (SCSS) here: http://sass-lang.com/
|
@ -0,0 +1,3 @@
|
|||||||
|
// Place all the styles related to the sub_domains controller here.
|
||||||
|
// They will automatically be included in application.css.
|
||||||
|
// You can use Sass (SCSS) here: http://sass-lang.com/
|
@ -0,0 +1,63 @@
|
|||||||
|
class SubDomainsController < ApplicationController
|
||||||
|
layout 'base_org'
|
||||||
|
before_filter :find_org_subfield_and_subdomain, :only => [:show, :index, :domain_update_priority, :destroy, :update, :hide_sub_domain, :show_sub_domain]
|
||||||
|
|
||||||
|
def new
|
||||||
|
@subdomain = SubDomain.new
|
||||||
|
@org_subfield = OrgSubfield.find(params[:org_subfield_id])
|
||||||
|
@organization = @org_subfield.organization
|
||||||
|
end
|
||||||
|
|
||||||
|
def create
|
||||||
|
if SubDomain.where("org_subfield_id=#{params[:org_subfield_id]} and name=?",params[:name]).count == 0
|
||||||
|
@res = true
|
||||||
|
@subfield = OrgSubfield.find(params[:org_subfield_id])
|
||||||
|
@organization = @subfield.organization
|
||||||
|
@subdomain = SubDomain.create(:name => params[:name], :org_subfield_id => params[:org_subfield_id], :priority => @subfield.sub_domains.blank? ? 1 : @subfield.sub_domains.order("priority").last.priority + 1)
|
||||||
|
@subdomain.update_column(:field_type, params[:field_type])
|
||||||
|
else
|
||||||
|
@res = false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def update
|
||||||
|
@subdomain.update_column(:name, params[:name])
|
||||||
|
end
|
||||||
|
|
||||||
|
def domain_update_priority
|
||||||
|
@subdomain.update_attribute(:priority, params[:priority].to_i)
|
||||||
|
end
|
||||||
|
|
||||||
|
def destroy
|
||||||
|
@subdomain.destroy
|
||||||
|
end
|
||||||
|
|
||||||
|
def show
|
||||||
|
render_404
|
||||||
|
# @subfield_content = @organization.org_subfields.order("priority")
|
||||||
|
# render layout: @organization.switch_type ? 'base_sub_domain' : 'base_org'
|
||||||
|
end
|
||||||
|
|
||||||
|
def index
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
def hide_sub_domain
|
||||||
|
@subdomain.update_attribute(:hide, 1)
|
||||||
|
end
|
||||||
|
|
||||||
|
def show_sub_domain
|
||||||
|
@subdomain.update_attribute(:hide, 0)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
private
|
||||||
|
def find_org_subfield_and_subdomain
|
||||||
|
@subfield = OrgSubfield.find(params[:org_subfield_id])
|
||||||
|
@subdomain = SubDomain.find(params[:id])
|
||||||
|
@organization = @subfield.organization
|
||||||
|
rescue ActiveRecord::RecordNotFound
|
||||||
|
# source_subdomain not found
|
||||||
|
render_404
|
||||||
|
end
|
||||||
|
end
|
@ -0,0 +1,2 @@
|
|||||||
|
module SubDocumentCommentsHelper
|
||||||
|
end
|
@ -0,0 +1,5 @@
|
|||||||
|
module SubDomainsHelper
|
||||||
|
include OrganizationsHelper
|
||||||
|
|
||||||
|
|
||||||
|
end
|
@ -0,0 +1,33 @@
|
|||||||
|
class SubDocumentComment < ActiveRecord::Base
|
||||||
|
attr_accessible :content, :creator_id, :locked, :org_subfield_id, :parent_id, :reply_id, :sticky, :sub_domain_id, :title
|
||||||
|
|
||||||
|
include Redmine::SafeAttributes
|
||||||
|
include ApplicationHelper
|
||||||
|
belongs_to :sub_domain
|
||||||
|
belongs_to :creator, :class_name => 'User', :foreign_key => 'creator_id'
|
||||||
|
acts_as_tree :order => "#{SubDocumentComment.table_name}.sticky asc, #{SubDocumentComment.table_name}.created_at desc"
|
||||||
|
acts_as_attachable
|
||||||
|
has_many :org_acts, :class_name => 'OrgActivity',:as =>:org_act ,:dependent => :destroy
|
||||||
|
after_create :document_save_as_sub_activity
|
||||||
|
after_update :update_activity
|
||||||
|
validates_presence_of :content
|
||||||
|
|
||||||
|
#动态的更新
|
||||||
|
private
|
||||||
|
def update_activity
|
||||||
|
org_activity = OrgActivity.where("org_act_type='SubDocumentComment' and org_act_id =?", id).first
|
||||||
|
if org_activity
|
||||||
|
org_activity.updated_at = Time.now
|
||||||
|
org_activity.save
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def document_save_as_sub_activity
|
||||||
|
if(self.parent().nil?)
|
||||||
|
self.org_acts << OrgActivity.new(:user_id => User.current.id, :container_id => self.sub_domain.id, :container_type => 'SubDomain')
|
||||||
|
else
|
||||||
|
act = OrgActivity.where("org_act_type='SubDocumentComment' and org_act_id =?", self.root.id).first
|
||||||
|
act.update_attributes(:updated_at => self.updated_at)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
@ -0,0 +1,5 @@
|
|||||||
|
class SubDomain < ActiveRecord::Base
|
||||||
|
attr_accessible :field_type, :hide, :name, :org_subfield_id, :priority, :status
|
||||||
|
belongs_to :org_subfield, :foreign_key => :org_subfield_id
|
||||||
|
has_many :sub_document_comments, :dependent => :destroy
|
||||||
|
end
|
@ -0,0 +1,89 @@
|
|||||||
|
<h3>
|
||||||
|
<%=l(:label_apply_homework)%>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="autoscroll">
|
||||||
|
<table class="list" style="width: 100%;table-layout: fixed">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th style="width: 30px;">
|
||||||
|
序号
|
||||||
|
</th>
|
||||||
|
<th style="width: 120px;">
|
||||||
|
作业名称
|
||||||
|
</th>
|
||||||
|
<th style="width: 120px;">
|
||||||
|
课程名称
|
||||||
|
</th>
|
||||||
|
<th style="width: 50px;">
|
||||||
|
作者
|
||||||
|
</th>
|
||||||
|
<th style="width: 50px;">
|
||||||
|
申请者
|
||||||
|
</th>
|
||||||
|
<th style="width: 50px;">
|
||||||
|
申请状态
|
||||||
|
</th>
|
||||||
|
<th style="width: 70px;">
|
||||||
|
申请日期
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<%@count=@page*30 %>
|
||||||
|
<% for homework in @homework do %>
|
||||||
|
<% unless homework.nil? %>
|
||||||
|
<% @count+=1 %>
|
||||||
|
<tr>
|
||||||
|
<td align="center">
|
||||||
|
<%=@count %>
|
||||||
|
</td>
|
||||||
|
<% c_h = HomeworkCommon.find homework.homework_common_id %>
|
||||||
|
<% if c_h %>
|
||||||
|
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<%=c_h.name%>'>
|
||||||
|
<%=link_to(c_h.try(:name), student_work_index_path(:homework => c_h.id))%>
|
||||||
|
</td>
|
||||||
|
<% if c_h.course %>
|
||||||
|
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<%=c_h.course.name%>'>
|
||||||
|
<%= link_to(c_h.course.name, course_path(c_h.course.id)) %>
|
||||||
|
</td>
|
||||||
|
<% end %>
|
||||||
|
<td align="center" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<% if c_h.try(:user).try(:realname) == ' '%><%= c_h.try(:user)%><% else %><%=c_h.try(:user).try(:realname) %><% end %>'>
|
||||||
|
<% if c_h.try(:user).try(:realname) == ' '%>
|
||||||
|
<%= link_to(c_h.try(:user), user_path(c_h.user_id)) %>
|
||||||
|
<% else %>
|
||||||
|
<%= link_to(c_h.try(:user).try(:realname), user_path(c_h.user_id)) %>
|
||||||
|
<% end %>
|
||||||
|
</td>
|
||||||
|
<% end %>
|
||||||
|
<td align="center" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<% if homework.try(:user).try(:realname) == ' '%><%= homework.try(:user)%><% else %><%=homework.try(:user).try(:realname) %><% end %>'>
|
||||||
|
<% if homework.try(:user).try(:realname) == ' '%>
|
||||||
|
<%= link_to(homework.try(:user), user_path(homework.user_id)) %>
|
||||||
|
<% else %>
|
||||||
|
<%= link_to(homework.try(:user).try(:realname), user_path(homework.user_id)) %>
|
||||||
|
<% end %>
|
||||||
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<% if homework.status == 1 %>
|
||||||
|
等待回复
|
||||||
|
<% elsif homework.status == 2 %>
|
||||||
|
已通过
|
||||||
|
<% else %>
|
||||||
|
已拒绝
|
||||||
|
<% end %>
|
||||||
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<%=format_date( homework.created_at ) %>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="pagination">
|
||||||
|
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<% html_title(l(:label_apply_homework)) -%>
|
@ -1,2 +1 @@
|
|||||||
$("#topics_list").html("<%= escape_javascript(render :partial => 'show_topics',:locals => {:memos=>@memos})%>")
|
$("#topics_list").html("<%= escape_javascript(render :partial => 'show_topics',:locals => {:memos=>@memos})%>")
|
||||||
$("#pages").html('<%= pagination_links_full @topic_pages, @topic_count,:per_page_links => false,:remote =>true%>');
|
|
@ -1,2 +1,2 @@
|
|||||||
$("#organization_document_<%= @act.id %>").replaceWith("<%= escape_javascript(render :partial => 'organizations/show_org_document', :locals => {:document => @document,:flag => params[:flag], :act => @act}) %>");
|
$("#organization_document_<%= @document.id %>").replaceWith("<%= escape_javascript(render :partial => 'organizations/show_org_document', :locals => {:document => @document,:flag => params[:flag], :act => @act}) %>");
|
||||||
sd_create_editor_from_data(<%= @act.id %>,"","100%", "<%=@act.class.to_s%>");
|
sd_create_editor_from_data(<%= @act.id %>,"","100%", "<%=@act.class.to_s%>");
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
<%= content_for(:header_tags) do %>
|
<%= content_for(:header_tags) do %>
|
||||||
<%= import_ke(enable_at: false, prettify: false, init_activity: true) %>
|
<%= import_ke(enable_at: false, prettify: false, init_activity: true) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= render :partial => 'new' %>
|
<%= render :partial => 'new' %>
|
||||||
<% unless @documents.nil? %>
|
<% unless @documents.nil? %>
|
||||||
<% @documents.each do |document| %>
|
<% @documents.each do |document| %>
|
||||||
<script>
|
<script>
|
||||||
$(function() {
|
$(function() {
|
||||||
sd_create_editor_from_data(<%= OrgActivity.where("org_act_type='OrgDocumentComment'and org_act_id=?", document.id).first.id %>, null, "100%", "OrgActivity");
|
sd_create_editor_from_data(<%= OrgActivity.where("org_act_type='OrgDocumentComment'and org_act_id=?", document.id).first.id %>, null, "100%", "OrgActivity");
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<%= render :partial => 'organizations/show_org_document', :locals => {:document => document, :act => OrgActivity.where("org_act_type='OrgDocumentComment'and org_act_id=?", document.id).first, :flag => 0} %>
|
<%= render :partial => 'organizations/show_org_document', :locals => {:document => document, :act => OrgActivity.where("org_act_type='OrgDocumentComment'and org_act_id=?", document.id).first, :flag => 0} %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
@ -0,0 +1,9 @@
|
|||||||
|
<% if !field.subfield_subdomain_dir.nil? %> <!--讨论帖子-->
|
||||||
|
<% if !request.local? and Secdomain.where("sub_type=2 and pid=?", @organization.id).count > 0 and Secdomain.where("sub_type=2 and pid=?", @organization.id).map(&:subname).include?(request.subdomain) %>
|
||||||
|
<%= link_to "更多", show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :class => "more" , :target => "_blank" %>
|
||||||
|
<% else %>
|
||||||
|
<%= link_to "更多", show_org_subfield_organization_path(:id => @organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "more" , :target => "_blank" %>
|
||||||
|
<% end %>
|
||||||
|
<% else %>
|
||||||
|
<%= link_to "更多", organization_path(@organization, :org_subfield_id => field.id), :class => "more" , :target => "_blank" %>
|
||||||
|
<% end %>
|
@ -0,0 +1,11 @@
|
|||||||
|
<% subdomains.each do |subdomain|%>
|
||||||
|
<li class="homepageLeftMenuCoursesLine" style="display:<%= subdomain.hide.to_i == 0?'block':'none' %>;position:relative;" id="sub_domain_hide_<%= subdomain.id %>">
|
||||||
|
<%= link_to subdomain.name, org_subfield_sub_domain_sub_document_comments_path(subdomain, :org_subfield_id => org_subfield_id), :class => "coursesLineGrey hidden", :title => subdomain.name %>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
|
<%# if subdomains.size == 5 %>
|
||||||
|
<!--<li class="homepageLeftMenuMore" id="show_more_org_project">-->
|
||||||
|
<!--<input type="hidden" value="<%#= page %>" id="org_project_page_num">-->
|
||||||
|
<!--<a href="javascript:void(0);" class="homepageLeftMenuMoreIcon" onclick="show_more_org_project('<%#= more_org_projects_organization_path(org_id) %>');"></a>-->
|
||||||
|
<!--</li>-->
|
||||||
|
<%# end%>
|
@ -1,117 +1,104 @@
|
|||||||
<div class="sn-index-leftbox" style="display:<%= field.hide == 0?'block':'none' %>;">
|
<% if is_default_field?(field) %>
|
||||||
<h2 class="h2-title">合作伙伴<a href="javascript:void(0);" target="_blank" class="more">更多</a></h2>
|
<% case field.name %>
|
||||||
<div class="sn-index-partnerbox " >
|
<% when 'course' %>
|
||||||
<ul id="scrollPic" >
|
<p>暂无内容!</p>
|
||||||
<li>
|
<% when 'project' %>
|
||||||
<a href="javascript:void(0);" target="_blank" class="partnerimg"><img src="images/partner/img-dhyq.jpg" width="363" height="43" alt=""/></a>
|
<p>暂无内容!</p>
|
||||||
<a href="javascript:void(0);" target="_blank" class="partnerimg"><img src="images/partner/img-qhdx.jpg" width="363" height="43" alt=""/></a>
|
<% end %>
|
||||||
</li>
|
<% else %>
|
||||||
<li>
|
<% if field.field_type == "Post" %> <%# 讨论类型 %>
|
||||||
<a href="javascript:void(0);" target="_blank" class="partnerimg"><img src="images/partner/img-jzdz.jpg" width="363" height="43" alt=""/></a>
|
<% org_acts = get_subfield_acts field %>
|
||||||
<a href="javascript:void(0);" target="_blank" class="partnerimg"><img src="images/partner/img-zgdz.jpg" width="363" height="43" alt=""/></a>
|
<% unless org_acts.blank? %>
|
||||||
</li>
|
<div class="sn-index-leftbox" style="display:<%= field.hide == 0?'block':'none' %>;">
|
||||||
</ul>
|
<h2 class="h2-title"><%= field.name %>
|
||||||
<div class="cl"></div>
|
<%= render :partial => 'organizations/link_subfield_more', :locals => {:field => field} %>
|
||||||
<div class="partner-btnbox">
|
</h2>
|
||||||
<div class="partner-prev partner-btn fl " id="LeftArr"><</div>
|
<div class="sn-index-partnerbox " >
|
||||||
<div class="partner-next partner-btn fl" id="RightArr">></div>
|
<ul id="scrollPic" >
|
||||||
<div class="cl"></div>
|
<div class="scroll-control">
|
||||||
</div>
|
<div class="scroll-container">
|
||||||
</div>
|
<% org_acts.first(8).each do |activity| %>
|
||||||
</div>
|
<% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' && activity.org_act_id != @organization.home_id %>
|
||||||
|
<% document = activity.org_act %>
|
||||||
<% if is_default_field?(field) %>
|
<% org_subfield_id = params[:org_subfield_id] %>
|
||||||
<% case field.name %>
|
<% flag = 2 %>
|
||||||
<% when 'course' %>
|
<% iamge_path = get_image_path_from_content(document.content) %>
|
||||||
<p>暂无内容!</p>
|
<% if iamge_path.nil? %>
|
||||||
<% when 'project' %>
|
<li class="sn-fl"><%= link_to image_tag("/images/default_blank/ad-default.jpg", :width => "368", :height => "43"), org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => "_blank", :class => "partnerimg" %></li>
|
||||||
<p>暂无内容!</p>
|
<% else %>
|
||||||
<% end %>
|
<li class="sn-fl"><%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "368", :height => "43"), org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => "_blank", :class => "partnerimg" %></li>
|
||||||
<% else %>
|
<% end %>
|
||||||
<% if field.field_type == "Post" %> <%# 讨论类型 %>
|
<% elsif activity.container_type == 'OrgSubfield' %>
|
||||||
<% org_acts = get_subfield_acts field %>
|
<% if activity.org_act_type == 'Message' and activity.org_act_id and Message.where("id=#{activity.org_act_id}").count > 0 %>
|
||||||
<% unless org_acts.blank? %>
|
<% message = Message.find(activity.org_act_id) %>
|
||||||
<% org_acts.each do |activity| %>
|
<% if message.board.org_subfield_id %>
|
||||||
<div class="sn-index-leftbox" style="display:<%= field.hide == 0?'block':'none' %>;">
|
<% iamge_path = get_image_path_from_content(message.content) %>
|
||||||
<h2 class="h2-title">合作伙伴<a href="javascript:void(0);" target="_blank" class="more">更多</a></h2>
|
<% if iamge_path.nil? %>
|
||||||
<div class="sn-index-smallbanner" style="display:<%= field.hide == 0?'block':'none' %>;">
|
<%= link_to image_tag("/images/default_blank/ad-default.jpg", :width => "368", :height => "43"), board_message_url_in_org(message.board.id,message.id), :target => "_blank", :class => "partnerimg" %>
|
||||||
<% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' && activity.org_act_id != @organization.home_id %>
|
<% else %>
|
||||||
<% document = activity.org_act %>
|
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "368", :height => "43"), board_message_url_in_org(message.board.id,message.id), :target => "_blank", :class => "partnerimg" %>
|
||||||
<% org_subfield_id = params[:org_subfield_id] %>
|
<% end %>
|
||||||
<% flag = 2 %>
|
<% else %>
|
||||||
<% iamge_path = get_image_path_from_content(document.content) %>
|
<% iamge_path = get_image_path_from_content(message.content) %>
|
||||||
<% if iamge_path.nil? %>
|
<% if iamge_path.nil? %>
|
||||||
<%= link_to image_tag("/images/default_blank/ad-default.jpg", :width => "369", :height => "169"), org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => "_blank" %>
|
<%= link_to image_tag("/images/default_blank/ad-default.jpg", :width => "370", :height => "220"), board_message_path(message.board,activity), :target => "_blank", :class => "partnerimg" %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "369", :height => "169"), org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => "_blank" %>
|
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "370", :height => "220"), board_message_path(message.board,activity), :target => "_blank", :class => "partnerimg" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% elsif activity.container_type == 'OrgSubfield' %>
|
<% end %>
|
||||||
<% if activity.org_act_type == 'Message' and activity.org_act_id and Message.where("id=#{activity.org_act_id}").count > 0 %>
|
<% end %>
|
||||||
<% message = Message.find(activity.org_act_id) %>
|
<% if activity.org_act_type == 'News' and News.where("id=?", activity.org_act_id).count > 0 %>
|
||||||
<% if message.board.org_subfield_id %>
|
<% news = News.find(activity.org_act_id) %>
|
||||||
<% iamge_path = get_image_path_from_content(message.content) %>
|
<% iamge_path = get_image_path_from_content(news.description) %>
|
||||||
<% if iamge_path.nil? %>
|
<% if iamge_path.nil? %>
|
||||||
<%= link_to image_tag("/images/default_blank/ad-default.jpg", :width => "369", :height => "169"), board_message_url_in_org(message.board.id,message.id), :target => "_blank" %>
|
<%= link_to image_tag("/images/default_blank/ad-default.jpg", :width => "368", :height => "43"), news_path(news), :target => "_blank", :class => "partnerimg" %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "369", :height => "169"), board_message_url_in_org(message.board.id,message.id), :target => "_blank" %>
|
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "368", :height => "43"), news_path(news), :target => "_blank", :class => "partnerimg" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% else %>
|
<% end %>
|
||||||
<% iamge_path = get_image_path_from_content(message.content) %>
|
<% end %>
|
||||||
<% if iamge_path.nil? %>
|
<% end %>
|
||||||
<%= link_to image_tag("/images/default_blank/ad-default.jpg", :width => "370", :height => "220"), board_message_path(message.board,activity), :target => "_blank" %>
|
</div>
|
||||||
<% else %>
|
</div>
|
||||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "370", :height => "220"), board_message_path(message.board,activity), :target => "_blank" %>
|
</ul>
|
||||||
<% end %>
|
<div class="cl"></div>
|
||||||
<% end %>
|
<div class="partner-btnbox">
|
||||||
<% end %>
|
<div class="partner-prev partner-btn fl " id="LeftArr"><</div>
|
||||||
<% if activity.org_act_type == 'News' and News.where("id=?", activity.org_act_id).count > 0 %>
|
<div class="partner-next partner-btn fl" id="RightArr">></div>
|
||||||
<% news = News.find(activity.org_act_id) %>
|
<div class="cl"></div>
|
||||||
<% iamge_path = get_image_path_from_content(news.description) %>
|
</div>
|
||||||
<% if iamge_path.nil? %>
|
</div>
|
||||||
<%= link_to image_tag("/images/default_blank/ad-default.jpg", :width => "369", :height => "169"), news_path(news), :target => "_blank" %>
|
</div>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "369", :height => "169"), news_path(news), :target => "_blank" %>
|
<%= render :partial => 'organizations/org_subfield_leftD_default', :locals => {:field => field} %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% elsif field.field_type == "Resource" %>
|
||||||
<% end %>
|
<% org_attachs = get_attach_org2(field) %>
|
||||||
</div>
|
<div class="sn-index-smallbanner" style="display:<%= field.hide == 0?'block':'none' %>;">
|
||||||
</div>
|
<% if !field.subfield_subdomain_dir.nil? %>
|
||||||
<% end %>
|
<% if !request.local? and Secdomain.where("sub_type=2 and pid=?", @organization.id).count > 0 and Secdomain.where("sub_type=2 and pid=?", @organization.id).map(&:subname).include?(request.subdomain) %>
|
||||||
<% else %>
|
<%= link_to image_tag("/images/default_blank/ad-default.jpg", :width => "368", :height => "43"), show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :target => "_blank" %>
|
||||||
<div class="sn-index-leftbox" style="display:<%= field.hide == 0?'block':'none' %>;">
|
<% else %>
|
||||||
<h2 class="h2-title">合作伙伴<a href="javascript:void(0);" target="_blank" class="more">更多</a></h2>
|
<%= link_to image_tag("/images/default_blank/ad-default.jpg", :width => "368", :height => "43"), show_org_subfield_organization_path(:id => @organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :target => "_blank" %>
|
||||||
<div class="sn-index-partnerbox " >
|
<% end %>
|
||||||
<ul id="scrollPic" >
|
<% else %>
|
||||||
<li>
|
<%= link_to image_tag("/images/default_blank/ad-default.jpg", :width => "368", :height => "43"), org_subfield_files_path(field), :class => "more-btn-center mt30", :target => "_blank" %>
|
||||||
<a href="javascript:void(0);" target="_blank" class="partnerimg"><img src="images/partner/img-dhyq.jpg" width="363" height="43" alt=""/></a>
|
<% end %>
|
||||||
<a href="javascript:void(0);" target="_blank" class="partnerimg"><img src="images/partner/img-qhdx.jpg" width="363" height="43" alt=""/></a>
|
</div>
|
||||||
</li>
|
<% end %>
|
||||||
<li>
|
<% end %>
|
||||||
<a href="javascript:void(0);" target="_blank" class="partnerimg"><img src="images/partner/img-jzdz.jpg" width="363" height="43" alt=""/></a>
|
|
||||||
<a href="javascript:void(0);" target="_blank" class="partnerimg"><img src="images/partner/img-zgdz.jpg" width="363" height="43" alt=""/></a>
|
<script>
|
||||||
</li>
|
$(document).ready(function(){
|
||||||
</ul>
|
var num = $(".scroll-container").children().size();
|
||||||
<div class="cl"></div>
|
var num = Math.round(num/4);
|
||||||
<div class="partner-btnbox">
|
var divWidth = 380*num;
|
||||||
<div class="partner-prev partner-btn fl " id="LeftArr"><</div>
|
$(".scroll-container").css("width",divWidth).css("height",110);
|
||||||
<div class="partner-next partner-btn fl" id="RightArr">></div>
|
if(num%2 != 0) {
|
||||||
<div class="cl"></div>
|
var controlWidth = 380*num + 380;
|
||||||
</div>
|
}else{
|
||||||
</div>
|
var controlWidth = 380*num;
|
||||||
</div>
|
}
|
||||||
<% end %>
|
$(".scroll-control").css("width",controlWidth);
|
||||||
<% elsif field.field_type == "Resource" %>
|
});
|
||||||
<% org_attachs = get_attach_org2(field) %>
|
</script>
|
||||||
<div class="sn-index-smallbanner" style="display:<%= field.hide == 0?'block':'none' %>;">
|
|
||||||
<% if !field.subfield_subdomain_dir.nil? %>
|
|
||||||
<% if !request.local? and Secdomain.where("sub_type=2 and pid=?", @organization.id).count > 0 and Secdomain.where("sub_type=2 and pid=?", @organization.id).map(&:subname).include?(request.subdomain) %>
|
|
||||||
<%= link_to image_tag("/images/default_blank/ad-default.jpg", :width => "369", :height => "169"), show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :target => "_blank" %>
|
|
||||||
<% else %>
|
|
||||||
<%= link_to image_tag("/images/default_blank/ad-default.jpg", :width => "369", :height => "169"), show_org_subfield_organization_path(:id => @organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :target => "_blank" %>
|
|
||||||
<% end %>
|
|
||||||
<% else %>
|
|
||||||
<%= link_to image_tag("/images/default_blank/ad-default.jpg", :width => "369", :height => "169"), org_subfield_files_path(field), :class => "more-btn-center mt30", :target => "_blank" %>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
|
@ -0,0 +1,19 @@
|
|||||||
|
<div class="sn-index-leftbox" style="display:<%= field.hide == 0?'block':'none' %>;">
|
||||||
|
<h2 class="h2-title">栏目名称</h2>
|
||||||
|
<div class="sn-index-partnerbox " >
|
||||||
|
<ul id="scrollPic" >
|
||||||
|
<div style="width: 760px;">
|
||||||
|
<li class="fl"><a href="javascript:void(0);" target="_blank" class="partnerimg"><img src="/images/default_blank/left-05.jpg" width="368" height="43" alt="" /></a></li>
|
||||||
|
<li class="fl"><a href="javascript:void(0);" target="_blank" class="partnerimg"><img src="/images/default_blank/left-05.jpg" width="368" height="43" alt="" /></a></li>
|
||||||
|
<li class="fl"><a href="javascript:void(0);" target="_blank" class="partnerimg"><img src="/images/default_blank/left-05.jpg" width="368" height="43" alt="" /></a></li>
|
||||||
|
<li class="fl"><a href="javascript:void(0);" target="_blank" class="partnerimg"><img src="/images/default_blank/left-05.jpg" width="368" height="43" alt="" /></a></li>
|
||||||
|
</div>
|
||||||
|
</ul>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<div class="partner-btnbox">
|
||||||
|
<div class="partner-prev partner-btn fl " id="LeftArr"><</div>
|
||||||
|
<div class="partner-next partner-btn fl" id="RightArr">></div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
@ -1,256 +1,285 @@
|
|||||||
<h2 class="h2-title"><%= field.name %><a href="javascript:void(0);" target="_blank" class="more">更多</a></h2>
|
|
||||||
<div class="cl"></div>
|
<% if is_default_field?(field) %>
|
||||||
<% if is_default_field?(field) %>
|
<% case field.name %>
|
||||||
<% case field.name %>
|
<% when 'course' %>
|
||||||
<% when 'course' %>
|
<% if @course_acts.blank? %>
|
||||||
<% if @course_acts.blank? %>
|
<h2 class="h2-title">课程动态</h2>
|
||||||
<%= render :partial => 'organizations/org_subfield_leftM1_default', :locals => {:field => field} %>
|
<div class="cl"></div>
|
||||||
<% else %>
|
<%= render :partial => 'organizations/org_subfield_leftM1_default', :locals => {:field => field} %>
|
||||||
<% @course_acts.first(1).each do |act| %>
|
<% else %>
|
||||||
<% if act.org_act_type == "HomeworkCommon" %>
|
<h2 class="h2-title">课程动态</h2>
|
||||||
<% activity = HomeworkCommon.find(act.org_act_id) %>
|
<div class="cl"></div>
|
||||||
<% iamge_path = get_image_path_from_content(activity.description) %>
|
<% @course_acts.first(1).each do |act| %>
|
||||||
<div class="sn-news-bigbox fl">
|
<% if act.org_act_type == "HomeworkCommon" %>
|
||||||
<% if iamge_path.nil? %>
|
<% activity = HomeworkCommon.find(act.org_act_id) %>
|
||||||
<%= link_to image_tag("/images/default_blank/files-default.jpg", :width => "380", :height => "165"), student_work_index_url_in_org(activity.id), :target => "_blank", :class =>"sn-news-bigimg" %>
|
<% iamge_path = get_image_path_from_content(activity.description) %>
|
||||||
<% else %>
|
<div class="sn-news-bigbox fl">
|
||||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "380", :height => "165"), student_work_index_url_in_org(activity.id), :target => "_blank", :class =>"sn-news-bigimg" %>
|
<% if iamge_path.nil? %>
|
||||||
<% end %>
|
<%= link_to image_tag("/images/default_blank/left-02.jpg", :width => "380", :height => "165"), student_work_index_url_in_org(activity.id), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %>
|
||||||
<h3>
|
<% else %>
|
||||||
<%= link_to activity.name.to_s, student_work_index_url_in_org(activity.id), :target => '_blank', :class => "h3-title" %>
|
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "380", :height => "165"), student_work_index_url_in_org(activity.id), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %>
|
||||||
</h3>
|
<% end %>
|
||||||
<span class="txt-grey"><%= format_date activity.updated_at %></span>
|
<h3>
|
||||||
<div class="sn-news-txt">
|
<%= link_to activity.name.to_s, student_work_index_url_in_org(activity.id), :target => '_blank', :class => "h3-title" %>
|
||||||
<p><%= activity.description.to_s.html_safe %></p>
|
</h3>
|
||||||
</div>
|
<span class="txt-grey"><%= format_date activity.updated_at %></span>
|
||||||
</div>
|
<div class="sn-news-txt">
|
||||||
<% elsif act.org_act_type == "Message" %>
|
<div class="sn-news-wrap"><%= activity.description.to_s.html_safe %></div>
|
||||||
<% activity = Message.find(act.org_act_id) %>
|
</div>
|
||||||
<% iamge_path = get_image_path_from_content(activity.content) %>
|
<div class="sn-read-more"><%=link_to "查看全文>>", activity.name.to_s, student_work_index_url_in_org(activity.id), :target => "_blank", :class => "sn-link-grey2 sn-fr" %></div>
|
||||||
<div class="sn-news-bigbox fl">
|
</div>
|
||||||
<% if iamge_path.nil? %>
|
<% elsif act.org_act_type == "Message" %>
|
||||||
<%= link_to image_tag("/images/default_blank/files-default.jpg", :width => "380", :height => "165"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class =>"sn-news-bigimg" %>
|
<% activity = Message.find(act.org_act_id) %>
|
||||||
<% else %>
|
<% iamge_path = get_image_path_from_content(activity.content) %>
|
||||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "380", :height => "165"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class =>"sn-news-bigimg" %>
|
<div class="sn-news-bigbox fl">
|
||||||
<% end %>
|
<% if iamge_path.nil? %>
|
||||||
<h3>
|
<%= link_to image_tag("/images/default_blank/left-02.jpg", :width => "380", :height => "165"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %>
|
||||||
<% if activity.parent_id.nil? %> <!--+"(帖子标题)"-->
|
<% else %>
|
||||||
<%= link_to activity.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "h3-title" %>
|
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "380", :height => "165"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %>
|
||||||
<% else %>
|
<% end %>
|
||||||
<%= link_to activity.parent.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "h3-title" %>
|
<h3>
|
||||||
<% end %>
|
<%= link_to activity.parent_id.nil? ? activity.subject.to_s.html_safe : activity.parent.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "h3-title" %>
|
||||||
</h3>
|
</h3>
|
||||||
<span class="txt-grey"><%= format_date activity.updated_on %></span>
|
<span class="txt-grey"><%= format_date activity.updated_on %></span>
|
||||||
<div class="sn-news-txt">
|
<div class="sn-news-txt">
|
||||||
<p><%= activity.content.to_s.html_safe %></p>
|
<div class="sn-news-wrap"><%= activity.content.to_s.html_safe %></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="sn-read-more"><%=link_to "查看全文>>", activity.parent_id.nil? ? activity.subject.to_s.html_safe : activity.parent.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class => "sn-link-grey2 sn-fr" %></div>
|
||||||
<% elsif act.org_act_type == "News" %>
|
</div>
|
||||||
<% activity = News.find(act.org_act_id) %>
|
<% elsif act.org_act_type == "News" %>
|
||||||
<% iamge_path = get_image_path_from_content(activity.description) %>
|
<% activity = News.find(act.org_act_id) %>
|
||||||
<div class="sn-news-bigbox fl">
|
<% iamge_path = get_image_path_from_content(activity.description) %>
|
||||||
<% if iamge_path.nil? %>
|
<div class="sn-news-bigbox fl">
|
||||||
<%= link_to image_tag("/images/default_blank/files-default.jpg", :width => "380", :height => "165"), news_url_in_org(activity.id), :target => "_blank", :class =>"sn-news-bigimg" %>
|
<% if iamge_path.nil? %>
|
||||||
<% else %>
|
<%= link_to image_tag("/images/default_blank/left-02.jpg", :width => "380", :height => "165"), news_url_in_org(activity.id), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %>
|
||||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "380", :height => "165"), news_url_in_org(activity.id), :target => "_blank", :class =>"sn-news-bigimg" %>
|
<% else %>
|
||||||
<% end %>
|
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "380", :height => "165"), news_url_in_org(activity.id), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %>
|
||||||
<h3>
|
<% end %>
|
||||||
<%= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank', :class => "h3-title" %>
|
<h3>
|
||||||
</h3>
|
<%= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank', :class => "h3-title" %>
|
||||||
<span class="txt-grey"><%= format_date activity.created_on %></span>
|
</h3>
|
||||||
<div class="sn-news-txt">
|
<span class="txt-grey"><%= format_date activity.created_on %></span>
|
||||||
<p><%= activity.description.to_s.html_safe %></p>
|
<div class="sn-news-txt">
|
||||||
</div>
|
<div class="sn-news-wrap"><%= activity.description.to_s.html_safe %></div>
|
||||||
</div>
|
</div>
|
||||||
<% elsif act.org_act_type == "Poll" %>
|
|
||||||
<% activity = Poll.find(act.org_act_id) %>
|
<div class="sn-read-more"><%=link_to "查看全文>>", activity.title.to_s, news_url_in_org(activity.id), :target => "_blank", :class => "sn-link-grey2 sn-fr" %></div>
|
||||||
<% has_commit = has_commit_poll?(activity.id ,User.current)%>
|
</div>
|
||||||
<% poll_name = activity.polls_name.empty? ? l(:label_poll_new) : activity.polls_name%>
|
<% elsif act.org_act_type == "Poll" %>
|
||||||
<% iamge_path = get_image_path_from_content(activity.polls_description) %>
|
<% activity = Poll.find(act.org_act_id) %>
|
||||||
<% if ( activity.polls_status==2) %>
|
<% has_commit = has_commit_poll?(activity.id ,User.current)%>
|
||||||
<div class="sn-news-bigbox fl">
|
<% poll_name = activity.polls_name.empty? ? l(:label_poll_new) : activity.polls_name%>
|
||||||
<% if iamge_path.nil? %>
|
<% iamge_path = get_image_path_from_content(activity.polls_description) %>
|
||||||
<%= link_to image_tag("/images/default_blank/files-default.jpg", :width => "380", :height => "165"), Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => "_blank", :class =>"sn-news-bigimg" %>
|
<% if ( activity.polls_status==2) %>
|
||||||
<% else %>
|
<div class="sn-news-bigbox fl">
|
||||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "380", :height => "165"), Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => "_blank", :class =>"sn-news-bigimg" %>
|
<% if iamge_path.nil? %>
|
||||||
<% end %>
|
<%= link_to image_tag("/images/default_blank/left-02.jpg", :width => "380", :height => "165"), Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %>
|
||||||
<h3>
|
<% else %>
|
||||||
<% if has_commit %>
|
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "380", :height => "165"), Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %>
|
||||||
<%= link_to poll_name, Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => '_blank', :class => "h3-title" %>
|
<% end %>
|
||||||
<% else %>
|
<h3>
|
||||||
<%= link_to poll_name, Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => '_blank', :class => "h3-title" %>
|
<% if has_commit %>
|
||||||
<% end %>
|
<%= link_to poll_name, Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => '_blank', :class => "h3-title" %>
|
||||||
</h3>
|
<% else %>
|
||||||
<span class="txt-grey"><%= format_date activity.published_at %></span>
|
<%= link_to poll_name, Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => '_blank', :class => "h3-title" %>
|
||||||
<div class="sn-news-txt">
|
<% end %>
|
||||||
<p><%= activity.polls_description.to_s.html_safe %></p>
|
</h3>
|
||||||
</div>
|
<span class="txt-grey"><%= format_date activity.published_at %></span>
|
||||||
</div>
|
<div class="sn-news-txt">
|
||||||
<% end %>
|
<div class="sn-news-wrap"><%= activity.polls_description.to_s.html_safe %></div>
|
||||||
<% end %>
|
</div>
|
||||||
<% end %>
|
<div class="sn-read-more"><%=link_to "查看全文>>", poll_name, Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => "_blank", :class => "sn-link-grey2 sn-fr" %></div>
|
||||||
<% end %>
|
</div>
|
||||||
<% when 'project' %>
|
<% end %>
|
||||||
<% if @project_acts.blank? %>
|
<% end %>
|
||||||
<%= render :partial => 'organizations/org_subfield_leftM1_default', :locals => {:field => field} %>
|
<% end %>
|
||||||
<% else %>
|
<% end %>
|
||||||
<% @project_acts.first(4).each do |act| %>
|
<% when 'project' %>
|
||||||
<% if act.org_act_type == "Issue" %>
|
<% if @project_acts.blank? %>
|
||||||
<% activity = Issue.find(act.org_act_id) %>
|
<h2 class="h2-title">项目动态</h2>
|
||||||
<% iamge_path = get_image_path_from_content(activity.description) %>
|
<div class="cl"></div>
|
||||||
<div class="sn-news-bigbox fl">
|
<%= render :partial => 'organizations/org_subfield_leftM1_default', :locals => {:field => field} %>
|
||||||
<% if iamge_path.nil? %>
|
<% else %>
|
||||||
<%= link_to image_tag("/images/default_blank/files-default.jpg", :width => "380", :height => "165"), issue_url_in_org(activity.id), :target => "_blank", :class =>"sn-news-bigimg" %>
|
<h2 class="h2-title">项目动态</h2>
|
||||||
<% else %>
|
<div class="cl"></div>
|
||||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "380", :height => "165"), issue_url_in_org(activity.id), :target => "_blank", :class =>"sn-news-bigimg" %>
|
<% @project_acts.first(1).each do |act| %>
|
||||||
<% end %>
|
<% if act.org_act_type == "Issue" %>
|
||||||
<h3>
|
<% activity = Issue.find(act.org_act_id) %>
|
||||||
<%= link_to activity.subject.to_s, issue_url_in_org(activity.id), :target => '_blank', :class => "h3-title" %>
|
<% iamge_path = get_image_path_from_content(activity.description) %>
|
||||||
</h3>
|
<div class="sn-news-bigbox fl">
|
||||||
<span class="txt-grey"><%= format_date activity.updated_on %></span>
|
<% if iamge_path.nil? %>
|
||||||
<div class="sn-news-txt">
|
<%= link_to image_tag("/images/default_blank/left-02.jpg", :width => "380", :height => "165"), issue_url_in_org(activity.id), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %>
|
||||||
<p><%= activity.description.to_s.html_safe %></p>
|
<% else %>
|
||||||
</div>
|
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "380", :height => "165"), issue_url_in_org(activity.id), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %>
|
||||||
</div>
|
<% end %>
|
||||||
<% elsif act.org_act_type == "Message" %>
|
<h3>
|
||||||
<% activity = Message.find(act.org_act_id) %>
|
<%= link_to activity.subject.to_s, issue_url_in_org(activity.id), :target => '_blank', :class => "h3-title" %>
|
||||||
<% iamge_path = get_image_path_from_content(activity.content) %>
|
</h3>
|
||||||
<div class="sn-news-bigbox fl">
|
<span class="txt-grey"><%= format_date activity.updated_on %></span>
|
||||||
<% if iamge_path.nil? %>
|
<div class="sn-news-txt">
|
||||||
<%= link_to image_tag("/images/default_blank/files-default.jpg", :width => "380", :height => "165"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class =>"sn-news-bigimg" %>
|
<div class="sn-news-wrap"><%= activity.description.to_s.html_safe %></div>
|
||||||
<% else %>
|
</div>
|
||||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "380", :height => "165"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class =>"sn-news-bigimg" %>
|
<div class="sn-read-more"><%=link_to "查看全文>>", activity.subject.to_s, issue_url_in_org(activity.id), :target => "_blank", :class => "sn-link-grey2 sn-fr" %></div>
|
||||||
<% end %>
|
</div>
|
||||||
<h3>
|
<% elsif act.org_act_type == "Message" %>
|
||||||
<% if activity.parent_id.nil? %> <!--+"(帖子标题)"-->
|
<% activity = Message.find(act.org_act_id) %>
|
||||||
<%= link_to activity.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "h3-title" %>
|
<% iamge_path = get_image_path_from_content(activity.content) %>
|
||||||
<% else %>
|
<div class="sn-news-bigbox fl">
|
||||||
<%= link_to activity.parent.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "h3-title" %>
|
<% if iamge_path.nil? %>
|
||||||
<% end %>
|
<%= link_to image_tag("/images/default_blank/left-02.jpg", :width => "380", :height => "165"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %>
|
||||||
</h3>
|
<% else %>
|
||||||
<span class="txt-grey"><%= format_date activity.updated_on %></span>
|
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "380", :height => "165"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %>
|
||||||
<div class="sn-news-txt">
|
<% end %>
|
||||||
<p><%= activity.content.to_s.html_safe %></p>
|
<h3> <!--+"(帖子标题)"-->
|
||||||
</div>
|
<%= link_to activity.parent_id.nil? ? activity.subject.to_s.html_safe : activity.parent.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "h3-title" %>
|
||||||
</div>
|
</h3>
|
||||||
<% elsif act.org_act_type == "News" %>
|
<span class="txt-grey"><%= format_date activity.updated_on %></span>
|
||||||
<% activity = News.find(act.org_act_id) %>
|
<div class="sn-news-txt">
|
||||||
<% iamge_path = get_image_path_from_content(activity.description) %>
|
<div class="sn-news-wrap"><%= activity.content.to_s.html_safe %></div>
|
||||||
<div class="sn-news-bigbox fl">
|
</div>
|
||||||
<% if iamge_path.nil? %>
|
<div class="sn-read-more"><%=link_to "查看全文>>", activity.parent_id.nil? ? activity.subject.to_s.html_safe : activity.parent.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class => "sn-link-grey2 sn-fr" %></div>
|
||||||
<%= link_to image_tag("/images/default_blank/files-default.jpg", :width => "380", :height => "165"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class =>"sn-news-bigimg" %>
|
</div>
|
||||||
<% else %>
|
<% elsif act.org_act_type == "News" %>
|
||||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "380", :height => "165"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class =>"sn-news-bigimg" %>
|
<% activity = News.find(act.org_act_id) %>
|
||||||
<% end %>
|
<% iamge_path = get_image_path_from_content(activity.description) %>
|
||||||
<h3>
|
<div class="sn-news-bigbox fl">
|
||||||
<%= link_to activity.description.to_s.html_safe, news_url_in_org(activity.id), :target => '_blank', :class => "h3-title" %>
|
<% if iamge_path.nil? %>
|
||||||
</h3>
|
<%= link_to image_tag("/images/default_blank/left-02.jpg", :width => "380", :height => "165"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %>
|
||||||
<span class="txt-grey">2016-04-08</span>
|
<% else %>
|
||||||
<div class="sn-news-txt">
|
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "380", :height => "165"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %>
|
||||||
<p><%= activity.description.to_s.html_safe %></p>
|
<% end %>
|
||||||
</div>
|
<h3>
|
||||||
</div>
|
<%= link_to activity.description.to_s.html_safe, news_url_in_org(activity.id), :target => '_blank', :class => "h3-title" %>
|
||||||
<% end %>
|
</h3>
|
||||||
<% end %>
|
<span class="txt-grey">2016-04-08</span>
|
||||||
<% end %>
|
<div class="sn-news-txt">
|
||||||
<% end %>
|
<div class="sn-news-wrap"><%= activity.description.to_s.html_safe %></div>
|
||||||
<% else %>
|
</div>
|
||||||
<% if field.field_type == "Post" %>
|
<div class="sn-read-more"><%=link_to "查看全文>>", news_url_in_org(activity.id), :target => "_blank", :class => "sn-link-grey2 sn-fr" %></div>
|
||||||
<% org_acts = get_subfield_acts field %>
|
</div>
|
||||||
<% if org_acts.blank? %>
|
<% end %>
|
||||||
<%= render :partial => 'organizations/org_subfield_leftM1_default', :locals => {:field => field} %>
|
<% end %>
|
||||||
<% else %>
|
<% end %>
|
||||||
<% org_acts.first(4).each do |activity| %>
|
<% end %>
|
||||||
<% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' && activity.org_act_id != @organization.home_id %>
|
<% else %>
|
||||||
<% document = activity.org_act %>
|
<% if field.field_type == "Post" %>
|
||||||
<% org_subfield_id = params[:org_subfield_id] %>
|
<% org_acts = get_subfield_acts field %>
|
||||||
<% flag = 2 %>
|
<% if org_acts.blank? %>
|
||||||
<% iamge_path = get_image_path_from_content(document.content) %>
|
<h2 class="h2-title"><%= field.name %></h2>
|
||||||
<div class="sn-news-bigbox fl">
|
<div class="cl"></div>
|
||||||
<% if iamge_path.nil? %>
|
<%= render :partial => 'organizations/org_subfield_leftM1_default', :locals => {:field => field} %>
|
||||||
<%= link_to image_tag("/images/default_blank/files-default.jpg", :width => "380", :height => "165"), org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => "_blank", :class =>"sn-news-bigimg" %>
|
<% else %>
|
||||||
<% else %>
|
<h2 class="h2-title"><%= field.name %>
|
||||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "380", :height => "165"), org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => "_blank", :class =>"sn-news-bigimg" %>
|
<%= render :partial => 'organizations/link_subfield_more', :locals => {:field => field} %>
|
||||||
<% end %>
|
</h2>
|
||||||
<h3>
|
<div class="cl"></div>
|
||||||
<%= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => '_blank', :class => "h3-title" %>
|
<% org_acts.first(1).each do |activity| %>
|
||||||
</h3>
|
<% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' && activity.org_act_id != @organization.home_id %>
|
||||||
<span class="txt-grey"><%= format_date document.created_at %></span>
|
<% document = activity.org_act %>
|
||||||
<div class="sn-news-txt">
|
<% org_subfield_id = params[:org_subfield_id] %>
|
||||||
<p><%= document.content.to_s.html_safe %></p>
|
<% flag = 2 %>
|
||||||
</div>
|
<% iamge_path = get_image_path_from_content(document.content) %>
|
||||||
</div>
|
<div class="sn-news-bigbox fl">
|
||||||
<% else activity.container_type == 'OrgSubfield' %>
|
<% if iamge_path.nil? %>
|
||||||
<% if activity.org_act_type == 'Message' and activity.org_act_id and Message.where("id=#{activity.org_act_id}").count > 0 %>
|
<%= link_to image_tag("/images/default_blank/left-02.jpg", :width => "380", :height => "165"), org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %>
|
||||||
<% message = Message.find(activity.org_act_id) %>
|
<% else %>
|
||||||
<% if message.parent_id.nil? %>
|
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "380", :height => "165"), org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %>
|
||||||
<% content = message.content%>
|
<% end %>
|
||||||
<% else %>
|
<h3>
|
||||||
<% content = message.parent.content%>
|
<%= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => '_blank', :class => "h3-title" %>
|
||||||
<% end %>
|
</h3>
|
||||||
<% iamge_path = get_image_path_from_content(content) %>
|
<span class="txt-grey"><%= format_date document.created_at %></span>
|
||||||
<% if message.board.org_subfield_id %>
|
<div class="sn-news-txt">
|
||||||
<div class="sn-news-bigbox fl">
|
<div class="sn-news-wrap"><%= document.content.to_s.html_safe %></div>
|
||||||
<% if iamge_path.nil? %>
|
</div>
|
||||||
<%= link_to image_tag("/images/default_blank/files-default.jpg", :width => "380", :height => "165"), board_message_url_in_org(message.board.id,message.id), :target => "_blank", :class =>"sn-news-bigimg" %>
|
<div class="sn-read-more"><%=link_to "查看全文>>", org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => "_blank", :class => "sn-link-grey2 sn-fr" %></div>
|
||||||
<% else %>
|
</div>
|
||||||
<%= 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" %>
|
<% else activity.container_type == 'OrgSubfield' %>
|
||||||
<% end %>
|
<% if activity.org_act_type == 'Message' and activity.org_act_id and Message.where("id=#{activity.org_act_id}").count > 0 %>
|
||||||
<h3>
|
<% message = Message.find(activity.org_act_id) %>
|
||||||
<% if message.parent_id.nil? %> <!--+"(帖子标题)"-->
|
<% 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 => "h3-title" %>
|
<% content = message.content%>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to message.parent.subject.to_s.html_safe, board_message_url_in_org(message.board.id,message.id), :target => '_blank', :class => "h3-title" %>
|
<% content = message.parent.content%>
|
||||||
<% end %>
|
<% end %>
|
||||||
</h3>
|
<% iamge_path = get_image_path_from_content(content) %>
|
||||||
<span class="txt-grey"><%= format_date message.created_on %></span>
|
<% if message.board.org_subfield_id %>
|
||||||
<div class="sn-news-txt">
|
<div class="sn-news-bigbox fl">
|
||||||
<p><%= content.to_s.html_safe %></p>
|
<% if iamge_path.nil? %>
|
||||||
</div>
|
<%= 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;" %>
|
||||||
</div>
|
<% else %>
|
||||||
<% 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;" %>
|
||||||
<div class="sn-news-bigbox fl">
|
<% end %>
|
||||||
<% if iamge_path.nil? %>
|
<h3> <!--+"(帖子标题)"-->
|
||||||
<%= link_to image_tag("/images/default_blank/files-default.jpg", :width => "380", :height => "165"), board_message_path(message.board,activity), :target => "_blank", :class =>"sn-news-bigimg" %>
|
<%= 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" %>
|
||||||
<% else %>
|
</h3>
|
||||||
<%= 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" %>
|
<span class="txt-grey"><%= format_date message.created_on %></span>
|
||||||
<% end %>
|
<div class="sn-news-txt">
|
||||||
<h3>
|
<div class="sn-news-wrap"><%= content.to_s.html_safe %></div>
|
||||||
<% if message.parent_id.nil? %> <!--+"(帖子标题)"-->
|
</div>
|
||||||
<%= link_to message.subject.to_s.html_safe, board_message_path(message.board,message), :target => '_blank', :class => "h3-title" %>
|
<div class="sn-read-more"><%=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 => "sn-link-grey2 sn-fr" %></div>
|
||||||
<% else %>
|
</div>
|
||||||
<%= link_to message.parent.subject.to_s.html_safe, board_message_path(message.board,activity), :target => '_blank', :class => "h3-title" %>
|
<% else %>
|
||||||
<% end %>
|
<div class="sn-news-bigbox fl">
|
||||||
</h3>
|
<% if iamge_path.nil? %>
|
||||||
<span class="txt-grey"><%= format_date message.created_on %></span>
|
<%= 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;" %>
|
||||||
<div class="sn-news-txt">
|
<% else %>
|
||||||
<p><%= content.to_s.html_safe %></p>
|
<%= 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;" %>
|
||||||
</div>
|
<% end %>
|
||||||
</div>
|
<h3>
|
||||||
<% end %>
|
<% if message.parent_id.nil? %> <!--+"(帖子标题)"-->
|
||||||
<% end %>
|
<%= link_to message.subject.to_s.html_safe, board_message_path(message.board,message), :target => '_blank', :class => "h3-title" %>
|
||||||
<% if activity.org_act_type == 'News' and News.where("id=?", activity.org_act_id).count > 0 %>
|
<% else %>
|
||||||
<% news = News.find(activity.org_act_id) %>
|
<%= link_to message.parent.subject.to_s.html_safe, board_message_path(message.board,activity), :target => '_blank', :class => "h3-title" %>
|
||||||
<% iamge_path = get_image_path_from_content(news.description) %>
|
<% end %>
|
||||||
<div class="sn-news-bigbox fl">
|
</h3>
|
||||||
<% if iamge_path.nil? %>
|
<span class="txt-grey"><%= format_date message.created_on %></span>
|
||||||
<%= link_to image_tag("/images/default_blank/files-default.jpg", :width => "380", :height => "165"), news_path(news), :target => "_blank", :class =>"sn-news-bigimg" %>
|
<div class="sn-news-txt">
|
||||||
<% else %>
|
<div class="sn-news-wrap"><%= content.to_s.html_safe %></div>
|
||||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "380", :height => "165"), news_path(news), :target => "_blank", :class =>"sn-news-bigimg" %>
|
</div>
|
||||||
<% end %>
|
<div class="sn-read-more">
|
||||||
<h3>
|
<% if message.parent_id.nil? %>
|
||||||
<%= link_to news.title.to_s, news_path(news), :target => '_blank', :class => "h3-title" %>
|
<%=link_to "查看全文>>", message.subject.to_s.html_safe, board_message_path(message.board,message), :target => "_blank", :class => "sn-link-grey2 sn-fr" %>
|
||||||
</h3>
|
<% else %>
|
||||||
<span class="txt-grey"><%= format_date news.created_on %></span>
|
<%=link_to "查看全文>>", message.parent.subject.to_s.html_safe, board_message_path(message.board,activity), :target => "_blank", :class => "sn-link-grey2 sn-fr" %>
|
||||||
<div class="sn-news-txt">
|
<% end %>
|
||||||
<p><%= news.description.to_s.html_safe %></p>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% if activity.org_act_type == 'News' and News.where("id=?", activity.org_act_id).count > 0 %>
|
||||||
<% end %>
|
<% news = News.find(activity.org_act_id) %>
|
||||||
<% end %>
|
<% iamge_path = get_image_path_from_content(news.description) %>
|
||||||
<% end %>
|
<div class="sn-news-bigbox fl">
|
||||||
<% end %>
|
<% 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;" %>
|
||||||
|
<% 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;" %>
|
||||||
|
<% end %>
|
||||||
|
<h3>
|
||||||
|
<%= link_to news.title.to_s, news_path(news), :target => '_blank', :class => "h3-title" %>
|
||||||
|
</h3>
|
||||||
|
<span class="txt-grey"><%= format_date news.created_on %></span>
|
||||||
|
<div class="sn-news-txt">
|
||||||
|
<div class="sn-news-wrap"><%= news.description.to_s.html_safe %></div>
|
||||||
|
</div>
|
||||||
|
<div class="sn-read-more"><%=link_to "查看全文>>", news.title.to_s, news_path(news), :target => "_blank", :class => "sn-link-grey2 sn-fr" %></div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(".sn-read-more").hide();
|
||||||
|
$(".sn-news-txt").each(function(){
|
||||||
|
var txtHeight = $(this).children().height();
|
||||||
|
if (txtHeight > 180){
|
||||||
|
$(this).next().show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<div class="sn-news-bigbox fl">
|
<div class="sn-news-bigbox fl">
|
||||||
<a href="javascript:void(0);" target="_blank" class="sn-news-bigimg"><img src="/images/news/img-news-big.jpg" width="380" height="165" alt=""/></a>
|
<a href="javascript:void(0);" target="_blank" class="sn-news-bigimg"><img src="/images/default_blank/left-02.jpg" width="380" height="165" alt="" style="display:block;" /></a>
|
||||||
<h3><a href="javascript:void(0);" target="_blank" class="h3-title"></a></h3>
|
<h3><a href="javascript:void(0);" target="_blank" class="h3-title"></a></h3>
|
||||||
<span class="txt-grey"></span>
|
<span class="txt-grey"></span>
|
||||||
<div class="sn-news-txt">
|
<div class="sn-news-txt">
|
||||||
<p></p>
|
<p></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,26 +1,38 @@
|
|||||||
<div class="sn-news-smallbox fl">
|
<div class="sn-news-small mb18">
|
||||||
<div class="sn-news-small mb18">
|
<a href="javascript:void(0);" target="_blank" class="sn-news-smallimg fl"><img src="/images/default_blank/left-03.jpg" width="85" height="85" alt=""/></a>
|
||||||
<a href="javascript:void()" target="_blank" class="sn-news-smallimg fl"><img src="/images/news/img-news-small01.jpg" width="85" height="85" alt=""/></a>
|
<h4><div class="sn-title-wrap"><a href="javascript:void(0);" target="_blank" class="h4-title fl mt10">帖子标题</a><span class="title-ellipsis"></span></div></h4>
|
||||||
<h4><a href="javascript:void()" target="_blank" class="h4-title fl mt10">北斗开放实验室迎湖南省省直机关领导调研参观</a></h4>
|
<span class="txt-grey fl">时间</span>
|
||||||
<span class="txt-grey fl">2016-04-08</span>
|
<div class="cl"></div>
|
||||||
<div class="cl"></div>
|
</div>
|
||||||
</div>
|
<div class="sn-news-small mb18">
|
||||||
<div class="sn-news-small mb18">
|
<a href="javascript:void(0);" target="_blank" class="sn-news-smallimg fl"><img src="/images/default_blank/left-03.jpg" width="85" height="85" alt=""/></a>
|
||||||
<a href="javascript:void()" target="_blank" class="sn-news-smallimg fl"><img src="/images/news/img-news-small02.jpg" width="85" height="85" alt=""/></a>
|
<h4><div class="sn-title-wrap"><a href="javascript:void(0);" target="_blank" class="h4-title fl mt10">帖子标题</a><span class="title-ellipsis"></span></div></h4>
|
||||||
<h4><a href="javascript:void()" target="_blank" class="h4-title fl mt10">北斗开放实验室迎湖南省省直机关领导调研参观</a></h4>
|
<span class="txt-grey fl">时间</span>
|
||||||
<span class="txt-grey fl">2016-04-08</span>
|
<div class="cl"></div>
|
||||||
<div class="cl"></div>
|
</div>
|
||||||
</div>
|
<div class="sn-news-small mb18">
|
||||||
<div class="sn-news-small mb18">
|
<a href="javascript:void(0);" target="_blank" class="sn-news-smallimg fl"><img src="/images/default_blank/left-03.jpg" width="85" height="85" alt=""/></a>
|
||||||
<a href="javascript:void()" target="_blank" class="sn-news-smallimg fl"><img src="/images/news/img-news-small03.jpg" width="85" height="85" alt=""/></a>
|
<h4><div class="sn-title-wrap"><a href="javascript:void(0);" target="_blank" class="h4-title fl mt10">帖子标题</a><span class="title-ellipsis"></span></div></h4>
|
||||||
<h4><a href="javascript:void()" target="_blank" class="h4-title fl mt10">北斗开放实验室迎湖南省省直机关领导调研参观</a></h4>
|
<span class="txt-grey fl">时间</span>
|
||||||
<span class="txt-grey fl">2016-04-08</span>
|
<div class="cl"></div>
|
||||||
<div class="cl"></div>
|
</div>
|
||||||
</div>
|
<div class="sn-news-small ">
|
||||||
<div class="sn-news-small ">
|
<a href="javascript:void(0);" target="_blank" class="sn-news-smallimg fl"><img src="/images/default_blank/left-03.jpg" width="85" height="85" alt=""/></a>
|
||||||
<a href="javascript:void()" target="_blank" class="sn-news-smallimg fl"><img src="/images/news/img-news-small04.jpg" width="85" height="85" alt=""/></a>
|
<h4><div class="sn-title-wrap"><a href="javascript:void(0);" target="_blank" class="h4-title fl mt10">帖子标题</a><span class="title-ellipsis"></span></div></h4>
|
||||||
<h4><a href="javascript:void()" target="_blank" class="h4-title fl mt10">北斗开放实验室迎湖南省省直机关领导调研参观</a></h4>
|
<span class="txt-grey fl">时间</span>
|
||||||
<span class="txt-grey fl">2016-04-08</span>
|
<div class="cl"></div>
|
||||||
<div class="cl"></div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
<script>
|
||||||
|
$(document).ready(function(){
|
||||||
|
$(".h4-title").each(function(){
|
||||||
|
var titleHeight = $(this).height();
|
||||||
|
if (titleHeight > 52){
|
||||||
|
$(this).next().show();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$(this).next().hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
@ -1,258 +1,300 @@
|
|||||||
<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) %>
|
<% if is_default_field?(field) %>
|
||||||
<% case field.name %>
|
<% case field.name %>
|
||||||
<% when 'course' %>
|
<% when 'course' %>
|
||||||
<% if @course_acts.blank? %>
|
<% if @course_acts.blank? %>
|
||||||
<%= render :partial => 'organizations/org_subfield_leftMD_default', :locals => {:field => field} %>
|
<div class="sn-index-leftbox" style="display:<%= field.hide == 0?'block':'none' %>;">
|
||||||
|
<h2 class="h2-title">课程动态</h2>
|
||||||
|
<div class="sn-index-resourcescon">
|
||||||
|
<%= render :partial => 'organizations/org_subfield_leftMD_default', :locals => {:field => field} %>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<% else %>
|
<% else %>
|
||||||
<% @course_acts.first(4).each do |act| %>
|
<div class="sn-index-leftbox" style="display:<%= field.hide == 0?'block':'none' %>;">
|
||||||
<% if act.org_act_type == "HomeworkCommon" %>
|
<h2 class="h2-title">课程动态</h2>
|
||||||
<% activity = HomeworkCommon.find(act.org_act_id) %>
|
<div class="sn-index-resourcescon">
|
||||||
<% iamge_path = get_image_path_from_content(activity.description) %>
|
<% @course_acts.first(4).each do |act| %>
|
||||||
<div class="sn-index-resourcesbox">
|
<% if act.org_act_type == "HomeworkCommon" %>
|
||||||
<% if iamge_path.nil? %>
|
<% activity = HomeworkCommon.find(act.org_act_id) %>
|
||||||
<%= 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" %>
|
<% iamge_path = get_image_path_from_content(activity.description) %>
|
||||||
<% else %>
|
<div class="sn-index-resourcesbox">
|
||||||
<%= 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" %>
|
<% if iamge_path.nil? %>
|
||||||
<% end %>
|
<%= link_to image_tag("/images/default_blank/left-04.jpg", :width => "185", :height => "125"), student_work_index_url_in_org(activity.id), :target => "_blank", :class =>"sn-resourcesimg" %>
|
||||||
<h3>
|
<% else %>
|
||||||
<%= link_to activity.name.to_s, student_work_index_url_in_org(activity.id), :target => '_blank', :class => "resources-title" %>
|
<%= 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" %>
|
||||||
</h3>
|
<% end %>
|
||||||
<div class="resources-tagbox">
|
<h3>
|
||||||
<%= link_to activity.description.to_s.html_safe, student_work_index_url_in_org(activity.id), :target => '_blank', :class => "resources-tag" %>
|
<%= link_to activity.name.to_s, student_work_index_url_in_org(activity.id), :target => '_blank', :class => "resources-title sn-hidden" %>
|
||||||
</div>
|
</h3>
|
||||||
<a href="javascript:void(0);" target="_blank" class="more-btn">更多</a>
|
<div class="resources-tagbox">
|
||||||
</div>
|
<%=render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id => activity.id, :content=> activity.description, :maxheight=>54, :maxwordsnum => 28} %>
|
||||||
<% elsif act.org_act_type == "Message" %>
|
<%#= link_to activity.description.to_s.html_safe, student_work_index_url_in_org(activity.id), :target => '_blank', :class => "resources-tag" %>
|
||||||
<% activity = Message.find(act.org_act_id) %>
|
</div>
|
||||||
<% iamge_path = get_image_path_from_content(activity.content) %>
|
<%#= link_to "更多", student_work_index_url_in_org(activity.id), :class => "more-btn", :target => "_blank" %>
|
||||||
<div class="sn-index-resourcesbox">
|
</div>
|
||||||
<% if iamge_path.nil? %>
|
<% elsif act.org_act_type == "Message" %>
|
||||||
<%= 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" %>
|
<% activity = Message.find(act.org_act_id) %>
|
||||||
<% else %>
|
<% iamge_path = get_image_path_from_content(activity.content) %>
|
||||||
<%= 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">
|
<div class="sn-index-resourcesbox">
|
||||||
<% if iamge_path.nil? %>
|
<% 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" %>
|
<%= link_to image_tag("/images/default_blank/left-04.jpg", :width => "185", :height => "125"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class =>"sn-resourcesimg" %>
|
||||||
<% else %>
|
<% 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" %>
|
<%= 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 %>
|
<% end %>
|
||||||
<h3>
|
<h3>
|
||||||
<% if has_commit %>
|
<% if activity.parent_id.nil? %> <!--+"(帖子标题)"-->
|
||||||
<%= link_to poll_name, Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => '_blank', :class => "resources-title" %>
|
<%= link_to activity.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "resources-title sn-hidden" %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to poll_name, Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => '_blank', :class => "resources-title" %>
|
<%= link_to activity.parent.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "resources-title sn-hidden" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</h3>
|
</h3>
|
||||||
<div class="resources-tagbox">
|
<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" %>
|
<%=render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id => activity.id, :content=> activity.content, :maxheight=>54, :maxwordsnum => 28} %>
|
||||||
|
<%#= link_to activity.content.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "resources-tag" %>
|
||||||
|
</div>
|
||||||
|
</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/left-04.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 sn-hidden" %>
|
||||||
|
</h3>
|
||||||
|
<div class="resources-tagbox">
|
||||||
|
<%=render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id => activity.id, :content=> activity.description, :maxheight=>54, :maxwordsnum => 28} %>
|
||||||
|
<%#= link_to activity.description.to_s.html_safe, news_url_in_org(activity.id), :target => '_blank', :class => "resources-tag" %>
|
||||||
</div>
|
</div>
|
||||||
<a href="javascript:void(0);" target="_blank" class="more-btn">更多</a>
|
<%#= link_to "更多", news_url_in_org(activity.id), :class => "more-btn", :target => "_blank" %>
|
||||||
</div>
|
</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/left-04.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 sn-hidden" %>
|
||||||
|
<% else %>
|
||||||
|
<%= link_to poll_name, Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => '_blank', :class => "resources-title sn-hidden" %>
|
||||||
|
<% end %>
|
||||||
|
</h3>
|
||||||
|
<div class="resources-tagbox">
|
||||||
|
<%=render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id => activity.id, :content=> activity.polls_description, :maxheight=>54, :maxwordsnum => 28} %>
|
||||||
|
<%#= 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>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% when 'project' %>
|
<% when 'project' %>
|
||||||
<% if @project_acts.blank? %>
|
<% if @project_acts.blank? %>
|
||||||
<%= render :partial => 'organizations/org_subfield_leftMD_default', :locals => {:field => field} %>
|
<div class="sn-index-leftbox" style="display:<%= field.hide == 0?'block':'none' %>;">
|
||||||
|
<h2 class="h2-title">项目动态</h2>
|
||||||
|
<div class="sn-index-resourcescon">
|
||||||
|
<%= render :partial => 'organizations/org_subfield_leftMD_default', :locals => {:field => field} %>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<% else %>
|
<% else %>
|
||||||
<% @project_acts.first(4).each do |act| %>
|
<div class="sn-index-leftbox" style="display:<%= field.hide == 0?'block':'none' %>;">
|
||||||
<% if act.org_act_type == "Issue" %>
|
<h2 class="h2-title">项目动态</h2>
|
||||||
<% activity = Issue.find(act.org_act_id) %>
|
<div class="sn-index-resourcescon">
|
||||||
<% iamge_path = get_image_path_from_content(activity.description) %>
|
<% @project_acts.first(4).each do |act| %>
|
||||||
<div class="sn-index-resourcesbox">
|
<% if act.org_act_type == "Issue" %>
|
||||||
<% if iamge_path.nil? %>
|
<% activity = Issue.find(act.org_act_id) %>
|
||||||
<%= 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" %>
|
<% iamge_path = get_image_path_from_content(activity.description) %>
|
||||||
<% else %>
|
<div class="sn-index-resourcesbox">
|
||||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "185", :height => "125"), issue_url_in_org(activity.id), :target => "_blank", :class =>"sn-resourcesimg" %>
|
<% if iamge_path.nil? %>
|
||||||
<% end %>
|
<%= link_to image_tag("/images/default_blank/left-04.jpg", :width => "185", :height => "125"), issue_url_in_org(activity.id), :target => "_blank", :class =>"sn-resourcesimg" %>
|
||||||
<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 %>
|
<% 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" %>
|
<%= 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 %>
|
<% end %>
|
||||||
</h3>
|
<h3>
|
||||||
<div class="resources-tagbox">
|
<%= link_to activity.subject.to_s, issue_url_in_org(activity.id), :target => '_blank', :class => "resources-title sn-hidden" %>
|
||||||
<%= link_to activity.content.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "resources-tag" %>
|
</h3>
|
||||||
|
<div class="resources-tagbox">
|
||||||
|
<%=render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id => activity.id, :content=> activity.description, :maxheight=>54, :maxwordsnum => 28} %>
|
||||||
|
<%#= link_to activity.description.to_s.html_safe, issue_url_in_org(activity.id), :target => '_blank', :class => "resources-tag" %>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a href="javascript:void(0);" target="_blank" class="more-btn">更多</a>
|
<% elsif act.org_act_type == "Message" %>
|
||||||
</div>
|
<% activity = Message.find(act.org_act_id) %>
|
||||||
<% elsif act.org_act_type == "News" %>
|
<% iamge_path = get_image_path_from_content(activity.content) %>
|
||||||
<% activity = News.find(act.org_act_id) %>
|
<div class="sn-index-resourcesbox">
|
||||||
<% iamge_path = get_image_path_from_content(activity.description) %>
|
<% if iamge_path.nil? %>
|
||||||
<div class="sn-index-resourcesbox">
|
<%= link_to image_tag("/images/default_blank/left-04.jpg", :width => "185", :height => "125"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class =>"sn-resourcesimg" %>
|
||||||
<% if iamge_path.nil? %>
|
<% else %>
|
||||||
<%= 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" %>
|
<%= 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" %>
|
||||||
<% else %>
|
<% end %>
|
||||||
<%= 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" %>
|
<h3>
|
||||||
<% end %>
|
<% if activity.parent_id.nil? %> <!--+"(帖子标题)"-->
|
||||||
<h3>
|
<%= link_to activity.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "resources-title sn-hidden" %>
|
||||||
<%= link_to activity.description.to_s.html_safe, news_url_in_org(activity.id), :target => '_blank', :class => "resources-title" %>
|
<% else %>
|
||||||
</h3>
|
<%= link_to activity.parent.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "resources-title sn-hidden" %>
|
||||||
<div class="resources-tagbox">
|
<% end %>
|
||||||
<%= link_to activity.content.to_s.html_safe, news_url_in_org(activity.id), :target => '_blank', :class => "resources-tag" %>
|
</h3>
|
||||||
</div>
|
<div class="resources-tagbox">
|
||||||
<a href="javascript:void(0);" target="_blank" class="more-btn">更多</a>
|
<%=render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id => activity.id, :content=> activity.content, :maxheight=>54, :maxwordsnum => 28} %>
|
||||||
</div>
|
<%#= link_to activity.content.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "resources-tag" %>
|
||||||
|
</div>
|
||||||
|
</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/left-04.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 sn-hidden" %>
|
||||||
|
</h3>
|
||||||
|
<div class="resources-tagbox">
|
||||||
|
<%=render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id => activity.id, :content=> activity.description, :maxheight=>54, :maxwordsnum => 28} %>
|
||||||
|
<%#= link_to activity.content.to_s.html_safe, news_url_in_org(activity.id), :target => '_blank', :class => "resources-tag" %>
|
||||||
|
</div>
|
||||||
|
<%#= link_to "更多", news_url_in_org(activity.id), :class => "more-btn", :target => "_blank" %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<% if field.field_type == "Post" %>
|
<% if field.field_type == "Post" %>
|
||||||
<% org_acts = get_subfield_acts field %>
|
<% org_acts = get_subfield_acts field %>
|
||||||
<% if org_acts.blank? %>
|
<% if org_acts.blank? %>
|
||||||
<%= render :partial => 'organizations/org_subfield_leftMD_default', :locals => {:field => field} %>
|
<div class="sn-index-leftbox" style="display:<%= field.hide == 0?'block':'none' %>;">
|
||||||
|
<h2 class="h2-title"><%= field.name %></h2>
|
||||||
|
<div class="sn-index-resourcescon">
|
||||||
|
<%= render :partial => 'organizations/org_subfield_leftMD_default', :locals => {:field => field} %>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<% else %>
|
<% else %>
|
||||||
<% org_acts.first(4).each do |activity| %>
|
<div class="sn-index-leftbox" style="display:<%= field.hide == 0?'block':'none' %>;">
|
||||||
<% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' && activity.org_act_id != @organization.home_id %>
|
<h2 class="h2-title"><%= field.name %>
|
||||||
<% document = activity.org_act %>
|
<%= render :partial => 'organizations/link_subfield_more', :locals => {:field => field} %>
|
||||||
<% org_subfield_id = params[:org_subfield_id] %>
|
</h2>
|
||||||
<% flag = 2 %>
|
<div class="sn-index-resourcescon">
|
||||||
<% iamge_path = get_image_path_from_content(document.content) %>
|
<% org_acts.first(4).each do |activity| %>
|
||||||
<div class="sn-index-resourcesbox">
|
<% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' && activity.org_act_id != @organization.home_id %>
|
||||||
<% if iamge_path.nil? %>
|
<% document = activity.org_act %>
|
||||||
<%= 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" %>
|
<% org_subfield_id = params[:org_subfield_id] %>
|
||||||
<% else %>
|
<% flag = 2 %>
|
||||||
<%= 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" %>
|
<% iamge_path = get_image_path_from_content(document.content) %>
|
||||||
<% end %>
|
<div class="sn-index-resourcesbox">
|
||||||
<h3>
|
<% if iamge_path.nil? %>
|
||||||
<%= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => '_blank', :class => "resources-title" %>
|
<%= 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" %>
|
||||||
</h3>
|
<% else %>
|
||||||
<div class="resources-tagbox">
|
<%= 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" %>
|
||||||
<%= 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" %>
|
<% end %>
|
||||||
</div>
|
<h3>
|
||||||
<a href="javascript:void(0);" target="_blank" class="more-btn">更多</a>
|
<%= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => '_blank', :class => "resources-title sn-hidden" %>
|
||||||
</div>
|
</h3>
|
||||||
<% else activity.container_type == 'OrgSubfield' %>
|
<div class="resources-tagbox">
|
||||||
<% if activity.org_act_type == 'Message' and activity.org_act_id and Message.where("id=#{activity.org_act_id}").count > 0 %>
|
<%=render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id => document.id, :content=> document.content, :maxheight=>54, :maxwordsnum => 28} %>
|
||||||
<% message = Message.find(activity.org_act_id) %>
|
<%#= 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" %>
|
||||||
<% if message.parent_id.nil? %>
|
</div>
|
||||||
<% content = message.content%>
|
<%#= link_to "更多", org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :class => "more-btn", :target => "_blank" %>
|
||||||
<% else %>
|
|
||||||
<% content = message.parent.content%>
|
</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/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 %>
|
||||||
|
<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 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 %>
|
||||||
|
</h3>
|
||||||
|
<div class="resources-tagbox">
|
||||||
|
<%= render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id => message.id, :content=> content, :maxheight=>54, :maxwordsnum => 28} %>
|
||||||
|
<%#= link_to content.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "resources-tag" %>
|
||||||
|
</div>
|
||||||
|
<%#= link_to "更多", board_message_url_in_org(message.board.id,message.id), :class => "more-btn", :target => "_blank" %>
|
||||||
|
</div>
|
||||||
|
<% else %>
|
||||||
|
<div class="sn-index-resourcesbox">
|
||||||
|
<% 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 %>
|
||||||
|
<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 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 %>
|
||||||
|
</h3>
|
||||||
|
<div class="resources-tagbox">
|
||||||
|
<%= render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id => message.id, :content=> content, :maxheight=>54, :maxwordsnum => 28} %>
|
||||||
|
<%#= link_to content.to_s.html_safe, board_message_path(message.board,activity), :target => '_blank', :class => "resources-tag" %>
|
||||||
|
</div>
|
||||||
|
<%#= link_to "更多", board_message_path(message.board,activity), :class => "more-btn", :target => "_blank" %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% iamge_path = get_image_path_from_content(content) %>
|
<% if activity.org_act_type == 'News' and News.where("id=?", activity.org_act_id).count > 0 %>
|
||||||
<% if message.board.org_subfield_id %>
|
<% news = News.find(activity.org_act_id) %>
|
||||||
|
<% iamge_path = get_image_path_from_content(news.description) %>
|
||||||
<div class="sn-index-resourcesbox">
|
<div class="sn-index-resourcesbox">
|
||||||
<% if iamge_path.nil? %>
|
<% 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" %>
|
<%= link_to image_tag("/images/default_blank/left-04.jpg", :width => "185", :height => "125"), news_path(news), :target => "_blank", :class =>"sn-resourcesimg" %>
|
||||||
<% else %>
|
<% 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" %>
|
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "185", :height => "125"), news_path(news), :target => "_blank", :class =>"sn-resourcesimg" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<h3>
|
<h3>
|
||||||
<% if message.parent_id.nil? %> <!--+"(帖子标题)"-->
|
<%= link_to news.title.to_s, news_path(news), :target => '_blank', :class => "resources-title sn-hidden" %>
|
||||||
<%= 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>
|
</h3>
|
||||||
<div class="resources-tagbox">
|
<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" %>
|
<%#= link_to news.description.to_s.html_safe, news_path(news), :target => '_blank', :class => "resources-tag" %>
|
||||||
|
<%= render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id => news.id, :content=> news.description, :maxheight=>54, :maxwordsnum => 28, :maxwordsnum => 28} %>
|
||||||
</div>
|
</div>
|
||||||
<a href="javascript:void(0);" target="_blank" class="more-btn">更多</a>
|
<%#= link_to "更多", news_path(news), :class => "more-btn", :target => "_blank" %>
|
||||||
</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>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% 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 %>
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<div class="cl"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
@ -1,11 +1,11 @@
|
|||||||
<div class="sn-index-resourcesbox">
|
<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>
|
<a href="javascript:void(0);" target="_blank" class="sn-resourcesimg"><img src="/images/default_blank/left-04.jpg" width="185" height="125" alt=""/></a>
|
||||||
<h3><a href="javascript:void()" target="_blank" class="resources-title">仪器资源</a></h3>
|
<!--<h3><a href="javascript:void(0);" target="_blank" class="resources-title sn-hidden">仪器资源</a></h3>-->
|
||||||
<div class="resources-tagbox">
|
<!--<div class="resources-tagbox">-->
|
||||||
<a href="javascript:void()" target="_blank" class="resources-tag">测试服务</a>
|
<!--<a href="javascript:void(0);" target="_blank" class="resources-tag">测试服务</a>-->
|
||||||
<a href="javascript:void()" target="_blank" class="resources-tag">开放日</a>
|
<!--<a href="javascript:void(0);" target="_blank" class="resources-tag">开放日</a>-->
|
||||||
<a href="javascript:void()" target="_blank" class="resources-tag">仪器共享</a>
|
<!--<a href="javascript:void(0);" target="_blank" class="resources-tag">仪器共享</a>-->
|
||||||
<a href="javascript:void()" target="_blank" class="resources-tag">定制测试</a>
|
<!--<a href="javascript:void(0);" target="_blank" class="resources-tag">定制测试</a>-->
|
||||||
</div>
|
<!--</div>-->
|
||||||
<a href="javascript:void()" target="_blank" class="more-btn">更多</a>
|
<!--<a href="javascript:void(0);" target="_blank" class="more-btn">更多</a>-->
|
||||||
</div>
|
</div>
|
@ -0,0 +1,33 @@
|
|||||||
|
<% unless excellent_teachers.count == 0 %>
|
||||||
|
<div class="sn-teacher-wrap" style="display:<%= field.hide == 0?'block':'none' %>;">
|
||||||
|
<h2 class="h2-title sn-mb5"><%= field.name %>
|
||||||
|
<%= link_to "更多", teachers_organization_path(@organization, :type => "famous", :org_subfield_id => field.id), :target => "_blank", :class => "more" %>
|
||||||
|
</h2>
|
||||||
|
<% excellent_teachers.each do |teacher| %>
|
||||||
|
<div class="sn-teacher-list">
|
||||||
|
<%= link_to image_tag(url_to_avatar(teacher), :width => "60", :height => "60", :class => "sn-fl sn-avatar-circle", :style => "display:block;"), user_path(teacher), :alt => "用户头像", :target => '_blank' %>
|
||||||
|
<!--<a href="javascript:void(0);" target="_blank"><img src="images/avatar_default.png" width="60" height="60" style="display:block;" class="sn-fl" /></a>-->
|
||||||
|
<div class="sn-teacher-info">
|
||||||
|
<%=link_to teacher.try(:realname) ? teacher.try(:realname) :teacher.try(:login), user_path(teacher), :class => "sn-teacher-name sn-hidden", :title => '', :target => '_blank' %></a>
|
||||||
|
<span class="sn-teacher-unit sn-hidden" title="<%= teacher.my_workplace %>"><%= teacher.my_workplace %></span> </div>
|
||||||
|
<div class="sn-teacher-social">
|
||||||
|
<% unless teacher.my_blogs_count == 0 %>
|
||||||
|
<span class="sn-mr20">博客 <%= teacher.my_blogs_count %></span>
|
||||||
|
<% end %>
|
||||||
|
<% unless teacher.courses.count == 0 %>
|
||||||
|
<span class="sn-mr20">课程 <%= teacher.courses.count %></span>
|
||||||
|
<% end %>
|
||||||
|
<% unless teacher.my_students == 0 %>
|
||||||
|
<span>学生 <%= teacher.my_students %></span>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<div class="sn-cl"></div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(".sn-teacher-list:last").addClass("sn-border-none");
|
||||||
|
</script>
|
||||||
|
<% end %>
|
||||||
|
|
@ -1,223 +1,247 @@
|
|||||||
<div class="sn-index-activebox" style="display:<%= field.hide == 0?'block':'none' %>;">
|
<% if is_default_field?(field) %>
|
||||||
<h2 class="h2-title mb18"><%= field.name %><a href="javascript:void(0);" target="_blank" class="more">更多</a></h2>
|
<% case field.name %>
|
||||||
<% if is_default_field?(field) %>
|
<% when 'course' %>
|
||||||
<% case field.name %>
|
<% if @course_acts.blank? %>
|
||||||
<% when 'course' %>
|
<div class="sn-index-activebox" style="display:<%= field.hide == 0?'block':'none' %>;">
|
||||||
<% if @course_acts.blank? %>
|
<h2 class="h2-title mb18">课程动态</h2>
|
||||||
<%= render :partial => 'organizations/org_subfield_rightT_default', :locals => {:field => field} %>
|
<%= render :partial => 'organizations/org_subfield_rightT_default', :locals => {:field => field} %>
|
||||||
<% else %>
|
<div class="cl"></div>
|
||||||
<% @course_acts.first(4).each do |act| %>
|
</div>
|
||||||
<% if act.org_act_type == "HomeworkCommon" %>
|
<% else %>
|
||||||
<% activity = HomeworkCommon.find(act.org_act_id) %>
|
<div class="sn-index-activebox" style="display:<%= field.hide == 0?'block':'none' %>;">
|
||||||
<% iamge_path = get_image_path_from_content(activity.description) %>
|
<h2 class="h2-title mb18">课程动态</h2>
|
||||||
<div class="sn-index-active">
|
<% @course_acts.first(4).each do |act| %>
|
||||||
<% if iamge_path.nil? %>
|
<% if act.org_act_type == "HomeworkCommon" %>
|
||||||
<%= 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" %>
|
<% activity = HomeworkCommon.find(act.org_act_id) %>
|
||||||
<% else %>
|
<% iamge_path = get_image_path_from_content(activity.description) %>
|
||||||
<%= 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" %>
|
<div class="sn-index-active">
|
||||||
<% end %>
|
<% if iamge_path.nil? %>
|
||||||
<h3>
|
<%= 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" %>
|
||||||
<%= link_to activity.name.to_s, student_work_index_url_in_org(activity.id), :target => '_blank', :class => "active-title" %>
|
<% else %>
|
||||||
</h3>
|
<%= 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" %>
|
||||||
<span class="txt-grey "><%= format_date activity.updated_at %></span>
|
<% end %>
|
||||||
</div>
|
<h3>
|
||||||
<% elsif act.org_act_type == "Message" %>
|
<%= link_to activity.name.to_s, student_work_index_url_in_org(activity.id), :target => '_blank', :class => "active-title" %>
|
||||||
<% activity = Message.find(act.org_act_id) %>
|
</h3>
|
||||||
<% iamge_path = get_image_path_from_content(activity.content) %>
|
<span class="txt-grey "><%= format_date activity.updated_at %></span>
|
||||||
<div class="sn-index-active">
|
</div>
|
||||||
<% if iamge_path.nil? %>
|
<% elsif act.org_act_type == "Message" %>
|
||||||
<%= 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" %>
|
<% activity = Message.find(act.org_act_id) %>
|
||||||
<% else %>
|
<% iamge_path = get_image_path_from_content(activity.content) %>
|
||||||
<%= 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" %>
|
<div class="sn-index-active">
|
||||||
<% end %>
|
<% if iamge_path.nil? %>
|
||||||
<h3>
|
<%= 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" %>
|
||||||
<% if activity.parent_id.nil? %> <!--+"(帖子标题)"-->
|
<% else %>
|
||||||
<%= link_to activity.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"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class =>"sn-activeimg" %>
|
||||||
<% else %>
|
<% end %>
|
||||||
<%= link_to activity.parent.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "active-title" %>
|
<h3>
|
||||||
<% end %>
|
<% if activity.parent_id.nil? %> <!--+"(帖子标题)"-->
|
||||||
</h3>
|
<%= link_to activity.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "active-title" %>
|
||||||
<span class="txt-grey "><%= format_date activity.updated_on %></span>
|
<% else %>
|
||||||
</div>
|
<%= link_to activity.parent.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "active-title" %>
|
||||||
<% elsif act.org_act_type == "News" %>
|
<% end %>
|
||||||
<% activity = News.find(act.org_act_id) %>
|
</h3>
|
||||||
<% iamge_path = get_image_path_from_content(activity.description) %>
|
<span class="txt-grey "><%= format_date activity.updated_on %></span>
|
||||||
<div class="sn-index-active">
|
</div>
|
||||||
<% if iamge_path.nil? %>
|
<% elsif act.org_act_type == "News" %>
|
||||||
<%= 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" %>
|
<% activity = News.find(act.org_act_id) %>
|
||||||
<% else %>
|
<% iamge_path = get_image_path_from_content(activity.description) %>
|
||||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "330", :height => "210"), news_url_in_org(activity.id), :target => "_blank", :class =>"sn-activeimg" %>
|
<div class="sn-index-active">
|
||||||
<% end %>
|
<% if iamge_path.nil? %>
|
||||||
<h3>
|
<%= 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" %>
|
||||||
<%= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank', :class => "active-title" %>
|
<% else %>
|
||||||
</h3>
|
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "330", :height => "210"), news_url_in_org(activity.id), :target => "_blank", :class =>"sn-activeimg" %>
|
||||||
<span class="txt-grey "><%= format_date activity.created_on %></span>
|
<% end %>
|
||||||
</div>
|
<h3>
|
||||||
<% elsif act.org_act_type == "Poll" %>
|
<%= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank', :class => "active-title" %>
|
||||||
<% activity = Poll.find(act.org_act_id) %>
|
</h3>
|
||||||
<% has_commit = has_commit_poll?(activity.id ,User.current)%>
|
<span class="txt-grey "><%= format_date activity.created_on %></span>
|
||||||
<% poll_name = activity.polls_name.empty? ? l(:label_poll_new) : activity.polls_name%>
|
</div>
|
||||||
<% iamge_path = get_image_path_from_content(activity.polls_description) %>
|
<% elsif act.org_act_type == "Poll" %>
|
||||||
<% if ( activity.polls_status==2) %>
|
<% activity = Poll.find(act.org_act_id) %>
|
||||||
<div class="sn-index-active">
|
<% has_commit = has_commit_poll?(activity.id ,User.current)%>
|
||||||
<% if iamge_path.nil? %>
|
<% poll_name = activity.polls_name.empty? ? l(:label_poll_new) : activity.polls_name%>
|
||||||
<%= 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" %>
|
<% iamge_path = get_image_path_from_content(activity.polls_description) %>
|
||||||
<% else %>
|
<% if ( activity.polls_status==2) %>
|
||||||
<%= 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" %>
|
<div class="sn-index-active">
|
||||||
<% end %>
|
<% if iamge_path.nil? %>
|
||||||
<h3>
|
<%= 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" %>
|
||||||
<% if has_commit %>
|
<% 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" %>
|
||||||
<% else %>
|
<% end %>
|
||||||
<%= link_to poll_name, Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => '_blank', :class => "active-title" %>
|
<h3>
|
||||||
<% end %>
|
<% if has_commit %>
|
||||||
</h3>
|
<%= link_to poll_name, Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => '_blank', :class => "active-title" %>
|
||||||
<span class="txt-grey "><%= format_date activity.published_at %></span>
|
<% else %>
|
||||||
</div>
|
<%= link_to poll_name, Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => '_blank', :class => "active-title" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
</h3>
|
||||||
<% end %>
|
<span class="txt-grey "><%= format_date activity.published_at %></span>
|
||||||
<% end %>
|
</div>
|
||||||
<% when 'project' %>
|
<% end %>
|
||||||
<% if @project_acts.blank? %>
|
<% end %>
|
||||||
<%= render :partial => 'organizations/org_subfield_leftMD_default', :locals => {:field => field} %>
|
<% end %>
|
||||||
<% else %>
|
<div class="cl"></div>
|
||||||
<% @project_acts.first(4).each do |act| %>
|
</div>
|
||||||
<% if act.org_act_type == "Issue" %>
|
|
||||||
<% activity = Issue.find(act.org_act_id) %>
|
<% end %>
|
||||||
<% iamge_path = get_image_path_from_content(activity.description) %>
|
<% when 'project' %>
|
||||||
<div class="sn-index-active">
|
<% if @project_acts.blank? %>
|
||||||
<% if iamge_path.nil? %>
|
<div class="sn-index-activebox" style="display:<%= field.hide == 0?'block':'none' %>;">
|
||||||
<%= 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" %>
|
<h2 class="h2-title mb18">项目动态</h2>
|
||||||
<% else %>
|
<%= render :partial => 'organizations/org_subfield_rightT_default', :locals => {:field => field} %>
|
||||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "330", :height => "210"), issue_url_in_org(activity.id), :target => "_blank", :class =>"sn-activeimg" %>
|
<div class="cl"></div>
|
||||||
<% end %>
|
</div>
|
||||||
<h3>
|
<% else %>
|
||||||
<%= link_to activity.subject.to_s, issue_url_in_org(activity.id), :target => '_blank', :class => "active-title" %>
|
<div class="sn-index-activebox" style="display:<%= field.hide == 0?'block':'none' %>;">
|
||||||
</h3>
|
<h2 class="h2-title mb18">项目动态</h2>
|
||||||
<span class="txt-grey "><%= format_date activity.updated_on %></span>
|
<% @project_acts.first(4).each do |act| %>
|
||||||
</div>
|
<% if act.org_act_type == "Issue" %>
|
||||||
<% elsif act.org_act_type == "Message" %>
|
<% activity = Issue.find(act.org_act_id) %>
|
||||||
<% activity = Message.find(act.org_act_id) %>
|
<% iamge_path = get_image_path_from_content(activity.description) %>
|
||||||
<% iamge_path = get_image_path_from_content(activity.content) %>
|
<div class="sn-index-active">
|
||||||
<div class="sn-index-active">
|
<% if iamge_path.nil? %>
|
||||||
<% 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" %>
|
||||||
<%= 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 %>
|
||||||
<% 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" %>
|
||||||
<%= 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 %>
|
||||||
<% end %>
|
<h3>
|
||||||
<h3>
|
<%= link_to activity.subject.to_s, issue_url_in_org(activity.id), :target => '_blank', :class => "active-title" %>
|
||||||
<% if activity.parent_id.nil? %> <!--+"(帖子标题)"-->
|
</h3>
|
||||||
<%= link_to activity.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "active-title" %>
|
<span class="txt-grey "><%= format_date activity.updated_on %></span>
|
||||||
<% else %>
|
</div>
|
||||||
<%= link_to activity.parent.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "active-title" %>
|
<% elsif act.org_act_type == "Message" %>
|
||||||
<% end %>
|
<% activity = Message.find(act.org_act_id) %>
|
||||||
</h3>
|
<% iamge_path = get_image_path_from_content(activity.content) %>
|
||||||
<span class="txt-grey "><%= format_date activity.updated_on %></span>
|
<div class="sn-index-active">
|
||||||
</div>
|
<% if iamge_path.nil? %>
|
||||||
<% elsif act.org_act_type == "News" %>
|
<%= 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" %>
|
||||||
<% activity = News.find(act.org_act_id) %>
|
<% else %>
|
||||||
<% iamge_path = get_image_path_from_content(activity.description) %>
|
<%= 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" %>
|
||||||
<div class="sn-index-active">
|
<% end %>
|
||||||
<% if iamge_path.nil? %>
|
<h3>
|
||||||
<%= 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" %>
|
<% if activity.parent_id.nil? %> <!--+"(帖子标题)"-->
|
||||||
<% else %>
|
<%= link_to activity.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"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class =>"sn-activeimg" %>
|
<% else %>
|
||||||
<% end %>
|
<%= link_to activity.parent.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "active-title" %>
|
||||||
<h3>
|
<% end %>
|
||||||
<%= link_to activity.description.to_s.html_safe, news_url_in_org(activity.id), :target => '_blank', :class => "active-title" %>
|
</h3>
|
||||||
</h3>
|
<span class="txt-grey "><%= format_date activity.updated_on %></span>
|
||||||
<span class="txt-grey "><%= format_date activity.created_on %></span>
|
</div>
|
||||||
</div>
|
<% elsif act.org_act_type == "News" %>
|
||||||
<% end %>
|
<% activity = News.find(act.org_act_id) %>
|
||||||
<% end %>
|
<% iamge_path = get_image_path_from_content(activity.description) %>
|
||||||
<% end %>
|
<div class="sn-index-active">
|
||||||
<% end %>
|
<% if iamge_path.nil? %>
|
||||||
<% else %>
|
<%= 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" %>
|
||||||
<% if field.field_type == "Post" %>
|
<% else %>
|
||||||
<% org_acts = get_subfield_acts field %>
|
<%= 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" %>
|
||||||
<% if org_acts.blank? %>
|
<% end %>
|
||||||
<%= render :partial => 'organizations/org_subfield_leftMD_default', :locals => {:field => field} %>
|
<h3>
|
||||||
<% else %>
|
<%= link_to activity.description.to_s.html_safe, news_url_in_org(activity.id), :target => '_blank', :class => "active-title" %>
|
||||||
<% org_acts.first(4).each do |activity| %>
|
</h3>
|
||||||
<% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' && activity.org_act_id != @organization.home_id %>
|
<span class="txt-grey "><%= format_date activity.created_on %></span>
|
||||||
<% document = activity.org_act %>
|
</div>
|
||||||
<% org_subfield_id = params[:org_subfield_id] %>
|
<% end %>
|
||||||
<% flag = 2 %>
|
<% end %>
|
||||||
<% iamge_path = get_image_path_from_content(document.content) %>
|
<div class="cl"></div>
|
||||||
<div class="sn-index-active">
|
</div>
|
||||||
<% if iamge_path.nil? %>
|
<% end %>
|
||||||
<%= 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" %>
|
<% end %>
|
||||||
<% else %>
|
<% 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" %>
|
<% if field.field_type == "Post" %>
|
||||||
<% end %>
|
<% org_acts = get_subfield_acts field %>
|
||||||
<h3>
|
<% if org_acts.blank? %>
|
||||||
<%= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => '_blank', :class => "active-title" %>
|
<div class="sn-index-activebox" style="display:<%= field.hide == 0?'block':'none' %>;">
|
||||||
</h3>
|
<h2 class="h2-title mb18"><%= field.name %></h2>
|
||||||
<span class="txt-grey "><%= format_date document.created_at %></span>
|
<%= render :partial => 'organizations/org_subfield_rightT_default', :locals => {:field => field} %>
|
||||||
</div>
|
<div class="cl"></div>
|
||||||
<% else activity.container_type == 'OrgSubfield' %>
|
</div>
|
||||||
<% if activity.org_act_type == 'Message' and activity.org_act_id and Message.where("id=#{activity.org_act_id}").count > 0 %>
|
<% else %>
|
||||||
<% message = Message.find(activity.org_act_id) %>
|
<div class="sn-index-activebox" style="display:<%= field.hide == 0?'block':'none' %>;">
|
||||||
<% if message.parent_id.nil? %>
|
<h2 class="h2-title mb18"><%= field.name %>
|
||||||
<% content = message.content%>
|
<%= render :partial => 'organizations/link_subfield_more', :locals => {:field => field} %>
|
||||||
<% else %>
|
<!--<a href="javascript:void(0);" target="_blank" class="more">更多</a>-->
|
||||||
<% content = message.parent.content%>
|
</h2>
|
||||||
<% end %>
|
<% org_acts.first(4).each do |activity| %>
|
||||||
<% iamge_path = get_image_path_from_content(content) %>
|
<% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' && activity.org_act_id != @organization.home_id %>
|
||||||
<% if message.board.org_subfield_id %>
|
<% document = activity.org_act %>
|
||||||
<div class="sn-index-active">
|
<% org_subfield_id = params[:org_subfield_id] %>
|
||||||
<% if iamge_path.nil? %>
|
<% flag = 2 %>
|
||||||
<%= 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" %>
|
<% iamge_path = get_image_path_from_content(document.content) %>
|
||||||
<% else %>
|
<div class="sn-index-active">
|
||||||
<%= 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" %>
|
<% if iamge_path.nil? %>
|
||||||
<% end %>
|
<%= 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" %>
|
||||||
<h3>
|
<% else %>
|
||||||
<% if message.parent_id.nil? %> <!--+"(帖子标题)"-->
|
<%= 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" %>
|
||||||
<%= link_to message.subject.to_s.html_safe, board_message_url_in_org(message.board.id,message.id), :target => '_blank', :class => "active-title" %>
|
<% end %>
|
||||||
<% else %>
|
<h3>
|
||||||
<%= link_to message.parent.subject.to_s.html_safe, board_message_url_in_org(message.board.id,message.id), :target => '_blank', :class => "active-title" %>
|
<%= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => '_blank', :class => "active-title" %>
|
||||||
<% end %>
|
</h3>
|
||||||
</h3>
|
<span class="txt-grey "><%= format_date document.created_at %></span>
|
||||||
<span class="txt-grey "><%= format_date message.created_on %></span>
|
</div>
|
||||||
</div>
|
<% else activity.container_type == 'OrgSubfield' %>
|
||||||
<% else %>
|
<% if activity.org_act_type == 'Message' and activity.org_act_id and Message.where("id=#{activity.org_act_id}").count > 0 %>
|
||||||
<div class="sn-index-active">
|
<% message = Message.find(activity.org_act_id) %>
|
||||||
<% if iamge_path.nil? %>
|
<% if message.parent_id.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" %>
|
<% content = message.content%>
|
||||||
<% else %>
|
<% 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" %>
|
<% content = message.parent.content%>
|
||||||
<% end %>
|
<% end %>
|
||||||
<h3>
|
<% iamge_path = get_image_path_from_content(content) %>
|
||||||
<% if message.parent_id.nil? %> <!--+"(帖子标题)"-->
|
<% if message.board.org_subfield_id %>
|
||||||
<%= link_to message.subject.to_s.html_safe, board_message_path(message.board,message), :target => '_blank', :class => "active-title" %>
|
<div class="sn-index-active">
|
||||||
<% else %>
|
<% if iamge_path.nil? %>
|
||||||
<%= link_to message.parent.subject.to_s.html_safe, board_message_path(message.board,activity), :target => '_blank', :class => "active-title" %>
|
<%= 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" %>
|
||||||
<% end %>
|
<% else %>
|
||||||
</h3>
|
<%= 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" %>
|
||||||
<span class="txt-grey "><%= format_date message.created_on %></span>
|
<% end %>
|
||||||
</div>
|
<h3>
|
||||||
<% end %>
|
<% if message.parent_id.nil? %> <!--+"(帖子标题)"-->
|
||||||
<% end %>
|
<%= link_to message.subject.to_s.html_safe, board_message_url_in_org(message.board.id,message.id), :target => '_blank', :class => "active-title" %>
|
||||||
<% if activity.org_act_type == 'News' and News.where("id=?", activity.org_act_id).count > 0 %>
|
<% else %>
|
||||||
<% news = News.find(activity.org_act_id) %>
|
<%= link_to message.parent.subject.to_s.html_safe, board_message_url_in_org(message.board.id,message.id), :target => '_blank', :class => "active-title" %>
|
||||||
<% iamge_path = get_image_path_from_content(news.description) %>
|
<% end %>
|
||||||
<div class="sn-index-active">
|
</h3>
|
||||||
<% if iamge_path.nil? %>
|
<span class="txt-grey "><%= format_date message.created_on %></span>
|
||||||
<%= link_to image_tag("/images/default_blank/files-default.jpg", :width => "330", :height => "210"), news_path(news), :target => "_blank", :class =>"sn-activeimg" %>
|
</div>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "330", :height => "210"), news_path(news), :target => "_blank", :class =>"sn-activeimg" %>
|
<div class="sn-index-active">
|
||||||
<% end %>
|
<% if iamge_path.nil? %>
|
||||||
<h3>
|
<%= 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" %>
|
||||||
<%= link_to news.title.to_s, news_path(news), :target => '_blank', :class => "active-title" %>
|
<% else %>
|
||||||
</h3>
|
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "330", :height => "210"), board_message_path(message.board,activity), :target => "_blank", :class =>"sn-activeimg" %>
|
||||||
<span class="txt-grey "><%= format_date news.created_on %></span>
|
<% end %>
|
||||||
</div>
|
<h3>
|
||||||
<% end %>
|
<% if message.parent_id.nil? %> <!--+"(帖子标题)"-->
|
||||||
<% end %>
|
<%= link_to message.subject.to_s.html_safe, board_message_path(message.board,message), :target => '_blank', :class => "active-title" %>
|
||||||
<% end %>
|
<% else %>
|
||||||
<% end %>
|
<%= link_to message.parent.subject.to_s.html_safe, board_message_path(message.board,activity), :target => '_blank', :class => "active-title" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
</h3>
|
||||||
<div class="cl"></div>
|
<span class="txt-grey "><%= format_date message.created_on %></span>
|
||||||
</div>
|
</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 %>
|
||||||
|
@ -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 ">创建时间</span>
|
||||||
|
</div>
|
@ -0,0 +1,59 @@
|
|||||||
|
<% org_teachers.each do |org_teacher| %>
|
||||||
|
<% school = School.where("id =?", org_teacher.school_id).first %>
|
||||||
|
<div class="teacher-list-row">
|
||||||
|
<div>
|
||||||
|
<div class="teacher-avatar">
|
||||||
|
<%= link_to image_tag(url_to_avatar(org_teacher), :width => "90", :height => "90"), user_url_in_org(org_teacher), :alt => "用户头像" %>
|
||||||
|
</div>
|
||||||
|
<div class="fl">
|
||||||
|
<div class="ml25 mb20"><span class="teacher-name"><%=link_to org_teacher.try(:realname).nil? ? org_teacher.try(:login) : org_teacher.try(:realname), user_url_in_org(org_teacher) %></span>
|
||||||
|
<% unless school.nil? %>
|
||||||
|
<span class="f12 fontGrey2 mr15"><%= school.name %></span>
|
||||||
|
<% end %>
|
||||||
|
<% unless org_teacher.nil? %>
|
||||||
|
<span class="f12 fontGrey2"><%= org_teacher.technical_title %></span></div>
|
||||||
|
<% end %>
|
||||||
|
<div class="teacher-social-block">
|
||||||
|
<div class="block-num"><%= org_teacher.courses.count %></div>
|
||||||
|
<div class="block-title">课程数</div>
|
||||||
|
</div>
|
||||||
|
<div class="block-slice"></div>
|
||||||
|
<div class="teacher-social-block">
|
||||||
|
<div class="block-num"><%= org_teacher.my_students %></div>
|
||||||
|
<div class="block-title">学生数</div>
|
||||||
|
</div>
|
||||||
|
<div class="block-slice"></div>
|
||||||
|
<div class="teacher-social-block">
|
||||||
|
<div class="block-num"><%= org_teacher_resource_count(org_teacher) %></div>
|
||||||
|
<div class="block-title">资源数</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% if User.current.admin_of_org?(@organization) %>
|
||||||
|
<a href="javascript:void(0);" class="fr teacher-select" onclick="hide($(this),'<%= org_teacher.id %>');" id="hide_<%= org_teacher.id %>"><%= org_teacher.excellent_teacher==0?"设为名师":"取消设置" %></a>
|
||||||
|
<!--<a href="javascript:void(0);" class="fr teacher-select">设为名师</a>-->
|
||||||
|
<% else %>
|
||||||
|
<!--<%# if(org_teacher.watched_by?(User.current)) %>-->
|
||||||
|
<!--<%#= link_to "取消关注",watch_path(:object_type=> 'user',:object_id=>org_teacher.id,:target_id=>org_teacher.id),:class => "fr teacher-select", :method => "delete",:remote => "true", :title => "取消关注"%>-->
|
||||||
|
<!--<%# else %>-->
|
||||||
|
<!--<%#= link_to "添加关注",watch_path(:object_type=> 'user',:object_id=>org_teacher.id,:target_id=>org_teacher.id),:class => "fr teacher-select", :method => "post",:remote => "true", :title => "添加关注"%>-->
|
||||||
|
<!--<%# end %>-->
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function hide(content, id){
|
||||||
|
if (content.text() == '设为名师')
|
||||||
|
$.ajax({
|
||||||
|
url: "/organizations/set_excellent_teacher?user=" + id,
|
||||||
|
type: "post"
|
||||||
|
});
|
||||||
|
else
|
||||||
|
$.ajax({
|
||||||
|
url: "/organizations/reset_excellent_teacher?user=" + id,
|
||||||
|
type: "post"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
@ -0,0 +1,6 @@
|
|||||||
|
<% if @organization.allow_set_teachers && !org_subfield_had_created?(@organization, "Comptec") %>
|
||||||
|
<li class="fl mr15">
|
||||||
|
<input type="radio" id="orgTec" value="Comptec" name="field_type" />
|
||||||
|
<label for="Comptec">教师</label>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
@ -0,0 +1,36 @@
|
|||||||
|
<div class="resources mt10">
|
||||||
|
<div class="function-row">
|
||||||
|
<input type="text" placeholder="搜索" class="teacher-list-search fl" />
|
||||||
|
<a href="javascript:void(0);" class="teacher-search-icon fl"></a>
|
||||||
|
<select class="teacher-search-type fr">
|
||||||
|
<option>课程数</option>
|
||||||
|
<option>学生数</option>
|
||||||
|
<option>资源数</option>
|
||||||
|
</select>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
<div class="teacher-list-row">
|
||||||
|
<div>
|
||||||
|
<div class="teacher-avatar"><img src="images/homepageImage.jpg" width="90" height="90" /></div>
|
||||||
|
<div class="fl">
|
||||||
|
<div class="ml25 mb20"><span class="teacher-name">尹刚</span><span class="f12 fontGrey2 mr15">国防科学技术大学</span><span class="f12 fontGrey2">教授</span></div>
|
||||||
|
<div class="teacher-social-block">
|
||||||
|
<div class="block-num">6000</div>
|
||||||
|
<div class="block-title">课程数</div>
|
||||||
|
</div>
|
||||||
|
<div class="block-slice"></div>
|
||||||
|
<div class="teacher-social-block">
|
||||||
|
<div class="block-num">500</div>
|
||||||
|
<div class="block-title">学生数</div>
|
||||||
|
</div>
|
||||||
|
<div class="block-slice"></div>
|
||||||
|
<div class="teacher-social-block">
|
||||||
|
<div class="block-num">8000</div>
|
||||||
|
<div class="block-title">资源数</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<a href="javascript:void(0);" class="fr teacher-select">添加</a>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
@ -0,0 +1,22 @@
|
|||||||
|
<div class="resources mt10">
|
||||||
|
<div class="function-row">
|
||||||
|
<%= form_tag( url_for(:controller => 'organizations', :action => 'teacher_search'),
|
||||||
|
:remote => true , :method => 'get', :id => 'resource_search_form') do %>
|
||||||
|
<input type="text" name="search" placeholder="输入教师名进行搜索" class="teacher-list-search fl" />
|
||||||
|
<%= submit_tag '', :class => 'homepageSearchIcon', :onfocus => 'this.blur();', :style => 'border-style:none', :class => "teacher-search-icon fl" %>
|
||||||
|
<!--<a href="javascript:void(0);" onclick='this.parent.submit();return false;' class="searchIcon"></a>-->
|
||||||
|
<% end %>
|
||||||
|
<!--<a href="javascript:" class="f_l" onclick="$('#search_student').submit();">搜索</a>-->
|
||||||
|
<!--<input type="text" placeholder="搜索" class="teacher-list-search fl" />-->
|
||||||
|
<!--<a href="javascript:void(0);" class="teacher-search-icon fl"></a>-->
|
||||||
|
<select class="teacher-search-type fr" onclick="chooseTeacherType();">
|
||||||
|
<option value="1">课程数</option>
|
||||||
|
<option value="2">学生数</option>
|
||||||
|
<option value="3">资源数</option>
|
||||||
|
</select>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
<div id="org_teachers_list">
|
||||||
|
<%=render 'organizations/org_teachers_list' %>
|
||||||
|
</div>
|
||||||
|
</div>
|
@ -0,0 +1,84 @@
|
|||||||
|
<% sub_domains = field.sub_domains.order("priority") %>
|
||||||
|
<% if sub_domains %>
|
||||||
|
<% sub_domains.each do |subdomain| %>
|
||||||
|
<ul class="orgSubList">
|
||||||
|
<li class="orgSubTree"></li>
|
||||||
|
<li class="orgSubNum ml5 mr5">
|
||||||
|
<div id="show_domain_priority_<%= subdomain.id %>" ondblclick="edit_priority('#show_domain_priority_<%= subdomain.id %>','#edit_domain_priority_<%= subdomain.id %>');" class="subNumBlock" title="双击可编辑">
|
||||||
|
<%= subdomain.priority %>
|
||||||
|
</div>
|
||||||
|
<div id="edit_domain_priority_<%= subdomain.id %>" style="display:none; width:30px;">
|
||||||
|
<input type="text" onblur="domain_update_priority('#show_domain_priority_<%= subdomain.id %>','#edit_domain_priority_<%= subdomain.id %>','<%= subdomain.org_subfield.id %>','<%= subdomain.id %>',$(this).val());" style="width:20px;" value="<%= subdomain.priority %>"/>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="orgSubColumn">
|
||||||
|
<div id="subsubdomain_show_<%= subdomain.id %>" class="subColumnControl" title="<%= subdomain.name %>"><%= subdomain.name %></div>
|
||||||
|
<div id="subsubdomain_edit_<%= subdomain.id %>" style="display:none;">
|
||||||
|
<input type="text" name="name" onblur="update_subfield_subdomain('#subsubdomain_show_<%= subdomain.id %>','#subsubdomain_edit_<%= subdomain.id %>','<%= subdomain.org_subfield.id %>','<%= subdomain.id %>',$(this).val());" value="<%= subdomain.name %>" style="width:70px;"/>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="orgSubStatus">新增</li>
|
||||||
|
<li class="orgSubOrder">
|
||||||
|
默认
|
||||||
|
</li>
|
||||||
|
<li class="orgSubType"><%= subdomain.field_type == "Post" ? "帖子" : "资源" %></li>
|
||||||
|
<li class="orgListCatalog hidden"> -- </li>
|
||||||
|
<%#= link_to "隐藏", hide_org_subsubdomain_organizations_path(subdomain), :method => 'post', :remote => true, :id => "hide_#{subdomain.id}", :class => "linkBlue fr mr5" %>
|
||||||
|
<li class="orgSubOperation">
|
||||||
|
<a href="javascript:void(0);" class="linkGrey fr ml5 mr10" onclick="hide_domain($(this),'<%= subdomain.org_subfield.id %>','<%= subdomain.id %>');" id="hide_<%= subdomain.id %>"><%= subdomain.hide==0?"隐藏":"可见" %></a>
|
||||||
|
<span class="fr">|</span>
|
||||||
|
<%= link_to "删除", org_subfield_sub_domain_path(subdomain, :org_subfield_id => subdomain.org_subfield.id), :method => 'delete', :remote => true, :confirm => "您确定删除吗?", :class => "linkGrey fr ml5 mr5" %>
|
||||||
|
<span class="fr">|</span>
|
||||||
|
<a href="javascript:void(0);" class="linkGrey fr ml5 mr5" onclick="edit('#subsubdomain_show_<%= subdomain.id %>','#subsubdomain_edit_<%= subdomain.id %>');">编辑</a>
|
||||||
|
</li>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</ul>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function update_subfield_subdomain(show_id, edit_id, field_id, domain_id, input_value) {
|
||||||
|
if ($(show_id).html().trim() != input_value.trim()) {
|
||||||
|
if (confirm('确定修改为' + input_value + "?"))
|
||||||
|
$.ajax({
|
||||||
|
url: "/org_subfields/" + field_id + "/sub_domains/" + domain_id + "?name=" + input_value,
|
||||||
|
type: 'put'
|
||||||
|
});
|
||||||
|
else{
|
||||||
|
$(edit_id).children("input").val($(show_id).html().trim());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$(show_id).show();
|
||||||
|
$(edit_id).hide();
|
||||||
|
// $(edit_id).focus();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function domain_update_priority(show_id, edit_id, field_id, domain_id, input_value){
|
||||||
|
var re = /^[0-9]*[1-9]*[0-9]$/
|
||||||
|
if(re.test(input_value) && $(show_id).html().trim() != input_value.trim() && input_value.trim() != ''){
|
||||||
|
$.ajax({
|
||||||
|
url: "/org_subfields/" + field_id + "/sub_domains/" + domain_id + "/domain_update_priority?priority=" + input_value,
|
||||||
|
type: 'put'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$(edit_id).children("input").val($(show_id).html().trim());
|
||||||
|
}
|
||||||
|
$(show_id).show();
|
||||||
|
$(edit_id).hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
function hide_domain(content, field_id, domain_id){
|
||||||
|
if (content.text() == '隐藏')
|
||||||
|
$.ajax({
|
||||||
|
url: "/org_subfields/" + field_id + "/sub_domains/" + domain_id + "/hide_sub_domain",
|
||||||
|
type: "post"
|
||||||
|
});
|
||||||
|
else
|
||||||
|
$.ajax({
|
||||||
|
url: "/org_subfields/" + field_id + "/sub_domains/" + domain_id + "/show_sub_domain",
|
||||||
|
type: "post"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
@ -1,7 +1,7 @@
|
|||||||
<div class="sn-index-active">
|
<div class="sn-index-active">
|
||||||
<div class="sn-index-active">
|
<div class="sn-index-active">
|
||||||
<a href="javascript:void()" target="_blank" class="sn-activeimg"><img src="images/active/img-active01.jpg" width="330" height="210" alt=""/></a>
|
<a href="javascript:void()" target="_blank" class="sn-activeimg"><img src="images/active/img-active01.jpg" width="330" height="210" alt=""/></a>
|
||||||
<h3><a href="javascript:void()" target="_blank" class="active-title"></a></h3>
|
<h3><a href="javascript:void()" target="_blank" class="active-title"></a></h3>
|
||||||
<span class="txt-grey "></span>
|
<span class="txt-grey "></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
@ -0,0 +1 @@
|
|||||||
|
$("#hide_<%= @ex_teacher.id %>").text("设为名师");
|
@ -0,0 +1 @@
|
|||||||
|
$("#hide_<%= @ex_teacher.id %>").text("取消设置");
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue