Merge branch 'hjq_beidou' into develop
This commit is contained in:
commit
fdb1846f75
|
@ -38,6 +38,11 @@ class OrgDocumentCommentsController < ApplicationController
|
||||||
|
|
||||||
def show
|
def show
|
||||||
@document = OrgDocumentComment.find(params[:id])
|
@document = OrgDocumentComment.find(params[:id])
|
||||||
|
@org_subfield = OrgSubfield.where(:id => @document.org_subfield_id).first
|
||||||
|
@subfield_content = @organization.org_subfields.order("priority")
|
||||||
|
respond_to do |format|
|
||||||
|
format.html {render :layout => @organization.switch_type ? 'base_org_custom' : 'base_org'}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
@ -91,7 +96,7 @@ class OrgDocumentCommentsController < ApplicationController
|
||||||
def add_reply_in_doc
|
def add_reply_in_doc
|
||||||
@document = OrgDocumentComment.find(params[:id]).root
|
@document = OrgDocumentComment.find(params[:id]).root
|
||||||
@comment = OrgDocumentComment.new(:organization_id => @document.organization_id, :creator_id => User.current.id, :reply_id => params[:id])
|
@comment = OrgDocumentComment.new(:organization_id => @document.organization_id, :creator_id => User.current.id, :reply_id => params[:id])
|
||||||
@comment.content = params[:org_comment][:org_content]
|
@comment.content = params[:org_content]
|
||||||
@document.children << @comment
|
@document.children << @comment
|
||||||
@document.save
|
@document.save
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
|
|
|
@ -28,8 +28,9 @@ class OrganizationsController < ApplicationController
|
||||||
helper :project_score
|
helper :project_score
|
||||||
helper :issues
|
helper :issues
|
||||||
include UsersHelper
|
include UsersHelper
|
||||||
|
include OrganizationsHelper
|
||||||
before_filter :find_organization, :only => [:show, :members, :apply_subdomain, :select_org_layout, :teachers, :students, :projects, :courses]
|
before_filter :find_organization, :only => [:show, :members, :apply_subdomain, :select_org_layout, :teachers, :students, :projects, :courses]
|
||||||
before_filter :allow_as_admin, :only => [:students, :teachers, :projects, :courses, :acts]
|
# before_filter :allow_as_admin, :only => [:students, :teachers, :projects, :courses, :acts]
|
||||||
layout 'base_org'
|
layout 'base_org'
|
||||||
def index
|
def index
|
||||||
|
|
||||||
|
@ -77,8 +78,12 @@ class OrganizationsController < ApplicationController
|
||||||
|
|
||||||
def show
|
def show
|
||||||
# 组织新类型 show_mode:判断标准 1为新类型,0为旧
|
# 组织新类型 show_mode:判断标准 1为新类型,0为旧
|
||||||
if @organization.switch_type && params[:org_subfield_id].nil? && params[:list] .nil?
|
if @organization.switch_type && params[:list] .nil?
|
||||||
if @organization.is_public? || User.current.admin? || User.current.member_of_org?(@organization)
|
if @organization.is_public? || User.current.admin? || User.current.member_of_org?(@organization)
|
||||||
|
unless params[:org_subfield_id].nil?
|
||||||
|
@org_subfield = OrgSubfield.where(:id => params[:org_subfield_id]).first
|
||||||
|
@subfield_acts = get_subfield_acts(@org_subfield)
|
||||||
|
end
|
||||||
@subfield_content = @organization.org_subfields.order("priority")
|
@subfield_content = @organization.org_subfields.order("priority")
|
||||||
shield_project_ids = ShieldActivity.where("container_type='Organization' and container_id=#{@organization.id} and shield_type='Project'").map(&:shield_id)
|
shield_project_ids = ShieldActivity.where("container_type='Organization' and container_id=#{@organization.id} and shield_type='Project'").map(&:shield_id)
|
||||||
shield_course_ids = ShieldActivity.where("container_type='Organization' and container_id=#{@organization.id} and shield_type='Course'").map(&:shield_id)
|
shield_course_ids = ShieldActivity.where("container_type='Organization' and container_id=#{@organization.id} and shield_type='Course'").map(&:shield_id)
|
||||||
|
@ -102,7 +107,7 @@ class OrganizationsController < ApplicationController
|
||||||
if @organization.org_subfields.where(:field_type => "Compact", :hide => 0).count > 0
|
if @organization.org_subfields.where(:field_type => "Compact", :hide => 0).count > 0
|
||||||
@acts = UserActivity.find_by_sql("SELECT * FROM `user_activities` where act_type in ('HomeworkCommon', 'News', 'Message', 'Issue') and
|
@acts = UserActivity.find_by_sql("SELECT * FROM `user_activities` where act_type in ('HomeworkCommon', 'News', 'Message', 'Issue') and
|
||||||
((container_type = 'Course' and container_id in (#{course_ids.join(',')})) or (container_type = 'Project' and container_id in (#{project_ids.join(',')})))
|
((container_type = 'Course' and container_id in (#{course_ids.join(',')})) or (container_type = 'Project' and container_id in (#{project_ids.join(',')})))
|
||||||
order by created_at desc limit 6;")
|
order by updated_at desc limit 6;")
|
||||||
end
|
end
|
||||||
render :layout => 'base_org_custom'
|
render :layout => 'base_org_custom'
|
||||||
else
|
else
|
||||||
|
@ -175,7 +180,7 @@ class OrganizationsController < ApplicationController
|
||||||
q = params[:search].nil? ? "" : "#{params[:search].strip}"
|
q = params[:search].nil? ? "" : "#{params[:search].strip}"
|
||||||
@field = params[:org_subfield_id].nil? ? OrgSubfield.where("organization_id =? and field_type =?", params[:id].to_i, "Comptec").first : OrgSubfield.find(params[:org_subfield_id])
|
@field = params[:org_subfield_id].nil? ? OrgSubfield.where("organization_id =? and field_type =?", params[:id].to_i, "Comptec").first : OrgSubfield.find(params[:org_subfield_id])
|
||||||
@type = params[:type]
|
@type = params[:type]
|
||||||
if @type == "courses" || @type.nil?
|
if @type.blank?
|
||||||
@org_teachers = User.find_by_sql("select u.*, ue.technical_title, ue.school_id,(select count(*) from courses where courses.tea_id = u.id) as course_count
|
@org_teachers = User.find_by_sql("select u.*, ue.technical_title, ue.school_id,(select count(*) from courses where courses.tea_id = u.id) as course_count
|
||||||
from users u, user_extensions ue where u.id = ue.user_id and ue.identity=0 and concat(lastname,firstname,login) like '%#{q}%' order by course_count desc")
|
from users u, user_extensions ue where u.id = ue.user_id and ue.identity=0 and concat(lastname,firstname,login) like '%#{q}%' order by course_count desc")
|
||||||
elsif @type == "famous"
|
elsif @type == "famous"
|
||||||
|
@ -199,7 +204,7 @@ class OrganizationsController < ApplicationController
|
||||||
q = params[:search].nil? ? "" : "#{params[:search].strip}"
|
q = params[:search].nil? ? "" : "#{params[:search].strip}"
|
||||||
@field = params[:org_subfield_id].nil? ? OrgSubfield.where("organization_id =? and field_type =?", params[:id].to_i, "Compstu").first : OrgSubfield.find(params[:org_subfield_id])
|
@field = params[:org_subfield_id].nil? ? OrgSubfield.where("organization_id =? and field_type =?", params[:id].to_i, "Compstu").first : OrgSubfield.find(params[:org_subfield_id])
|
||||||
@type = params[:type]
|
@type = params[:type]
|
||||||
if @type == "courses" || @type.nil?
|
if @type.blank?
|
||||||
@org_students = User.find_by_sql("select u.*, ue.student_id, ue.school_id,(select count(*) from courses where courses.tea_id = u.id) as course_count
|
@org_students = User.find_by_sql("select u.*, ue.student_id, ue.school_id,(select count(*) from courses where courses.tea_id = u.id) as course_count
|
||||||
from users u, user_extensions ue where u.id = ue.user_id and ue.identity= 1 and concat(lastname,firstname,login) like '%#{q}%' order by course_count desc")
|
from users u, user_extensions ue where u.id = ue.user_id and ue.identity= 1 and concat(lastname,firstname,login) like '%#{q}%' order by course_count desc")
|
||||||
elsif @type == "famous"
|
elsif @type == "famous"
|
||||||
|
@ -235,7 +240,7 @@ class OrganizationsController < ApplicationController
|
||||||
q = params[:search].nil? ? "" : "#{params[:search].strip}"
|
q = params[:search].nil? ? "" : "#{params[:search].strip}"
|
||||||
@field = params[:org_subfield_id].nil? ? OrgSubfield.where("organization_id =? and field_type =?", params[:id].to_i, "Comppro").first : OrgSubfield.find(params[:org_subfield_id])
|
@field = params[:org_subfield_id].nil? ? OrgSubfield.where("organization_id =? and field_type =?", params[:id].to_i, "Comppro").first : OrgSubfield.find(params[:org_subfield_id])
|
||||||
@type = params[:type]
|
@type = params[:type]
|
||||||
if @type.nil?
|
if @type.blank?
|
||||||
@containers = Project.find_by_sql("select p.*, (select count(*) from forge_activities where forge_activities.project_id = p.id) as project_count
|
@containers = Project.find_by_sql("select p.*, (select count(*) from forge_activities where forge_activities.project_id = p.id) as project_count
|
||||||
from projects p where p.status =1 and p.is_public =1 and name like '%#{q}%' order by project_count desc;")
|
from projects p where p.status =1 and p.is_public =1 and name like '%#{q}%' order by project_count desc;")
|
||||||
elsif @type == "famous"
|
elsif @type == "famous"
|
||||||
|
@ -249,7 +254,7 @@ class OrganizationsController < ApplicationController
|
||||||
q = params[:search].nil? ? "" : "#{params[:search].strip}"
|
q = params[:search].nil? ? "" : "#{params[:search].strip}"
|
||||||
@field = params[:org_subfield_id].nil? ? OrgSubfield.where("organization_id =? and field_type =?", params[:id].to_i, "Compstu").first : OrgSubfield.find(params[:org_subfield_id])
|
@field = params[:org_subfield_id].nil? ? OrgSubfield.where("organization_id =? and field_type =?", params[:id].to_i, "Compstu").first : OrgSubfield.find(params[:org_subfield_id])
|
||||||
@type = params[:type]
|
@type = params[:type]
|
||||||
if @type.nil?
|
if @type.blank?
|
||||||
@containers = Course.find_by_sql("select c.*, (select count(*) from course_activities where course_activities.course_id = c.id) as course_count
|
@containers = Course.find_by_sql("select c.*, (select count(*) from course_activities where course_activities.course_id = c.id) as course_count
|
||||||
from courses c where c.is_delete =0 and c.is_public =1 and name like '%#{q}%' order by course_count desc;")
|
from courses c where c.is_delete =0 and c.is_public =1 and name like '%#{q}%' order by course_count desc;")
|
||||||
elsif @type == "famous"
|
elsif @type == "famous"
|
||||||
|
|
|
@ -325,13 +325,10 @@ update
|
||||||
|
|
||||||
def show
|
def show
|
||||||
## TODO: the below will move to filter, done.
|
## TODO: the below will move to filter, done.
|
||||||
if !User.current.member_of?(@project)
|
if !User.current.member_of?(@project) && @project.hidden_repo
|
||||||
if @project.hidden_repo
|
|
||||||
render_403
|
render_403
|
||||||
return -1
|
return
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
@entries = @repository.entries(@path, @rev)
|
@entries = @repository.entries(@path, @rev)
|
||||||
@changeset = @repository.find_changeset_by_name(@rev)
|
@changeset = @repository.find_changeset_by_name(@rev)
|
||||||
if request.xhr?
|
if request.xhr?
|
||||||
|
|
|
@ -3,7 +3,7 @@ class SubDocumentCommentsController < ApplicationController
|
||||||
before_filter :find_subfield_content, :only => [:show, :index]
|
before_filter :find_subfield_content, :only => [:show, :index]
|
||||||
before_filter :authorize_allowed, :only => [:create, :add_reply]
|
before_filter :authorize_allowed, :only => [:create, :add_reply]
|
||||||
helper :attachments,:organizations
|
helper :attachments,:organizations
|
||||||
layout 'base_sub_domain'
|
layout 'base_org_custom'
|
||||||
|
|
||||||
def new
|
def new
|
||||||
@sub_document_comment = SubDocumentComment.new
|
@sub_document_comment = SubDocumentComment.new
|
||||||
|
@ -41,7 +41,7 @@ class SubDocumentCommentsController < ApplicationController
|
||||||
if @organization.is_public? || User.current.admin? || User.current.member_of_org?(@organization)
|
if @organization.is_public? || User.current.admin? || User.current.member_of_org?(@organization)
|
||||||
@document = SubDocumentComment.find(params[:id])
|
@document = SubDocumentComment.find(params[:id])
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html {render :layout => @organization.switch_type ? 'base_sub_domain' : 'base_org'}
|
format.html {render :layout => @organization.switch_type ? 'base_org_custom' : 'base_org'}
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
render_403
|
render_403
|
||||||
|
@ -58,7 +58,7 @@ class SubDocumentCommentsController < ApplicationController
|
||||||
@offset ||= @atta_pages.offset
|
@offset ||= @atta_pages.offset
|
||||||
@documents = paginateHelper @documents,20
|
@documents = paginateHelper @documents,20
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html {render :layout => @organization.switch_type ? 'base_sub_domain' : 'base_org'}
|
format.html {render :layout => @organization.switch_type ? 'base_org_custom' : 'base_org'}
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
render_403
|
render_403
|
||||||
|
|
|
@ -66,52 +66,87 @@ module OrganizationsHelper
|
||||||
def org_user_by_type obj
|
def org_user_by_type obj
|
||||||
case obj.act_type
|
case obj.act_type
|
||||||
when "Message"
|
when "Message"
|
||||||
user = obj.act.author
|
obj.act.author
|
||||||
when "News"
|
when "News"
|
||||||
user = obj.act.author
|
obj.act.author
|
||||||
when "HomeworkCommon"
|
when "HomeworkCommon"
|
||||||
user = obj.act.user
|
obj.act.user
|
||||||
when "Issue"
|
when "Issue"
|
||||||
user = obj.act.author
|
obj.act.author
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def org_title_by_type obj
|
def org_title_by_type obj
|
||||||
case obj.act_type
|
case obj.act_type
|
||||||
when "Message"
|
when "Message"
|
||||||
user = obj.act.parent_id.nil? ? obj.act.subject : obj.act.parent.subject
|
obj.act.parent_id.nil? ? obj.act.subject : obj.act.parent.subject
|
||||||
when "News"
|
when "News"
|
||||||
user = obj.act.title
|
obj.act.title
|
||||||
when "HomeworkCommon"
|
when "HomeworkCommon"
|
||||||
user = obj.act.name
|
obj.act.name
|
||||||
when "Issue"
|
when "Issue"
|
||||||
user = obj.act.subject
|
obj.act.subject
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def org_content_by_type obj
|
def org_content_by_type obj
|
||||||
case obj.act_type
|
case obj.act_type
|
||||||
when "Message"
|
when "Message"
|
||||||
user = obj.act.parent_id.nil? ? obj.act.content : obj.act.parent.content
|
obj.act.parent_id.nil? ? obj.act.content : obj.act.parent.content
|
||||||
when "News"
|
when "News"
|
||||||
user = obj.act.description
|
obj.act.description
|
||||||
when "HomeworkCommon"
|
when "HomeworkCommon"
|
||||||
user = obj.act.description
|
obj.act.description
|
||||||
when "Issue"
|
when "Issue"
|
||||||
user = obj.act.description
|
obj.act.description
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def org_time_by_type obj
|
def org_time_by_type obj
|
||||||
case obj.act_type
|
case obj.act_type
|
||||||
when "Message"
|
when "Message"
|
||||||
time = obj.act.updated_on
|
obj.act.updated_on
|
||||||
when "News"
|
when "News"
|
||||||
user = obj.act.created_on
|
obj.act.created_on
|
||||||
when "HomeworkCommon"
|
when "HomeworkCommon"
|
||||||
user = obj.act.updated_at
|
obj.act.updated_at
|
||||||
when "Issue"
|
when "Issue"
|
||||||
user = obj.act.updated_on
|
obj.act.updated_on
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
# 组织的栏目类型标题
|
||||||
|
def subfield_title_type obj
|
||||||
|
case obj.org_act_type
|
||||||
|
when "OrgDocumentComment"
|
||||||
|
obj.org_act.title
|
||||||
|
when "Message"
|
||||||
|
obj.org_act.parent_id.nil? ? obj.org_act.subject : obj.org_act.parent.subject
|
||||||
|
when "News"
|
||||||
|
obj.org_act.title
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
# 组织的栏目类型时间
|
||||||
|
def subfield_time_type obj
|
||||||
|
case obj.org_act_type
|
||||||
|
when "OrgDocumentComment"
|
||||||
|
obj.org_act.updated_at
|
||||||
|
when "Message"
|
||||||
|
obj.org_act.updated_on
|
||||||
|
when "News"
|
||||||
|
obj.org_act.created_on
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def subfield_reply_count_type obj
|
||||||
|
case obj.org_act_type
|
||||||
|
when "OrgDocumentComment"
|
||||||
|
obj.org_act.children.count
|
||||||
|
when "Message"
|
||||||
|
obj.org_act.children.count
|
||||||
|
when "News"
|
||||||
|
obj.org_act.comments_count
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -178,18 +213,20 @@ module OrganizationsHelper
|
||||||
|
|
||||||
# 系统栏目只有管理员才能看到
|
# 系统栏目只有管理员才能看到
|
||||||
def subfield_to_addmin?(org)
|
def subfield_to_addmin?(org)
|
||||||
if User.current.admin?
|
# if User.current.admin?
|
||||||
@organization.org_subfields.order("priority")
|
@organization.org_subfields.order("priority")
|
||||||
else
|
# else
|
||||||
@organization.org_subfields.select { |os| (os.field_type != "Comptec" && os.field_type != "Compstu" && os.field_type != "Comppro" && os.field_type != "Compcou" && os.field_type != "Compact") }.sort_by {|os| os.priority}
|
# @organization.org_subfields.select { |os| (os.field_type != "Comptec" && os.field_type != "Compstu" && os.field_type != "Comppro" && os.field_type != "Compcou" && os.field_type != "Compact") }.sort_by {|os| os.priority}
|
||||||
end
|
# end
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_subfield_acts field
|
def get_subfield_acts field
|
||||||
|
unless field.nil?
|
||||||
org_subfield = OrgSubfield.find(field.id)
|
org_subfield = OrgSubfield.find(field.id)
|
||||||
org_subfield_ids = org_subfield.org_document_comments.map(&:id) << 0
|
org_subfield_ids = org_subfield.org_document_comments.map(&:id) << 0
|
||||||
org_acts = OrgActivity.where("(org_act_type='OrgDocumentComment'and org_act_id in (#{org_subfield_ids.join(",")})) || (container_type='OrgSubfield' and container_id=#{org_subfield.id})").order('updated_at desc')
|
org_acts = OrgActivity.where("(org_act_type='OrgDocumentComment'and org_act_id in (#{org_subfield_ids.join(",")})) || (container_type='OrgSubfield' and container_id=#{org_subfield.id})").order('updated_at desc')
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def allow_to_create?(org, type)
|
def allow_to_create?(org, type)
|
||||||
!org_subfield_had_created?(org, type) && User.current.admin?
|
!org_subfield_had_created?(org, type) && User.current.admin?
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<span class="attachment">
|
<span class="attachment">
|
||||||
<%= link_to truncate(@attachment.filename,length: 35, omission: '...'),
|
<%= link_to truncate(@attachment.filename,length: 35, omission: '...'),
|
||||||
download_named_attachment_path(@attachment.id, @attachment.filename),
|
download_named_attachment_path(@attachment.id, @attachment.filename),
|
||||||
:title => @attachment.filename+"\n"+@attachment.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis; max-width:300px;",:class => "linkBlue f14 fb link_file_a2 fl" %>
|
:title => @attachment.filename+"\n"+@attachment.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis; max-width:280px;",:class => "linkBlue f14 fb link_file_a2 fl" %>
|
||||||
</span>
|
</span>
|
||||||
<span class="fr">版本号:当前</span>
|
<span class="fr">版本号:当前</span>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
<div class="sn-row sn-bg-grey2">
|
||||||
|
<div class="sn-footer">
|
||||||
|
<ul class="sn-footer-link">
|
||||||
|
<li class="sn-mr50"><a href="<%= about_us_path %>" class="sn-link-white sn-f18">关于我们</a></li>
|
||||||
|
<li class="sn-mr50"><a href="<%= agreement_path %>" class="sn-link-white sn-f18">服务协议</a></li>
|
||||||
|
<li class="sn-mr50"><a href="http://forge.trustie.net/forums/1/memos/1168" class="sn-link-white sn-f18">帮助中心</a></li>
|
||||||
|
<li><a href="<%= forums_path(:reorder_complex=>'desc')%>" class="sn-link-white sn-f18">在线报名</a></li>
|
||||||
|
</ul>
|
||||||
|
<div class="sn-contact">联系人:魏小姐 | 电 话:0731-84761282 | 传 真:0731-84761268 | 邮 箱:office@gnssopenlab.org</div>
|
||||||
|
<div class="sn-address">地 址:湖南省长沙市开福区东风路89号观园大厦23层<br />
|
||||||
|
卫星导航仿真与测试开放实验室</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -9,16 +9,16 @@
|
||||||
<%= favicon %>
|
<%= favicon %>
|
||||||
<%= javascript_heads %>
|
<%= javascript_heads %>
|
||||||
<%= heads_for_theme %>
|
<%= heads_for_theme %>
|
||||||
<%= stylesheet_link_tag 'new_user', 'public', 'org_custom','jquery/jquery-ui-1.9.2' %>
|
<%= stylesheet_link_tag 'new_user', 'public', 'org_custom','jquery/jquery-ui-1.9.2', 'org2' %>
|
||||||
<%= call_hook :view_layouts_base_html_head %>
|
<%= call_hook :view_layouts_base_html_head %>
|
||||||
<%= yield :header_tags -%>
|
<%= yield :header_tags -%>
|
||||||
<!-- MathJax的配置 -->
|
<!-- MathJax的配置 -->
|
||||||
<%=render :partial => "math_js" %>
|
<%#=render :partial => "math_js" %>
|
||||||
</head>
|
</head>
|
||||||
<body style="background: #fff">
|
<body style="background: #fff">
|
||||||
<% update_visiti_count @organization %>
|
<% update_visiti_count @organization %>
|
||||||
<header id="por_header">
|
<header id="por_header">
|
||||||
<%= render :partial => 'org_custom_header', :locals => {:subfield_content => @subfield_content} %>
|
<%= render :partial => 'organizations/org_custom_header', :locals => {:subfield_content => @subfield_content} %>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<%# 内容开始 %>
|
<%# 内容开始 %>
|
||||||
|
|
|
@ -160,30 +160,14 @@
|
||||||
<div style="clear:both;"></div>
|
<div style="clear:both;"></div>
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
<!--footer-->
|
<%= render :partial => "layouts/org_custom_footer" %>
|
||||||
<div class="sn-row sn-bg-grey2">
|
|
||||||
<div class="sn-footer">
|
|
||||||
<ul class="sn-footer-link">
|
|
||||||
<li class="sn-mr50"><a href="<%= about_us_path %>" class="sn-link-white sn-f18">关于我们</a></li>
|
|
||||||
<li class="sn-mr50"><a href="<%= agreement_path %>" class="sn-link-white sn-f18">服务协议</a></li>
|
|
||||||
<li class="sn-mr50"><a href="http://forge.trustie.net/forums/1/memos/1168" class="sn-link-white sn-f18">帮助中心</a></li>
|
|
||||||
<li><a href="<%= forums_path(:reorder_complex=>'desc')%>" class="sn-link-white sn-f18">在线报名</a></li>
|
|
||||||
</ul>
|
|
||||||
<div class="sn-contact">联系人:魏小姐 | 电 话:0731-84761282 | 传 真:0731-84761268 | 邮 箱:office@gnssopenlab.org</div>
|
|
||||||
<div class="sn-address">地 址:湖南省长沙市开福区东风路89号观园大厦23层<br />
|
|
||||||
卫星导航仿真与测试开放实验室</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!--页面底部-->
|
<!--页面底部-->
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<div id="ajax-modal" style="display:none;"></div>
|
<div id="ajax-modal" style="display:none;"></div>
|
||||||
|
<div id="ajax-indicator" style="display:none;"><span><%= l(:label_loading) %></span></div>
|
||||||
<div id="ajax-indicator" style="display:none;">
|
|
||||||
<span><%= l(:label_loading) %></span>
|
|
||||||
</div>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,111 @@
|
||||||
|
<div class="sn-innner-content">
|
||||||
|
<div class="sn-row sn-bg-white">
|
||||||
|
<div class="sn-font-grey3 f14"> 您的位置:<%= link_to "首页", organization_path(@organization), :class => "sn-link-grey2" %> >
|
||||||
|
<%=link_to @org_subfield.name, organization_path(@organization, :org_subfield_id => @org_subfield.id), :class => "sn-link-grey2" %> >
|
||||||
|
<a class = "sn-link-grey2" ><%= @document.title %></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="sn-inner-newslist mt15">
|
||||||
|
<h2 class="sn-inner-newsh2 sn-hidden"><%= @document.title %></h2>
|
||||||
|
<div class="sn-inner-newscon">
|
||||||
|
<p class=" sn-inner-psmall">来源:<%= @org_subfield.name %> 发布时间:<%= format_date(@document.created_at) %></p>
|
||||||
|
<p class=" sn-inner-pcon"><%= @document.content.html_safe %></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--回复-->
|
||||||
|
<% if User.current.logged? %>
|
||||||
|
<% comments_for_doc = @document.children.reorder("created_at desc") %>
|
||||||
|
<% count = @document.children.count() %>
|
||||||
|
<div class="sn-replybox">
|
||||||
|
<h2 class="sn-reply-h2">留言板<span class="sn-fr sn-f14 sn-font-grey3 sn-mt10"><%= count %>条留言</span></h2>
|
||||||
|
<%= form_for :org_comment, :url => {:action => 'add_reply_in_doc',:controller => 'org_document_comments', :id => @document.id, :flag => true}, :html => {:multipart => true, :id => 'message_form', :class => "sn-reply-form", } do |f| %>
|
||||||
|
<textarea class="sn-reply-text" name="org_content" id="text_submain"></textarea>
|
||||||
|
<%#= f.kindeditor :sub_content,:width=>'99%',:height => '100px;',:editor_id=>'message_content_editor', :class => "sn-reply-text" %>
|
||||||
|
<div class="sn-reply-btnbox">
|
||||||
|
<a href="javascript:void(0)" onclick = "org_new_files_upload()" class = "submit-btn">发表</a>
|
||||||
|
</div>
|
||||||
|
<p id="sub_domain_reply" style="display: none;color: #ff0000">内容不能为空</p>
|
||||||
|
<%#= link_to l(:button_cancel), "javascript:void(0)", :onclick => 'message_content_editor.html("");', :class => " grey_btn fr c_white mt10 mr5" %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<div class="sn-reply-comment">
|
||||||
|
<h2 class="sn-comment-h2">全部评论</h2>
|
||||||
|
|
||||||
|
<div id="newstyle_reply_div_<%= @document.id %>" style="display:<%= count == 0 ? 'none' : 'block' %>">
|
||||||
|
<% comments_for_doc.each_with_index do |reply,i| %>
|
||||||
|
<div class="sn-comment-listbox">
|
||||||
|
<a href="javascript:void(0)" class="sn-reply-userpic fl"><img src="images/img-news-con.jpg" width="824" height="522" alt="" /></a>
|
||||||
|
<%= link_to User.find(reply.creator_id).realname, user_url_in_org(reply.creator_id), :class => "sn-reply-username fl" %><span class="fl"><%= time_from_now(reply.created_at) %></span>
|
||||||
|
<div class="fl sn-reply-usertxt ">
|
||||||
|
<%=render :partial =>"users/intro_content", :locals=>{:user_activity_id => reply.id, :content=> reply.content} %>
|
||||||
|
<%#= reply.content.html_safe unless reply.content.nil? %>
|
||||||
|
</div>
|
||||||
|
<!--<a href="javascript:void(0)" target="_blank" class="sn-reply-zan fl">(100)</a>-->
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<% if count > 3 %>
|
||||||
|
<div class="sn-reply-more">
|
||||||
|
<a id="reply_btn_<%= @document.id %>" onclick="expand_reply('#newstyle_reply_div_<%= @document.id %>','#reply_btn_<%= @document.id%>')" data-count="<%= count %>" data-init="0" href="javascript:void(0)" value="show_help">
|
||||||
|
展开更多
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(document).ready(function(){
|
||||||
|
var replyCount = $(".sn-comment-listbox").size();
|
||||||
|
if (replyCount >3){
|
||||||
|
for(var i= 3; i < replyCount+1; i++){
|
||||||
|
$(".sn-comment-listbox").eq(i).hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
function expand_reply(container, btnid) {
|
||||||
|
var target = $(container).children();
|
||||||
|
var btn = $(btnid);
|
||||||
|
if (btn.data('init') == '0') {
|
||||||
|
btn.data('init', 1);
|
||||||
|
btn.html('收起回复');
|
||||||
|
target.show();
|
||||||
|
} else {
|
||||||
|
btn.data('init', 0);
|
||||||
|
btn.html('展开更多');
|
||||||
|
target.hide();
|
||||||
|
target.eq(0).show();
|
||||||
|
target.eq(1).show();
|
||||||
|
target.eq(2).show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//验证搜索时输入字
|
||||||
|
function regexName_submain(content) {
|
||||||
|
var name = $.trim($("#name").val());
|
||||||
|
if (name.length == 0) {
|
||||||
|
$("#project_name_span").text(content);
|
||||||
|
$("#project_name_span").css('color', '#ff0000');
|
||||||
|
$("#project_name_span").focus();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$("#project_name_span").text("");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function org_new_files_upload(){
|
||||||
|
var name = $.trim($("#text_submain").val());
|
||||||
|
// content = $("#text_submain").val();
|
||||||
|
if (name.length == 0) {
|
||||||
|
$("#sub_domain_reply").show();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$("#message_form").submit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
|
@ -1,11 +1,14 @@
|
||||||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"create_kindeditor",'blog' %>
|
<% if @organization.switch_type %>
|
||||||
<script>
|
<%= render :partial => 'show_custom_org_document_comment' %>
|
||||||
|
<% else %>
|
||||||
|
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"create_kindeditor",'blog' %>
|
||||||
|
<script>
|
||||||
$(function() {
|
$(function() {
|
||||||
sd_create_editor_from_data(<%= @document.id%>,null,"100%", "<%=@document.class.to_s%>");
|
sd_create_editor_from_data(<%= @document.id%>,null,"100%", "<%=@document.class.to_s%>");
|
||||||
showNormalImage('message_description_<%= @document.id %>');
|
showNormalImage('message_description_<%= @document.id %>');
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<div class="resources" style="margin-top:<%= User.current.logged? ? '0px':'10px' %>;" id="organization_document_<%= @document.id %>">
|
<div class="resources" style="margin-top:<%= User.current.logged? ? '0px':'10px' %>;" id="organization_document_<%= @document.id %>">
|
||||||
<div class="homepagePostBrief">
|
<div class="homepagePostBrief">
|
||||||
<div class="homepagePostPortrait">
|
<div class="homepagePostPortrait">
|
||||||
<%= link_to image_tag(url_to_avatar(User.find(@document.creator_id)), :width => 45, :heigth => 45), user_url_in_org(@document.creator_id) %>
|
<%= link_to image_tag(url_to_avatar(User.find(@document.creator_id)), :width => 45, :heigth => 45), user_url_in_org(@document.creator_id) %>
|
||||||
|
@ -139,9 +142,9 @@
|
||||||
</div>
|
</div>
|
||||||
<%# end %>
|
<%# end %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function(){
|
$(function(){
|
||||||
$("#intro_content_<%= @document.id%> p,#intro_content_<%= @document.id%> span,#intro_content_<%= @document.id%> em").each(function(){
|
$("#intro_content_<%= @document.id%> p,#intro_content_<%= @document.id%> span,#intro_content_<%= @document.id%> em").each(function(){
|
||||||
var postContent = $(this).html();
|
var postContent = $(this).html();
|
||||||
|
@ -169,4 +172,5 @@
|
||||||
target.eq(2).show();
|
target.eq(2).show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
<% end %>
|
||||||
|
|
|
@ -16,7 +16,9 @@
|
||||||
<div class="block-title">资源</div>
|
<div class="block-title">资源</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<% if User.current.admin? %>
|
||||||
<a href="javascript:void(0);" class="fr teacher-select" onclick="admin_hide_org($(this),'<%= container.id %>');" id="hide_<%= container.id %>"><%= container.class == Course ? (container.is_excellent == 0 ? "设为精品" : "取消精品") : (container.hot ==0 ? "设为热门" : "取消热门") %></a>
|
<a href="javascript:void(0);" class="fr teacher-select" onclick="admin_hide_org($(this),'<%= container.id %>');" id="hide_<%= container.id %>"><%= container.class == Course ? (container.is_excellent == 0 ? "设为精品" : "取消精品") : (container.hot ==0 ? "设为热门" : "取消热门") %></a>
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -63,8 +63,28 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
<% elsif field.field_type == "Comptec" %>
|
||||||
|
<li>
|
||||||
|
<%= link_to "#{field.name}", teachers_organization_path(@organization, :org_subfield_id => field.id, :type => "#{User.current.admin? ? "" : "famous"}"), :class => "sn-link-white", :target => "_blank" %>
|
||||||
|
</li>
|
||||||
|
<% elsif field.field_type == "Compstu" %>
|
||||||
|
<li>
|
||||||
|
<%= link_to "#{field.name}", students_organization_path(@organization, :org_subfield_id => field.id, :type => "#{User.current.admin? ? "" : "famous"}"), :class => "sn-link-white", :target => "_blank" %>
|
||||||
|
</li>
|
||||||
|
<% elsif field.field_type == "Comppro" %>
|
||||||
|
<li>
|
||||||
|
<%= link_to "#{field.name}", projects_organization_path(@organization, :org_subfield_id => field.id, :type => "#{User.current.admin? ? "" : "famous"}"), :class => "sn-link-white", :target => "_blank" %>
|
||||||
|
</li>
|
||||||
|
<% elsif field.field_type == "Compcou" %>
|
||||||
|
<li>
|
||||||
|
<%= link_to "#{field.name}", courses_organization_path(@organization, :org_subfield_id => field.id, :type => "#{User.current.admin? ? "" : "famous"}"), :class => "sn-link-white", :target => "_blank" %>
|
||||||
|
</li>
|
||||||
|
<% elsif field.field_type == "Compact" %>
|
||||||
|
<li>
|
||||||
|
<%= link_to "#{field.name}", acts_organization_path(@organization, :org_subfield_id => field.id), :class => "sn-link-white", :target => "_blank" %>
|
||||||
|
</li>
|
||||||
<% elsif field.field_type == "Resource" && field.hide == 0 %>
|
<% elsif field.field_type == "Resource" && field.hide == 0 %>
|
||||||
<li class="nav-element">
|
<li>
|
||||||
<%= link_to field.name, org_subfield_files_path(field), :class => "sn-link-white", :target => "_blank" %>
|
<%= link_to field.name, org_subfield_files_path(field), :class => "sn-link-white", :target => "_blank" %>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -117,27 +117,23 @@
|
||||||
<a href="javascript:void(0);" class="homepageLeftMenuMoreIcon" onclick="$('#PostDomain_<%= field.id %>').slideToggle();" style="border-bottom: 1px solid #ddd;"></a>
|
<a href="javascript:void(0);" class="homepageLeftMenuMoreIcon" onclick="$('#PostDomain_<%= field.id %>').slideToggle();" style="border-bottom: 1px solid #ddd;"></a>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% elsif field.field_type == "Comptec" && User.current.admin? %>
|
<% elsif field.field_type == "Comptec" %>
|
||||||
<div class="homepageLeftMenuBlock">
|
<div class="homepageLeftMenuBlock">
|
||||||
<%= link_to "#{field.name}", teachers_organization_path(organization, :org_subfield_id => field.id), :class => "homepageMenuText homepageMenuControl hidden", :onclick => "$('#homepageLeftMenuPost').slideToggle();" %>
|
<%= link_to "#{field.name}", teachers_organization_path(organization, :org_subfield_id => field.id, :type => "#{User.current.admin? ? "" : "famous"}"), :class => "homepageMenuText homepageMenuControl hidden", :onclick => "$('#homepageLeftMenuPost').slideToggle();" %>
|
||||||
</div>
|
</div>
|
||||||
<% elsif field.field_type == "Compstu" && User.current.admin? %>
|
<% elsif field.field_type == "Compstu" %>
|
||||||
<div class="homepageLeftMenuBlock">
|
<div class="homepageLeftMenuBlock">
|
||||||
<%= link_to "#{field.name}", students_organization_path(organization, :org_subfield_id => field.id), :class => "homepageMenuText homepageMenuControl hidden", :onclick => "$('#homepageLeftMenuPost').slideToggle();" %>
|
<%= link_to "#{field.name}", students_organization_path(organization, :org_subfield_id => field.id, :type => "#{User.current.admin? ? "" : "famous"}"), :class => "homepageMenuText homepageMenuControl hidden", :onclick => "$('#homepageLeftMenuPost').slideToggle();" %>
|
||||||
</div>
|
</div>
|
||||||
<% elsif field.field_type == "Compstu" && User.current.admin? %>
|
<% elsif field.field_type == "Comppro" %>
|
||||||
<div class="homepageLeftMenuBlock">
|
<div class="homepageLeftMenuBlock">
|
||||||
<%= link_to "#{field.name}", students_organization_path(organization, :org_subfield_id => field.id), :class => "homepageMenuText homepageMenuControl hidden", :onclick => "$('#homepageLeftMenuPost').slideToggle();" %>
|
<%= link_to "#{field.name}", projects_organization_path(organization, :org_subfield_id => field.id, :type => "#{User.current.admin? ? "" : "famous"}"), :class => "homepageMenuText homepageMenuControl hidden", :onclick => "$('#homepageLeftMenuPost').slideToggle();" %>
|
||||||
</div>
|
</div>
|
||||||
<% elsif field.field_type == "Comppro" && User.current.admin? %>
|
<% elsif field.field_type == "Compcou" %>
|
||||||
<div class="homepageLeftMenuBlock">
|
<div class="homepageLeftMenuBlock">
|
||||||
<%= link_to "#{field.name}", projects_organization_path(organization, :org_subfield_id => field.id), :class => "homepageMenuText homepageMenuControl hidden", :onclick => "$('#homepageLeftMenuPost').slideToggle();" %>
|
<%= link_to "#{field.name}", courses_organization_path(organization, :org_subfield_id => field.id, :type => "#{User.current.admin? ? "" : "famous"}"), :class => "homepageMenuText homepageMenuControl hidden", :onclick => "$('#homepageLeftMenuPost').slideToggle();" %>
|
||||||
</div>
|
</div>
|
||||||
<% elsif field.field_type == "Compcou" && User.current.admin? %>
|
<% elsif field.field_type == "Compact" %>
|
||||||
<div class="homepageLeftMenuBlock">
|
|
||||||
<%= link_to "#{field.name}", courses_organization_path(organization, :org_subfield_id => field.id), :class => "homepageMenuText homepageMenuControl hidden", :onclick => "$('#homepageLeftMenuPost').slideToggle();" %>
|
|
||||||
</div>
|
|
||||||
<% elsif field.field_type == "Compact" && User.current.admin? %>
|
|
||||||
<div class="homepageLeftMenuBlock">
|
<div class="homepageLeftMenuBlock">
|
||||||
<%= link_to "#{field.name}", acts_organization_path(organization, :org_subfield_id => field.id), :class => "homepageMenuText homepageMenuControl hidden", :onclick => "$('#homepageLeftMenuPost').slideToggle();" %>
|
<%= link_to "#{field.name}", acts_organization_path(organization, :org_subfield_id => field.id), :class => "homepageMenuText homepageMenuControl hidden", :onclick => "$('#homepageLeftMenuPost').slideToggle();" %>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<div class="block-title">资源数</div>
|
<div class="block-title">资源数</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<% if User.current.admin_of_org?(@organization) %>
|
<% if User.current.admin? %>
|
||||||
<a href="javascript:void(0);" class="fr teacher-select" onclick="hide($(this),'<%= org_student.id %>');" id="hide_<%= org_student.id %>"><%= org_student.excellent_student ==0 ? "设为学霸" : "取消设置" %></a>
|
<a href="javascript:void(0);" class="fr teacher-select" onclick="hide($(this),'<%= org_student.id %>');" id="hide_<%= org_student.id %>"><%= org_student.excellent_student ==0 ? "设为学霸" : "取消设置" %></a>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -28,15 +28,8 @@
|
||||||
<div class="block-title">资源数</div>
|
<div class="block-title">资源数</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<% if User.current.admin_of_org?(@organization) %>
|
<% if User.current.admin? %>
|
||||||
<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" 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 %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
|
|
@ -0,0 +1,44 @@
|
||||||
|
<% if @subfield_acts.blank? %>
|
||||||
|
<% else %>
|
||||||
|
<div class="sn-inner-body">
|
||||||
|
<div class="sn-innner-content">
|
||||||
|
<div class="sn-row sn-bg-white">
|
||||||
|
<div class="sn-font-grey3 f14">
|
||||||
|
您的位置:<%= link_to "首页", organization_path(@organization), :class => "sn-link-grey2" %> >
|
||||||
|
<a class = "sn-link-grey2"><%= @org_subfield.name %></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="sn-inner-newslist mt15">
|
||||||
|
<h2 class="sn-inner-newsh2"><%= @org_subfield.name %></h2>
|
||||||
|
<ul>
|
||||||
|
<% @subfield_acts.each do |act| %>
|
||||||
|
<% title = subfield_title_type(act) %>
|
||||||
|
<% time = subfield_time_type(act) %>
|
||||||
|
<% reply_count = subfield_reply_count_type(act) %>
|
||||||
|
<% document = act.org_act %>
|
||||||
|
<li>
|
||||||
|
<div class="sn-circle fl"></div>
|
||||||
|
<% if act.org_act_type == "OrgDocumentComment" %>
|
||||||
|
<%=link_to title, org_document_comment_path(act.org_act, :organization_id => @organization.id), :class => "sn-newslist-titile fl", :target => "_blank" %>
|
||||||
|
<% elsif act.org_act_type == "News" %>
|
||||||
|
<%=link_to title, news_path(act.org_act), :class => "sn-newslist-titile fl", :target => "_blank" %>
|
||||||
|
<% elsif act.org_act_type == "Message" %>
|
||||||
|
<%=link_to title, board_message_path(act.org_act.board.id, act.org_act.id), :class => "sn-newslist-titile fl", :target => "_blank" %>
|
||||||
|
<% end %>
|
||||||
|
<span class=" txt-grey fr"><%= format_date(time) %></span>
|
||||||
|
<span class="sn-newslist-reply fr mr10 txt-grey">回复(<%= reply_count %>)</span>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<!--<div>-->
|
||||||
|
<!--<ul class="sn-inner-pages" id="pages" style="margin-top: 5px;">-->
|
||||||
|
<!--<%#= pagination_links_full @atta_pages, @atta_count, :per_page_links => true, :remote => @is_remote, :flag => true %>-->
|
||||||
|
<!--<div class="cl"></div>-->
|
||||||
|
<!--</ul>-->
|
||||||
|
<!--</div>-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
|
@ -89,7 +89,11 @@
|
||||||
<li class="orgListOperation">
|
<li class="orgListOperation">
|
||||||
<a href="javascript:void(0);" class="linkGrey fr ml5 mr10" onclick="hide($(this),'<%= field.id %>');" id="hide_<%= field.id %>"><%= field.hide==0?"隐藏":"可见" %></a>
|
<a href="javascript:void(0);" class="linkGrey fr ml5 mr10" onclick="hide($(this),'<%= field.id %>');" id="hide_<%= field.id %>"><%= field.hide==0?"隐藏":"可见" %></a>
|
||||||
<span class="fr">|</span>
|
<span class="fr">|</span>
|
||||||
|
<% if (field.field_type == "Comptec" || field.field_type == "Compstu" || field.field_type == "Comppro" || field.field_type == "Compcou" || field.field_type == "Compact") && !User.current.admin? %>
|
||||||
|
<span class = "linkGrey fr ml5 mr5">默认</span>
|
||||||
|
<% else %>
|
||||||
<%= link_to "删除", org_subfield_path(field), :method => 'delete', :remote => true, :confirm => "您确定删除吗?", :class => "linkGrey fr ml5 mr5" %>
|
<%= link_to "删除", org_subfield_path(field), :method => 'delete', :remote => true, :confirm => "您确定删除吗?", :class => "linkGrey fr ml5 mr5" %>
|
||||||
|
<% end %>
|
||||||
<span class="fr">|</span>
|
<span class="fr">|</span>
|
||||||
<a href="javascript:void(0);" class="linkGrey fr ml5 mr5" onclick="edit('#subfield_show_<%= field.id %>','#subfield_edit_<%= field.id %>');">编辑</a>
|
<a href="javascript:void(0);" class="linkGrey fr ml5 mr5" onclick="edit('#subfield_show_<%= field.id %>','#subfield_edit_<%= field.id %>');">编辑</a>
|
||||||
<% unless field.field_type == "Resource" || field.field_type == "Comptec" || field.field_type == "Compstu" || field.field_type == "Comppro" || field.field_type == "Compcou" || field.field_type == "Compact" %>
|
<% unless field.field_type == "Resource" || field.field_type == "Comptec" || field.field_type == "Compstu" || field.field_type == "Comppro" || field.field_type == "Compcou" || field.field_type == "Compact" %>
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
$("#org_container_list").html('<%= escape_javascript( render :partial => 'organizations/org_container', :locals => {:containers => @containers})%>');
|
$("#org_container_list").html('<%= escape_javascript( render :partial => 'organizations/org_container', :locals => {:containers => @containers})%>');
|
||||||
$("#pages").html('<%= pagination_links_full @atta_pages, @container_count, :per_page_links => false, :remote => @is_remote, :flag => true %>');
|
$("#pages").html('<%= pagination_links_full @atta_pages, @container_count, :per_page_links => false, :remote => true, :flag => true %>');
|
||||||
$("#org_student_search").attr('href','<%= courses_organization_path(@organization, :type => @type) %>');
|
//$("#org_student_search").attr('href','<%#= courses_organization_path(@organization, :type => @type) %>');
|
|
@ -1,3 +1,2 @@
|
||||||
$("#org_container_list").html('<%= escape_javascript( render :partial => 'organizations/org_container', :locals => {:containers => @containers})%>');
|
$("#org_container_list").html('<%= escape_javascript( render :partial => 'organizations/org_container', :locals => {:containers => @containers})%>');
|
||||||
$("#pages").html('<%= pagination_links_full @atta_pages, @container_count, :per_page_links => false, :remote => @is_remote, :flag => true %>');
|
$("#pages").html('<%= pagination_links_full @atta_pages, @container_count, :per_page_links => false, :remote => true, :flag => true %>');
|
||||||
$("#org_student_search").attr('href','<%= projects_organization_path(@organization, :type => @type) %>');
|
|
||||||
|
|
|
@ -1,6 +1,11 @@
|
||||||
<%# 区分两种模式 params[:org_subfield_id] 不为空的时候则跳到栏目%>
|
<%# 区分两种模式 params[:org_subfield_id] 不为空的时候则跳到栏目%>
|
||||||
<% if @organization.switch_type && params[:org_subfield_id].nil? %>
|
<% if @organization.switch_type %>
|
||||||
|
<% if params[:org_subfield_id].nil? %>
|
||||||
<%= render :partial => 'show_custom' %>
|
<%= render :partial => 'show_custom' %>
|
||||||
|
<% else %>
|
||||||
|
<%#= 单个栏目模式二中显示 %>
|
||||||
|
<%= render :partial => 'show_custom_org_subfield' %>
|
||||||
|
<% end %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= javascript_include_tag "jquery.infinitescroll.js" %>
|
<%= javascript_include_tag "jquery.infinitescroll.js" %>
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,2 @@
|
||||||
$("#org_students_list").html('<%= escape_javascript( render :partial => 'organizations/org_students_list', :locals => {:org_students => @org_students})%>');
|
$("#org_students_list").html('<%= escape_javascript( render :partial => 'organizations/org_students_list', :locals => {:org_students => @org_students})%>');
|
||||||
$("#pages").html('<%= pagination_links_full @atta_pages, @students_count, :per_page_links => false, :remote => @is_remote, :flag => true %>');
|
$("#pages").html('<%= pagination_links_full @atta_pages, @students_count, :per_page_links => false, :remote => true, :flag => true %>');
|
||||||
$("#org_student_search").attr('href','<%= students_organization_path(@organization, :type => @type) %>');
|
|
||||||
|
|
|
@ -1,3 +1,2 @@
|
||||||
$("#org_teachers_list").html('<%= escape_javascript( render :partial => 'organizations/org_teachers_list', :locals => {:org_teachers => @org_teachers})%>');
|
$("#org_teachers_list").html('<%= escape_javascript( render :partial => 'organizations/org_teachers_list', :locals => {:org_teachers => @org_teachers})%>');
|
||||||
$("#pages").html('<%= pagination_links_full @atta_pages, @teachers_count, :per_page_links => false, :remote => @is_remote, :flag => true %>');
|
$("#pages").html('<%= pagination_links_full @atta_pages, @teachers_count, :per_page_links => false, :remote => true, :flag => true %>');
|
||||||
$("#org_teacher_search").attr('href','<%= teachers_organization_path(@organization, :type => @type) %>');
|
|
|
@ -1,14 +1,6 @@
|
||||||
@charset "utf-8";
|
@charset "utf-8";
|
||||||
/* CSS Document */
|
/* CSS Document */
|
||||||
/* 样式重置 */
|
/* 样式重置 */
|
||||||
body,h1,h2,h3,h4,h5,h6,hr,p,blockquote,dl,dt,dd,ul,ol,li,pre,form,fieldset,legend,button,input,textarea,th,td{ margin:0; padding:0;}
|
|
||||||
body,table,input,textarea,select,button { font-family: "微软雅黑","宋体"; font-size:12px;line-height:1.9; background:#f2f2f2;}
|
|
||||||
div,img,tr,td,table{ border:0;}
|
|
||||||
table,tr,td{border:0;cellspacing:0; cellpadding:0;}
|
|
||||||
ol,ul,li{ list-style-type:none}
|
|
||||||
a:link,a:visited{color:#000;text-decoration:none;}
|
|
||||||
a:hover,a:active{color:#24366e;}
|
|
||||||
|
|
||||||
.sn-fl {float:left;}
|
.sn-fl {float:left;}
|
||||||
.sn-fr {float:right;}
|
.sn-fr {float:right;}
|
||||||
.sn-cl {clear:both;content:".";display:block;font-size:0;height:0;line-height:0;visibility:hidden}
|
.sn-cl {clear:both;content:".";display:block;font-size:0;height:0;line-height:0;visibility:hidden}
|
||||||
|
@ -166,17 +158,17 @@ a.more-btn{ display:block; width:185px; height:30px; text-align:center; backgrou
|
||||||
|
|
||||||
/* 内页新闻列表 */
|
/* 内页新闻列表 */
|
||||||
.sn-inner-body{ width:100%; background-color:#fff;}
|
.sn-inner-body{ width:100%; background-color:#fff;}
|
||||||
.sn-innner-content{ width:1200px; margin:0 auto;}
|
.sn-innner-content{ width:1000px; margin:0 auto;}
|
||||||
.sn-inner-newsh2{ font-size:20px; font-weight:normal; padding-bottom:5px; border-bottom:1px dashed #eee;}
|
.sn-inner-newsh2{ font-size:20px; font-weight:normal; padding-bottom:5px; border-bottom:1px dashed #eee;}
|
||||||
.sn-circle{ margin:18px 5px 0 5px ;border:1px solid #24366e; width:5px; height:5px; -webkit-border-radius:50px; -moz-border-radius:50px; -o-border-radius:50px; border-radius:50px; }
|
.sn-circle{ margin:18px 5px 0 5px ;border:1px solid #24366e; width:5px; height:5px; -webkit-border-radius:50px; -moz-border-radius:50px; -o-border-radius:50px; border-radius:50px; }
|
||||||
.sn-inner-newslist ul li{ line-height:42px; font-size:15px; border-bottom:1px solid #eee;}
|
.sn-inner-newslist ul li{ line-height:42px; font-size:15px; border-bottom:1px solid #eee;}
|
||||||
.sn-inner-newslist a{font-size:15px; color:#888;}
|
.sn-inner-newslist a{font-size:15px; color:#888;}
|
||||||
.sn-inner-newslist a:hover{ color:#24366e;}
|
.sn-inner-newslist a:hover{ color:#24366e;}
|
||||||
a.sn-newslist-titile{ font-size:15px;width:840px; display:block;overflow:hidden;white-space:nowrap; text-overflow:ellipsis;}
|
a.sn-newslist-titile{ font-size:15px;width:700px; display:block;overflow:hidden;white-space:nowrap; text-overflow:ellipsis;}
|
||||||
a:hover.sn-newslist-reply,a:hover.sn-newslist-zan{ color:#379be9;}
|
a:hover.sn-newslist-reply,a:hover.sn-newslist-zan{ color:#379be9;}
|
||||||
|
|
||||||
/* 内页新闻展示 */
|
/* 内页新闻展示 */
|
||||||
.sn-inner-newscon{ width:1200px; padding:5px 0 50px; border-bottom:1px solid #e8e8e8; margin-bottom:30px; color:#999; font-size:14px; }
|
.sn-inner-newscon{ width:1000px; padding:5px 0 50px; border-bottom:1px solid #e8e8e8; margin-bottom:30px; color:#999; font-size:14px; }
|
||||||
.sn-inner-pcon{text-indent:2em; overflow:hidden;}
|
.sn-inner-pcon{text-indent:2em; overflow:hidden;}
|
||||||
.sn-inner-newscon img{ display:block; max-width:830px; margin:25px auto 5px;}
|
.sn-inner-newscon img{ display:block; max-width:830px; margin:25px auto 5px;}
|
||||||
.sn-inner-psmall{ color:#999; font-size:12px; margin-bottom:15px;}
|
.sn-inner-psmall{ color:#999; font-size:12px; margin-bottom:15px;}
|
||||||
|
@ -186,8 +178,8 @@ a:hover.sn-newslist-zan{ background:url(../images/zan.gif) 0 -21px no-repeat; }
|
||||||
/* 留言 */
|
/* 留言 */
|
||||||
.sn-replybox{ margin-bottom:100px;}
|
.sn-replybox{ margin-bottom:100px;}
|
||||||
.sn-reply-h2{ font-size:18px; font-weight:normal; color:#24366e; margin-bottom:6px;}
|
.sn-reply-h2{ font-size:18px; font-weight:normal; color:#24366e; margin-bottom:6px;}
|
||||||
.sn-reply-form{ width:1200px;height:180px; border:1px solid #e8e8e8; -webkit-border-radius:3px; -moz-border-radius:3px; -o-border-radius:3px; border-radius:3px; background:#fff; margin-bottom:20px; }
|
.sn-reply-form{ width:1000px;height:180px; border:1px solid #e8e8e8; -webkit-border-radius:3px; -moz-border-radius:3px; -o-border-radius:3px; border-radius:3px; background:#fff; margin-bottom:20px; }
|
||||||
.sn-reply-text{ width:1200px; height:130px; background:#fff; border:none; resize:none;}
|
.sn-reply-text{ width:1000px; height:130px; background:#fff; border:none; resize:none;}
|
||||||
.sn-reply-btnbox{border-top:1px solid #e8e8e8; height:48px;}
|
.sn-reply-btnbox{border-top:1px solid #e8e8e8; height:48px;}
|
||||||
a.submit-btn{ display:block; color:#fff; text-align:center; font-size:14px; line-height:27px; width:79px; height:27px; -webkit-border-radius:3px; -moz-border-radius:3px; -o-border-radius:3px; border-radius:3px; background:#24366e; margin:8px 0 0 10px;}
|
a.submit-btn{ display:block; color:#fff; text-align:center; font-size:14px; line-height:27px; width:79px; height:27px; -webkit-border-radius:3px; -moz-border-radius:3px; -o-border-radius:3px; border-radius:3px; background:#24366e; margin:8px 0 0 10px;}
|
||||||
a:hover.submit-btn{ color:#16275c; color:#fff;}
|
a:hover.submit-btn{ color:#16275c; color:#fff;}
|
||||||
|
@ -196,10 +188,10 @@ a:hover.submit-btn{ color:#16275c; color:#fff;}
|
||||||
.sn-reply-userpic img{ width:40px; height:40px;-webkit-border-radius:50px; -moz-border-radius:50px; -o-border-radius:50px; border-radius:50px;}
|
.sn-reply-userpic img{ width:40px; height:40px;-webkit-border-radius:50px; -moz-border-radius:50px; -o-border-radius:50px; border-radius:50px;}
|
||||||
a.sn-reply-zan{ display:block; background:url(../images/zan.gif) 0 4px no-repeat; width:54px; height:16px; padding-left:12px; color:#999; }
|
a.sn-reply-zan{ display:block; background:url(../images/zan.gif) 0 4px no-repeat; width:54px; height:16px; padding-left:12px; color:#999; }
|
||||||
a:hover.sn-reply-zan{ background:url(../images/zan.gif) 0 -32px no-repeat; }
|
a:hover.sn-reply-zan{ background:url(../images/zan.gif) 0 -32px no-repeat; }
|
||||||
.sn-comment-listbox{ padding:23px 0; width:1200px;border-bottom:1px solid #e8e8e8;}
|
.sn-comment-listbox{ padding:23px 0; width:1000px;border-bottom:1px solid #e8e8e8;}
|
||||||
a.sn-reply-username { color:#24366e; margin-right:15px; }
|
a.sn-reply-username { color:#24366e; margin-right:15px; }
|
||||||
.sn-reply-usertxt{ width:1145px; font-size:14px; }
|
.sn-reply-usertxt{ width:945px; font-size:14px; }
|
||||||
.sn-reply-more{ width:1200px; height:25px; background:#ddd; text-align:center; line-height:25px;}
|
.sn-reply-more{ width:1000px; height:25px; background:#ddd; text-align:center; line-height:25px;}
|
||||||
|
|
||||||
/*用户图像*/
|
/*用户图像*/
|
||||||
.topnav_login_list{ border:1px solid #eaeaea; background:#fff; padding-left:10px; padding-bottom:10px; padding-top:8px; width:60px; left:-7px; position:absolute; z-index:9999; line-height:2; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); margin-top: 1px;}
|
.topnav_login_list{ border:1px solid #eaeaea; background:#fff; padding-left:10px; padding-bottom:10px; padding-top:8px; width:60px; left:-7px; position:absolute; z-index:9999; line-height:2; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); margin-top: 1px;}
|
||||||
|
|
Loading…
Reference in New Issue