Merge branch 'develop_new' into develop

This commit is contained in:
cxt 2016-04-09 18:34:51 +08:00
commit 40dba4d463
64 changed files with 1953 additions and 159 deletions

View File

@ -548,7 +548,8 @@ class AdminController < ApplicationController
#作业
def homework
@homework = HomeworkCommon.order('end_time desc')
#@homework = HomeworkCommon.order('end_time desc')
@homework = HomeworkCommon.order( 'created_at desc ')
@homework = paginateHelper @homework,30
@page = (params['page'] || 1).to_i - 1
respond_to do |format|

View File

@ -70,8 +70,8 @@ class AttachmentsController < ApplicationController
def direct_download
@attachment.increment_download
send_file @attachment.diskfile, :filename => filename_for_content_disposition(@attachment.filename),
:type => detect_content_type(@attachment),
:disposition => 'attachment' #inline can open in browser
:type => detect_content_type(@attachment),
:disposition => 'attachment' #inline can open in browser
end
def direct_download_history
@ -175,7 +175,7 @@ class AttachmentsController < ApplicationController
@attachment = Attachment.find(params[:attachmentid])
if @attachment != nil
filedense = params[:newtype].to_s
# d = Iconv.conv("unicodebig","utf-8",filedense)
# d = Iconv.conv("unicodebig","utf-8",filedense)
if filedense == "%E5%85%AC%E5%BC%80" #l(:field_is_public)
@attachment.is_public = 1
else
@ -210,9 +210,9 @@ class AttachmentsController < ApplicationController
if @attachment.thumbnailable? && thumbnail = @attachment.thumbnail(:size => params[:size])
if stale?(:etag => thumbnail)
send_file thumbnail,
:filename => filename_for_content_disposition(@attachment.filename),
:type => detect_content_type(@attachment),
:disposition => 'inline'
:filename => filename_for_content_disposition(@attachment.filename),
:type => detect_content_type(@attachment),
:disposition => 'inline'
end
else
# No thumbnail for the attachment or thumbnail could not be created
@ -292,10 +292,10 @@ class AttachmentsController < ApplicationController
respond_to do |format|
if !@attachment.container.nil? &&
(@attachment.container.is_a?(Course) || ((@attachment.container.has_attribute?(:course) || @attachment.container.has_attribute?(:course_id) ) &&
@attachment.container.course ) || ((@attachment.container.has_attribute?(:board) || @attachment.container.has_attribute?(:board_id)) &&
@attachment.container.board && @attachment.container.board.course ) || @attachment.container.is_a?(StudentWorksScore) || @attachment.container.is_a?(HomeworkCommon) ||
@attachment.container.is_a?(StudentWork))
(@attachment.container.is_a?(Course) || ((@attachment.container.has_attribute?(:course) || @attachment.container.has_attribute?(:course_id) ) &&
@attachment.container.course ) || ((@attachment.container.has_attribute?(:board) || @attachment.container.has_attribute?(:board_id)) &&
@attachment.container.board && @attachment.container.board.course ) || @attachment.container.is_a?(StudentWorksScore) || @attachment.container.is_a?(HomeworkCommon) ||
@attachment.container.is_a?(StudentWork))
if @attachment.container.is_a?(News)
format.html { redirect_to_referer_or news_path(@attachment.container) }
elsif @attachment.container.is_a?(StudentWorksScore)
@ -327,25 +327,25 @@ class AttachmentsController < ApplicationController
elsif !@attachment.container.nil? && @attachment.container.is_a?(OrgDocumentComment)
format.html {redirect_to_referer_or org_document_comment_path(@attachment.container)}
else
if @project.nil?
format.html { redirect_to_referer_or forum_memo_path(@attachment.container.forum, @attachment.container) }
else
if @project.nil?
format.html { redirect_to_referer_or forum_memo_path(@attachment.container.forum, @attachment.container) }
else
format.html { redirect_to_referer_or project_path(@project) }
end
end
end
format.js
end
end
end
def delete_homework
@bid = @attachment.container.bid
# Make sure association callbacks are called
container = @attachment.container
@attachment.container.attachments.delete(@attachment)
#if container.attachments.empty?
#container.delete
#end
@bid = @attachment.container.bid
# Make sure association callbacks are called
container = @attachment.container
@attachment.container.attachments.delete(@attachment)
#if container.attachments.empty?
#container.delete
#end
respond_to do |format|
format.html { redirect_to_referer_or respond_path(@bid) }
@ -594,7 +594,7 @@ class AttachmentsController < ApplicationController
end
end
private
private
def find_project
@attachment = Attachment.find(params[:id])
# Show 404 if the filename in the url is wrong
@ -608,7 +608,7 @@ private
@attachment.container.board.course)
@course = @attachment.container.board.course
else
unless @attachment.container_type == 'Bid' || @attachment.container_type == 'HomeworkAttach' || @attachment.container_type == 'Memo' || @attachment.container_type == 'Softapplication' || @attachment.container_type == 'PhoneAppVersion' || @attachment.container_type == 'StudentWorksScore'|| @attachment.container_type == 'StudentWork'
unless @attachment.container_type == 'Bid' || @attachment.container_type == 'Organization' || @attachment.container_type == 'HomeworkAttach' || @attachment.container_type == 'Memo' || @attachment.container_type == 'Softapplication' || @attachment.container_type == 'PhoneAppVersion' || @attachment.container_type == 'StudentWorksScore'|| @attachment.container_type == 'StudentWork'
@project = @attachment.project
end
end
@ -628,7 +628,7 @@ private
def read_authorize
if @attachment.container_type == "HomeworkAttach" || @attachment.container_type == 'Bid'
true
true
#User.current.allowed_to?(:view_homework_attaches, @attachment.project) ? true : deny_access
else
@attachment.visible? ? true : deny_access
@ -654,7 +654,7 @@ private
def renderTag
@attachmentNew = Attachment.find(params[:attchmentId])
respond_to do |format|
respond_to do |format|
format.js
end
end

View File

@ -623,6 +623,36 @@ class FilesController < ApplicationController
@attachtype = 0
@contenttype = 0
respond_to do |format|
format.js
# format.html {
# redirect_to org_subfield_files_url(@org_subfield)
# }
end
# 组织添加附件,为了修改图片
elsif params[:organization_id]
@organization = Organization.find(params[:organization_id])
@addTag=false
# atttchment_type = 0为logo 1为banner
if params[:logo]
attachments = Attachment.attach_filesex(@organization, params[:attachments], false)
else
attachments = Attachment.attach_filesex(@organization, params[:attachments], true)
end
# TODO: 临时用 nyan
sort_init 'created_on', 'desc'
sort_update 'created_on' => "#{Attachment.table_name}.created_on",
'filename' => "#{Attachment.table_name}.filename",
'size' => "#{Attachment.table_name}.filesize",
'downloads' => "#{Attachment.table_name}.downloads"
@containers = [Organization.includes(:attachments).reorder("#{Attachment.table_name}.created_on DESC").find(@organization.id)]
show_attachments @containers
@tag_list = attachment_tag_list @all_attachments
@attachtype = 0
@contenttype = 0
respond_to do |format|
format.js
# format.html {

View File

@ -130,6 +130,12 @@ class OrgSubfieldsController < ApplicationController
@organization = @org_subfield.organization
end
def update_status
@subfield = OrgSubfield.find(params[:id])
@organization = Organization.find(@subfield.organization_id)
@subfield.update_attributes(:status => params[:status])
end
def show_attachments obj
@attachments = []
obj.each do |container|

View File

@ -28,18 +28,25 @@ class OrganizationsController < ApplicationController
helper :project_score
helper :issues
include UsersHelper
before_filter :find_organization, :only => [:show, :members, :apply_subdomain]
before_filter :find_organization, :only => [:show, :members, :apply_subdomain, :select_org_layout]
layout 'base_org'
def index
end
def new
@organization = Organization.new
render :layout => 'new_base'
end
def edit
@organization = Organization.find(params[:id])
# @organization = Organization.find(params[:id])
begin
@organization = Organization.where("id =?", params[:id])
ensure
render_404
end
end
def destroy
@ -56,7 +63,7 @@ class OrganizationsController < ApplicationController
@organization.description = params[:organization][:description]
@organization.is_public = params[:organization][:is_public]
@organization.allow_guest_download = params[:organization][:allow_guest_download] == '1' ? 1 : 0
@organization.show_mode = params[:show_mode]
@organization.show_mode = 0
@organization.creator_id = User.current.id
member = OrgMember.new(:user_id => User.current.id)
@ -68,50 +75,170 @@ class OrganizationsController < ApplicationController
end
def show
if @organization.is_public? || User.current.admin? || User.current.member_of_org?(@organization)
@organization = Organization.find(params[:id])
# 统计访问量
@organization.update_attribute(:visits, @organization.visits.to_i + 1)
if params[:org_subfield_id]
@org_subfield = OrgSubfield.find(params[:org_subfield_id])
@org_subfield_ids = @org_subfield.org_document_comments.map(&:id) << 0
@org_activities = 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').page(params[:page] || 1).per(10)
# 组织新类型 show_mode判断标准 1为新类型0为旧
if @organization.show_mode == 1 && params[:org_subfield_id].nil? && params[:list] .nil?
if @organization.is_public? || User.current.admin? || User.current.member_of_org?(@organization)
# REDO:时间紧,暂时先这样
@org_logo_attchment = Attachment.where("container_id =? and container_type =? and attachtype =?", @organization, "Organization", 0).order("created_on desc").first
@org_banner_attchment = Attachment.where("container_id =? and container_type =? and attachtype =?", @organization, "Organization", 1).order("created_on desc").first
@subfield_content = @organization.org_subfields.order("priority")
@organization = Organization.find(params[:id])
# 统计访问量
@organization.update_column(:visits, @organization.visits.to_i + 1)
# @org_subfield = OrgSubfield.find(params[:org_subfield_id])
# @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').page(params[:page] || 1).per(10)
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)
project_ids = (@organization.projects.map(&:id)-shield_project_ids) << 0
course_ids = (@organization.courses.map(&:id)-shield_course_ids) << 0
course_types = "('Message','News','HomeworkCommon','Poll','Course')"
@project_acts = get_project_activities_org @organization, project_ids
@course_acts = get_course_activities_org @organization, course_ids
#@org_acts = OrgActivity.where("container_id =? and container_type =?",@organization.id, 'Organization').order('updated_at desc')
#@project_acts = OrgActivity.where("(container_id =? and container_type =?) " +
# "or (container_type ='Project' and org_act_type in ('Issue','Message') and container_id in (#{project_ids.join(',')})) ",
# @organization.id, 'Organization').order('updated_at desc').limit(8)
#@course_acts = OrgActivity.where("(container_id =? and container_type =?) " +
# "or (container_type ='Course' and org_act_type in #{course_types} and container_id in (#{course_ids.join(',')}))",
# @organization.id, 'Organization').order('updated_at desc').limit(8)
# 项目两种动态
#@project_acts = get_project_activities_org @organization
# 课程动态
#@project_acts_issues = get_project_activities_org @organization
#@course_acts = get_course_activities_org @organization
render :layout => 'base_org_newstyle'
else
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)
project_ids = (@organization.projects.map(&:id)-shield_project_ids) << 0
course_ids = (@organization.courses.map(&:id)-shield_course_ids) << 0
course_types = "('Message','News','HomeworkCommon','Poll','Course')"
case params[:type]
when nil
@org_activities = OrgActivity.where("(container_id =? and container_type =?) " +
"or (container_type ='Project' and org_act_type in ('Issue','Message','ProjectCreateInfo') and container_id in (#{project_ids.join(',')})) "+
"or (container_type ='Course' and org_act_type in #{course_types} and container_id in (#{course_ids.join(',')}))",
@organization.id, 'Organization').order('updated_at desc').page(params[:page] || 1).per(10)
when 'project_issue'
@org_activities = OrgActivity.where("container_type = 'Project' and org_act_type = 'Issue' and container_id in (#{project_ids.join(',')})").order('updated_at desc').page(params[:page] || 1).per(10)
when 'project_message'
@org_activities = OrgActivity.where("container_type = 'Project' and org_act_type = 'Message' and container_id in (#{project_ids.join(',')})").order('updated_at desc').page(params[:page] || 1).per(10)
when 'org'
@org_activities = OrgActivity.where("container_id =? and container_type =?",@organization.id, 'Organization').order('updated_at desc').page(params[:page] || 1).per(10)
when 'course_homework'
@org_activities = OrgActivity.where("container_type = 'Course' and org_act_type = 'HomeworkCommon' and container_id in (#{course_ids.join(',')})").order('updated_at desc').page(params[:page] || 1).per(10)
when 'course_news'
@org_activities = OrgActivity.where("container_type = 'Course' and org_act_type = 'News' and container_id in (#{course_ids.join(',')})").order('updated_at desc').page(params[:page] || 1).per(10)
when 'course_message'
@org_activities = OrgActivity.where("container_type = 'Course' and org_act_type = 'Message' and container_id in (#{course_ids.join(',')})").order('updated_at desc').page(params[:page] || 1).per(10)
when 'course_poll'
@org_activities = OrgActivity.where("container_type = 'Course' and org_act_type = 'Poll' and container_id in (#{course_ids.join(',')})").order('updated_at desc').page(params[:page] || 1).per(10)
end
end
@page = params[:page] ? params[:page].to_i : 1
respond_to do |format|
format.html
format.js
render_403
end
else
render_403
if @organization.is_public? || User.current.admin? || User.current.member_of_org?(@organization)
@organization = Organization.find(params[:id])
# 统计访问量
@organization.update_column(:visits, @organization.visits.to_i + 1)
if params[:org_subfield_id]
@org_subfield = OrgSubfield.find(params[:org_subfield_id])
@org_subfield_ids = @org_subfield.org_document_comments.map(&:id) << 0
@org_activities = 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').page(params[:page] || 1).per(10)
else
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)
project_ids = (@organization.projects.map(&:id)-shield_project_ids) << 0
course_ids = (@organization.courses.map(&:id)-shield_course_ids) << 0
course_types = "('Message','News','HomeworkCommon','Poll','Course')"
case params[:type]
when nil
@org_activities = OrgActivity.where("(container_id =? and container_type =?) " +
"or (container_type ='Project' and org_act_type in ('Issue','Message','ProjectCreateInfo') and container_id in (#{project_ids.join(',')})) "+
"or (container_type ='Course' and org_act_type in #{course_types} and container_id in (#{course_ids.join(',')}))",
@organization.id, 'Organization').order('updated_at desc').page(params[:page] || 1).per(10)
when 'project_issue'
@org_activities = OrgActivity.where("container_type = 'Project' and org_act_type = 'Issue' and container_id in (#{project_ids.join(',')})").order('updated_at desc').page(params[:page] || 1).per(10)
when 'project_message'
@org_activities = OrgActivity.where("container_type = 'Project' and org_act_type = 'Message' and container_id in (#{project_ids.join(',')})").order('updated_at desc').page(params[:page] || 1).per(10)
when 'org'
@org_activities = OrgActivity.where("container_id =? and container_type =?",@organization.id, 'Organization').order('updated_at desc').page(params[:page] || 1).per(10)
when 'course_homework'
@org_activities = OrgActivity.where("container_type = 'Course' and org_act_type = 'HomeworkCommon' and container_id in (#{course_ids.join(',')})").order('updated_at desc').page(params[:page] || 1).per(10)
when 'course_news'
@org_activities = OrgActivity.where("container_type = 'Course' and org_act_type = 'News' and container_id in (#{course_ids.join(',')})").order('updated_at desc').page(params[:page] || 1).per(10)
when 'course_message'
@org_activities = OrgActivity.where("container_type = 'Course' and org_act_type = 'Message' and container_id in (#{course_ids.join(',')})").order('updated_at desc').page(params[:page] || 1).per(10)
when 'course_poll'
@org_activities = OrgActivity.where("container_type = 'Course' and org_act_type = 'Poll' and container_id in (#{course_ids.join(',')})").order('updated_at desc').page(params[:page] || 1).per(10)
end
end
@page = params[:page] ? params[:page].to_i : 1
respond_to do |format|
format.html
format.js
end
else
render_403
end
end
end
def get_project_message_activities_org org
project_ids = org.projects.map{|project| project.id}.join(",")
unless project_ids.blank?
project_acts = OrgActivity.find_by_sql("SELECT * FROM org_activities where container_id in (#{project_ids}) and container_type = 'project' and org_act_type = 'Message' order by updated_at desc limit 2;")
else
project_acts = nil
end
end
def get_project_issue_activities_org org
project_ids = org.projects.map{|project| project.id}.join(",")
unless project_ids.blank?
project_acts = OrgActivity.find_by_sql("SELECT * FROM org_activities where container_id in (#{project_ids}) and container_type = 'project' and org_act_type = 'issue' order by updated_at desc limit 4;")
else
project_acts = nil
end
#project_acts = OrgActivity.find_by_sql("SELECT * FROM org_activities where container_id in (#{project_ids}) and container_type = 'project' and org_act_type = 'issue' order by updated_at desc limit 4;")
end
# 获取整过项目的动态
def get_project_activities_org org, project_ids
unless project_ids.blank?
project_acts = OrgActivity.find_by_sql("SELECT * FROM org_activities where container_id in (#{project_ids.join(',')}) and container_type = 'project'
and org_act_type in ('Message', 'Issue') order by updated_at desc limit 8;")
else
project_acts = nil
end
#project_acts = OrgActivity.find_by_sql("SELECT * FROM org_activities where container_id in (#{project_ids}) and container_type = 'project' and org_act_type = 'issue' order by updated_at desc limit 4;")
end
# 获取整过课程的动态
def get_course_activities_org org, course_ids
unless course_ids.blank?
project_acts = OrgActivity.find_by_sql("SELECT * FROM org_activities where container_id in (#{course_ids.join(',')}) and container_type = 'course'
and org_act_type in ('HomeworkCommon', 'Poll', 'Message', 'News', 'Course') order by updated_at desc limit 8;")
else
project_acts = nil
end
#project_acts = OrgActivity.find_by_sql("SELECT * FROM org_activities where container_id in (#{course_ids}) and container_type = 'course' order by updated_at desc limit 5;")
#project_acts = OrgActivity.find_by_sql("SELECT * FROM org_activities where container_id in (#{course_ids}) and container_type = 'course' and org_act_type = 'HomeworkCommon' order by updated_at desc limit 1;")
end
def get_course_homework_activities_org org
course_ids = org.courses.map{|course| course.id}.join(",")
unless course_ids.blank?
project_acts = OrgActivity.find_by_sql("SELECT * FROM org_activities where container_id in (#{course_ids}) and container_type = 'course' and org_act_type = 'HomeworkCommon' order by updated_at desc limit 1;")
else
project_acts = nil
end
#project_acts = OrgActivity.find_by_sql("SELECT * FROM org_activities where container_id in (#{course_ids}) and container_type = 'course' order by updated_at desc limit 5;")
#project_acts = OrgActivity.find_by_sql("SELECT * FROM org_activities where container_id in (#{course_ids}) and container_type = 'course' and org_act_type = 'HomeworkCommon' order by updated_at desc limit 1;")
end
def get_course_message_activities_org org
course_ids = org.courses.map{|course| course.id}.join(",")
unless course_ids.blank?
project_acts = OrgActivity.find_by_sql("SELECT * FROM org_activities where container_id in (#{course_ids}) and container_type = 'course' and org_act_type = 'Message' order by updated_at desc limit 1;")
else
project_acts = nil
end
end
def get_course_news_activities_org org
course_ids = org.courses.map{|course| course.id}.join(",")
unless course_ids.blank?
project_acts = OrgActivity.find_by_sql("SELECT * FROM org_activities where container_id in (#{course_ids}) and container_type = 'course' and org_act_type = 'News' order by updated_at desc limit 1;")
else
project_acts = nil
end
#project_acts = OrgActivity.find_by_sql("SELECT * FROM org_activities where container_id in (#{course_ids}) and container_type = 'course' and org_act_type = 'News' order by updated_at desc limit 1;")
end
def update
@ -125,9 +252,13 @@ class OrganizationsController < ApplicationController
#@organization.name = params[:organization][:name]
@organization.save
respond_to do |format|
if @organization.show_mode == 1
format.html { redirect_to organization_path(@organization)}
else
format.html { redirect_to setting_organization_path(@organization)}
end
end
end
def check_uniq
@check = false;
@ -159,11 +290,6 @@ class OrganizationsController < ApplicationController
end
end
def clear_org_avatar_temp
end
def set_homepage
@org = Organization.find(params[:id])
@org.home_id = params[:home_id]

View File

@ -1,6 +1,7 @@
# encoding: utf-8
module OrganizationsHelper
include ApplicationHelper
include FilesHelper
def find_user_not_in_current_org_by_name org
@ -28,4 +29,48 @@ module OrganizationsHelper
end
end
def get_message_org(org_id, field_id)
OrgDocumentComment.find_by_sql("SELECT * FROM org_document_comments where organization_id = #{org_id} and org_subfield_id = #{field_id} and parent_id is null order by updated_at desc limit 8;")
end
def get_message_reply_org(org_id, ids)
# OrgDocumentComment.find_by_sql("SELECT * FROM org_document_comments where organization_id = #{org_id} and parent_id is not null order by updated_at desc limit 1;")
OrgDocumentComment.find_by_sql("SELECT * FROM org_document_comments where organization_id = #{org_id} and parent_id in (#{ids}) order by updated_at desc limit 1;")
end
def get_attach_org(field_id)
Attachment.find_by_sql("SELECT * FROM `attachments` where container_id =#{field_id} and container_type = 'OrgSubfield' and is_public =1 order by created_on limit 6;")
end
def get_attach_org2(field)
org_attachments = field.attachments
attachments = User.current.admin? ? org_attachments : visable_attachemnts(org_attachments)
return attachments.sort_by{|x| x.created_on}.reverse.first(6)
# Attachment.find_by_sql("SELECT * FROM `attachments` where container_id =#{field_id} and container_type = 'OrgSubfield' and is_public =1 order by created_on limit 6;")
end
# 从内容中获取路径
def get_image_path_from_content content
r = Regexp.new(/src="\/files\/uploads\/image(.+?)"/)
if r.match(content).nil?
image_path = nil
else
image_path = r.match(content)[1]
end
end
#排列下拉框
def subfield_status_option
type = []
option1 = []
option1 << "列表"
option1 << "1"
type << option1
option2 = []
option2 << "图片"
option2 << "0"
type << option2
type
end
end

View File

@ -23,6 +23,7 @@ class Attachment < ActiveRecord::Base
belongs_to :project, foreign_key: 'container_id', conditions: "attachments.container_type = 'Project'"
belongs_to :course, foreign_key: 'container_id', conditions: "attachments.container_type = 'Course'"
belongs_to :org_subfield, foreign_key: 'container_id', conditions: "attachements.container_type = 'OrgSubfield'"
belongs_to :organization, foreign_key: 'container_id', conditions: "attachements.container_type = 'Organization'"
belongs_to :softapplication, foreign_key: 'container_id', conditions: "attachments.container_type = 'Softapplication'"
belongs_to :author, :class_name => "User", :foreign_key => "author_id"
belongs_to :attachmentstype, :foreign_key => "attachtype",:primary_key => "id"

View File

@ -8,6 +8,8 @@ class Organization < ActiveRecord::Base
has_many :org_courses, :dependent => :destroy
has_many :org_subfields, :dependent => :destroy
has_many :users, :through => :org_members
has_many :files
acts_as_attachable
validates_uniqueness_of :name
after_create :save_as_org_activity, :add_default_subfields

View File

@ -22,24 +22,27 @@
提交作品数
</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>
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<%=homework.name%>'>
<%=link_to(homework.name, student_work_index_path(:homework => homework.id))%>
<%=link_to(homework.try(:name), student_work_index_path(:homework => homework.id))%>
</td>
<% if homework.course %>
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<%=homework.course.name%>'>
<%= link_to(homework.course.name, course_path(homework.course.id)) %>
</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)) %>
@ -51,9 +54,10 @@
<%=link_to(StudentWork.where('homework_common_id=?',homework.id).count, student_work_index_path(:homework => homework.id))%>
</td>
<td align="center">
<%=format_date(homework.end_time) %>
<%=format_date( homework.created_at ) %>
</td>
</tr>
<% end %>
<% end %>
</tbody>
</table>

View File

@ -24,7 +24,8 @@
<tr class="<%= cycle("odd", "even") %>">
<td style="text-align:center;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<%=org.name%>'>
<span>
<%= link_to org.name,home_path(:organization => org.id) %>
<%#= link_to org.name,home_path(:organization => org.id) %>
<%= link_to org.name, organization_path(org) %>
</span>
</td>
<td align="center">

View File

@ -0,0 +1,34 @@
<span class="add_attachment" data-containerid="<%= container.id %>">
<button name="button" class="sub_btn" onclick="_file<%=container.id %>.click()" onmouseover="this.focus()" style="<%= ie8? ? 'display:none' : ''%>" type="button" ><%= l(:label_browse_org) %></button>
<%= file_field_tag 'attachments[dummy][file]',
:id => "_file#{container.id}",
:class => ie8? ? '':'file_selector',
:multiple => true,
:onchange => "addInputFiles_board(this, '#{container.id}','"+"submit_resource"+"');",
:style => ie8? ? '': 'display:none',
:data => {
:max_file_size => Setting.attachment_max_size.to_i.kilobytes,
:max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
:max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
:upload_path => uploads_path(:format => 'js'),
:description_placeholder => l(:label_optional_description),
:field_is_public => l(:field_is_public),
:are_you_sure => l(:text_are_you_sure),
:file_count => l(:label_file_count),
:delete_all_files => l(:text_are_you_sure_all),
:lebel_file_uploding => l(:lebel_file_uploding),
:containerid => "#{container.id}"
} %>
</span>
<!--<input type="submit" name="" value="上传文件" class="f_l ml10" style="width:80px; height:26px;">-->
<span id="upload_file_count<%=container.id %>">
<%= l(:label_no_file_uploaded)%>
</span>
(<%= l(:label_max_size) %>:<%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)
<p style="padding-left: 68px;">建议上传高度不超过52px的图片</p>
<div class="cl"></div>
<div>
<span id="attachments_fields<%= container.id %>" data-containerid="<%= container.id %>" xmlns="http://www.w3.org/1999/html">
</span>
</div>

View File

@ -0,0 +1,25 @@
<div id="popbox_upload" class="mb10" style="margin-top: -30px;color:#15bccf; font-size:16px;">
<div class="upload_con">
<h2 style="text-align: center">更换Logo</h2>
<div class="upload_box">
<%= error_messages_for 'attachment' %>
<div id="network_issue" style="color: red; display: none;"><%= l(:label_file_upload_error_messages)%></div>
<%= form_tag(organization_files_path(org, :in_org => params[:in_org], :logo => true), :multipart => true,:remote => !ie8?,:name=>"upload_form") do %>
<!--<input type="hidden" name="org_subfield_attachment_type" value="<%#= org_subfield_attachment_type%>">-->
<%= render :partial => 'files/org_upload_attachment_list', :locals => {:container => org}%>
<div class="cl"></div>
<a href="javascript:void(0);" class=" fr grey_btn mr40" onclick="hideModal();"><%= l(:button_cancel)%></a>
<a id="submit_org_resource" href="javascript:void(0);" class="blue_btn fr" onclick="submit_resource();"><%= l(:button_confirm)%></a>
<% end %>
</div>
</div>
</div>
<script>
function submit_resource()
{
$('#submit_org_resource').parent().submit();
}
</script>

View File

@ -1,71 +1,75 @@
<% if @addTag%>
<% if @obj_flag == '3'%>
$('#tags_show_issue').html('<%= escape_javascript(render :partial => 'tags/tag_name',
<% if @obj_flag == '3'%>
$('#tags_show_issue').html('<%= escape_javascript(render :partial => 'tags/tag_name',
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
//$('#put-tag-form-issue').hide();
$('#name-issue').val("");
<% elsif @obj_flag == '6'%>
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty();
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/tag_name',
//$('#put-tag-form-issue').hide();
$('#name-issue').val("");
<% elsif @obj_flag == '6'%>
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty();
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/tag_name',
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
$("#put-tag-form- <%=@obj.class%>- <%=@obj.id%>").hide();
$("#put-tag-form-<%=@obj.class%>-<%=@obj.id%> #name").val("");
<% else %>
$('#tags_show').html('<%= escape_javascript(render :partial => 'tags/tag_name',
$("#put-tag-form- <%=@obj.class%>- <%=@obj.id%>").hide();
$("#put-tag-form-<%=@obj.class%>-<%=@obj.id%> #name").val("");
<% else %>
$('#tags_show').html('<%= escape_javascript(render :partial => 'tags/tag_name',
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
$('#tags_show').html('<%=render_attachments_tag_save(@project, nil)%>');
$('#put-tag-form #name').val("");
//$('#put-tag-form').hide();
<% end %>
$('#tags_show').html('<%=render_attachments_tag_save(@project, nil)%>');
$('#put-tag-form #name').val("");
//$('#put-tag-form').hide();
<% end %>
<% else %>
$("#attachments_fields").children().remove();
$("#upload_file_count").text("未上传文件");
$('#upload_file_div').slideToggle('slow');
<% if @project %>
hideModal();
<% if @in_project_toolbar %>
window.location.href = '<%= project_files_path(@project) %>'
<% else %>
<% if @project %>
hideModal();
<% if @in_project_toolbar %>
window.location.href = '<%= project_files_path(@project) %>'
<% else %>
$("#resource_list").html('<%= j(render partial:"project_file", locals: {project: @project}) %>');
$("#project_files_count_info").html("<%= @all_attachments.count %>");
$("#project_files_count_nav").html("(<%= @all_attachments.count %>)")
// 添加文件上传成功提示
<% unless params[:attachments].nil? %>
var div = $('<div id="addBox" class="flash notice">文件上传成功!</div>');
$("#course_list").prepend(div);
setTimeout( function(){div.remove();},3000)
<% end %>
<% end %>
<%elsif @course%>
hideModal();
<%if @in_course_toolbar %>
window.location.href='<%= course_files_path(@course)%>'
<%else%>
$("#resource_list").html('<%= j(render partial: "course_file" ,locals: {course: @course}) %>');
$("#courses_files_count_info").html("<%= @all_attachments.count%>");
$("#courses_files_count_nav").html("(<%= @all_attachments.count%>)")
// 添加文件上传成功提示,
<% unless params[:attachments].nil? %>
var div = $('<div id="addBox" class="flash notice">文件上传成功!</div>');
$("#course_list").prepend(div);
setTimeout( function(){div.remove();},3000)
<% end %>
<%end%>
<% elsif @org_subfield %>
<% if params[:in_org] %>
window.location.href = '<%= org_subfield_files_path @org_subfield %>';
<%else %>
hideModal();
$("#resource_list").html('<%= j(render partial: "subfield_files" ,locals: {org_subfield: @org_subfield}) %>');
// 添加文件上传成功提示,
<% unless params[:attachments].nil? %>
$("#resource_list").html('<%= j(render partial:"project_file", locals: {project: @project}) %>');
$("#project_files_count_info").html("<%= @all_attachments.count %>");
$("#project_files_count_nav").html("(<%= @all_attachments.count %>)")
// 添加文件上传成功提示
<% unless params[:attachments].nil? %>
var div = $('<div id="addBox" class="flash notice">文件上传成功!</div>');
$("#course_list").prepend(div);
setTimeout( function(){div.remove();},3000)
<% end %>
<% end %>
<%elsif @course%>
hideModal();
<%if @in_course_toolbar %>
window.location.href='<%= course_files_path(@course)%>'
<%else%>
$("#resource_list").html('<%= j(render partial: "course_file" ,locals: {course: @course}) %>');
$("#courses_files_count_info").html("<%= @all_attachments.count%>");
$("#courses_files_count_nav").html("(<%= @all_attachments.count%>)")
// 添加文件上传成功提示,
<% unless params[:attachments].nil? %>
var div = $('<div id="addBox" class="flash notice">文件上传成功!</div>');
$("#course_list").prepend(div);
setTimeout( function(){div.remove();},3000)
<% end %>
<%end%>
<% elsif @org_subfield %>
<% if params[:in_org] %>
window.location.href = '<%= org_subfield_files_path @org_subfield %>';
<%else %>
hideModal();
$("#resource_list").html('<%= j(render partial: "subfield_files" ,locals: {org_subfield: @org_subfield}) %>');
// 添加文件上传成功提示,
<% unless params[:attachments].nil? %>
// var div = $('<div id="addBox" class="flash notice">文件上传成功!</div>');
// $("#org_subfield_list").prepend(div);
// setTimeout( function(){div.remove();},3000);
<% end %>
<% end %>
<% end %>
<% end %>
<% end %>
<% elsif @organization %> //组织单独处理
hideModal();
window.location.href = '<%= organization_path @organization %>';
<% end %>
<% end %>
$(document).ready(img_thumbnails);

View File

@ -0,0 +1,401 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title><%= h html_title %></title>
<meta name="description" content="<%= Redmine::Info.app_name %>" />
<meta name="keywords" content="issue,bug,tracker" />
<%= csrf_meta_tag %>
<%= favicon %>
<%= javascript_heads %>
<%= heads_for_theme %>
<%= stylesheet_link_tag 'org_new_style','jquery/jquery-ui-1.9.2' %>
<%= javascript_include_tag 'cookie','project', 'organization','header','prettify','select_list_move','org'%>
<%= javascript_include_tag 'attachments' %>
<%#= call_hook :view_layouts_base_html_head %>
<!-- page specific tags -->
<%#= yield :header_tags -%>
<!-- MathJax的配置 -->
<script type="text/javascript"
src="/javascripts/MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<!-- 配置 在生成的公式图片上去掉Math定义的右键菜单$$ $$ \( \) \[ \] 中的公式给予显示-->
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
showMathMenu: false,
showMathMenuMSIE: false,
tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
});
</script>
<script>
jQuery(document).ready(function($){
// browser window scroll (in pixels) after which the "back to top" link is shown
var offset = 300,
//browser window scroll (in pixels) after which the "back to top" link opacity is reduced
offset_opacity = 1200,
//duration of the top scrolling animation (in ms)
scroll_top_duration = 700,
//grab the "back to top" link
$back_to_top = $('.cd-top');
//hide or show the "back to top" link
$(window).scroll(function(){
( $(this).scrollTop() > offset ) ? $back_to_top.addClass('cd-is-visible') : $back_to_top.removeClass('cd-is-visible cd-fade-out');
if( $(this).scrollTop() > offset_opacity ) {
$back_to_top.addClass('cd-fade-out');
}
});
//smooth scroll to top
$back_to_top.on('click', function(event){
event.preventDefault();
$('body,html').animate({
scrollTop: 0 ,
}, scroll_top_duration
);
});
});
</script>
</head>
<!--add by huang-->
<script type="text/javascript">
function orge_new_files_upload()
{
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'files/upload_org_new_files',:locals => {:org => @organization, :org_attachment_type => 1}) %>');
showModal('ajax-modal', '513px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='hideModal()' style='margin-left: 480px;'><img src='/images/bid/close.png' width='26px' height='26px' /></a>");
$('#ajax-modal').parent().css("top","40%").css("left","36%").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("popbox_polls");
}
</script>
<body onload="prettyPrint();">
<div class="cl"></div>
<div class="container">
<div class="header">
<div class="header-con">
<% if User.current.admin_of_org?(@organization) %>
<a href="javascript:void(0);" class="fl logo" onclick="orge_new_files_upload();">
<!--"/files/uploads/image#{iamge_path}"-->
<% if @org_logo_attchment.blank? %>
<img src="/images/org_new_style/logo.jpg" height="52" alt=""/>
<% else %>
<img src="/attachments/<%= @org_logo_attchment.id %>/<%= @org_logo_attchment.filename %>" height="52">
<% end %>
</a>
<% else %>
<a href="javascript:void(0);" class="fl logo" onclick="orge_new_files_upload();">
<!--"/files/uploads/image#{iamge_path}"-->
<% if @org_logo_attchment.blank? %>
<img src="/images/org_new_style/logo.jpg" height="52" alt=""/>
<% else %>
<img src="/attachments/<%= @org_logo_attchment.id %>/<%= @org_logo_attchment.filename %>" height="52">
<% end %>
</a>
<% end %>
<%# 登录 %>
<%= render :partial => 'organizations/org_logined_header' %>
</div>
<div class="cl"></div>
</div><!--header end-->
<div class="nav-box">
<div class="nav fl">
<% @subfield_content.each do |field| %>
<% if is_default_field?(field) %>
<% case field.name %>
<% when 'activity' %>
<%= link_to "首页", organization_path(@organization), :class => "fl navact" %>
<% when 'course' %>
<a href="#course_<%= field.id %>" class="fl"> 课程动态</a>
<% when 'project' %>
<a href="#project_<%= field.id %>" class="fl">项目动态</a>
<% end %>
<% else %>
<% if field.field_type == "Post" && field.hide == 0 %>
<a href="#message_<%= field.id %>" class="fl"><%= field.name %></a>
<% elsif field.field_type == "Resource" && field.hide == 0 %>
<a href="#resource_<%= field.id %>" class="fl"><%= field.name %></a>
<% end %>
<% end %>
<% end %>
<% if User.current.admin_of_org?(@organization) %>
<a href="<%= setting_organization_path(@organization) %>" class="fl">配置</a>
<% end %>
</div>
</div><!--nav end-->
<div class="banner">
<h2><%= @organization.name %></h2>
</div>
<div class="cl"></div>
<!--模块-->
<% @subfield_content.each do |field| %>
<% if is_default_field?(field) %>
<% case field.name %>
<% when 'course' %>
<div class="box1 bg-grey" style="display:<%= field.hide == 0?'block':'none' %>;">
<% if field.status == 0 %>
<div class="content ">
<div class="box-top" id="course_<%= field.id %>"><h2 class="box-title">课程动态</h2></div>
<% if @course_acts.blank? %>
<p class="nocontent">暂无内容,敬请期待!</p>
<div class="cl"></div>
<%= link_to "More", organization_path(@organization, :list =>1), :class => "more-btn-center mt30" , :target => "_blank" %>
<div class="cl"></div>
<% else %>
<div class="course-list">
<ul class="clearfix">
<% unless @course_acts.nil? %>
<%= render :partial => 'organizations/org_new_course_pic', :locals => {:activities => @course_acts.first(3)} %>
<% end %>
<div class="cl"></div>
<%= link_to "More", organization_path(@organization, :list =>1), :class => "more-btn-center mt30" , :target => "_blank" %>
<div class="cl"></div>
</ul>
</div>
<% end %>
</div><!--content end-->
<% else %>
<div class="content">
<div class="box-top" id="course_<%= field.id %>"><h2 class="box-title">课程动态</h2></div>
<% if @course_acts.blank? %>
<p class="nocontent">暂无内容,敬请期待!</p>
<div class="cl"></div>
<%= link_to "More", organization_path(@organization, :list =>1), :class => "more-btn-center mt30" , :target => "_blank" %>
<div class="cl"></div>
<% else %>
<div class="row">
<%= render :partial => 'organizations/org_new_course_act_list', :locals =>{:activities => @course_acts, :field => field, :organization => @organization} %>
<!--row-ziyuan end-->
</div>
<div class="cl"></div>
<%= link_to "More", organization_path(@organization, :list =>1), :class => "more-btn-center mt30" , :target => "_blank" %>
<div class="cl"></div>
<% end %>
</div><!--row end-->
<% end %>
</div><!--box1 end-->
<% when 'project' %>
<div class="box1" style="display:<%= field.hide == 0?'block':'none' %>;">
<% if field.status == 0 %>
<div class="content ">
<div class="box-top" id="project_<%= field.id %>"><h2 class="box-title">项目动态</h2><p class="box-title-p"></p></div>
<% if @project_acts.blank? %>
<p class="nocontent">暂无内容,敬请期待!</p>
<div class="cl"></div>
<%= link_to "More", organization_path(@organization, :list =>1), :class => "more-btn-center mt30" , :target => "_blank" %>
<div class="cl"></div>
<% else %>
<div class="course-list">
<ul class="clearfix">
<% unless @project_acts.nil? %>
<%= render :partial => 'organizations/org_new_project_pic', :locals => {:activities => @project_acts.first(3)} %>
<% end %>
<div class="cl"></div>
<%= link_to "More", organization_path(@organization, :list =>1), :class => "more-btn-center mt30" , :target => "_blank" %>
<div class="cl"></div>
</ul>
</div>
<% end %>
</div><!--content end-->
<% else %>
<div class="content">
<div class="box-top" style="display:<%= field.hide == 0?'block':'none' %>;" id="project_<%= field.id %>"><h2 class="box-title">项目动态</h2><p class="box-title-p"></p></div>
<% if @project_acts.blank? %>
<p class="nocontent">暂无内容,敬请期待!</p>
<div class="cl"></div>
<%= link_to "More", organization_path(@organization, :list =>1), :class => "more-btn-center mt30" , :target => "_blank" %>
<div class="cl"></div>
<% else %>
<div class="row">
<%= render :partial => 'organizations/org_new_project_act_list', :locals =>{:activities => @project_acts, :field => field, :organization => @organization} %>
<!--row-ziyuan end-->
</div>
<div class="cl"></div>
<%= link_to "More", organization_path(@organization, :list =>1), :class => "more-btn-center mt30" , :target => "_blank" %>
<div class="cl"></div>
<% end %>
</div><!--row end-->
<% end %>
</div>
<% end %>
<% else %>
<% if field.field_type == "Post" %> <%# 讨论类型 %>
<% org_subfield = OrgSubfield.find(field.id) %>
<% 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') %>
<%# message_ats = get_message_org(@organization.id, field.id) %>
<%# ids = field.org_document_comments.map{|o| o.id}.join(",") %>
<div class="box1 bg-grey" style="display:<%= field.hide == 0?'block':'none' %>;" id="org_subfield_<%= field.id %>">
<% if field.status == 0 %>
<div class="content">
<div class="box-top" id="message_<%= field.id %>"><h2 class="box-title"><%= field.name %></h2></div>
<% if org_acts.blank? %>
<p class="nocontent">暂无内容,敬请期待!</p>
<div class="cl"></div>
<% 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 "More", show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30" , :target => "_blank" %>
<% else %>
<%= link_to "More", show_org_subfield_organization_path(:id => @organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30" , :target => "_blank" %>
<% end %>
<% else %>
<%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %>
<% end %>
<%#= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %>
<div class="cl"></div>
<% else %>
<div class="course-list">
<ul class="clearfix">
<% org_acts.first(3).each do |act| %>
<%= render :partial => 'organizations/org_new_forum_pic', :locals => {:activity => act, :field => field, :organization => @organization} %>
<% end %>
<div class="cl"></div>
</ul>
<% 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 "More", show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30" , :target => "_blank" %>
<% else %>
<%= link_to "More", show_org_subfield_organization_path(:id => @organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30" , :target => "_blank" %>
<% end %>
<% else %>
<%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %>
<% end %>
<%#= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %>
<div class="cl"></div>
</div>
<% end %>
</div><!--content end-->
<% else %>
<div class="content">
<div class="box-top" id="message_<%= field.id %>"><h2 class="box-title"><%= field.name %></h2></div>
<% if org_acts.blank? %>
<p class="nocontent">暂无内容,敬请期待!</p>
<div class="cl"></div>
<% 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 "More", show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30" , :target => "_blank" %>
<% else %>
<%= link_to "More", show_org_subfield_organization_path(:id => @organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30" , :target => "_blank" %>
<% end %>
<% else %>
<%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %>
<% end %>
<div class="cl"></div>
<% else %>
<div class="row">
<% org_acts.each do |act| %>
<%= render :partial => 'organizations/org_new_forum_list', :locals => {:activity => act, :field => field, :organization => @organization} %>
<% end %>
<!--row-ziyuan end-->
</div>
<div class="cl"></div>
<% 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 "More", show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30" , :target => "_blank" %>
<% else %>
<%= link_to "More", show_org_subfield_organization_path(:id => @organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30" , :target => "_blank" %>
<% end %>
<% else %>
<%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %>
<% end %>
<div class="cl"></div>
<% end %>
</div><!--row end-->
<div class="cl"></div>
<% end %>
</div><!--box1 end-->
<% elsif field.field_type == "Resource" %>
<% org_attachs = get_attach_org2(field) %>
<div class="box1" style="display:<%= field.hide == 0?'block':'none' %>;" id="org_subfield_<%= field.id %>">
<div class="content">
<div class="box-top" id="resource_<%= field.id %>"><h2 class="box-title"><%= field.name %></h2></div>
<% if org_attachs.blank? %>
<p class="nocontent">暂无内容,敬请期待!</p>
<div class="cl"></div>
<% 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 "More", show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30", :target => "_blank" %>
<% else %>
<%= link_to "More", show_org_subfield_organization_path(:id => @organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30", :target => "_blank" %>
<% end %>
<% else %>
<%= link_to "More", org_subfield_files_path(field), :class => "more-btn-center mt30", :target => "_blank" %>
<% end %>
<%#= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %>
<div class="cl"></div>
<% else %>
<div class="row">
<%= render :partial => 'organizations/org_new_resource', :locals => {:org_attachs => org_attachs} %>
<!--row-ziyuan end-->
</div>
<div class="cl"></div>
<% 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 "More", show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30", :target => "_blank" %>
<% else %>
<%= link_to "More", show_org_subfield_organization_path(:id => @organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30", :target => "_blank" %>
<% end %>
<% else %>
<%= link_to "More", org_subfield_files_path(field), :class => "more-btn-center mt30", :target => "_blank" %>
<% end %>
<%#= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %>
<div class="cl"></div>
<% end %>
</div><!--row end-->
<div class="cl"></div>
</div><!--box1 end-->
</div>
<% end %>
<% end %>
<% end %>
<div class="footer">
<div class="footer-con">
<ul>
<li><a href="<%= about_us_path %>" target="_blank" class="fl">关于我们</a></li>
<li><a href="<%= agreement_path %>" target="_blank" class="fl"> 服务协议 </a></li>
<li><a href="http://forge.trustie.net/forums/1/memos/1168" target="_blank" class="fl">帮助中心</a></li>
<li><a href="<%= forums_path(:reorder_complex=>'desc')%>" target="_blank" class="fl"> 贴吧交流</a></li>
</ul>
<div class="cl"></div>
<p>Copyright 2007~2016 All Rights Reserved<br>湘ICP备09019772</p>
</div>
</div>
<!--backtop end-->
<main class="cd-container">
</main>
<a href="#0" class="cd-top">Top</a>
</div><!--container end-->
<!--页面底部-->
<div class="cl"></div>
<div id="ajax-modal" style="display:none;"></div>
<div id="ajax-indicator" style="display:none;">
<span><%= l(:label_loading) %></span>
</div>
<%#= call_hook :view_layouts_base_body_bottom %>
</body>
</html>

View File

@ -0,0 +1,3 @@
$("#subfield_show_<%= @subfield.id %>").html("<%= @subfield.name %>");
$("#sub_field_left_lists").html("");
$("#sub_field_left_lists").html("<%= escape_javascript(render :partial => 'organizations/org_left_subfield_list', :locals => {:organization => @organization}) %>");

View File

@ -84,8 +84,8 @@
<% end %>
<% else %>
<div class="homepageLeftMenuBlock" style="display:<%= field.hide == 0?'block':'none' %>;" id="org_subfield_<%= field.id %>">
<% if field.field_type == "Post" %>
<% if !field.subfield_subdomain_dir.nil? %>
<% if field.field_type == "Post" %> <!--讨论帖子-->
<% 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 "#{field.name}", show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :class => "homepageMenuText" %>
<% else %>

View File

@ -0,0 +1,48 @@
<% if User.current.logged? %>
<div class="navHomepageProfile" id="navHomepageProfile">
<ul>
<li class="homepageProfileMenuIcon fr" id="homepageProfileMenuIcon">
<%= link_to "<div class='mt5 mb8 user-img' id='user_avatar'>#{image_tag(url_to_avatar(User.current), :class => "portraitRadius",:alt=>"头像", :id => "nh_user_logo")}</div>".html_safe, user_activities_path(User.current.id) %>
<%#= link_to image_tag(url_to_avatar(User.current)), user_url_in_org(User.current.id), :alt => '用户头像', :target => '_blank', :class => "fr user-img" %>
<ul class="topnav_login_list none" id="topnav_login_list">
<li>
<%= link_to "修改资料", my_account_path, :class => "menuGrey"%>
</li>
<li>
<%= link_to "我的组织", user_organizations_user_path(:id => User.current.id), :class => "menuGrey"%>
</li>
<li>
<%= link_to "新建组织", new_organization_path, :class => "menuGrey"%>
</li>
<!--<li><a href="javascript:void(0);" class="menuGrey">账号设置</a> </li>-->
<li>
<%= link_to "退出", logout_url_without_domain, :class => "menuGrey", :method => "post"%>
</li>
</ul>
</li>
</ul>
</div>
<% else %>
<div class="login fr" >
<a href="<%= signin_url_without_domain %>" class=" " >登录&nbsp;&nbsp;|&nbsp;</a>
<a href="<%= register_url_without_domain %>" class=" " >退出</a>
</div>
<% end %>
<script type="text/javascript">
$("#navHomepageProfile").mouseenter(function(){
$("#homepageProfileMenuIcon").addClass("homepageProfileMenuIconhover");
$("#topnav_login_list").show();
});
$("#navHomepageProfile").mouseleave(function(){
$("#homepageProfileMenuIcon").removeClass("homepageProfileMenuIconhover");
$("#topnav_login_list").hide();
});
function signout(){
$.post(
'<%= signout_path%>',
{}
);
}
</script>

View File

@ -0,0 +1,80 @@
<% activities.each do |act| %>
<% if act.org_act_type == "HomeworkCommon" %>
<% activity = HomeworkCommon.find(act.org_act_id) %>
<div class="row-ziyuan fl">
<%= link_to image_tag(url_to_avatar(activity.user),:width => "40", :height => "40"), user_path(activity.user), :class => "fl user-img" %>
<!--<a href="#" class="fl user-img" ><img src="images/detailimg4.jpg" /></a>-->
<div class="note-box fl">
<%= link_to activity.name.to_s, student_work_index_url_in_org(activity.id), :target => '_blank', :class => "fl note-title" %>
<%#= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank', :class => "fl ziyuan-title" %>
<p class="fl"><span >发布时间:<%= format_date activity.updated_at %></span>
<span> 作者:<%= activity.try(:user).try(:realname).nil? ? activity.try(:user).try(:login) : activity.try(:user).try(:realname) %></span>
<span class="fr right-info2"> <%= activity.journals_for_messages.count %></span> </p>
</div>
</div><!--row-ziyuan end-->
<% elsif act.org_act_type == "Message" %>
<% activity = Message.find(act.org_act_id) %>
<div class="row-ziyuan fl">
<%= link_to image_tag(url_to_avatar(activity.author),:width => "40", :height => "40"), user_path(activity.author), :class => "fl user-img" %>
<!--<a href="#" class="fl user-img" ><img src="images/detailimg4.jpg" /></a>-->
<div class="note-box fl">
<% 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 => "fl note-title" %>
<% else %>
<%= link_to activity.parent.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "fl note-title" %>
<% end %>
<%#= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank', :class => "fl ziyuan-title" %>
<p class="fl"><span >发布时间:<%= format_date activity.updated_on %></span>
<span> 作者:<%= activity.try(:author).try(:realname).nil? ? activity.try(:author).try(:login) : activity.try(:author).try(:realname) %></span>
<span class="fr right-info2"> <%= activity.children.count %></span> </p>
</div>
</div><!--row-ziyuan end-->
<% elsif act.org_act_type == "News" %>
<% activity = News.find(act.org_act_id) %>
<div class="row-ziyuan fl">
<%= link_to image_tag(url_to_avatar(activity.author),:width => "40", :height => "40"), user_path(activity.author), :class => "fl user-img" %>
<!--<a href="#" class="fl user-img" ><img src="images/detailimg4.jpg" /></a>-->
<div class="note-box fl">
<%= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank', :class => "fl note-title" %>
<p class="fl"><span >发布时间:<%= format_date activity.created_on %></span>
<span> 作者:<%= activity.try(:author).try(:realname).nil? ? activity.try(:author).try(:login) : activity.try(:author).try(:realname) %></span>
<span class="fr right-info2"> <%= activity.comments.count %></span> </p>
</div>
</div><!--row-ziyuan end-->
<% 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%>
<% if ( activity.polls_status==2) %>
<div class="row-ziyuan fl">
<%= link_to image_tag(url_to_avatar(activity.user),:width => "40", :height => "40"), user_path(activity.user), :class => "fl user-img" %>
<!--<a href="#" class="fl user-img" ><img src="images/detailimg4.jpg" /></a>-->
<div class="note-box fl">
<% if has_commit %>
<%= link_to poll_name, Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => '_blank', :class => "fl note-title" %>
<% else %>
<%= link_to poll_name, Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s, :target => '_blank', :class => "fl note-title" %>
<% end %>
<p class="fl"><span >发布时间:<%= format_date activity.published_at %></span>
<span> 作者:<%= activity.try(:user).try(:realname).nil? ? activity.try(:user) : activity.try(:user).try(:realname) %></span>
<span class="fr right-info2"> 0 </span> </p>
</div>
</div><!--row-ziyuan end-->
<% end %>
<% elsif act.org_act_type == "Course" %>
<% activity = Course.find(act.org_act_id) %>
<div class="row-ziyuan fl">
<%= link_to image_tag(url_to_avatar(activity.teacher),:width => "40", :height => "40"), user_path(activity.teacher), :class => "fl user-img" %>
<!--<a href="#" class="fl user-img" ><img src="images/detailimg4.jpg" /></a>-->
<div class="note-box fl">
<%= link_to activity.name.to_s, course_url_in_org(activity.id), :target => '_blank', :class => "fl note-title" %>
<p class="fl"><span >发布时间:<%= format_date activity.created_at %></span>
<span> 作者:<%= activity.try(:teacher).try(:realname).nil? ? activity.try(:teacher) : activity.try(:teacher).try(:realname) %></span>
<span class="fr right-info2"> 0</span> </p>
</div>
</div><!--row-ziyuan end-->
<% end %>
<% end %>

View File

@ -0,0 +1,5 @@
<a href="#" target="_blank" class="row-con">
<span class="row-time"><%= format_date(activity.updated_at) %></span>
<h3 class="row-title "><%= activity.title %></h3>
<div class="row-txt row-txt-line"><%= activity.description %></div>
</a>

View File

@ -0,0 +1,20 @@
<a href="/#" title="">
<div class="course-list-img">
<% iamge_path = get_image_path_from_content(activity.description) %>
<% if iamge_path.nil? %>
<%= link_to image_tag("/images/org_new_style/default-img.jpg", :width => "370", :height => "220"), student_work_index_url_in_org(activity.id), :target => "_blank" %>
<!--<img width="370" height="220" alt="#" src="/images/org_new_style/default-img.jpg">-->
<% else %>
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "370", :height => "220"), student_work_index_url_in_org(activity.id), :target => "_blank" %>
<!--<img width="370" height="220" src="/files/uploads/image<%#= iamge_path %>" alt="" />-->
<% end %>
</div>
<h5>
<span><%= link_to activity.name.to_s, student_work_index_url_in_org(activity.id), :target => '_blank' %></span>
</h5>
<div class="item-btm clearfix">
<%=link_to activity.try(:user).try(:realname).nil? ? activity.try(:user).try(:login) : activity.try(:user).try(:realname), user_path(activity.user), :class=>"publisher-name fl", :target => "_blank" %></a>
<p class="pass-time fl"><span><%= format_date activity.updated_at %></span></p>
<div class="fr right-info"> <span> <%= activity.journals_for_messages.count %></span></div>
</div>
</a>

View File

@ -0,0 +1,22 @@
<a href="/#" title="">
<div class="course-list-img">
<% iamge_path = get_image_path_from_content(activity.content) %>
<% if iamge_path.nil? %>
<%= link_to image_tag("/images/org_new_style/default-img.jpg", :width => "370", :height => "220"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank" %>
<% else %>
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "370", :height => "220"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank" %>
<% end %>
</div>
<h5>
<% 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' %>
<% else %>
<%= link_to activity.parent.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank' %>
<% end %>
</h5>
<div class="item-btm clearfix">
<%=link_to activity.try(:author).try(:realname).nil? ? activity.try(:author).try(:login) : activity.try(:author).try(:realname), user_path(activity.author), :class=>"publisher-name fl", :target => "_blank" %></a>
<p class="pass-time fl"><span><%= format_date activity.updated_on %></span></p>
<div class="fr right-info"> <span> <%= activity.children.count %></span></div>
</div>
</a>

View File

@ -0,0 +1,19 @@
<a href="/#" title="">
<div class="course-list-img">
<% iamge_path = get_image_path_from_content(activity.description) %>
<% if iamge_path.nil? %>
<%= link_to image_tag("/images/org_new_style/default-img.jpg", :width => "370", :height => "220"), news_url_in_org(activity.id), :target => "_blank" %>
<!--<img width="370" height="220" alt="#" src="/images/org_new_style/default-img.jpg">-->
<% else %>
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "370", :height => "220"), news_url_in_org(activity.id), :target => "_blank" %>
<% end %>
</div>
<h5>
<span><%= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank' %></span>
</h5>
<div class="item-btm clearfix">
<%=link_to activity.try(:author).try(:realname).nil? ? activity.try(:author).try(:login) : activity.try(:author).try(:realname), user_path(activity.author), :class=>"publisher-name fl", :target => "_blank" %></a>
<p class="pass-time fl"><span><%= format_date activity.created_on %></span></p>
<div class="fr right-info"> <span> <%= activity.comments.count %></span></div>
</div>
</a>

View File

@ -0,0 +1,107 @@
<% activities.each do |act| %>
<% if act.org_act_type == "HomeworkCommon" %>
<% activity = HomeworkCommon.find(act.org_act_id) %>
<li>
<a href="/#" title="">
<div class="course-list-img">
<% iamge_path = get_image_path_from_content(activity.description) %>
<% if iamge_path.nil? %>
<%= link_to image_tag("/images/org_new_style/default-img.jpg", :width => "370", :height => "220"), student_work_index_url_in_org(activity.id), :target => "_blank" %>
<!--<img width="370" height="220" alt="#" src="/images/org_new_style/default-img.jpg">-->
<% else %>
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "370", :height => "220"), student_work_index_url_in_org(activity.id), :target => "_blank" %>
<!--<img width="370" height="220" src="/files/uploads/image<%#= iamge_path %>" alt="" />-->
<% end %>
</div>
<h5>
<%= link_to activity.name.to_s, student_work_index_url_in_org(activity.id), :target => '_blank' %>
</h5>
<div class="item-btm clearfix">
<%=link_to activity.try(:user).try(:realname).nil? ? activity.try(:user).try(:login) : activity.try(:user).try(:realname), user_path(activity.user), :class=>"publisher-name fl", :target => "_blank" %></a>
<p class="pass-time fl"><span><%= format_date activity.updated_at %></span></p>
<div class="fr right-info"> <span> <%= activity.journals_for_messages.count %></span></div>
</div>
</a>
</li>
<% elsif act.org_act_type == "Message" %>
<% activity = Message.find(act.org_act_id) %>
<li>
<a href="/#" title="">
<div class="course-list-img">
<% iamge_path = get_image_path_from_content(activity.content) %>
<% if iamge_path.nil? %>
<%= link_to image_tag("/images/org_new_style/default-img.jpg", :width => "370", :height => "220"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank" %>
<% else %>
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "370", :height => "220"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank" %>
<% end %>
</div>
<h5>
<% 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' %>
<% else %>
<%= link_to activity.parent.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank' %>
<% end %>
</h5>
<div class="item-btm clearfix">
<%=link_to activity.try(:author).try(:realname).nil? ? activity.try(:author).try(:login) : activity.try(:author).try(:realname), user_path(activity.author), :class=>"publisher-name fl", :target => "_blank" %></a>
<p class="pass-time fl"><span><%= format_date activity.updated_on %></span></p>
<div class="fr right-info"> <span> <%= activity.children.count %></span></div>
</div>
</a>
</li>
<% elsif act.org_act_type == "News" %>
<% activity = News.find(act.org_act_id) %>
<li>
<a href="/#" title="">
<div class="course-list-img">
<% iamge_path = get_image_path_from_content(activity.description) %>
<% if iamge_path.nil? %>
<%= link_to image_tag("/images/org_new_style/default-img.jpg", :width => "370", :height => "220"), news_url_in_org(activity.id), :target => "_blank" %>
<% else %>
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "370", :height => "220"), news_url_in_org(activity.id), :target => "_blank" %>
<% end %>
</div>
<h5>
<%= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank' %>
</h5>
<div class="item-btm clearfix">
<%=link_to activity.try(:author).try(:realname).nil? ? activity.try(:author).try(:login) : activity.try(:author).try(:realname), user_path(activity.author), :class=>"publisher-name fl", :target => "_blank" %></a>
<p class="pass-time fl"><span><%= format_date activity.created_on %></span></p>
<div class="fr right-info"> <span> <%= activity.comments.count %></span></div>
</div>
</a>
</li>
<% 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%>
<% if ( activity.polls_status==2) %>
<li>
<a href="/#" title="">
<div class="course-list-img">
<% iamge_path = get_image_path_from_content(activity.polls_description) %>
<% if iamge_path.nil? %>
<%= link_to image_tag("/images/org_new_style/default-img.jpg", :width => "370", :height => "220"), news_url_in_org(activity.id), :target => "_blank" %>
<% else %>
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "370", :height => "220"), news_url_in_org(activity.id), :target => "_blank" %>
<% end %>
</div>
<h5>
<% if has_commit %>
<%= link_to poll_name, Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => '_blank' %>
<% else %>
<%= link_to poll_name, Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s, :target => '_blank' %>
<% end %>
</h5>
<div class="item-btm clearfix">
<%=link_to activity.try(:user).try(:realname).nil? ? activity.try(:user).try(:login) : activity.try(:user).try(:realname), user_path(activity.user), :class=>"publisher-name fl", :target => "_blank" %></a>
<p class="pass-time fl"><span><%= format_date activity.published_at %></span></p>
<div class="fr right-info"> <span> 0 </span></div>
</div>
</a>
</li>
<% end %>
<% end %>
<% end %>

View File

@ -0,0 +1,5 @@
<a href="#" target="_blank" class="row-con">
<span class="row-time"><%= format_date activity.updated_at %></span>
<h3 class="row-title ">首届卫星导航仿真与测试专题研讨会在...首届卫星导航仿真与测试专题研讨会在...</h3>
<div class="row-txt row-txt-line">10月15日由卫星导航仿真与测试开放实验室联盟主办的首次专题研讨会在西安国家民用航天产业基地隆重召开...</div>
</a>

View File

@ -0,0 +1,12 @@
<div class="cl"></div>
<div style="margin-top: 10px">
<% iamge_path = get_image_path_from_content(activity.content) %>
<% if iamge_path.nil? %>
<img src="/images/org_new_style/default-img.jpg" alt="" class="fl con-left-img"/>
<% else %>
<img src="/files/uploads/image<%= iamge_path %>" alt="" class="fl con-left-img"/>
<% end %>
<%=link_to activity.content.html_safe, organization_path(organization, :org_subfield_id => field.id), :class => "con-left-txt fl", :target => "_blank" %>
</div>
<div class="cl"></div>

View File

@ -0,0 +1,74 @@
<% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' && activity.org_act_id != @organization.home_id %>
<% document = activity.org_act %>
<% org_subfield_id = params[:org_subfield_id] %>
<% flag = 2 %>
<div class="row-ziyuan fl">
<%= link_to image_tag(url_to_avatar(document.creator),:width => "40", :height => "40"), user_path(document.creator), :class => "fl user-img" %>
<div class="note-box fl">
<%= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => '_blank', :class => "fl note-title" %>
<p class="fl"><span >发布时间:<%= format_date document.created_at %></span>
<span> 作者:<%= document.try(:creator).try(:realname).nil? ? document.try(:creator).try(:login) : document.try(:creator).try(:realname) %></span>
<span class="fr right-info2"> <%= document.children.count %></span> </p>
</div>
</div>
<% elsif 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.board.org_subfield_id %>
<div class="row-ziyuan fl">
<%= link_to image_tag(url_to_avatar(message.author),:width => "40", :height => "40"), user_path(message.author), :class => "fl user-img" %>
<!--<a href="#" class="fl user-img" ><img src="images/detailimg4.jpg" /></a>-->
<div class="note-box fl">
<% 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 => "fl note-title" %>
<% else %>
<%= link_to message.parent.subject.to_s.html_safe, board_message_url_in_org(message.board.id,message.id), :target => '_blank', :class => "fl note-title" %>
<% end %>
<%#= link_to activity.title.to_s, organization_path(@organization, :org_subfield_id => field.id), :target => '_blank', :class => "fl note-title" %>
<%#= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank', :class => "fl ziyuan-title" %>
<p class="fl"><span >发布时间:<%= format_date message.created_on %></span>
<span> 作者:<%= message.try(:author).try(:realname).nil? ? message.try(:author).try(:login) : message.try(:author).try(:realname) %></span>
<span class="fr right-info2"> <%= message.children.count %></span> </p>
</div>
</div><!--row-ziyuan end-->
<% else %>
<div class="row-ziyuan fl">
<%= link_to image_tag(url_to_avatar(message.author),:width => "40", :height => "40"), user_path(message.author), :class => "fl user-img" %>
<!--<a href="#" class="fl user-img" ><img src="images/detailimg4.jpg" /></a>-->
<div class="note-box fl">
<% if message.parent_id.nil? %>
<%= link_to message.subject.to_s.html_safe, board_message_path(message.board,message), :target => '_blank', :class => "fl note-title" %>
<% else %>
<%= link_to message.parent.subject.to_s.html_safe, board_message_path(message.board,activity), :target => '_blank', :class => "fl note-title" %>
<% end %>
<%#= link_to activity.title.to_s, organization_path(@organization, :org_subfield_id => field.id), :target => '_blank', :class => "fl note-title" %>
<%#= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank', :class => "fl ziyuan-title" %>
<p class="fl"><span >发布时间:<%= format_date message.updated_at %></span>
<span> 作者:<%= message.try(:author).try(:realname).nil? ? message.try(:author).try(:login) : message.try(:author).try(:realname) %></span>
<span class="fr right-info2"> <%= message.children.count %></span> </p>
</div>
</div><!--row-ziyuan 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) %>
<div class="row-ziyuan fl">
<%= link_to image_tag(url_to_avatar(news.author),:width => "40", :height => "40"), user_path(news.author), :class => "fl user-img" %>
<!--<a href="#" class="fl user-img" ><img src="images/detailimg4.jpg" /></a>-->
<div class="note-box fl">
<%= link_to news.title.to_s, news_path(news), :target => '_blank', :class => "fl note-title" %>
<%#= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank', :class => "fl ziyuan-title" %>
<p class="fl"><span >发布时间:<%= format_date news.created_on %></span>
<span> 作者:<%= news.try(:author).try(:realname).nil? ? news.try(:author).try(:login) : news.try(:author).try(:realname) %></span>
<span class="fr right-info2"> <%= news.comments.count %></span> </p>
</div>
</div><!--row-ziyuan end-->
<% end %>
<% end %>

View File

@ -0,0 +1,124 @@
<% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' && activity.org_act_id != @organization.home_id %>
<% document = activity.org_act %>
<% org_subfield_id = params[:org_subfield_id] %>
<% flag = 2 %>
<li>
<a href="/#" title="" >
<div class="course-list-img">
<% iamge_path = get_image_path_from_content(document.content) %>
<% if iamge_path.nil? %>
<%= link_to image_tag("/images/org_new_style/default-img.jpg", :width => "370", :height => "220"), org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => "_blank" %>
<% else %>
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "370", :height => "220"), org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => "_blank" %>
<% end %>
</div>
<h5><%#= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id) %>
<span><%= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => '_blank' %></span>
</h5>
<div class="item-btm clearfix">
<%=link_to document.try(:creator).try(:realname).nil? ? document.try(:creator).try(:login) : document.try(:creator).try(:realname), user_path(document.creator), :class=>"publisher-name fl", :target => "_blank" %></a>
<p class="pass-time fl"><span><%= format_date document.created_at %></span></p>
<div class="fr right-info"> <span> <%= document.children.count %></span></div>
</div>
</a>
</li>
<% elsif 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.board.org_subfield_id %>
<li>
<a href="/#" title="" >
<div class="course-list-img">
<% if message.parent_id.nil? %>
<% content = message.content%>
<% else %>
<% content = message.parent.content%>
<% end %>
<% iamge_path = get_image_path_from_content(content) %>
<% if iamge_path.nil? %>
<%= link_to image_tag("/images/org_new_style/default-img.jpg", :width => "370", :height => "220"), board_message_url_in_org(message.board.id,message.id), :target => "_blank" %>
<% else %>
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "370", :height => "220"), board_message_url_in_org(message.board.id,message.id), :target => "_blank" %>
<% end %>
</div>
<h5>
<% if message.parent_id.nil? %>
<span><%= link_to message.subject.to_s.html_safe, board_message_url_in_org(message.board.id,message.id), :target => '_blank' %></span>
<% else %>
<span><%= link_to message.parent.subject.to_s.html_safe, board_message_url_in_org(message.board.id,message.id), :target => '_blank'%></span>
<% end %>
<%#= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id) %>
<%#= link_to document.subject, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank' %>
</h5>
<div class="item-btm clearfix">
<%=link_to message.try(:author).try(:realname).nil? ? message.try(:author).try(:login) : message.try(:author).try(:realname), user_path(message.author), :class=>"publisher-name fl", :target => "_blank" %></a>
<p class="pass-time fl"><span><%= format_date message.created_on %></span></p>
<div class="fr right-info"> <span> <%= message.children.count %></span></div>
</div>
</a>
</li>
<% else %>
<li>
<a href="/#" title="" >
<div class="course-list-img">
<% if message.parent_id.nil? %>
<% content = message.content%>
<% else %>
<% content = message.parent.content%>
<% end %>
<% iamge_path = get_image_path_from_content(content) %>
<% if iamge_path.nil? %>
<%= link_to image_tag("/images/org_new_style/default-img.jpg", :width => "370", :height => "220"), board_message_path(message.board,activity), :target => "_blank" %>
<% else %>
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "370", :height => "220"), board_message_path(message.board,activity), :target => "_blank" %>
<% end %>
</div>
<h5>
<% if message.parent_id.nil? %>
<%= link_to message.subject.to_s.html_safe, board_message_path(message.board,message), :class=> "postGrey"
%>
<% else %>
<%= link_to message.parent.subject.to_s.html_safe, board_message_path(message.board,activity), :class=> "postGrey"
%>
<% end %>
<%#= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id) %>
<%#= link_to document.subject, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank' %>
</h5>
<div class="item-btm clearfix">
<%=link_to message.try(:author).try(:realname).nil? ? message.try(:author).try(:login) : message.try(:author).try(:realname), user_path(message.author), :class=>"publisher-name fl", :target => "_blank" %></a>
<p class="pass-time fl"><span><%= format_date message.created_on %></span></p>
<div class="fr right-info"> <span> <%= message.children.count %></span></div>
</div>
</a>
</li>
<% 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) %>
<li>
<a href="/#" title="" >
<div class="course-list-img">
<% iamge_path = get_image_path_from_content(news.description) %>
<% if iamge_path.nil? %>
<%= link_to image_tag("/images/org_new_style/default-img.jpg", :width => "370", :height => "220"), news_path(news), :target => "_blank" %>
<% else %>
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "370", :height => "220"), news_path(news), :target => "_blank" %>
<% end %>
</div>
<h5><%#= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id) %>
<span><%= link_to news.title.to_s, news_path(news), :target => '_blank' %></span>
</h5>
<div class="item-btm clearfix">
<%=link_to news.try(:author).try(:realname).nil? ? news.try(:author).try(:login) : news.try(:author).try(:realname), user_path(news.author), :class=>"publisher-name fl", :target => "_blank" %></a>
<p class="pass-time fl"><span><%= format_date news.created_on %></span></p>
<div class="fr right-info"> <span> <%= news.comments.count %></span></div>
</div>
</a>
</li>
<% end %>
<% end %>

View File

@ -0,0 +1,6 @@
<a href="#" target="_blank">
<div class="con-r-img fl">
<%= link_to image_tag(url_to_avatar(activity.creator),:width => "40", :height => "40"), user_path(activity.creator) %>
<span class="con-name"><%= activity.try(:creator).try(:realname).nil? ? activity.try(:creator).try(:login) : activity.try(:creator).try(:realname) %></span></div>
<p class="fr"><%= activity.content.html_safe %></p>
</a>

View File

@ -0,0 +1,49 @@
<% activities.each do |act| %>
<% if act.org_act_type == "Issue" %>
<% activity = Issue.find(act.org_act_id) %>
<div class="row-ziyuan fl">
<%= link_to image_tag(url_to_avatar(activity.author),:width => "40", :height => "40"), user_path(activity.author), :class => "fl user-img" %>
<!--<a href="#" class="fl user-img" ><img src="images/detailimg4.jpg" /></a>-->
<div class="note-box fl">
<%= link_to activity.subject.to_s, issue_url_in_org(activity.id), :target => '_blank', :class => "fl note-title" %>
<%#= link_to activity.name.to_s, student_work_index_url_in_org(activity.id), :target => '_blank', :class => "fl ziyuan-title" %>
<%#= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank', :class => "fl ziyuan-title" %>
<p class="fl"><span >发布时间:<%= format_date activity.updated_on %></span>
<span> 作者:<%= activity.try(:author).try(:realname).nil? ? activity.try(:author).try(:login) : activity.try(:author).try(:realname) %></span>
<span class="fr right-info2"> <%= activity.journals.count %></span> </p>
</div>
</div><!--row-ziyuan end-->
<% elsif act.org_act_type == "Message" %>
<% activity = Message.find(act.org_act_id) %>
<div class="row-ziyuan fl">
<%= link_to image_tag(url_to_avatar(activity.author),:width => "40", :height => "40"), user_path(activity.author), :class => "fl user-img" %>
<!--<a href="#" class="fl user-img" ><img src="images/detailimg4.jpg" /></a>-->
<div class="note-box fl">
<% 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 => "fl note-title" %>
<% else %>
<%= link_to activity.parent.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "fl note-title" %>
<% end %>
<%#= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank', :class => "fl ziyuan-title" %>
<p class="fl"><span >发布时间:<%= format_date activity.updated_on %></span>
<span> 作者:<%= activity.try(:author).try(:realname).nil? ? activity.try(:author).try(:login) : activity.try(:author).try(:realname) %></span>
<span class="fr right-info2"> <%= activity.children.count %></span> </p>
</div>
</div><!--row-ziyuan end-->
<% elsif act.org_act_type == "News" %>
<% activity = News.find(act.org_act_id) %>
<div class="row-ziyuan fl">
<%= link_to image_tag(url_to_avatar(activity.author),:width => "40", :height => "40"), user_path(activity.author), :class => "fl user-img" %>
<!--<a href="#" class="fl user-img" ><img src="images/detailimg4.jpg" /></a>-->
<div class="note-box fl">
<%= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank', :class => "fl note-title" %>
<p class="fl"><span >发布时间:<%= format_date activity.created_on %></span>
<span> 作者:<%= activity.try(:author).try(:realname).nil? ? activity.try(:author).try(:login) : activity.try(:author).try(:realname) %></span>
<span class="fr right-info2"> <%= activity.comments.count %></span> </p>
</div>
</div><!--row-ziyuan end-->
<% end %>
<% end %>

View File

@ -0,0 +1,17 @@
<div class="article-rwrap">
<h3 class="item-title-r">
<%= link_to activity.subject.to_s, issue_url_in_org(activity.id), :class => "title-detail-r" %>
</h3>
<div class="item-btm clearfix">
<ul class="fl left-info">
<li class="hd-pic">
<%= link_to activity.author.realname.nil? ? activity.author.login : activity.author.realname, user_path(activity.author), :class => "publisher-name fl", :target => "_blank" %>
</li>
<li class="pass-time"><span><%= format_date(activity.updated_on) %></span></li>
</ul>
<div class="fr right-info">
<span> <%= activity.journals.count %></span>
</div>
</div>
<div class="cl"></div>
</div>

View File

@ -0,0 +1,49 @@
<div class="item-img fr">
<% iamge_path = get_image_path_from_content(activity.content) %>
<% if iamge_path.nil? %>
<img src="/images/org_new_style/default-img.jpg" width="180" height="115">
<% else %>
<img src="/files/uploads/image<%= iamge_path %>" width="180" height="115">
<% end %>
</div>
<div class="article-lwrap clearfix">
<div class="item-txt fl">
<h3 class="item-title">
<% if activity.parent_id.nil? %>
<%= link_to activity.subject.to_s.html_safe, board_message_url_in_org(activity.board.id,activity.id), :class => "title-detail" %>
<% else %>
<%= link_to activity.parent.subject.to_s.html_safe, board_message_url_in_org(activity.board.id,activity.id), :class => "title-detail" %>
<% end %>
</h3>
<% if activity.parent_id.nil? %>
<% content = activity.content %>
<% else %>
<% content = activity.parent.content %>
<% end %>
<div class="item-bd">
<span class="fl"><%= content.to_s.html_safe %></span>
<% if activity.parent_id.nil? %>
<%= link_to "[查看全文]", board_message_url_in_org(activity.board.id,activity.id), :class => "read-more fl" %>
<% else %>
<%= link_to "[查看全文]", board_message_url_in_org(activity.board.id,activity.id), :class => "read-more fl" %>
<% end %>
</div>
<div class="item-btm clearfix">
<ul class="fl left-info">
<li class="hd-pic">
<%= link_to image_tag(url_to_avatar(activity.author),:width => "20", :height => "20"), user_path(activity.author), :class => "publisher-hd fl", :target => "_blank" %>
<a class="publisher-name fl" href="#" target="_blank">
<%= link_to activity.author.realname.nil? ? activity.author.login : activity.author.realname, user_path(activity.author), :class => "publisher-name fl", :target => "_blank" %>
</a>
</li>
<li class="pass-time"><span><%= format_date(activity.updated_on) %></span></li>
</ul>
<div class="fr right-info">
<span> <%= activity.children.count %></span>
</div>
</div>
</div>
<div class="cl"></div>
</div>

View File

@ -0,0 +1,77 @@
<% activities.each do |act| %>
<% if act.org_act_type == "Issue" %>
<% activity = Issue.find(act.org_act_id) %>
<li>
<a href="/#" title="">
<div class="course-list-img">
<% iamge_path = get_image_path_from_content(activity.description) %>
<% if iamge_path.nil? %>
<%= link_to image_tag("/images/org_new_style/default-img.jpg", :width => "370", :height => "220"), issue_url_in_org(activity.id), :target => "_blank" %>
<% else %>
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "370", :height => "220"), issue_url_in_org(activity.id), :target => "_blank" %>
<% end %>
</div>
<h5>
<%= link_to activity.subject.to_s, issue_url_in_org(activity.id), :target => '_blank' %>
</h5>
<div class="item-btm clearfix">
<%=link_to activity.try(:author).try(:realname).nil? ? activity.try(:author).try(:login) : activity.try(:author).try(:realname), user_path(activity.author), :class=>"publisher-name fl", :target => "_blank" %></a>
<p class="pass-time fl"><span><%= format_date activity.updated_on %></span></p>
<div class="fr right-info"> <span> <%= activity.journals.count %></span></div>
</div>
</a>
</li>
<% elsif act.org_act_type == "Message" %>
<% activity = Message.find(act.org_act_id) %>
<li>
<a href="/#" title="">
<div class="course-list-img">
<% iamge_path = get_image_path_from_content(activity.content) %>
<% if iamge_path.nil? %>
<%= link_to image_tag("/images/org_new_style/default-img.jpg", :width => "370", :height => "220"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank" %>
<% else %>
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "370", :height => "220"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank" %>
<% end %>
</div>
<h5>
<% 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' %>
<% else %>
<%= link_to activity.parent.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank' %>
<% end %>
</h5>
<div class="item-btm clearfix">
<%=link_to activity.try(:author).try(:realname).nil? ? activity.try(:author).try(:login) : activity.try(:author).try(:realname), user_path(activity.author), :class=>"publisher-name fl", :target => "_blank" %></a>
<p class="pass-time fl"><span><%= format_date activity.updated_on %></span></p>
<div class="fr right-info"> <span> <%= activity.children.count %></span></div>
</div>
</a>
</li>
<% elsif act.org_act_type == "News" %>
<% activity = News.find(act.org_act_id) %>
<li>
<a href="/#" title="">
<div class="course-list-img">
<% iamge_path = get_image_path_from_content(activity.description) %>
<% if iamge_path.nil? %>
<%= link_to image_tag("/images/org_new_style/default-img.jpg", :width => "370", :height => "220"), news_url_in_org(activity.id), :target => "_blank" %>
<% else %>
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "370", :height => "220"), news_url_in_org(activity.id), :target => "_blank" %>
<% end %>
</div>
<h5>
<%= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank' %>
</h5>
<div class="item-btm clearfix">
<%=link_to activity.try(:author).try(:realname).nil? ? activity.try(:author).try(:login) : activity.try(:author).try(:realname), user_path(activity.author), :class=>"publisher-name fl", :target => "_blank" %></a>
<p class="pass-time fl"><span><%= format_date activity.created_on %></span></p>
<div class="fr right-info"> <span> <%= activity.comments.count %></span></div>
</div>
</a>
</li>
<% end %>
<% end %>

View File

@ -0,0 +1,14 @@
<% org_attachs.each do |attach| %>
<div class="row-ziyuan fl">
<%= link_to image_tag(url_to_avatar(attach.author),:width => "40", :height => "40"), user_path(attach.author), :class => "fl user-img" %>
<!--<a href="#" class="fl user-img" ><img src="images/detailimg4.jpg" /></a>-->
<div class="ziyuan-box fl">
<%= link_to truncate(attach.filename,length: 35, omission: '...'),
download_named_attachment_path(attach.id, attach.filename),
:title => attach.filename+"\n"+attach.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis;", :class => "fl ziyuan-title" %>
<p class="fl"><span >上传时间:<%= format_date attach.created_on %></span><span>类型:<%= attach.tag_list[0] %></span><span> 下载次数:<%= attach.downloads%></span> <span>引用:<%= attach.quotes.nil? ? 0:attach.quotes %></span></p>
</div>
<%= link_to "下载", download_named_attachment_path(attach.id, attach.filename), :class => "download-btn fl" %>
<div class="cl"></div>
</div><!--row-ziyuan end-->
<% end %>

View File

@ -2,6 +2,7 @@
<li class="orgOrder fb">顺序</li>
<li class="orgListUser fb">已有栏目</li>
<li class="orgListStatus fb">状态</li>
<li class="orgListStatusList fb fb">排列</li>
<li class="orgListStatus fb">类型</li>
<li class="orgListUser fb">域名目录</li>
<div class="cl"></div>
@ -21,8 +22,23 @@
</li>
<li class="orgListUser"><%= name %></li>
<li class="orgListStatus">默认</li>
<li class="orgListStatusList">
<% if field.name == "activity" %>
默认
<% else %>
<%= form_tag({:controller => 'org_subfields', :action => 'update_status', :id => field.id,},:remote=>'true', :method => 'post', :id=>"update_status_form_#{field.id}", :class => 'query_form') do %>
<div class="update_status_class"><span class="hidden"><%=field.status== 1 ? "列表" : "图片" %></span>
<a style="display: inline-block;" href="javascript:void(0)" class="pic_edit2"></a>
</div>
<%= select( :name,:group_id, subfield_status_option,
{ :include_blank => false,:selected => field.status},
{:onchange=>"update_status('#update_status_form_#{field.id}');", :id =>"field_status_id", :name => "status",:class=>"undis class-edit fl", :style => "width:56px;"}) %>
<% end %>
<% end %>
</li>
<li class="orgListStatus">默认</li>
<a href="javascript:void(0);" class="linkBlue fr mr10" onclick="hide($(this),'<%= field.id %>');" id="hide_<%= field.id %>"><%= field.hide==0?"设为隐藏":"设为可见" %></a>
<a href="javascript:void(0);" class="linkBlue fr mr10" onclick="hide($(this),'<%= field.id %>');" id="hide_<%= field.id %>"><%= field.hide==0?"隐藏":"可见" %></a>
<div class="cl"></div>
</ul>
<% else %>
@ -42,6 +58,21 @@
</div>
</li>
<li class="orgListStatus">新增</li>
<li class="orgListStatusList">
<% if field.field_type == "Resource" %>
列表
<% else %>
<%= form_tag({:controller => 'org_subfields', :action => 'update_status', :id => field.id,},:remote=>'true', :method => 'post', :id=>"update_status_form_#{field.id}", :class => 'query_form') do %>
<div class="update_status_class"><span class="hidden"><%=field.status== 1 ? "列表" : "图片" %></span>
<a style="display: inline-block;" href="javascript:void(0)" class="pic_edit2"></a>
</div>
<%= select( :name,:group_id, subfield_status_option,
{ :include_blank => false,:selected => field.status},
{:onchange=>"update_status('#update_status_form_#{field.id}');", :id =>"field_status_id", :name => "status",:class=>"undis class-edit fl", :style => "width:56px;"}) %>
<% end %>
<% end %>
</li>
<li class="orgListStatus"><%= field.field_type == "Post" ? "帖子" : "资源" %></li>
<li class="orgListUser hidden">
<% if Secdomain.where("sub_type=2 and pid=?", @organization.id).count > 0 %>
@ -58,7 +89,7 @@
</div>
</li>
<%#= link_to "隐藏", hide_org_subfield_organizations_path(field), :method => 'post', :remote => true, :id => "hide_#{field.id}", :class => "linkBlue fr mr5" %>
<a href="javascript:void(0);" class="linkBlue fr mr10" onclick="hide($(this),'<%= field.id %>');" id="hide_<%= field.id %>"><%= field.hide==0?"设为隐藏":"设为可见" %></a>
<a href="javascript:void(0);" class="linkBlue fr mr10" onclick="hide($(this),'<%= field.id %>');" id="hide_<%= field.id %>"><%= field.hide==0?"隐藏":"可见" %></a>
<%= link_to "删除", org_subfield_path(field), :method => 'delete', :remote => true, :confirm => "您确定删除吗?", :class => "linkBlue fr mr10" %>
<a href="javascript:void(0);" class="linkBlue fr mr10" onclick="edit('#subfield_show_<%= field.id %>','#subfield_edit_<%= field.id %>');">编辑</a>
@ -68,6 +99,34 @@
<% end %>
<script>
$(document).ready(function(){
$(".pic_edit2").click(function(){
$(this).parent().hide();
$(this).parent().next().show();
});
$(".class-edit").blur(function(){
$(this).hide();
$(this).prev().show();
var editValue = $(this).children("option:selected").text();
$(this).prev().children(":first").text(editValue);
});
function stopPropagation(e) {
if (e.stopPropagation)
e.stopPropagation();
else
e.cancelBubble = true;
};
$(document).bind('click',function(){
$('.class-edit').css('display','none');
$('.update_status_class').show();
});
$('.class-edit,.pic_edit2').bind('click',function(e){
stopPropagation(e);
});
});
function update_status(id){
$(id).submit();
}
function edit(show_id, edit_id) {
$(show_id).toggle();
$(edit_id).toggle();
@ -146,7 +205,7 @@
$(edit_id).hide();
}
function hide(content, id){
if (content.text() == '设为隐藏')
if (content.text() == '隐藏')
$.ajax({
url: "/organizations/hide_org_subfield?org_subfield_id=" + id,
type: "post"

View File

@ -1,2 +1,2 @@
$("#hide_<%= @org_subfield.id %>").text("设为可见");
$("#hide_<%= @org_subfield.id %>").text("可见");
$("#org_subfield_<%= @org_subfield.id %>").css("display", "none");

View File

@ -72,13 +72,13 @@
<!--class="c_green f12" 您的申请已提交,系统会以消息的形式通知您结果 -->
</div>
<div class="cl"></div>
<!--<div class="orgRow mb10 mt5">-->
<!--<span style="margin-left:10px;" >显示模式&nbsp;: </span>-->
<!--<input type="radio" id="show_mode_ordinary" value="0" name="show_mode" style="margin-left:5px;" <%= @organization.show_mode == 0 ? "checked" : "" %> />-->
<!--<label for="show_mode_ordinary">社区模式一</label>-->
<!--<input type="radio" id="show_mode_special" value="1" name="show_mode" style="margin-left:10px;" <%= @organization.show_mode == 1 ? "checked" : "" %> />-->
<!--<label for="show_mode_special">社区模式二</label>-->
<!--</div>-->
<div class="orgRow mb10 mt5">
<span style="margin-left:10px;" >显示模式&nbsp;: </span>
<input type="radio" id="show_mode_ordinary" value="0" name="show_mode" style="margin-left:5px;" <%= @organization.show_mode == 0 ? "checked" : "" %> />
<label for="show_mode_ordinary">社区模式一</label>
<input type="radio" id="show_mode_special" value="1" name="show_mode" style="margin-left:10px;" <%= @organization.show_mode == 1 ? "checked" : "" %> />
<label for="show_mode_special">社区模式二</label>
</div>
<div class="orgRow mb10 mt5"><span style="margin-left:38px;" >公开&nbsp;: </span>
<input type="checkbox" id="is_public" onclick="disable_down($(this), $('#allow_download'),$('#allow_down_hint'));" name="organization[is_public]" <%= @organization.is_public ? 'checked': ''%> class="ml3" />
</div>

View File

@ -1,2 +1,2 @@
$("#hide_<%= @org_subfield.id %>").text("设为隐藏");
$("#hide_<%= @org_subfield.id %>").text("隐藏");
$("#org_subfield_<%= @org_subfield.id %>").css("display", "block");

View File

@ -65,7 +65,7 @@
<span class="w60 c_red">测试错误!</span>
<% end %>
<span class="w60">您的输出:</span>
<span class="width120"><pre style="white-space: pre-wrap; margin-right: 15px;"><%=x["result"]%> </pre></span>
<span class="width120"><pre style="white-space: pre-wrap; margin-right: 15px;"><%=x["result"].force_encoding("UTF-8")%> </pre></span>
<span class="w60">正确输出:</span>
<span class="width120"><pre style="white-space: pre-wrap; margin-right: 15px;"><%=x["output"]%></pre></span>

View File

@ -4,9 +4,9 @@
<p class="f14 mt5">
<span class="fb">作品名称:</span><%=@student_work.name%>
</p>
<div class="f14 mt5" style="max-width: 425px; color:#808181">
<div class="f14 mt5" style="max-width: 425px; color:#808181; max-height:300px; overflow: auto;">
<div class="fb fl dis">作品描述:</div>
<div class="upload_img fl" style="max-width: 350px;"><%=@student_work.description.html_safe %></div>
<div class="upload_img fl" style="max-width: 330px;"><%=@student_work.description.html_safe %></div>
<div class="cl"></div>
</div>
<p class="mt5">

View File

@ -4,9 +4,9 @@
<p class="f14 mt5">
<span class="fb">作品名称:</span><%=@student_work.name%>
</p>
<div class="f14 mt5" style="max-width: 425px; color:#808181">
<div class="f14 mt5" style="max-width: 425px; color:#808181; max-height:300px; overflow: auto;">
<div class="fb fl dis">作品描述:</div>
<div class="upload_img fl" style="max-width: 350px;"><%=@student_work.description.html_safe %></div>
<div class="upload_img fl" style="max-width: 330px;"><%=@student_work.description.html_safe %></div>
<div class="cl"></div>
</div>
<p class="mt5">

View File

@ -679,6 +679,7 @@ zh:
label_repository: 版本库
label_course_repository: 代码库
label_browse: 上传文件
label_browse_org: 上传图片
label_branch: 分支
label_tag: 标签
label_revision: 修订

View File

@ -46,6 +46,14 @@ RedmineApp::Application.routes.draw do
end
end
resources :organizations do
resource :files do
member do
end
collection do
end
end
resources :org_document_comments do
member do
@ -112,6 +120,7 @@ RedmineApp::Application.routes.draw do
member do
match 'update_sub_dir', :via => [:put]
match 'update_priority', :via => [:put]
match 'update_status', :via => [:post]
end
resource :boards
end

View File

@ -0,0 +1,5 @@
class AddStatusToOrgSubfields < ActiveRecord::Migration
def change
add_column :org_subfields, :status, :integer, :default => true
end
end

View File

@ -0,0 +1,19 @@
class DeleteAnonymousWork < ActiveRecord::Migration
def up
student_works = StudentWork.where("homework_common_id = 2882").map{|work| work.id} unless StudentWork.where("homework_common_id = 2882").empty?
student_work_ids = "(" + student_works.join(",") + ")"
student_work_scores = StudentWorksScore.where("student_work_id in #{student_work_ids}")
unless student_work_scores.empty?
student_work_scores.each do |sscore|
student_work = StudentWork.find sscore.student_work_id
student_work.student_score = 0 unless student_work.nil?
student_work.absence_penalty = 0
sscore.destroy
student_work.save
end
end
end
def down
end
end

View File

@ -11,7 +11,11 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20160329014316) do
<<<<<<< HEAD
ActiveRecord::Schema.define(:version => 20160331063938) do
=======
ActiveRecord::Schema.define(:version => 20160405021915) do
>>>>>>> c3ee4dadfb92c75e8649cad7e0ed57c2ec02ec00
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false
@ -1289,6 +1293,7 @@ ActiveRecord::Schema.define(:version => 20160329014316) do
t.datetime "updated_at", :null => false
t.string "field_type"
t.integer "hide", :default => 0
t.integer "status", :default => 1
end
create_table "organizations", :force => true do |t|
@ -1301,6 +1306,7 @@ ActiveRecord::Schema.define(:version => 20160329014316) do
t.datetime "updated_at", :null => false
t.boolean "allow_guest_download", :default => true
t.integer "visits", :default => 0
t.integer "show_mode", :default => 0
end
create_table "phone_app_versions", :force => true do |t|

View File

@ -168,7 +168,7 @@ module Redmine
if block_given?
yield text, parameters, options
else
if args[2][:path].nil?
if args[2].nil? || args[2][:path].nil?
link_to text, params.merge(parameters), options
else
page = "&page=" + parameters[:page].to_s unless parameters[:page].nil?

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="16px" height="16px" viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve">
<polygon fill="#FFFFFF" points="8,2.8 16,10.7 13.6,13.1 8.1,7.6 2.5,13.2 0,10.7 "/>
</svg>

After

Width:  |  Height:  |  Size: 555 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

View File

@ -18,12 +18,12 @@
.orgUrlInput {width:200px; outline:none; border:1px solid #eaeaea; height:22px;}
a.saveBtn {padding:3px 5px; background-color:#269ac9; color:#ffffff;}
a.saveBtn:hover {background-color:#297fb8;}
.orgMemberList {width:460px; float:left;}
.orgMemberList {width:480px; float:left;}
.orgListRow {border-bottom:1px solid #e4e4e4; padding-bottom:5px;}
.orgListUser {width:85px; float:left;}
.orgListRole {width:180px; float:left;}
.orgOrder {width:30px; float:left;margin-right:10px;text-align:center;}
.orgMemContainer {width:228px;}
.orgMemContainer {width:208px;}
.orgMemberAdd {float:right;}
.orgAddSearch {border:1px solid #dddddd; outline:none; width:180px; height:22px; color:#9b9b9b;}
.undis {display:none;}
@ -75,7 +75,8 @@ a.linkGrey8:hover {color:#585858;}
#orgUserName {display:inline-block;}
.org_login_list a {color:#269ac9;}
.orgListStatus {width:55px; float:left;}
.orgListStatus {width:40px; float:left;}
.orgListStatusList {width:58px; float:left;}
.personalUrl {border:1px solid #dddddd; width:75px; outline:none; white-space:nowrap; padding-left:2px;}
.reCon{ margin:5px; width:710px;}
.retop{width:710px; height:40px; background:#eaeaea; padding:5px;}

View File

@ -0,0 +1,276 @@
@charset "utf-8";
/* 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.5; background:#fff;}
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{color:#29156f;}
.fl{ float:left;}
.fr{ float:right;}
.cl{ clear:both;overflow:hidden;}
.mr40{ margin-right:40px;}
.mr30{ margin-right:30px;}
.mb20{ margin-bottom:20px;}
.mb70{ margin-bottom:70px;}
.bg-grey{ background:#f2f2f2;}
/** header **/
.header{ width:100%; height:60px; background:#29146f; padding:5px 0 0px; }
.header-con{ width:1200px; margin:0 auto;}
.logo,.logo img{ display:block; height:52px; }
a.login{ background:url(../images/org_new_style/icons.png) -7px -11px no-repeat; width:146px; height:55px; margin-right:40px; margin-top:11px;}
a:hover.login{ background:url(../images/org_new_style/icons.png) -7px -88px no-repeat; }
a.register{ background:url(../images/org_new_style/icons.png) -190px -11px no-repeat; width:158px; height:55px; ;margin-top:11px;}
a:hover.register{ background:url(../images/org_new_style/icons.png) -190px -88px no-repeat; }
.login{ margin-top:15px;}
.login a{ color:#fff; font-size:14px; margin-top:10px; }
/** nav **/
.nav-box{ width:1200px; height:60px; margin:0 auto;}
.nav a{ display:block; padding:15px 10px; font-size:18px; color:#000; margin-right:20px; }
.navact{border-bottom:3px solid #ffbd18;}
.nav a:hover{border-bottom:3px solid #ffbd18;}
.searchbox{ width:338px; height:57px; border:1px solid #ccc; -webkit-border-radius: 3px;border-radius: 3px; margin:10px 0px 0 0;}
.search-input{width:270px; height:40px; color:#bebebe; font-size:18px; border:1px solid #ccc; -webkit-border-radius: 3px;border-radius: 3px;border:0px; background:none; margin:10px 0 0 20px;}
.search-input:hover{ border:none;color:#fff; }
a.search-icon{ background:url(../images/org_new_style/icons.png) -387px -11px no-repeat; width:40px; height:40px; margin-top:8px;}
a:hover.search-icon{ background:url(../images/org_new_style/icons.png) -387px -89px no-repeat;}
.searchbox:hover{ background:#999999; color:#fff;}
/* banner */
.banner{ width:100%; height:234px; background:#070317 url(../images/org_new_style/banner.jpg) 0 0 no-repeat; color:#fff; text-align:center; padding-top:70px; line-height:2.4;}
.banner h2{ font-size:42px; }
.banner p{ font-size:18px;}
.banner span{ font-size:16px;}
/** box1 **/
.box1{ width:100%; padding:60px 0;}
.content{ width:1200px; margin:0 auto;}
.box-top{ margin:0 auto; text-align:center; margin-bottom:45px; }
.box-title{ width:355px; height:67px; margin:0 auto; background:#29156f; color:#fff; text-align:center; font-size:40px; font-weight: lighter; margin-bottom:2px;}
.box-title-p{ font-size:20px; color:#999999;}
.row{ width:1200px; margin: 0 auto; }
.row-box1{ width:365px;}
.row-img{ margin-bottom:10px; width:365px; height:230px; display:block;}
.row-time{ color:#ffbd18; font-size:14px; font-weight:bold; line-height:1.9;}
.row-title{ font-size:16px; font-weight:bold; line-height:1.9;display:block;white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.row-con { display:block; }
.row-con:hover{ color:#29156f; }
.row-txt{line-height:2.4; padding-bottom:10px; margin-bottom:10px; color:#888;}
.row-txt:hover{color:#29156f;}
.row-txt-line{border-bottom:1px solid #cccccc; width:365px;}
a.btn-more{ display:block; font-size:14px; width:110px; height:40px; -webkit-border-radius: 3px;border-radius: 3px;background:#ffbd18; color:#fff; text-align:center; line-height:3.0;}
a:hover.btn-more{ background:#29156f;}
.row-box2{ width:388px; border:1px solid #ccc; border-bottom:none;}
.row-con2 a{ display:block;padding:20px 10px; border-bottom:1px solid #ccc;}
.row-con2 a:hover{ background:#29156f; color:#fff;}
.row-con2 a:hover{ color:#fff;}
.row-txt2{line-height:2.4; color:#888;}
.row-txt2:hover{ color:#fff; }
/** 活动专区 **/
.con-left{ width:618px;}
.con-left-box{ margin-bottom:20px; height:96px; display:block;}
.con-left-img{ width:175px; height:96px;}
.con-left-txt{ width:360px; margin-left:15px; font-size:14px; color:#888; padding-top:8px; line-height:1.9; height:75px; overflow:hidden;text-overflow:ellipsis;display:-webkit-box;
-webkit-line-clamp:3;-webkit-box-orient:vertical;}
.con-left-txt:hover{color:#29156f;}
.con-left-pre{ margin-top:15px; }
a.con-back-btn{ display: block;width:25px;height:25px;background:url(../images/org_new_style/icons.png) no-repeat -38px -505px ;}
a.con-arrow-btn{ display: block;width:25px;height:25px;background:url(../images/org_new_style/icons.png) no-repeat -12px -505px ; opacity:.5;}
.con-right{ width:532px; height:170px; background:#f6f6f6 ; padding:25px;}
.con-right p{background: url(../images/org_new_style/con-right.gif) no-repeat 0 0;line-height:1.9; width:415px; padding:40px 0 0 20px; font-size:14px; color:#888; margin-left:20px;}
.con-r-img img{ border:3px solid #e6473b; -moz-border-radius: 50px; -webkit-border-radius: 50px;border-radius: 50px; display:block; width:67px; height:67px;}
.con-r-img img:hover{border:3px solid #29156f;}
.con-name{ font-size:18px; font-weight:bold; margin-top:5px;}
.con-r-img { text-align:center;}
.con-r-pre{ margin-top:20px;}
a.pre-arrow,a.pre-back{ display:block; width:25px; height:10px; background:#29156f; margin-left:5px;}
a.pre-back{ background:#888;}
/** footer **/
.footer{ height:150px; background:#29156f; width:100%;}
.footer-con{ width:1200px; padding:30px 0 0 60px; margin:0 auto; text-align:center; font-size:14px; color:#fff;}
.footer-con ul{ display:block; width:430px; height:50px; margin:0 auto; }
.footer-con ul li a{font-size:18px; color:#fff; margin-right:35px; font-weight:bold;}
/** download **/
.row-ziyuan{ width:570px; border-bottom:1px solid #e6e6e6; padding:15px 0;margin: 0px 15px;}
.ziyuan-box{ width:420px; margin-right:20px;}
.ziyuan-box span{ margin-right:5px;}
.ziyuan-title{ display:block; width:420px; font-size:16px;white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.ziyuan-box p{display:block; width:420px; color:#888; font-size:12px; line-height:2.5;}
a.download-btn{ display:block; border:1px solid #ccc; margin-top:10px; font-size:14px; width:70px; height:27px;-webkit-border-radius: 3px;border-radius:3px;color:#888; text-align:center; line-height:1.9;}
a:hover.download-btn{ background:#29146f; color:#fff; border:none;}
.user-img,.user-img img{ margin-right:10px; -moz-border-radius: 50px; -webkit-border-radius: 50px;border-radius: 50px; display:block; width:40px; height:40px;}
.ml60{ margin-left:60px;}
.user-img img{border:2px solid #e6473b; }
.user-img img:hover{border:2px solid #29156f;}
.article-lwrap{ width:760px; border-bottom:1px solid #E4E4E4; padding:10px 0;}
.item-txt{ width:555px;}
.item-img,.item-img img{ width:180px; height:120px;}
.item-title{ display:block; width:555px; font-size:18px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-bottom:5px;}
.item-bd{ width:555px; font-size:14px !important; color:#888; line-height:1.9; height:55px; overflow:hidden;text-overflow:ellipsis;display:-webkit-box;
-webkit-line-clamp:2;-webkit-box-orient:vertical; }
.item-bd:hover{color:#29156f;}
a.read-more{ color:red;}
a:hover.read-more{ text-decoration:underline;}
.publisher-hd,.publisher-hd img{ margin-right:10px; -moz-border-radius: 50px; -webkit-border-radius: 50px;border-radius: 50px; display:block; width:28px; height:28px;}
.left-info li,left-info li a{ float:left;}
.item-btm,.publisher-name,.pass-time{ margin-top:5px;}
.pass-time{ margin-left:20px; color:#888;}
.right-info{background:url(../images/org_new_style/icons.png) no-repeat -41px -541px ; width:15px; height:16px; padding-left:20px; color:#888; margin-top:5px;}
.nopic{ width:760px;}
.article-lwrap{ width:760px; border-bottom:1px solid #E4E4E4; padding:20px 0;}
.item-title-r{ display:block; width:400px; font-size:18px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.article-rwrap{ width:400px; border-bottom:1px dashed #E4E4E4; padding:12px 0;}
.course-list ul{ }
.course-list ul li{ display:block; width:370px; float:left; margin:0 15px;}
.course-list h5{display:block; width:380px; font-size:18px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.course-list-img,.course-list-img img{ width:370px; height:220px; margin-bottom:10px;}
/*用户图像*/
.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 a{color:#269ac9;}
.topnav_login_list li{ }
.homepageProfileMenuIcon {background:url(../images/nav_icon.png) 30px -155px no-repeat; width:65px; height:54px; position:relative; display:inline-block; line-height:0;}
.homepageLeft {width:240px; float:left; margin-right:10px; margin-bottom:10px;}
.none {display: none;}
/** backtop **/
.cd-top {
display: inline-block;
height: 60px;
width: 60px;
position: fixed;
bottom: 40px;
right: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
/* image replacement properties */
overflow: hidden;
text-indent: 100%;
white-space: nowrap;
background: rgba(108, 108, 108, 0.8) url(../images/org_new_style/cd-top-arrow.svg) no-repeat center 50%;
visibility: hidden;
opacity: 0;
-webkit-transition: all 0.3s;
-moz-transition: all 0.3s;
transition: all 0.3s;
}
.cd-top.cd-is-visible {
/* the button becomes visible */
visibility: visible;
opacity: 1;
}
.cd-top.cd-fade-out {
/* 如果用户继续向下滚动,这个按钮的透明度会变得更低 */
opacity: .5;
}
.no-touch .cd-top:hover {
background-color: #29156f;
opacity: 1;
}
a.more-btn{ display:block; background:#ccc; color:#fff; margin-top:10px; width:100px; height:38px;font-size:14px; -webkit-border-radius: 5px;border-radius:5px;text-align:center; line-height:38px;}
a.more-btn{ display:block; border:1px solid #ccc; color:#000; margin-top:10px; width:120px; height:38px;font-size:14px; -webkit-border-radius: 25px;border-radius:25px;text-align:center; line-height:38px; margin:0 auto; margin-top:30px;}
a.more-btn-center{ display:block; border:1px solid #ccc; color:#000; margin-top:10px; width:120px; height:38px;font-size:14px; -webkit-border-radius: 25px;border-radius:25px;text-align:center; line-height:38px; margin:0 auto; margin-top:30px;}
a:hover.more-btn{ background:#29146f; color:#fff;}
a:hover.more-btn-center{ background:#29146f; color:#fff;}
.mt30{ margin-top:30px;}
.nocontent{ font-size:30px; color:#888; margin:150px auto; text-align:center;}
/** 帖子列表模式 **/
.note-box{ width:515px; }
.note-box span{ margin-right:5px;}
.note-title{ display:block; width:515px; font-size:16px;white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.note-box p{display:block; width:515px; color:#888; font-size:12px; line-height:2.5;}
.right-info2{background:url(../images/org_new_style/icons.png) no-repeat -41px -540px ; width:15px; line-height:1.9; height:16px; padding-left:20px; color:#888; margin-top:5px;}
.upload_con h2 {
display: block;
background: #eaeaea;
font-size: 14px;
color: #343333;
height: 31px;
width: auto;
margin-top: 25px;
padding-left: 20px;
padding-top: 5px;
}
a.blue_btn {
background: #64bdd9;
color: #fff;
font-size: 14px;
font-weight: normal;
padding: 2px 8px;
text-align: center;
cursor: pointer;
}
a.grey_btn {
background: #d9d9d9;
color: #656565;
font-size: 14px;
font-weight: normal;
text-align: center;
margin-left: 10px;
margin-bottom: 10px;
padding: 2px 10px;
}
span.add_attachment {
font-size: 80%;
line-height: 2.5em;
}
.c_dark {
color: #2d2d2d;
}
.upload_filename {
background: url(../images/pic_file.png) 0 -20px no-repeat;
color: #7f7f7f;
width: 270px;
border: none;
padding-left: 20px;
margin-right: 10px;
margin-bottom: 5px;
white-space: nowrap;
text-overflow: ellipsis;
}
.profiler-results.profiler-left {
left: 0px;
}
.profiler-results {
z-index: 2147483643;
position: fixed;
top: 0px;
}
.filename { background: url(../images/pic_file.png) 0 -25px no-repeat;color: #3ca5c6;max-width: 150px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;}
.ajax-waiting input.upload_filename {background:url(../images/hourglass.png) no-repeat 0px 50%;}
.ajax-loading input.upload_filename {background:url(../images/loading.gif) no-repeat 0px 50%;}
div.ui-progressbar { width: 100px; height:14px; margin: 2px 0 -5px 8px; display: inline-block; }
.upload_filename{ background: url(../images/pic_file.png) 0 -20px no-repeat;color: #7f7f7f;width: 270px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;}
.evaluation{position: relative;}
.evaluation_submit{position: absolute;right: 0px;bottom: 0px;}
.student_work_search{background-color: #64bdd9;color: white !important;padding: 2px 7px;margin-left: 10px;cursor: pointer; }