diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb
index 20ae191ab..900487364 100644
--- a/app/controllers/attachments_controller.rb
+++ b/app/controllers/attachments_controller.rb
@@ -62,6 +62,18 @@ class AttachmentsController < ApplicationController
end
end
+ #更新资源文件类型
+ def updateType
+ @attachment = Attachment.find(params[:attachmentid])
+ if @attachment != nil
+ @attachment.attachtype = params[:newtype]
+ @attachment.save
+ render :text =>'success'
+ else
+ render :text=>'error'
+ end
+ end
+
def thumbnail
if @attachment.thumbnailable? && thumbnail = @attachment.thumbnail(:size => params[:size])
if stale?(:etag => thumbnail)
diff --git a/app/controllers/bids_controller.rb b/app/controllers/bids_controller.rb
index b4309bf17..868e3edac 100644
--- a/app/controllers/bids_controller.rb
+++ b/app/controllers/bids_controller.rb
@@ -718,13 +718,14 @@ class BidsController < ApplicationController
def update
@bid = Bid.find(params[:id])
+ @project = @bid.courses.first#Project.find(params[:course_id])
if @bid.update_attributes(params[:bid])
flash[:notice] = l(:label_update_homework_succeed)
- @project = Project.find(params[:course_id])
+ #@project = Project.find(params[:course_id])
redirect_to project_homework_path(@project)
else
@bid.safe_attributes = params[:bid]
- render :action => 'edit'
+ render :action => 'edit', :layout =>'base_courses'
end
end
diff --git a/app/controllers/files_controller.rb b/app/controllers/files_controller.rb
index 86a20d3eb..a2dd8c869 100644
--- a/app/controllers/files_controller.rb
+++ b/app/controllers/files_controller.rb
@@ -19,8 +19,8 @@ class FilesController < ApplicationController
layout 'base_projects'#by young
menu_item :files
- before_filter :find_project_by_project_id
- before_filter :authorize
+ before_filter :find_project_by_project_id#, :except => [:getattachtype]
+ before_filter :authorize, :except => [:getattachtype]
helper :sort
include SortHelper
@@ -53,7 +53,7 @@ class FilesController < ApplicationController
def create
container = (params[:version_id].blank? ? @project : @project.versions.find_by_id(params[:version_id]))
- attachments = Attachment.attach_files(container, params[:attachments])
+ attachments = Attachment.attach_filesex(container, params[:attachments],params[:attachment_type])
render_attachment_warning_if_needed(container)
if !attachments.empty? && !attachments[:files].blank? && Setting.notified_events.include?('file_added')
@@ -61,4 +61,23 @@ class FilesController < ApplicationController
end
redirect_to project_files_path(@project)
end
+
+ # 返回制定资源类型的资源列表
+ def getattachtype
+ 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 = [ Project.includes(:attachments).reorder("#{Attachment.table_name}.created_on DESC").find(@project.id)] #modify by Long Jun
+ @containers += @project.versions.includes(:attachments).reorder("#{Attachment.table_name}.created_on DESC").all.sort
+
+ @attachtype = params[:type].to_i
+ @contenttype = params[:contentType].to_s
+
+ respond_to do |format|
+ format.js
+ end
+ end
end
diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rb
index 1baf5d62c..150071b41 100644
--- a/app/controllers/messages_controller.rb
+++ b/app/controllers/messages_controller.rb
@@ -43,7 +43,7 @@ class MessagesController < ApplicationController
@reply_pages = Paginator.new @reply_count, REPLIES_PER_PAGE, page
@replies = @topic.children.
includes(:author, :attachments, {:board => :project}).
- reorder("#{Message.table_name}.created_on ASC").
+ reorder("#{Message.table_name}.created_on DESC").
limit(@reply_pages.per_page).
offset(@reply_pages.offset).
all
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index d26cf698e..01021cb57 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -198,7 +198,7 @@ class ProjectsController < ApplicationController
@project_type = params[:project_type]
@school_id = params[:school_id]
per_page_option = 10
- if @school_id == "0" or @school.nil?
+ if @school_id == "0" or @school_id.nil?
@projects_all = Project.active.visible.
joins("LEFT JOIN #{ProjectStatus.table_name} ON #{Project.table_name}.id = #{ProjectStatus.table_name}.project_id").
where("#{Project.table_name}.project_type = ? ", Project::ProjectType_course)
@@ -295,8 +295,12 @@ class ProjectsController < ApplicationController
project_type = params[:project_type].to_i
projects_all = (project_type.eql? Project::ProjectType_course) ? Project.course_entities : Project.project_entities
@projects = projects_all.visible
- @projects_all = @projects.visible.like(params[:name]) if params[:name].present?
-
+ #@projects_all = @projects.visible.like(params[:name]) if params[:name].present?
+ if params[:name].present?
+ @projects_all = @projects.visible.like(params[:name])
+ else
+ @projects_all = @projects;
+ end
@project_count = @projects_all.count
@project_pages = Paginator.new @project_count, per_page_option, params['page']
diff --git a/app/controllers/school_controller.rb b/app/controllers/school_controller.rb
index 00faa51c5..fdcdb8e8a 100644
--- a/app/controllers/school_controller.rb
+++ b/app/controllers/school_controller.rb
@@ -23,10 +23,15 @@ class SchoolController < ApplicationController
end
end
-
+
def upload_logo
end
+
+ #获取制定学校开设的课程数
+ def course_count school_id
+ School.find(school_id).courses.count
+ end
def index
@@ -74,7 +79,7 @@ class SchoolController < ApplicationController
render :text => options
end
-
+
def get_schoollist
@school = School.where("province = ?", params[:province])
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index dff26ce19..9a21e26f2 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -549,6 +549,14 @@ class UsersController < ApplicationController
format.api { render_validation_errors(@user) }
end
end
+
+ unless @user.id.nil?
+ #后台注册的用户默认权限为男性开发员
+ ue = UserExtensions.create(:identity => 3,
+ :gender => 0,
+ :user_id => @user.id)
+ ue.save
+ end
end
def edit
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index aeacae866..6b8525a00 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -390,6 +390,16 @@ module ApplicationHelper
s.html_safe
end
+ #扩展的checkbox生成
+ def principals_check_box_tags_ex(name, principals)
+ s = ''
+ principals.each do |principal|
+ s << "#{ check_box_tag name, principal.id, false, :id => nil } #{h principal.userInfo } \n"
+ end
+ s.html_safe
+ end
+
+
# Returns a string for users/groups option tags
def principals_options_for_select(collection, selected=nil)
s = ''
diff --git a/app/helpers/attachments_helper.rb b/app/helpers/attachments_helper.rb
index 7259e9d10..aa6a5f7f5 100644
--- a/app/helpers/attachments_helper.rb
+++ b/app/helpers/attachments_helper.rb
@@ -38,7 +38,7 @@ module AttachmentsHelper
else
false
end
-
+
end
def render_api_attachment(attachment, api)
diff --git a/app/helpers/courses_helper.rb b/app/helpers/courses_helper.rb
index d474b5587..35a907ecc 100644
--- a/app/helpers/courses_helper.rb
+++ b/app/helpers/courses_helper.rb
@@ -108,5 +108,7 @@ module CoursesHelper
now > cTime
end
-
+ def find_by_extra_from_project extra
+ Course.find_by_extra(try(extra))
+ end
end
diff --git a/app/helpers/files_helper.rb b/app/helpers/files_helper.rb
index f58896434..052aae468 100644
--- a/app/helpers/files_helper.rb
+++ b/app/helpers/files_helper.rb
@@ -44,4 +44,23 @@ module FilesHelper
File.new(zipfile_name,'w+')
end
+ # 判断指定的资源时候符合类型
+ def isTypeOk(attachment, type, contentType)
+ result = false
+ if type != 0
+ if attachment.attachtype == type
+ result = true
+ end
+ else
+ result = true
+ end
+ if result
+ if contentType != '0' && contentType != attachment.suffix_type
+ result = false
+ end
+ end
+ result
+ end
+
+
end
\ No newline at end of file
diff --git a/app/helpers/members_helper.rb b/app/helpers/members_helper.rb
index 915e02627..75676f475 100644
--- a/app/helpers/members_helper.rb
+++ b/app/helpers/members_helper.rb
@@ -24,7 +24,7 @@ module MembersHelper
principal_pages = Redmine::Pagination::Paginator.new principal_count, 10, params['page'] #by young
principals = scope.offset(principal_pages.offset).limit(principal_pages.per_page).all
- s = content_tag('div', principals_check_box_tags('membership[user_ids][]', principals), :id => 'principals')
+ s = content_tag('div', principals_check_box_tags_ex('membership[user_ids][]', principals), :id => 'principals')
links = pagination_links_full(principal_pages, principal_count, :per_page_links => false) {|text, parameters, options|
link_to text, autocomplete_project_memberships_path(project, parameters.merge(:q => params[:q], :format => 'js')), :remote => true
diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb
index 5bd677bdf..a42a626dc 100644
--- a/app/helpers/projects_helper.rb
+++ b/app/helpers/projects_helper.rb
@@ -32,7 +32,7 @@ module ProjectsHelper
{:name => 'categories', :action => :manage_categories, :partial => 'projects/settings/issue_categories', :label => :label_issue_category_plural},
# {:name => 'wiki', :action => :manage_wiki, :partial => 'projects/settings/wiki', :label => :label_wiki},
{:name => 'repositories', :action => :manage_repository, :partial => 'projects/settings/repositories', :label => :label_repository_plural},
- {:name => 'boards', :action => :manage_boards, :partial => 'projects/settings/boards', :label => :label_board_plural},
+ #{:name => 'boards', :action => :manage_boards, :partial => 'projects/settings/boards', :label => :label_board_plural},
{:name => 'activities', :action => :manage_project_activities, :partial => 'projects/settings/activities', :label => :enumeration_activities}
]
tabs.select {|tab| User.current.allowed_to?(tab[:action], @project)}
@@ -62,33 +62,33 @@ module ProjectsHelper
content_tag('div', content, :class => "tabs_enterprise")
end
- def sort_course(state, project_type)
+ def sort_course(state, project_type, school_id)
content = ''.html_safe
case state
when 0
- content << content_tag('li', link_to(l(:label_sort_by_time), course_path(:project_sort_type => '0', :project_type => project_type), :class=>"selected"), :class=>"selected")
- content << content_tag('li', link_to(l(:label_sort_by_active), course_path(:project_sort_type => '1', :project_type => project_type)))
+ content << content_tag('li', link_to(l(:label_sort_by_time), course_path(:project_sort_type => '0', :project_type => project_type), :school_id => school_id, :class=>"selected"), :class=>"selected")
+ content << content_tag('li', link_to(l(:label_sort_by_active), course_path(:project_sort_type => '1', :project_type => project_type, :school_id => school_id)))
# content << content_tag('li', link_to(l(:label_sort_by_influence), course_path(:project_sort_type => '2', :project_type => project_type)))
- content << content_tag('li', link_to(l(:label_sort_by_activity), course_path(:project_sort_type => '3', :project_type => project_type)))
+ content << content_tag('li', link_to(l(:label_sort_by_activity), course_path(:project_sort_type => '3', :project_type => project_type, :school_id => school_id)))
when 1
- content << content_tag('li', link_to(l(:label_sort_by_time), course_path(:project_sort_type => '0', :project_type => project_type)))
- content << content_tag('li', link_to(l(:label_sort_by_active), course_path(:project_sort_type => '1', :project_type => project_type), :class=>"selected"), :class=>"selected")
+ content << content_tag('li', link_to(l(:label_sort_by_time), course_path(:project_sort_type => '0', :project_type => project_type, :school_id => school_id)))
+ content << content_tag('li', link_to(l(:label_sort_by_active), course_path(:project_sort_type => '1', :project_type => project_type, :school_id => school_id), :class=>"selected"), :class=>"selected")
# content << content_tag('li', link_to(l(:label_sort_by_influence), course_path(:project_sort_type => '2', :project_type => project_type)))
- content << content_tag('li', link_to(l(:label_sort_by_activity), course_path(:project_sort_type => '3', :project_type => project_type)))
+ content << content_tag('li', link_to(l(:label_sort_by_activity), course_path(:project_sort_type => '3', :project_type => project_type, :school_id => school_id)))
when 2
- content << content_tag('li', link_to(l(:label_sort_by_time), course_path(:project_sort_type => '0', :project_type => project_type)))
- content << content_tag('li', link_to(l(:label_sort_by_active), course_path(:project_sort_type => '1', :project_type => project_type)))
+ content << content_tag('li', link_to(l(:label_sort_by_time), course_path(:project_sort_type => '0', :project_type => project_type, :school_id => school_id)))
+ content << content_tag('li', link_to(l(:label_sort_by_active), course_path(:project_sort_type => '1', :project_type => project_type, :school_id => school_id)))
# content << content_tag('li', link_to(l(:label_sort_by_influence), course_path(:project_sort_type => '2', :project_type => project_type), :class=>"selected"), :class=>"selected")
- content << content_tag('li', link_to(l(:label_sort_by_activity), course_path(:project_sort_type => '3', :project_type => project_type)))
+ content << content_tag('li', link_to(l(:label_sort_by_activity), course_path(:project_sort_type => '3', :project_type => project_type, :school_id => school_id)))
#gcm
when 3
- content << content_tag('li', link_to(l(:label_sort_by_time), course_path(:project_sort_type => '0', :project_type => project_type)))
- content << content_tag('li', link_to(l(:label_sort_by_active), course_path(:project_sort_type => '1', :project_type => project_type)))
+ content << content_tag('li', link_to(l(:label_sort_by_time), course_path(:project_sort_type => '0', :project_type => project_type, :school_id => school_id)))
+ content << content_tag('li', link_to(l(:label_sort_by_active), course_path(:project_sort_type => '1', :project_type => project_type, :school_id => school_id)))
# content << content_tag('li', link_to(l(:label_sort_by_influence), course_path(:project_sort_type => '2', :project_type => project_type)))
- content << content_tag('li', link_to(l(:label_sort_by_activity), course_path(:project_sort_type => '3', :project_type => project_type), :class=>"selected"), :class=>"selected")
+ content << content_tag('li', link_to(l(:label_sort_by_activity), course_path(:project_sort_type => '3', :project_type => project_type, :school_id => school_id), :class=>"selected"), :class=>"selected")
end
#gcmend
@@ -145,7 +145,7 @@ module ProjectsHelper
#Added by young
def course_settings_tabs
tabs = [{:name => 'info', :action => :edit_project, :partial => 'projects/edit', :label => :label_information_plural, :course=>'1'},
- {:name => 'boards', :action => :manage_boards, :partial => 'projects/settings/boards', :label => :label_board_plural, :project_type => 1},
+ #{:name => 'boards', :action => :manage_boards, :partial => 'projects/settings/boards', :label => :label_board_plural, :project_type => 1},
# {:name => 'repositories', :action => :manage_repository, :partial => 'projects/settings/repositories', :label => :label_repository_plural},
{:name => 'members', :action => :manage_members, :partial => 'projects/settings/members', :label => :label_member_plural}
]
diff --git a/app/helpers/welcome_helper.rb b/app/helpers/welcome_helper.rb
index 53869b9ed..e05f789a9 100644
--- a/app/helpers/welcome_helper.rb
+++ b/app/helpers/welcome_helper.rb
@@ -105,7 +105,31 @@ module WelcomeHelper
# c2 = c2 - c1
# (c1.take(max)+c2).take(sum)
end
-
+
+ #查找所有学校按每个学校开设课程数量降序排序
+ #page 分页查询开始条数的编号,从0开始
+ #limit 分页查询的数量
+ def find_maxmin_course_school page,limit
+ School.find_by_sql("SELECT *,(SELECT COUNT(*) FROM courses WHERE school_id = schools.id) AS a
+ FROM schools
+ ORDER BY a DESC LIMIT #{page},#{limit}")
+ #School.where(" id IN (SELECT school_id FROM courses GROUP BY school_id)").limit limit;
+ #School.order("#{School.course_count}").limit(limit).all
+ #@school = School.all.sort
+ #@school.each do |s|
+ # s.courses.count
+ #end
+ #result = []
+ #@school = School.all.to_ary
+ #i = 1
+ #for i in i < School.count
+ # j = i - 1
+ # for j in j > 0
+ # if @school[j].courses.count >
+ # end
+ #end
+ end
+
def find_miracle_project(sum, max_rate)
max = sum*(max_rate.to_f/10)
c1 = find_new_project(sum).to_a.dup
@@ -130,6 +154,12 @@ module WelcomeHelper
sort_course_by_hot limit
end
+ def find_all_new_hot_course limit = 9
+ #sort_project_by_hot_rails 1, 'course_ac_para DESC', limit
+ time_now = Time.new.strftime("%Y");
+ Project.visible.joins(:project_status).where("#{Project.table_name}.project_type = ? and #{Project.table_name}.created_on like '%#{time_now}%'", 1).order("course_ac_para DESC").limit(limit).all
+ end
+
def find_all_hot_bid
sort_bid_by_hot
end
diff --git a/app/models/attachment.rb b/app/models/attachment.rb
index 73ae44b4d..661762e5c 100644
--- a/app/models/attachment.rb
+++ b/app/models/attachment.rb
@@ -23,6 +23,7 @@ class Attachment < ActiveRecord::Base
belongs_to :project, foreign_key: 'container_id', conditions: "attachments.container_type = 'Project'"
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"
validates_presence_of :filename, :author
validates_length_of :filename, :maximum => 255
@@ -65,6 +66,30 @@ class Attachment < ActiveRecord::Base
copy
end
+ #获取资源的后缀类型
+ def suffix_type
+ childArr = self.filename.split('.')
+ suffix = '*'
+ if childArr.length > 1
+ suffix = childArr[childArr.length-1]
+ end
+ suffix
+ end
+
+ #获取用来显示的后缀名称
+ def show_suffix_type
+ suffix = 'other'
+ temp = self.suffix_type.downcase
+ if self.attachmentstype.suffixArr.include?(temp)
+ suffix = temp
+ end
+ suffix
+ end
+
+ def suffixArr
+ @@SuffixArr
+ end
+
def validate_max_file_size
if @temp_file && self.filesize > Setting.attachment_max_size.to_i.kilobytes
errors.add(:base, l(:error_attachment_too_big, :max_size => Setting.attachment_max_size.to_i.kilobytes))
@@ -260,6 +285,13 @@ class Attachment < ActiveRecord::Base
result
end
+
+ def self.attach_filesex(obj, attachments,attachment_type)
+ result = obj.save_attachmentsex(attachments, User.current,attachment_type)
+ obj.attach_saved_attachments
+ result
+ end
+
def self.latest_attach(attachments, filename)
attachments.sort_by(&:created_on).reverse.detect {
|att| att.filename.downcase == filename.downcase
diff --git a/app/models/attachmentstype.rb b/app/models/attachmentstype.rb
new file mode 100644
index 000000000..6a37cc51f
--- /dev/null
+++ b/app/models/attachmentstype.rb
@@ -0,0 +1,11 @@
+class Attachmentstype < ActiveRecord::Base
+ attr_accessible :typeId, :typeName
+ has_many :attachments, :foreign_key => "attachtype",:primary_key => "id"
+
+ # 当前使用的文件内容分类列表
+ @@SuffixArr = ['pdf','zip','doc','docx','rar','txt','jpg','bmp','xls','xlsx']
+
+ def suffixArr
+ @@SuffixArr
+ end
+end
diff --git a/app/models/course.rb b/app/models/course.rb
index d2f1abfef..0420b1744 100644
--- a/app/models/course.rb
+++ b/app/models/course.rb
@@ -7,6 +7,7 @@ class Course < ActiveRecord::Base
belongs_to :school, :class_name => 'School', :foreign_key => :school_id #定义一个方法school,该方法通过school_id来调用School表
has_many :bid
validates_presence_of :password, :term
+ validates_format_of :class_period, :message => "class period can only digital!", :with =>/^[1-9]\d*$/
safe_attributes 'extra',
'time',
'name',
@@ -17,7 +18,14 @@ class Course < ActiveRecord::Base
'password',
'term',
'password'
-
+
+ #自定义验证
+ def validate
+ if !class_period.match([0-9])
+ errors.add_to_base("class period can only digital")
+ end
+ end
+
def get_endup_time
begin
end_time = Time.parse(self.endup_time)
@@ -39,5 +47,4 @@ class Course < ActiveRecord::Base
return time
end
end
-
end
diff --git a/app/models/mailer.rb b/app/models/mailer.rb
index d8e3d29bd..e5ede6285 100644
--- a/app/models/mailer.rb
+++ b/app/models/mailer.rb
@@ -63,7 +63,7 @@ class Mailer < ActionMailer::Base
# Mailer.issue_add(issue).deliver => sends an email to issue recipients
def issue_add(issue)
redmine_headers 'Project' => issue.project.identifier,
- 'Issue-Id' => issue.id,
+ 'Issue-Id' => (issue.project.issues.index(issue).to_i + 1).to_s,
'Issue-Author' => issue.author.login
redmine_headers 'Issue-Assignee' => issue.assigned_to.login if issue.assigned_to
message_id issue
@@ -85,7 +85,7 @@ class Mailer < ActionMailer::Base
def issue_edit(journal)
issue = journal.journalized.reload
redmine_headers 'Project' => issue.project.identifier,
- 'Issue-Id' => issue.id,
+ 'Issue-Id' => (issue.project.issues.index(issue).to_i + 1).to_s,
'Issue-Author' => issue.author.login
redmine_headers 'Issue-Assignee' => issue.assigned_to.login if issue.assigned_to
message_id journal
diff --git a/app/models/project.rb b/app/models/project.rb
index e0cc27b3b..3c2956a94 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -38,8 +38,7 @@ class Project < ActiveRecord::Base
:conditions => "#{Principal.table_name}.type='Group' OR (#{Principal.table_name}.type='User' AND #{Principal.table_name}.status=#{Principal::STATUS_ACTIVE})"
has_many :users, :through => :members
has_many :principals, :through => :member_principals, :source => :principal
-
- has_many :enabled_modules, :dependent => :delete_all
+ has_many :enabled_modules, :dependent => :delete_all
has_and_belongs_to_many :trackers, :order => "#{Tracker.table_name}.position"
has_many :issues, :dependent => :destroy, :include => [:status, :tracker]
has_many :issue_changes, :through => :issues, :source => :journals
@@ -159,8 +158,27 @@ class Project < ActiveRecord::Base
def new_course
self.where('project_type = ?', 1)
end
-
-
+
+ # 获取项目的资源类型列表
+ def attachmenttypes
+ @attachmenttypes = Attachmentstype.find(:all, :conditions => ["#{Attachmentstype.table_name}.typeId= ?",self.attachmenttype ])
+ end
+
+ # 获取资源后缀名列表
+ def contenttypes
+ attachmenttypes
+ if @attachmenttypes.length >0
+ @attachmenttypes.last().suffixArr
+ end
+ end
+
+ #自定义验证
+ def validation
+ if !class_period.match([0-9])
+ errors.add_to_base("class period can only digital")
+ end
+ end
+
# 项目留言 added by fq
def self.add_jour(user, notes)
project = Project.find('trustie')
@@ -726,7 +744,8 @@ class Project < ActiveRecord::Base
'custom_fields',
'tracker_ids',
'issue_custom_field_ids',
- 'project_type'
+ 'project_type',
+ 'attachmenttype'
diff --git a/app/models/user.rb b/app/models/user.rb
index 20624888a..d16d790d2 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -190,7 +190,11 @@ class User < Principal
where(" LOWER(concat(lastname, firstname)) LIKE :p ", :p => pattern)
end
}
-
+
+ #选择项目成员时显示的用户信息文字
+ def userInfo
+ info=self.name + ' (' + self.login + ')';
+ end
###添加留言 fq
def add_jour(user, notes, reference_user_id = 0, options = {})
diff --git a/app/views/attachments/_type_edit.html.erb b/app/views/attachments/_type_edit.html.erb
new file mode 100644
index 000000000..5d9278823
--- /dev/null
+++ b/app/views/attachments/_type_edit.html.erb
@@ -0,0 +1,14 @@
+<% edit_allowed = User.current.allowed_to?(:manage_files, @project) %>
+<% if attachmenttypes.any? %>
+
+ <%= select_tag "attachment_type",
+ options_from_collection_for_select(attachmenttypes, "id",
+ "typeName",attachment.attachtype), :onchange=>"attachmenttypes_change("+attachment.id.to_s + ",this.value)"%>
+
+ <%= link_to(image_tag('edit/edit.png'), 'javascript:void(0);',:style=>"white-space:nowrap;", :id=>"edit_box"+attachment.id.to_s ,
+ :onclick =>"$('#put-tag-form-" +attachment.id.to_s+ "').show();
+ $('#attach_type_id_label" +attachment.id.to_s+ "').hide();
+ $('#edit_box" +attachment.id.to_s+ "').hide();") if edit_allowed %>
+
+<% end %>
+
diff --git a/app/views/bids/_bid_homework_show.html.erb b/app/views/bids/_bid_homework_show.html.erb
index 7c8e1468c..9237b2aa8 100644
--- a/app/views/bids/_bid_homework_show.html.erb
+++ b/app/views/bids/_bid_homework_show.html.erb
@@ -13,9 +13,11 @@
diff --git a/app/views/files/_new.html.erb b/app/views/files/_new.html.erb
index ac5dce466..4c1b97fa1 100644
--- a/app/views/files/_new.html.erb
+++ b/app/views/files/_new.html.erb
@@ -1,5 +1,6 @@
<%=l(:label_attachment_new)%>
<% versions = project.versions.sort %>
+<% attachmenttypes = project.attachmenttypes %>
<%= error_messages_for 'attachment' %>
<%= form_tag(project_files_path(project), :multipart => true, :class => "tabular") do %>
@@ -10,6 +11,14 @@
options_from_collection_for_select(versions, "id", "name") %>
<% end %>
+ <% if attachmenttypes.any? %>
+
<%=l(:attachment_type)%>
+ <%= select_tag "attachment_type",
+ options_from_collection_for_select(attachmenttypes, "id",
+ "typeName") %>
+
+ <% end %>
+
<%=l(:label_attachment_plural)%> <%= render :partial => 'attachments/form' %>
<%= submit_tag l(:button_add) %>
diff --git a/app/views/files/_show_all_attachment.html.erb b/app/views/files/_show_all_attachment.html.erb
new file mode 100644
index 000000000..07dc6a27f
--- /dev/null
+++ b/app/views/files/_show_all_attachment.html.erb
@@ -0,0 +1,72 @@
+<% selAttachType =@attachtype %>
+<% selContentType =@contenttype %>
+<% attachmenttypes = @project.attachmenttypes %>
+<% delete_allowed = User.current.allowed_to?(:manage_files, @project) %>
+<% edit_allowed = User.current.allowed_to?(:manage_files, @project) %>
+
+
+
+
+
+
+
+
+
+
+ <%= sort_header_tag('filename', :caption => l(:field_filename), :scope => "col", :id => "vzebra-adventure") %>
+ <%#= sort_header_tag('created_on', :caption => l(:label_date), :default_order => 'desc', :scope => "col", :id => "vzebra-comedy") %>
+ <%= sort_header_tag('size', :caption => l(:field_filesize), :default_order => 'desc', :scope => "col", :id => "vzebra-children") %>
+ <%= sort_header_tag('attach_type', :caption => l(:attachment_browse), :default_order => 'desc', :scope => "col", :id => "vzebra-attachmenttype") %>
+ <%= sort_header_tag('content_type', :caption => l(:attachment_sufix_browse), :default_order => 'desc', :scope => "col", :id => "vzebra-contenttype") %>
+ <%= sort_header_tag('downloads', :caption => l(:field_downloads), :default_order => 'desc', :scope => "col", :id => "vzebra-action") %>
+ <%= sort_header_tag('operation', :caption => "", :scope => "col", :id => "vzebra-children") %>
+
+
+
+
+ <% @containers.each do |container| %>
+ <% next if container.attachments.empty? -%>
+ <% if container.is_a?(Version) -%>
+
+
+ <%= link_to(h(container), {:controller => 'versions', :action => 'show', :id => container}, :class => "icon icon-package", :style => "color: #666666;") %>
+
+
+ <% end -%>
+ <% container.attachments.each do |file| %>
+ ">
+ <%= link_to_attachment file, :download => true, :title => file.filename+"\n"+file.description.to_s, :style => "width: 230px; overflow: hidden; white-space: nowrap;text-overflow: ellipsis;" %>
+
+ <%= number_to_human_size(file.filesize) %>
+
+ <%= file.attachmentstype.typeName %>
+
+ <%= render :partial => 'attachments/type_edit', :locals => {:attachmenttypes => attachmenttypes, :attachment => file, :contentype => selContentType} %>
+
+
+ <%= file.show_suffix_type %>
+ <%= file.downloads %>
+
+
+ <%= link_to(image_tag('delete.png'), attachment_path(file),
+ :data => {:confirm => l(:text_are_you_sure)}, :method => :delete) if delete_allowed %>
+
+
+
+
+
+
+
+
+ <% end -%>
+ <% reset_cycle %>
+ <% end -%>
+
+
+
+
+
diff --git a/app/views/files/_sort_by_attachtypel.html.erb b/app/views/files/_sort_by_attachtypel.html.erb
new file mode 100644
index 000000000..01c57c490
--- /dev/null
+++ b/app/views/files/_sort_by_attachtypel.html.erb
@@ -0,0 +1,71 @@
+<% selAttachType =@attachtype %>
+<% selContentType =@contenttype %>
+<% attachmenttypes = @project.attachmenttypes %>
+<% delete_allowed = User.current.allowed_to?(:manage_files, @project) %>
+<% edit_allowed = User.current.allowed_to?(:manage_files, @project) %>
+
+
+
+
+
+
+
+
+
+
+ <%= sort_header_tag('filename', :caption => l(:field_filename), :scope => "col", :id => "vzebra-adventure") %>
+ <%#= sort_header_tag('created_on', :caption => l(:label_date), :default_order => 'desc', :scope => "col", :id => "vzebra-comedy") %>
+ <%= sort_header_tag('size', :caption => l(:field_filesize), :default_order => 'desc', :scope => "col", :id => "vzebra-children") %>
+ <%= sort_header_tag('attach_type', :caption => l(:attachment_browse), :default_order => 'desc', :scope => "col", :id => "vzebra-attachmenttype") %>
+ <%= sort_header_tag('content_type', :caption => l(:attachment_sufix_browse), :default_order => 'desc', :scope =>"col", :id=> "vzebra-contenttype")%>
+ <%= sort_header_tag('downloads', :caption => l(:field_downloads), :default_order => 'desc', :scope => "col", :id => "vzebra-action") %>
+ <%= sort_header_tag('operation', :caption => "", :scope => "col", :id => "vzebra-children") %>
+
+
+
+
+ <% @containers.each do |container| %>
+ <% next if container.attachments.empty? -%>
+ <% container.attachments.each do |file| %>
+ <% if isTypeOk(file,selAttachType,selContentType) %>
+ ">
+ <%= link_to_attachment file, :download => true, :title => file.filename+"\n"+file.description.to_s, :style => "width: 230px; overflow: hidden; white-space: nowrap;text-overflow: ellipsis;" %>
+
+ <%= number_to_human_size(file.filesize) %>
+
+ <%= file.attachmentstype.typeName %>
+
+
+ <%= render :partial => 'attachments/type_edit', :locals => {:attachmenttypes => attachmenttypes,
+ :attachment => file,:contentype=>selContentType} %>
+
+
+ <%= file.show_suffix_type %>
+ <%= file.downloads %>
+
+
+ <%= link_to(image_tag('delete.png'), attachment_path(file),
+ :data => {:confirm => l(:text_are_you_sure)}, :method => :delete) if delete_allowed %>
+
+
+
+
+
+
+
+
+ <% end -%>
+ <% end -%>
+ <% reset_cycle %>
+ <% end -%>
+
+
+
+
+
+
diff --git a/app/views/files/getattachtype.js.erb b/app/views/files/getattachtype.js.erb
new file mode 100644
index 000000000..3bc9863b2
--- /dev/null
+++ b/app/views/files/getattachtype.js.erb
@@ -0,0 +1,5 @@
+<% if @attachtype==0 && @contenttype=='0' %>
+$("#all_browse_div").html('<%= j(render partial: "show_all_attachment")%>');
+<%else%>
+$("#all_browse_div").html('<%= j(render partial: "sort_by_attachtypel")%>');
+<%end%>
diff --git a/app/views/files/index.html.erb b/app/views/files/index.html.erb
index 7552b9941..978b4420a 100644
--- a/app/views/files/index.html.erb
+++ b/app/views/files/index.html.erb
@@ -1,278 +1,188 @@
-
+<% attachmenttypes = @project.attachmenttypes %>
+<% sufixtypes = @project.contenttypes %>
-
-<%=(@project.project_type == 1) ? t(:label_user_course) : t(:label_project) %>资源共享区
+<%= (@project.project_type == 1) ? t(:label_user_course) : t(:label_project) %>资源共享区
<%#= link_to(l(:label_attachment_new), 'javascript:void(0);', :onclick=>"$('#file_buttons').slideToggle();", :class => 'icon icon-add') if User.current.allowed_to?(:manage_files, @project) %>
-
+
<%= javascript_tag "observeSearchfield('attach_search', null, '#{ escape_javascript attachments_autocomplete_path(:project_id => @project.id, :format => 'js') }')" %>
<% delete_allowed = User.current.allowed_to?(:manage_files, @project) %>
-
-
-
-
-
-
-
-
-
- <%= sort_header_tag('filename', :caption => l(:field_filename), :scope =>"col" , :id => "vzebra-adventure")%>
- <%= sort_header_tag('created_on', :caption => l(:label_date), :default_order => 'desc', :scope =>"col" , :id => "vzebra-comedy")%>
- <%= sort_header_tag('size', :caption => l(:field_filesize), :default_order => 'desc', :scope =>"col", :id=> "vzebra-children")%>
- <%= sort_header_tag('downloads', :caption => l(:field_downloads), :default_order => 'desc', :scope =>"col", :id => "vzebra-action") %>
- <%= sort_header_tag('operation', :caption => "", :scope =>"col", :id => "vzebra-children") %>
-
-
-
- <% @containers.each do |container| %>
- <% next if container.attachments.empty? -%>
- <% if container.is_a?(Version) -%>
-
-
- <%= link_to(h(container), {:controller => 'versions', :action => 'show', :id => container}, :class => "icon icon-package", :style => "color: #666666;") %>
-
-
- <% end -%>
- <% container.attachments.each do |file| %>
- ">
- <%= link_to_attachment file, :download => true, :title => file.filename+"\n"+file.description.to_s, :style => "width: 230px; overflow: hidden; white-space: nowrap;text-overflow: ellipsis;" %>
- <%= format_time(file.created_on) %>
- <%= number_to_human_size(file.filesize) %>
- <%= file.downloads %>
-
-
- <%= link_to(image_tag('delete.png'), attachment_path(file),
- :data => {:confirm => l(:text_are_you_sure)}, :method => :delete) if delete_allowed %>
-
-
-
-
-
-
-
-
- <% end -%>
- <% reset_cycle %>
- <% end -%>
-
-
-
-
+
+ <%= render :partial => 'show_all_attachment' %>
+
<% html_title(l(:label_attachment_plural)) -%>
-
\ No newline at end of file
diff --git a/app/views/forums/show.html.erb b/app/views/forums/show.html.erb
index 677416a6d..72e7ce221 100644
--- a/app/views/forums/show.html.erb
+++ b/app/views/forums/show.html.erb
@@ -19,7 +19,7 @@
<%= f.text_area :content, :required => true, :id => 'editor02' %>
-
+
<%= l(:label_attachment_plural) %>
<%= render :partial => 'attachments/form', :locals => {:container => @memo} %>
diff --git a/app/views/layouts/_base_footer.html.erb.orig b/app/views/layouts/_base_footer.html.erb.orig
new file mode 100644
index 000000000..c2e9c1f3d
--- /dev/null
+++ b/app/views/layouts/_base_footer.html.erb.orig
@@ -0,0 +1,73 @@
+
+
+<<<<<<< HEAD
+
+
+ <%= debug(params) if Rails.env.development? %>
+
+
+
diff --git a/app/views/messages/show.html.erb b/app/views/messages/show.html.erb
index 6f7e5d5ef..aecfc332a 100644
--- a/app/views/messages/show.html.erb
+++ b/app/views/messages/show.html.erb
@@ -124,7 +124,7 @@
- <%= reply_count += 1 %>楼
+ <%= reply_count += 1 %>楼
<%= link_to(
diff --git a/app/views/projects/course.html.erb b/app/views/projects/course.html.erb
index 1359b8bea..98228c168 100644
--- a/app/views/projects/course.html.erb
+++ b/app/views/projects/course.html.erb
@@ -30,7 +30,7 @@
<% end %>
-<%= sort_course(@s_type, @project_type)%>
+<%= sort_course(@s_type, @project_type, @school_id)%>
<%= render_project_hierarchy(@projects)%>
diff --git a/app/views/welcome/contest.html.erb b/app/views/welcome/contest.html.erb
index 19ef620f2..65c96e4d0 100644
--- a/app/views/welcome/contest.html.erb
+++ b/app/views/welcome/contest.html.erb
@@ -188,8 +188,8 @@
<% find_new_forum_topics(11).each do |topic|%>
-
- <%= link_to topic.subject.truncate(30, omission: '...'), topic.event_url, :class => "gray" , :style => "font-size: 10pt !important;" %>
+
+ <%= link_to '['+topic.forum.name + ']',forum_path(topic.forum),:class => 'memo_Bar_title' %><%= link_to topic.subject.truncate(30, omission: '...'), topic.event_url, :class => "gray" , :style => "font-size: 10pt !important;" %>
<%= l(:field_updated_on) %><%=time_tag_welcome(topic_last_time topic)%>前
diff --git a/app/views/welcome/course.html.erb b/app/views/welcome/course.html.erb
index b8b755b58..eef2401f8 100644
--- a/app/views/welcome/course.html.erb
+++ b/app/views/welcome/course.html.erb
@@ -1,145 +1,204 @@
<%= stylesheet_link_tag 'welcome' %>
<%= javascript_include_tag 'welcome' %>
-
-
- <%= image_tag '/images/qrweixin.jpg', size: '150x150', alt: 'trustie', class: "weixin" %>
-
微信扫码
-
-
-
- <%= image_tag(@logoLink, size:'75x75') %>
+
+ <%= image_tag '/images/qrweixin.jpg', size: '150x150', alt: 'trustie', class: "weixin" %>
+
微信扫码
+
+
+
+ <%= image_tag(@logoLink, size:'75x75') %>
-
-
-
+
+
+
<% if params[:school_id].nil? and User.current.user_extensions.school.nil? %>
- <% else%>
+ <% else%>
<% if params[:school_id] == "0" %>
- <% else %>
+ <% else %>
<% if params[:school_id].nil? %>
- <%= School.find(User.current.user_extensions.school.id).name %>
-
+ <%= link_to School.find(User.current.user_extensions.school.id).name, options={:action => 'course',:school_id => User.current.user_extensions.school.id}, html_options={:class => 'font_welcome_school',:method => 'get'}%>
+
<% else %>
- <%= School.find(params[:school_id]).name %>
-
+ <%= link_to School.find(params[:school_id]).name ,options={:action => 'course',:school_id => params[:school_id]}, html_options={:class => 'font_welcome_school',:method => 'get'}%>
+
<% end %>
<% end %>
<% end %>
- <%= l(:label_welcome_trustie) %><%= l(:label_welcome_trustie_course) %>
- <% if params[:school_id].nil? and User.current.user_extensions.school.nil? %>
- , <%= l(:label_welcome_trustie_course_description) %>
- <% else %>
- <% if params[:school_id] == "0" %>
- , <%= l(:label_welcome_trustie_course_description) %>
- <% end %>
- <% end %>
-
-
- <%= render :partial => "search_project", :locals => {:project_type => Project::ProjectType_course}%>
-
-
-
+
<%= l(:label_welcome_trustie) %><%= l(:label_welcome_trustie_course) %>
+ <% if params[:school_id].nil? and User.current.user_extensions.school.nil? %>
+
, <%= l(:label_welcome_trustie_course_description) %>
+ <% else %>
+ <% if params[:school_id] == "0" %>
+
, <%= l(:label_welcome_trustie_course_description) %>
+ <% end %>
+ <% end %>
+
+
+ <%= render :partial => "search_project", :locals => {:project_type => Project::ProjectType_course}%>
+
+
+
-
+
-
新开课程
-
<%= link_to "更多>>", {:controller => 'projects', :action => 'course', :project_type => 1, :school_id => params[:school_id]} %>
-
-
- <% find_miracle_course(10, 7,params[:school_id]).map do |project| %>
- >
-
- <%= image_tag(get_course_avatar(project), :class => "avatar-4") %>
-
-
-
- [<%= get_course_term project %>]
- <%= link_to( project.name, project_path(project.id), :class => "d-g-blue d-p-project-name",:title => "#{project.name}" )%>
- (<%= link_to "#{studentCount(project)}人", project_member_path(project, :role => 2) ,:course =>'1' %>)
- <% files_count = (project.attachments.count.to_i+Version.joins(:project).where("projects.id=#{project.id}").count.to_i).to_s %>
- (<%=link_to "#{files_count}份", project_files_path(project) %>资料)
-
-
-
- <% course = Course.find_by_extra(project.identifier) %>
- <%= course.school.name.try(:gsub, /(.+)$/, '\1:') %>
-
-
- <%= link_to(course.try(:teacher).try(:name), user_path(course.teacher)) %>
- <%#=course.try(:teacher).try(:name)%>
-
-
-
-
- <% if !course_endTime_timeout?(project)%>
-
- <%= join_in_course(project, User.current)%>
-
- <% end %>
-
-
- <% end; reset_cycle %>
-
-
+
新开课程
+ <% if(find_miracle_course(10, 7,params[:school_id]).count == 0) %>
+
<%= link_to "更多>>", {:controller => 'projects', :action => 'course', :project_type => 1, :school_id => nil} %>
+
+
+
+
+
+ 该学校未开设任何课程,您可以查看其他学校课程
+
+
+ <% find_all_new_hot_course(9).map do |project| %>
+ >
+
+ <%= image_tag(get_course_avatar(project), :class => "avatar-4") %>
+
+
+
+
+ <% course = Course.find_by_extra(project.identifier)%>
+ <% if(course.school == nil) %>
+
+ <% else %>
+ <%= course.school.name.try(:gsub, /(.+)$/, '\1:') %>
+ <% end %>
+
+
+ <%= link_to(course.try(:teacher).try(:name), user_path(course.teacher)) %>
+ <%#=course.try(:teacher).try(:name)%>
+
+
+
+ [<%= get_course_term project %>]
+ <%= link_to( project.name, project_path(project.id), :class => "d-g-blue d-p-project-name",:title => "#{project.name}" )%>
+ (<%= link_to "#{studentCount(project)}人", project_member_path(project, :role => 2) ,:course =>'1' %>)
+ <% files_count = (project.attachments.count.to_i+Version.joins(:project).where("projects.id=#{project.id}").count.to_i).to_s %>
+ (<%=link_to "#{files_count}份", project_files_path(project) %>资料)
+
+
+
+ <% if !course_endTime_timeout?(project)%>
+
+ <%= new_watcher_link(project, User.current)%>
+
+ <% end %>
+
+
+ <% end %>
+
+
+ <% else %>
+
<%= link_to "更多>>", {:controller => 'projects', :action => 'course', :project_type => 1, :school_id => params[:school_id]} %>
+
+
+
+ <% find_miracle_course(10, 7,params[:school_id]).map do |project| %>
+ >
+
+ <%= image_tag(get_course_avatar(project), :class => "avatar-4") %>
+
+
+
+
+ <% course = Course.find_by_extra(project.identifier) %>
+ <%= course.school.name.try(:gsub, /(.+)$/, '\1:') %>
+
+
+ <%= link_to(course.try(:teacher).try(:name), user_path(course.teacher)) %>
+ <%#=course.try(:teacher).try(:name)%>
+
+
+
+ [<%= get_course_term project %>]
+ <%= link_to( project.name, project_path(project.id), :class => "d-g-blue d-p-project-name",:title => "#{project.name}" )%>
+ (<%= link_to "#{studentCount(project)}人", project_member_path(project, :role => 2) ,:course =>'1' %>)
+ <% files_count = (project.attachments.count.to_i+Version.joins(:project).where("projects.id=#{project.id}").count.to_i).to_s %>
+ (<%=link_to "#{files_count}份", project_files_path(project) %>资料)
+
+
+
+ <% if !course_endTime_timeout?(project)%>
+
+ <%= join_in_course(project, User.current)%>
+
+ <% end %>
+
+
+ <% end; reset_cycle %>
+
+
+ <% end %>
-
- 问题和反馈动态
- <%= link_to "我要提问" , newbie_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%>
- <%= link_to "我要反馈" , suggestion_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%>
-
-
<%= link_to "更多>>", forums_path %>
-
-
- <% find_new_forum_topics(10).each do |topic|%>
-
-
-
- <%= link_to topic.subject.truncate(30, omission: '...'), topic.event_url, :class => "gray" , :style => "font-size: 10pt !important;" %>
+
+ 问题和反馈动态
+ <%= link_to "我要提问" , newbie_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%>
+ <%= link_to "我要反馈" , suggestion_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%>
+
+ <%= link_to "更多>>", forums_path %>
+
+
+ <% find_new_forum_topics(10).each do |topic|%>
+
+
+
+ <%= link_to '['+topic.forum.name + ']',forum_path(topic.forum),:class => 'memo_Bar_title' %><%= link_to topic.subject.truncate(30, omission: '...'), topic.event_url, :class => "gray" , :style => "font-size: 10pt !important;" %>
-
- <%= l(:field_updated_on) %><%=time_tag_welcome(topic_last_time topic)%>前
+
+ <%= l(:field_updated_on) %><%=time_tag_welcome(topic_last_time topic)%>前
由 <%= link_to topic.author ? topic.author : 'Anonymous', user_path(topic.author_id), :style => "font-size: 9pt !important; color: rgb(17, 102, 173);" %> 发表
- 回复(<%= link_to (topic.parent ? topic.parent.replies_count : topic.replies_count), topic.event_url %>)
-
-
- <% end %>
-
-
+ 回复(<%= link_to (topic.parent ? topic.parent.replies_count : topic.replies_count), topic.event_url %>)
+
+
+ <% end %>
+
+
-
-
-
- 当前网站状态
- 活跃课程: <%=@courseCount%>
- 高校: 2个
- 教师: <%=@teacherCount%> 名
- 学生: <%=@studentCount%> 名
-
-
-
+
+
+
+ 当前网站状态
+ 活跃课程: <%=@courseCount%>
+ 高校: 2个
+ 教师: <%=@teacherCount%> 名
+ 学生: <%=@studentCount%> 名
+
+
+
\ No newline at end of file
diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb
index 3fdee2a97..0a69b1f78 100644
--- a/app/views/welcome/index.html.erb
+++ b/app/views/welcome/index.html.erb
@@ -100,7 +100,7 @@
<% find_new_forum_topics(7).each do |topic|%>
- <%= link_to topic.subject.truncate(30, omission: '...'), topic.event_url,title: topic.subject %>
+ <%= link_to '['+topic.forum.name + ']',forum_path(topic.forum),:class => 'memo_Bar_title' %><%= link_to topic.subject.truncate(30, omission: '...'), topic.event_url,title: topic.subject %>
diff --git a/config/environment.rb b/config/environment.rb
index 1d9a39669..f44e25ae3 100644
--- a/config/environment.rb
+++ b/config/environment.rb
@@ -10,5 +10,6 @@ if Dir.glob(File.join(vendor_plugins_dir, "*")).any?
exit 1
end
+
# Initialize the rails application
RedmineApp::Application.initialize!
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 1d2e9b6c3..1ae68b839 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -132,6 +132,10 @@ en:
actionview_instancetag_blank_option: Please select
+ attachment_all: "All"
+ attachment_browse: "Attachment Content Browse"
+ attachment_sufix_browse: "Attachment Type Browse"
+ attachment_type: "Attachment Type"
general_text_No: 'No'
general_text_Yes: 'Yes'
general_text_no: 'no'
@@ -1604,4 +1608,4 @@ en:
# ajax异步验证
- modal_valid_passing: can be used.
\ No newline at end of file
+ modal_valid_passing: can be used.
diff --git a/config/locales/zh.yml b/config/locales/zh.yml
index 774d1fbfb..219327f45 100644
--- a/config/locales/zh.yml
+++ b/config/locales/zh.yml
@@ -140,6 +140,10 @@ zh:
actionview_instancetag_blank_option: 请选择
+ attachment_all: "全部"
+ attachment_sufix_browse: "文件类型"
+ attachment_browse: "内容类型"
+ attachment_type: '资源分类'
general_text_No: '否'
general_text_Yes: '是'
general_text_no: '否'
diff --git a/config/routes.rb b/config/routes.rb
index 62d773077..46d710b64 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -19,7 +19,7 @@ RedmineApp::Application.routes.draw do
resources :no_uses
delete 'no_uses', :to => 'no_uses#delete'
- resources :apply_project_masters
+ resources :apply_project_masters
delete 'apply_project_masters', :to => 'apply_project_masters#delete'
@@ -301,7 +301,12 @@ RedmineApp::Application.routes.draw do
# issue form update
match 'issues/update_form', :controller => 'issues', :action => 'update_form', :via => [:put, :post], :as => 'issue_form'
- resources :files, :only => [:index, :new, :create]
+ resources :files, :only => [:index, :new, :create] do
+ collection do
+ match "getattachtype" , via: [:get, :post]
+ #match 'getattachtype/:attachtype', :to => 'files#getattachtype', via: [:get, :post]
+ end
+ end
resources :versions, :except => [:index, :show, :edit, :update, :destroy] do
collection do
@@ -453,7 +458,11 @@ RedmineApp::Application.routes.draw do
get 'attachments/autocomplete'
match 'attachments/autocomplete', :to => 'attachments#autocomplete', via: [:post]
post 'attachments/relationfile', to: 'attachments#add_exist_file_to_project', as: 'attach_relation'
- resources :attachments, :only => [:show, :destroy]
+ resources :attachments, :only => [:show, :destroy] do
+ collection do
+ match "updateType" , via: [:get, :post]
+ end
+ end
resources :groups do
member do
diff --git a/db/migrate/20140508030039_create_attachmentstypes.rb b/db/migrate/20140508030039_create_attachmentstypes.rb
new file mode 100644
index 000000000..39ee703a7
--- /dev/null
+++ b/db/migrate/20140508030039_create_attachmentstypes.rb
@@ -0,0 +1,19 @@
+# encoding: utf-8
+class CreateAttachmentstypes < ActiveRecord::Migration
+ def self.up
+ create_table :attachmentstypes do |t|
+ t.column :typeId, :integer, :null => false
+ t.column :typeName, :string, :limit =>50
+ end
+ Attachmentstype.create(typeId:1,typeName:'源代码')
+ Attachmentstype.create(typeId:1,typeName:'课件')
+ Attachmentstype.create(typeId:1,typeName:'研究报告')
+ Attachmentstype.create(typeId:2,typeName:'源代码')
+ Attachmentstype.create(typeId:2,typeName:'课件')
+ Attachmentstype.create(typeId:2,typeName:'研究报告')
+ end
+
+ def self.down
+ drop_table :attachmentstypes
+ end
+end
\ No newline at end of file
diff --git a/db/migrate/20140508030358_add_attachtype_to_attachments.rb b/db/migrate/20140508030358_add_attachtype_to_attachments.rb
new file mode 100644
index 000000000..e22d02e60
--- /dev/null
+++ b/db/migrate/20140508030358_add_attachtype_to_attachments.rb
@@ -0,0 +1,5 @@
+class AddAttachtypeToAttachments < ActiveRecord::Migration
+ def change
+ add_column :attachments, :attachtype, :int ,default: 1
+ end
+end
diff --git a/db/migrate/20140509020307_add_attachmenttype_to_project.rb b/db/migrate/20140509020307_add_attachmenttype_to_project.rb
new file mode 100644
index 000000000..6a448977b
--- /dev/null
+++ b/db/migrate/20140509020307_add_attachmenttype_to_project.rb
@@ -0,0 +1,5 @@
+class AddAttachmenttypeToProject < ActiveRecord::Migration
+ def change
+ add_column :projects, :attachmenttype, :int ,default: 1
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 2dd0f1515..74310a946 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20140505083430) do
+ActiveRecord::Schema.define(:version => 20140509020307) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false
@@ -45,12 +45,21 @@ ActiveRecord::Schema.define(:version => 20140505083430) do
t.datetime "created_on"
t.string "description"
t.string "disk_directory"
+ t.integer "attachtype", :default => 1
end
add_index "attachments", ["author_id"], :name => "index_attachments_on_author_id"
add_index "attachments", ["container_id", "container_type"], :name => "index_attachments_on_container_id_and_container_type"
add_index "attachments", ["created_on"], :name => "index_attachments_on_created_on"
+ create_table "attachmentstypes", :id => false, :force => true do |t|
+ t.integer "id", :null => false
+ t.integer "typeId"
+ t.string "typeName", :limit => 50
+ end
+
+ add_index "attachmentstypes", ["id"], :name => "id"
+
create_table "auth_sources", :force => true do |t|
t.string "type", :limit => 30, :default => "", :null => false
t.string "name", :limit => 60, :default => "", :null => false
@@ -614,6 +623,7 @@ ActiveRecord::Schema.define(:version => 20140505083430) do
t.boolean "inherit_members", :default => false, :null => false
t.integer "project_type"
t.boolean "hidden_repo", :default => false, :null => false
+ t.integer "attachmenttype", :default => 1
end
add_index "projects", ["lft"], :name => "index_projects_on_lft"
@@ -803,11 +813,6 @@ ActiveRecord::Schema.define(:version => 20140505083430) do
add_index "time_entries", ["project_id"], :name => "time_entries_project_id"
add_index "time_entries", ["user_id"], :name => "index_time_entries_on_user_id"
- create_table "tmp", :force => true do |t|
- t.string "name"
- t.string "part_number"
- end
-
create_table "tokens", :force => true do |t|
t.integer "user_id", :default => 0, :null => false
t.string "action", :limit => 30, :default => "", :null => false
@@ -1014,10 +1019,4 @@ ActiveRecord::Schema.define(:version => 20140505083430) do
add_index "workflows", ["role_id", "tracker_id", "old_status_id"], :name => "wkfs_role_tracker_old_status"
add_index "workflows", ["role_id"], :name => "index_workflows_on_role_id"
- create_table "yans", :force => true do |t|
- t.string "name"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
- end
-
end
diff --git a/lib/plugins/acts_as_attachable/lib/acts_as_attachable.rb b/lib/plugins/acts_as_attachable/lib/acts_as_attachable.rb
index ca556919a..30bbaedda 100644
--- a/lib/plugins/acts_as_attachable/lib/acts_as_attachable.rb
+++ b/lib/plugins/acts_as_attachable/lib/acts_as_attachable.rb
@@ -60,6 +60,11 @@ module Redmine
@unsaved_attachments ||= []
end
+ def save_attachmentsex(attachments, author=User.current,attachment_type)
+ @curattachment_type = attachment_type
+ result = save_attachments(attachments,author)
+ result
+ end
def save_attachments(attachments, author=User.current)
if attachments.is_a?(Hash)
attachments = attachments.stringify_keys
@@ -91,6 +96,7 @@ module Redmine
end
next unless a
a.description = attachment['description'].to_s.strip
+ a.attachtype = @curattachment_type;
if a.new_record?
unsaved_attachments << a
else
diff --git a/public/images/Edit/edit.png b/public/images/Edit/edit.png
new file mode 100644
index 000000000..8335716fd
Binary files /dev/null and b/public/images/Edit/edit.png differ
diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css
index 723b93bd6..7b0a0099c 100644
--- a/public/stylesheets/application.css
+++ b/public/stylesheets/application.css
@@ -1840,7 +1840,7 @@ a.remove-upload:hover {text-decoration:none !important;}
/*gcm upload file count and deleteall*/
#upload_file_count #count {color:red; font-size:1.5em;}
-span.add_attachment .remove_all {background:none;background: url(../images/delete.png) no-repeat 1px 50%; width:1px; display:inline-block;position:absolute;right:21px;text-decoration:none;}
+span.add_attachment .remove_all {background:none;background: url(../images/delete.png) no-repeat 1px 50%; width:1px; display:inline-block;position:absolute;right:61px;text-decoration:none;}
div.fileover { background-color: lavender; }
diff --git a/public/stylesheets/nyan.css b/public/stylesheets/nyan.css
index 5645e375e..24fffd20f 100644
--- a/public/stylesheets/nyan.css
+++ b/public/stylesheets/nyan.css
@@ -10,468 +10,509 @@ span[id^=valid_user]{
color: green;
}
.border_box {
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- -box-sizing: border-box;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ -box-sizing: border-box;
}
-.div_inline{
- display: inline-block;
+
+.div_inline {
+ display: inline-block;
}
+
/*文字不换行*/
-.text_nowrap{
- word-break:keep-all;
- white-space:nowrap;
- overflow:hidden;
- text-overflow:ellipsis;
+.text_nowrap {
+ word-break: keep-all;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
}
+
/*字体 斜体*/
-.font_italic{
- font-style: italic;
+.font_italic {
+ font-style: italic;
}
+
/*字体加粗*/
-.font_bolder{
- font-weight: bolder;
+.font_bolder {
+ font-weight: bolder;
}
-.text_center{
- text-align: center;
+
+.text_center {
+ text-align: center;
}
-.ph10_5{ /*padding horizontal 10% 5%*/
- padding: 0px 5% 0px 10%;
+
+.ph10_5 {
+ /*padding horizontal 10% 5%*/
+ padding: 0px 5% 0px 10%;
}
-.clear_both{
- clear: both;
+
+.clear_both {
+ clear: both;
}
-.memo-content pre{
- white-space: normal;
- word-wrap: break-word;
+
+.memo-content pre {
+ white-space: normal;
+ word-wrap: break-word;
}
+
.highlight {
- background-color: #fff34d;
- -moz-border-radius: 3px;
- -webkit-border-radius: 3px;
- border-radius: 3px;
- -moz-box-shadow: 0px 1px 2px rgba(0,0,0,0.7);
- -webkit-box-shadow: 0px 1px 2px rgba(0,0,0,0.7);
- box-shadow: 0px 1px 2px rgba(0,0,0,0.7);
- color: #cc0033;
- /*padding: 1px 3px;*/
- /*margin: 0 -4px;*/
- filter: alpha(opacity=70);
- -moz-opacity: 0.7;
- -webkit-opacity: 0.7;
- opacity: 0.7;
+ background-color: #fff34d;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ border-radius: 3px;
+ -moz-box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.7);
+ -webkit-box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.7);
+ box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.7);
+ color: #cc0033;
+ /*padding: 1px 3px;*/
+ /*margin: 0 -4px;*/
+ filter: alpha(opacity = 70);
+ -moz-opacity: 0.7;
+ -webkit-opacity: 0.7;
+ opacity: 0.7;
}
+
.clearfix {
- width: 100%;
- height: 0px;
- clear: both;
- display: block;
+ width: 100%;
+ height: 0px;
+ clear: both;
+ display: block;
}
+
.hidden {
- display: none;
+ display: none;
}
-.font_color_orange{
- color: #E8770D;
+
+.font_color_orange {
+ color: #E8770D;
}
* {
- font-family: Helvetica, Tahoma, Arial, "Microsoft YaHei", "微软雅黑", SimSun, "宋体", STXihei, "华文细黑", Heiti, "黑体", sans-serif;
+ font-family: Helvetica, Tahoma, Arial, "Microsoft YaHei", "微软雅黑", SimSun, "宋体", STXihei, "华文细黑", Heiti, "黑体", sans-serif;
}
+
/* 模态窗口
*******************************************************************************/
/** jRating CSS **/
/**Div containing the color of the stars */
-
.jRatingAverage {
- background-color:#f62929;
- position:relative;
- top:0;
- left:0;
- z-index:2;
- height:100%;
+ background-color: #f62929;
+ position: relative;
+ top: 0;
+ left: 0;
+ z-index: 2;
+ height: 100%;
}
+
.jRatingColor {
- background-color:#FFD400; /* bgcolor of the stars*/
- position:relative;
- top:0;
- left:0;
- z-index:2;
- height:100%;
+ background-color: #FFD400; /* bgcolor of the stars*/
+ position: relative;
+ top: 0;
+ left: 0;
+ z-index: 2;
+ height: 100%;
}
/** Div containing the stars **/
.jStar {
- position:relative;
- left:0;
- z-index:3;
+ position: relative;
+ left: 0;
+ z-index: 3;
}
/** P containing the rate informations **/
p.jRatingInfos {
- position: absolute;
- z-index:9999;
- background: transparent url('bg_jRatingInfos.png') no-repeat;
- color: #CACACA;
- display: none;
- width: 91px;
- height: 29px;
- font-size:16px;
- text-align:center;
- padding-top:5px;
+ position: absolute;
+ z-index: 9999;
+ background: transparent url('bg_jRatingInfos.png') no-repeat;
+ color: #CACACA;
+ display: none;
+ width: 91px;
+ height: 29px;
+ font-size: 16px;
+ text-align: center;
+ padding-top: 5px;
}
+
p.jRatingInfos span.maxRate {
- color:#c9c9c9;
- font-size:14px;
+ color: #c9c9c9;
+ font-size: 14px;
}
+
/* 模态窗口
*******************************************************************************/
-#lean_overlay{
- position: fixed;
- z-index: 80;
- top: 0;
- left: 0;
- height: 100%;
- width: 100%;
- background: #000;
- display: none;
+#lean_overlay {
+ position: fixed;
+ z-index: 80;
+ top: 0;
+ left: 0;
+ height: 100%;
+ width: 100%;
+ background: #000;
+ display: none;
}
#OpenWindow {
- background: none repeat scroll 0 0 #FFFFFF;
- border-radius: 5px 5px 5px 5px;
- box-shadow: 0 0 4px rgba(0, 0, 0, 0.7);
- display: none;
- padding-bottom: 2px;
- width: 404px;
- z-index: 100;
- left: 50%;
- margin-left: -202px;
- opacity: 1;
- position: fixed;
- top: 200px;
+ background: none repeat scroll 0 0 #FFFFFF;
+ border-radius: 5px 5px 5px 5px;
+ box-shadow: 0 0 4px rgba(0, 0, 0, 0.7);
+ display: none;
+ padding-bottom: 2px;
+ width: 404px;
+ z-index: 100;
+ left: 50%;
+ margin-left: -202px;
+ opacity: 1;
+ position: fixed;
+ top: 200px;
}
+
#OpenWindow-header {
- background: url("/images/showmodal/hd-bg.png") repeat scroll 0 0 transparent;
- border-bottom: 1px solid #CCCCCC;
- border-top-left-radius: 5px;
- border-top-right-radius: 5px;
- padding: 18px 18px 14px;
+ background: url("/images/showmodal/hd-bg.png") repeat scroll 0 0 transparent;
+ border-bottom: 1px solid #CCCCCC;
+ border-top-left-radius: 5px;
+ border-top-right-radius: 5px;
+ padding: 18px 18px 14px;
}
-#OpenWindow-content{
- -webkit-transition: all 0.2s linear 1s;
- -o-transition: all 0.2s linear 1s;
- -moz-transition: all 0.2s linear 1s;
- transition: all 0.2s linear 1s;
- border-top-left-radius: 5px;
- border-top-right-radius: 5px;
- padding: 18px 18px 14px;
+
+#OpenWindow-content {
+ -webkit-transition: all 0.2s linear 1s;
+ -o-transition: all 0.2s linear 1s;
+ -moz-transition: all 0.2s linear 1s;
+ transition: all 0.2s linear 1s;
+ border-top-left-radius: 5px;
+ border-top-right-radius: 5px;
+ padding: 18px 18px 14px;
}
.modal_close {
- background: url("/images/showmodal/modal_close.png") repeat scroll 0 0 transparent;
- display: block;
- height: 14px;
- position: absolute;
- right: 12px;
- top: 12px;
- width: 14px;
- z-index: 2;
+ background: url("/images/showmodal/modal_close.png") repeat scroll 0 0 transparent;
+ display: block;
+ height: 14px;
+ position: absolute;
+ right: 12px;
+ top: 12px;
+ width: 14px;
+ z-index: 2;
}
+
body {
- /*font-size: 13px;*/
+ /*font-size: 13px;*/
}
+
#OpenWindow .txt-fld {
- border-bottom: 1px solid #EEEEEE;
- padding: 14px 20px;
- position: relative;
- text-align: right;
- width: 364px;
+ border-bottom: 1px solid #EEEEEE;
+ padding: 14px 20px;
+ position: relative;
+ text-align: right;
+ width: 364px;
}
+
#OpenWindow .txt-fld input {
- background: none repeat scroll 0 0 #F7F7F7;
- border-color: #CCCCCC #E7E6E6 #E7E6E6 #CCCCCC;
- border-radius: 4px 4px 4px 4px;
- border-style: solid;
- border-width: 1px;
- color: #222222;
- font-family: "Helvetica Neue";
- font-size: 1.2em;
- outline: medium none;
- padding: 8px;
- width: 244px;
+ background: none repeat scroll 0 0 #F7F7F7;
+ border-color: #CCCCCC #E7E6E6 #E7E6E6 #CCCCCC;
+ border-radius: 4px 4px 4px 4px;
+ border-style: solid;
+ border-width: 1px;
+ color: #222222;
+ font-family: "Helvetica Neue";
+ font-size: 1.2em;
+ outline: medium none;
+ padding: 8px;
+ width: 244px;
}
+
#OpenWindow .txt-fld input.good_input {
- background: url("/images/showmodal/good.png") no-repeat scroll 236px center #DEF5E1;
+ background: url("/images/showmodal/good.png") no-repeat scroll 236px center #DEF5E1;
}
+
#OpenWindow .btn-fld {
- overflow: hidden;
- padding: 12px 20px 12px 130px;
- width: 254px;
+ overflow: hidden;
+ padding: 12px 20px 12px 130px;
+ width: 254px;
}
+
#OpenWindow button {
- background: none repeat scroll 0 0 #3F9D4A;
- border: medium none;
- border-radius: 4px 4px 4px 4px;
- color: #FFFFFF;
- float: right;
- font-family: Verdana;
- font-size: 13px;
- font-weight: bold;
- overflow: visible;
- padding: 7px 10px;
- text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
- width: auto;
+ background: none repeat scroll 0 0 #3F9D4A;
+ border: medium none;
+ border-radius: 4px 4px 4px 4px;
+ color: #FFFFFF;
+ float: right;
+ font-family: Verdana;
+ font-size: 13px;
+ font-weight: bold;
+ overflow: visible;
+ padding: 7px 10px;
+ text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
+ width: auto;
}
+
/*********************************************************************************************************************
* Wen的OpenWindow
*********************************************************************************************************************/
#WOpenWindow {
- background: none repeat scroll 0 0 #FFFFFF;
- border-radius: 5px 5px 5px 5px;
- box-shadow: 0 0 4px rgba(0, 0, 0, 0.7);
- display: none;
- padding-bottom: 2px;
- width: 1000px;
- z-index: 100;
- left: 50%;
- margin-left: -202px;
- opacity: 1;
- position: fixed;
- top: 200px;
+ background: none repeat scroll 0 0 #FFFFFF;
+ border-radius: 5px 5px 5px 5px;
+ box-shadow: 0 0 4px rgba(0, 0, 0, 0.7);
+ display: none;
+ padding-bottom: 2px;
+ width: 1000px;
+ z-index: 100;
+ left: 50%;
+ margin-left: -202px;
+ opacity: 1;
+ position: fixed;
+ top: 200px;
}
-#WOpenWindow .school_list{
- width: 900px;
- line-height: 20px;
-
+
+#WOpenWindow .school_list {
+ width: 900px;
+ line-height: 20px;
+
}
+
#WOpenWindow-header {
- background: url("/images/showmodal/hd-bg.png") repeat scroll 0 0 transparent;
- border-bottom: 1px solid #CCCCCC;
- border-top-left-radius: 5px;
- border-top-right-radius: 5px;
- padding: 18px 18px 14px;
-}
-#WOpenWindow-content{
- -webkit-transition: all 0.2s linear 1s;
- -o-transition: all 0.2s linear 1s;
- -moz-transition: all 0.2s linear 1s;
- transition: all 0.2s linear 1s;
- border-top-left-radius: 5px;
- border-top-right-radius: 5px;
- padding: 18px 18px 14px;
-}
-#WOpenWindow .content{
- width: 1000px;
- height: 220px;
- overflow: scroll;
+ background: url("/images/showmodal/hd-bg.png") repeat scroll 0 0 transparent;
+ border-bottom: 1px solid #CCCCCC;
+ border-top-left-radius: 5px;
+ border-top-right-radius: 5px;
+ padding: 18px 18px 14px;
}
-#WOpenWindow .pcontent{
-
+#WOpenWindow-content {
+ -webkit-transition: all 0.2s linear 1s;
+ -o-transition: all 0.2s linear 1s;
+ -moz-transition: all 0.2s linear 1s;
+ transition: all 0.2s linear 1s;
+ border-top-left-radius: 5px;
+ border-top-right-radius: 5px;
+ padding: 18px 18px 14px;
}
+#WOpenWindow .content {
+ width: 1000px;
+ height: 220px;
+ overflow: scroll;
+}
+
+#WOpenWindow .pcontent {
+
+}
#WOpenWindow .txt-fld {
- border-bottom: 1px solid #EEEEEE;
- padding: 14px 20px;
- position: relative;
- text-align: right;
- width: 364px;
-}
-#WOpenWindow .txt-fld input {
- background: none repeat scroll 0 0 #F7F7F7;
- border-color: #CCCCCC #E7E6E6 #E7E6E6 #CCCCCC;
- border-radius: 4px 4px 4px 4px;
- border-style: solid;
- border-width: 1px;
- color: #222222;
- font-family: "Helvetica Neue";
- font-size: 1.2em;
- outline: medium none;
- padding: 8px;
- width: 244px;
-}
-#WOpenWindow .txt-fld input.good_input {
- background: url("/images/showmodal/good.png") no-repeat scroll 236px center #DEF5E1;
-}
-#WOpenWindow .btn-fld {
- overflow: hidden;
- padding: 12px 20px 12px 130px;
- width: 254px;
-}
-#WOpenWindow button {
- background: none repeat scroll 0 0 #3F9D4A;
- border: medium none;
- border-radius: 4px 4px 4px 4px;
- color: #FFFFFF;
- float: right;
- font-family: Verdana;
- font-size: 13px;
- font-weight: bold;
- overflow: visible;
- padding: 7px 10px;
- text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
- width: auto;
+ border-bottom: 1px solid #EEEEEE;
+ padding: 14px 20px;
+ position: relative;
+ text-align: right;
+ width: 364px;
}
+#WOpenWindow .txt-fld input {
+ background: none repeat scroll 0 0 #F7F7F7;
+ border-color: #CCCCCC #E7E6E6 #E7E6E6 #CCCCCC;
+ border-radius: 4px 4px 4px 4px;
+ border-style: solid;
+ border-width: 1px;
+ color: #222222;
+ font-family: "Helvetica Neue";
+ font-size: 1.2em;
+ outline: medium none;
+ padding: 8px;
+ width: 244px;
+}
+
+#WOpenWindow .txt-fld input.good_input {
+ background: url("/images/showmodal/good.png") no-repeat scroll 236px center #DEF5E1;
+}
+
+#WOpenWindow .btn-fld {
+ overflow: hidden;
+ padding: 12px 20px 12px 130px;
+ width: 254px;
+}
+
+#WOpenWindow button {
+ background: none repeat scroll 0 0 #3F9D4A;
+ border: medium none;
+ border-radius: 4px 4px 4px 4px;
+ color: #FFFFFF;
+ float: right;
+ font-family: Verdana;
+ font-size: 13px;
+ font-weight: bold;
+ overflow: visible;
+ padding: 7px 10px;
+ text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
+ width: auto;
+}
/*********************************************************************************************************************/
-
/* 按钮
*******************************************************************************/
.orangeButton {
- background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #e87832), color-stop(1, #db6825));
- background:-moz-linear-gradient(top, #e87832 5%, #db6825 100%);
- background:-webkit-linear-gradient(top, #e87832 5%, #db6825 100%);
- background:-o-linear-gradient(top, #e87832 5%, #db6825 100%);
- background:-ms-linear-gradient(top, #e87832 5%, #db6825 100%);
- background:linear-gradient(to bottom, #e87832 5%, #db6825 100%);
- filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#e87832', endColorstr='#db6825',GradientType=0);
- background-color:#e87832;
- -moz-border-radius:4px;
- -webkit-border-radius:4px;
- border-radius:4px;
- border:1px solid #e87832;
- display:inline-block;
- cursor:pointer;
- color:#ffffff;
- font-size:16px;
- padding:4px 11px;
- text-decoration:none;
- text-shadow:0px 1px 0px #754529;
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0.05, #e87832), color-stop(1, #db6825));
+ background: -moz-linear-gradient(top, #e87832 5%, #db6825 100%);
+ background: -webkit-linear-gradient(top, #e87832 5%, #db6825 100%);
+ background: -o-linear-gradient(top, #e87832 5%, #db6825 100%);
+ background: -ms-linear-gradient(top, #e87832 5%, #db6825 100%);
+ background: linear-gradient(to bottom, #e87832 5%, #db6825 100%);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#e87832', endColorstr = '#db6825', GradientType = 0);
+ background-color: #e87832;
+ -moz-border-radius: 4px;
+ -webkit-border-radius: 4px;
+ border-radius: 4px;
+ border: 1px solid #e87832;
+ display: inline-block;
+ cursor: pointer;
+ color: #ffffff;
+ font-size: 16px;
+ padding: 4px 11px;
+ text-decoration: none;
+ text-shadow: 0px 1px 0px #754529;
}
+
.orangeButton:hover {
- background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #db6825), color-stop(1, #e87832));
- background:-moz-linear-gradient(top, #db6825 5%, #e87832 100%);
- background:-webkit-linear-gradient(top, #db6825 5%, #e87832 100%);
- background:-o-linear-gradient(top, #db6825 5%, #e87832 100%);
- background:-ms-linear-gradient(top, #db6825 5%, #e87832 100%);
- background:linear-gradient(to bottom, #db6825 5%, #e87832 100%);
- filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#db6825', endColorstr='#e87832',GradientType=0);
- background-color:#db6825;
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0.05, #db6825), color-stop(1, #e87832));
+ background: -moz-linear-gradient(top, #db6825 5%, #e87832 100%);
+ background: -webkit-linear-gradient(top, #db6825 5%, #e87832 100%);
+ background: -o-linear-gradient(top, #db6825 5%, #e87832 100%);
+ background: -ms-linear-gradient(top, #db6825 5%, #e87832 100%);
+ background: linear-gradient(to bottom, #db6825 5%, #e87832 100%);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#db6825', endColorstr = '#e87832', GradientType = 0);
+ background-color: #db6825;
}
+
.orangeButton:active {
- position:relative;
- top:1px;
+ position: relative;
+ top: 1px;
}
+
input[class~='whiteButton'], .whiteButton {
- -moz-box-shadow:inset 0px 1px 0px 0px #ffffff;
- -webkit-box-shadow:inset 0px 1px 0px 0px #ffffff;
- box-shadow:inset 0px 1px 0px 0px #ffffff;
- background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #ffffff), color-stop(1, #f6f6f6));
- background:-moz-linear-gradient(top, #ffffff 5%, #f6f6f6 100%);
- background:-webkit-linear-gradient(top, #ffffff 5%, #f6f6f6 100%);
- background:-o-linear-gradient(top, #ffffff 5%, #f6f6f6 100%);
- background:-ms-linear-gradient(top, #ffffff 5%, #f6f6f6 100%);
- background:linear-gradient(to bottom, #ffffff 5%, #f6f6f6 100%);
- filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f6f6f6',GradientType=0);
- background-color:#ffffff;
- -moz-border-radius:6px;
- -webkit-border-radius:6px;
- border-radius:6px;
- border:1px solid #dcdcdc;
- display:inline-block;
- color:#666666;
+ -moz-box-shadow: inset 0px 1px 0px 0px #ffffff;
+ -webkit-box-shadow: inset 0px 1px 0px 0px #ffffff;
+ box-shadow: inset 0px 1px 0px 0px #ffffff;
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0.05, #ffffff), color-stop(1, #f6f6f6));
+ background: -moz-linear-gradient(top, #ffffff 5%, #f6f6f6 100%);
+ background: -webkit-linear-gradient(top, #ffffff 5%, #f6f6f6 100%);
+ background: -o-linear-gradient(top, #ffffff 5%, #f6f6f6 100%);
+ background: -ms-linear-gradient(top, #ffffff 5%, #f6f6f6 100%);
+ background: linear-gradient(to bottom, #ffffff 5%, #f6f6f6 100%);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#ffffff', endColorstr = '#f6f6f6', GradientType = 0);
+ background-color: #ffffff;
+ -moz-border-radius: 6px;
+ -webkit-border-radius: 6px;
+ border-radius: 6px;
+ border: 1px solid #dcdcdc;
+ display: inline-block;
+ color: #666666;
color: #116699;
- font-family:arial;
- font-size:15px;
- font-weight:bold;
- padding:6px 24px;
+ font-family: arial;
+ font-size: 15px;
+ font-weight: bold;
+ padding: 6px 24px;
/*padding:3px 10px;*/
- text-decoration:none;
- text-shadow:0px 1px 0px #ffffff;
+ text-decoration: none;
+ text-shadow: 0px 1px 0px #ffffff;
}
+
input[class~='whiteButton']:hover, .whiteButton:hover {
color: #c61a1a;
- background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #f6f6f6), color-stop(1, #ffffff));
- background:-moz-linear-gradient(top, #f6f6f6 5%, #ffffff 100%);
- background:-webkit-linear-gradient(top, #f6f6f6 5%, #ffffff 100%);
- background:-o-linear-gradient(top, #f6f6f6 5%, #ffffff 100%);
- background:-ms-linear-gradient(top, #f6f6f6 5%, #ffffff 100%);
- background:linear-gradient(to bottom, #f6f6f6 5%, #ffffff 100%);
- filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f6f6f6', endColorstr='#ffffff',GradientType=0);
- text-decoration: none;
- background-color:#f6f6f6;
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0.05, #f6f6f6), color-stop(1, #ffffff));
+ background: -moz-linear-gradient(top, #f6f6f6 5%, #ffffff 100%);
+ background: -webkit-linear-gradient(top, #f6f6f6 5%, #ffffff 100%);
+ background: -o-linear-gradient(top, #f6f6f6 5%, #ffffff 100%);
+ background: -ms-linear-gradient(top, #f6f6f6 5%, #ffffff 100%);
+ background: linear-gradient(to bottom, #f6f6f6 5%, #ffffff 100%);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#f6f6f6', endColorstr = '#ffffff', GradientType = 0);
+ text-decoration: none;
+ background-color: #f6f6f6;
}
+
input[class~='whiteButton']:active, .whiteButton:active {
- position:relative;
- top:1px;
+ position: relative;
+ top: 1px;
text-decoration: none;
}
+
input[class~='m3p10'], .m3p10 {
- margin: 0;
- padding: 3px 10px;
- height: 20px;
- display: inline-block;
+ margin: 0;
+ padding: 3px 10px;
+ height: 20px;
+ display: inline-block;
}
-input[class~='h30'], .h30{
- height: 30px;
+
+input[class~='h30'], .h30 {
+ height: 30px;
}
+
/* minimal
*******************************************************************************/
input[class='nyan-minimal'], .nyan-minimal {
- background: #e3e3e3;
- border: 1px solid #bbb;
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- border-radius: 3px;
- -webkit-box-shadow: inset 0 0 1px 1px #f6f6f6;
- -moz-box-shadow: inset 0 0 1px 1px #f6f6f6;
- box-shadow: inset 0 0 1px 1px #f6f6f6;
- color: #333;
- font: bold 12px "helvetica neue", helvetica, arial, sans-serif;
- line-height: 1;
- padding: 8px 0 9px;
- text-align: center;
- text-shadow: 0 1px 0 #fff;
- padding-left:10px;
- padding-right:10px;
+ background: #e3e3e3;
+ border: 1px solid #bbb;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+ -webkit-box-shadow: inset 0 0 1px 1px #f6f6f6;
+ -moz-box-shadow: inset 0 0 1px 1px #f6f6f6;
+ box-shadow: inset 0 0 1px 1px #f6f6f6;
+ color: #333;
+ font: bold 12px "helvetica neue", helvetica, arial, sans-serif;
+ line-height: 1;
+ padding: 8px 0 9px;
+ text-align: center;
+ text-shadow: 0 1px 0 #fff;
+ padding-left: 10px;
+ padding-right: 10px;
}
+
input[class='nyan-minimal'], .nyan-minimal:hover {
background: #d9d9d9;
-webkit-box-shadow: inset 0 0 1px 1px #eaeaea;
-moz-box-shadow: inset 0 0 1px 1px #eaeaea;
box-shadow: inset 0 0 1px 1px #eaeaea;
color: #222;
- cursor: pointer;
+ cursor: pointer;
}
+
input[class='nyan-minimal'], .nyan-minimal:active {
background: #d0d0d0;
-webkit-box-shadow: inset 0 0 1px 1px #e3e3e3;
-moz-box-shadow: inset 0 0 1px 1px #e3e3e3;
box-shadow: inset 0 0 1px 1px #e3e3e3;
- color: #000;
+ color: #000;
}
/* clean gray
*******************************************************************************/
input[class='nyan-clean-gray'], .nyan-clean-gray {
- background-color: #eeeeee;
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #eeeeee), color-stop(100%, #cccccc));
- background-image: -webkit-linear-gradient(top, #eeeeee, #cccccc);
- background-image: -moz-linear-gradient(top, #eeeeee, #cccccc);
- background-image: -ms-linear-gradient(top, #eeeeee, #cccccc);
- background-image: -o-linear-gradient(top, #eeeeee, #cccccc);
- background-image: linear-gradient(top, #eeeeee, #cccccc);
- border: 1px solid #ccc;
- border-bottom: 1px solid #bbb;
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- border-radius: 3px;
- color: #333;
- font: bold 11px "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;
- line-height: 1;
- padding: 8px 0;
- text-align: center;
- text-shadow: 0 1px 0 #eee;
- padding-left:10px;
- padding-right:10px;
+ background-color: #eeeeee;
+ background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #eeeeee), color-stop(100%, #cccccc));
+ background-image: -webkit-linear-gradient(top, #eeeeee, #cccccc);
+ background-image: -moz-linear-gradient(top, #eeeeee, #cccccc);
+ background-image: -ms-linear-gradient(top, #eeeeee, #cccccc);
+ background-image: -o-linear-gradient(top, #eeeeee, #cccccc);
+ background-image: linear-gradient(top, #eeeeee, #cccccc);
+ border: 1px solid #ccc;
+ border-bottom: 1px solid #bbb;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+ color: #333;
+ font: bold 11px "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;
+ line-height: 1;
+ padding: 8px 0;
+ text-align: center;
+ text-shadow: 0 1px 0 #eee;
+ padding-left: 10px;
+ padding-right: 10px;
}
+
input[class='nyan-clean-gray']:hover, .nyan-clean-gray:hover {
background-color: #dddddd;
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #dddddd), color-stop(100%, #bbbbbb));
@@ -483,221 +524,252 @@ input[class='nyan-clean-gray']:hover, .nyan-clean-gray:hover {
border: 1px solid #bbb;
border-bottom: 1px solid #999;
cursor: pointer;
- text-shadow: 0 1px 0 #ddd;
+ text-shadow: 0 1px 0 #ddd;
}
+
input[class='nyan-clean-gray']:active, .nyan-clean-gray:active {
border: 1px solid #aaa;
border-bottom: 1px solid #888;
-webkit-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;
-moz-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;
- box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;
+ box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;
}
-
#share_label {
line-height: 1.4em
}
/* 项目左侧siderbar下面工具集的样式
*******************************************************************************/
- .tools a:link{
- color: #116699;
- text-decoration:none;
- width:100px;
- padding:3px 5px 0px 5px;
-}
-.tools a:visited{
- color: #116699;
- text-decoration:none;
- padding:3px 5px 0px 5px;
- width:100px;
-}
-.tools a:hover{
- color:white;
- padding:3px 3px 0px 20px;
- width:88px;
- text-decoration:none;
- background-color:#539D26;
-}
-.tools a:active{
- color:white;
- padding:3px 3px 0px 20px;
- width:88px;
- text-decoration:none;
- background-color:#BD06B4;
+.tools a:link {
+ color: #116699;
+ text-decoration: none;
+ width: 100px;
+ padding: 3px 5px 0px 5px;
}
-.tools ul{
- list-style-type: none;
- margin: 0px 0px 0px 10% ;
- padding: 0;
+.tools a:visited {
+ color: #116699;
+ text-decoration: none;
+ padding: 3px 5px 0px 5px;
+ width: 100px;
}
-.tools li{
- background: url("/images/sidebar/tool_tag_alpha.png") 10px 30% no-repeat transparent;
- color: #3e3e3e;
- font-weight: 400;
- line-height: 1.5em;
- margin: 0px 0px 10px;
- padding: 0px 0px 0px 30px;
- font-size: 1.0em;
- /*border-bottom: 1px solid #CCC;*/
+
+.tools a:hover {
+ color: white;
+ padding: 3px 3px 0px 20px;
+ width: 88px;
+ text-decoration: none;
+ background-color: #539D26;
}
-.tools li:last-child{
- border: none;
+
+.tools a:active {
+ color: white;
+ padding: 3px 3px 0px 20px;
+ width: 88px;
+ text-decoration: none;
+ background-color: #BD06B4;
}
+
+.tools ul {
+ list-style-type: none;
+ margin: 0px 0px 0px 10%;
+ padding: 0;
+}
+
+.tools li {
+ background: url("/images/sidebar/tool_tag_alpha.png") 10px 30% no-repeat transparent;
+ color: #3e3e3e;
+ font-weight: 400;
+ line-height: 1.5em;
+ margin: 0px 0px 10px;
+ padding: 0px 0px 0px 30px;
+ font-size: 1.0em;
+ /*border-bottom: 1px solid #CCC;*/
+}
+
+.tools li:last-child {
+ border: none;
+}
+
/* 贴吧 forum memo
*******************************************************************************/
-div.actions input[type="text"]{
- padding: 3px;
- width: 100%;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- -box-sizing: border-box;
+div.actions input[type="text"] {
+ padding: 3px;
+ width: 100%;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ -box-sizing: border-box;
}
+
.lz {
- position:relative;
+ position: relative;
min-height: 200px;
margin: 10px 2px;
border-radius: 5px;
box-shadow: 1px 1px 6px #97EBF4;
border: 1px solid #F1F1F1;
}
-.lz-left{
- float: left;
- margin: 2%;
- padding: 0;
+
+.lz-left {
+ float: left;
+ margin: 2%;
+ padding: 0;
}
-.memo-section{
+
+.memo-section {
width: auto;
margin-left: 15%;
padding-top: 1%;
border-left: 2px dotted #EEE;
}
-.memo-title{
- margin: 1em 0;
- padding-left: 1%;
- padding-bottom: 1%;
- font-weight: bold;
- border-bottom: 1px dashed rgb(204, 204, 204);
+
+.memo-title {
+ margin: 1em 0;
+ padding-left: 1%;
+ padding-bottom: 1%;
+ font-weight: bold;
+ border-bottom: 1px dashed rgb(204, 204, 204);
}
-.memo-content{
- padding: 1%;
- margin: 1%;
- margin-bottom: 40px;
- background-color: #F8F8F8;
- border-radius: 3px;
+
+.memo-content {
+ padding: 1%;
+ margin: 1%;
+ margin-bottom: 40px;
+ background-color: #F8F8F8;
+ border-radius: 3px;
}
-.memo-timestamp{
- position: absolute;
- bottom: 0px;
- right: 0;
- margin: 20px;
+
+.memo-timestamp {
+ position: absolute;
+ bottom: 0px;
+ right: 0;
+ margin: 20px;
}
-.replies{
- overflow:hidden;
- max-width: 100%;
- float: right;
- /*max-width: 90%;*/
+
+.replies {
+ overflow: hidden;
+ max-width: 100%;
+ float: right;
+ /*max-width: 90%;*/
}
-.reply-box{
- float: right;
- width: 640px;
- padding: 3%;
- /*border: 2px solid #C6F3F9;*/
- border-top: 2px double #C6F3F9;
- /*border-radius: 10px;*/
+
+.reply-box {
+ float: right;
+ width: 640px;
+ padding: 3%;
+ /*border: 2px solid #C6F3F9;*/
+ border-top: 2px double #C6F3F9;
+ /*border-radius: 10px;*/
}
+
.memo-content img, .comments img {
- overflow:hidden;
- /*width: 100%;*/
- max-width: 500px;
- height: auto !important;
- width:expression(this.width > 500 ? "500px" : this.width+"px");
+ overflow: hidden;
+ /*width: 100%;*/
+ max-width: 500px;
+ height: auto !important;
+ width: expression(this.width > 500 ? "500px" : this.width+"px");
}
-table.content-text-list tbody tr td.sticky, div.memo-section .sticky{
- background: url(../images/zding.gif) no-repeat 0 1px; padding-left: 35px;
- /*background: url(../images/2uparrow.png) no-repeat 0 1px; padding-left: 20px;*/
- font-weight: bold;
- margin-left: 5px;
+
+table.content-text-list tbody tr td.sticky, div.memo-section .sticky {
+ background: url(../images/zding.gif) no-repeat 0 1px;
+ padding-left: 35px;
+ /*background: url(../images/2uparrow.png) no-repeat 0 1px; padding-left: 20px;*/
+ font-weight: bold;
+ margin-left: 5px;
}
-table.content-text-list tbody tr td.locked, div.memo-section .locked{
- background: url(../images/locked.png) no-repeat 0 1px;
- padding-left: 20px;
- margin-left: 5px;
+
+table.content-text-list tbody tr td.locked, div.memo-section .locked {
+ background: url(../images/locked.png) no-repeat 0 1px;
+ padding-left: 20px;
+ margin-left: 5px;
}
+
/* 问题列表
*******************************************************************************/
.query_form {
}
+
.content-title-top {
- padding-bottom: 10px;
+ padding-bottom: 10px;
}
+
.custom_query {
- max-width : 95%;
- margin : 3px auto;
- border-bottom : solid 1px #;
- -o-box-shadow :inset 0px 1px 1px 0px #FAFAFA;
- -moz-box-shadow :inset 0px 1px 1px 0px #FAFAFA;
- -webkit-box-shadow:inset 0px 1px 1px 0px #FAFAFA;
- box-shadow :inset 0px 1px 1px 0px #FAFAFA;
+ max-width: 95%;
+ margin: 3px auto;
+ -o-box-shadow: inset 0px 1px 1px 0px #FAFAFA;
+ -moz-box-shadow: inset 0px 1px 1px 0px #FAFAFA;
+ -webkit-box-shadow: inset 0px 1px 1px 0px #FAFAFA;
+ box-shadow: inset 0px 1px 1px 0px #FAFAFA;
}
+
.custom_query>span {
- display : block;
- max-width : 100%;
- line-height : 1.8em;
- font-size : 14px;
- text-align : center;
- border-radius : 3px;
- background-color: #DBEBEE;
+ display: block;
+ max-width: 100%;
+ line-height: 1.8em;
+ font-size: 14px;
+ text-align: center;
+ border-radius: 3px;
+ background-color: #DBEBEE;
}
+
.custom_query > .hide-when-print {
- max-width : 97%;
- padding : 1px 3px 6px;
- margin : 0 auto;
- background-color: #F7F7F7;
- border-bottom-left-radius : 10px;
- border-bottom-right-radius: 10px;
+ max-width: 97%;
+ padding: 1px 3px 6px;
+ margin: 0 auto;
+ background-color: #F7F7F7;
+ border-bottom-left-radius: 10px;
+ border-bottom-right-radius: 10px;
}
+
/* 项目新闻栏
*******************************************************************************/
.add_frame {
- position:relative;
+ position: relative;
margin: 5px 10px 2px 0px;
padding: 10px 10px;
border-radius: 5px;
/*box-shadow: 1px 1px 6px rgb(241,241,241);*/
/*border: 1px solid #F1F1F1;*/
}
-.add_frame_header{
- background: linear-gradient(#fbfbfb, #f8f8f8) repeat scroll 0% 0% transparent;
- border-bottom: 1px solid rgb(226,226,226);
- box-shadow: 0px 1px 0px white, 0px, -1px 0px rgb(245,245,245);
- height: 39px;
- font-size: 15px;
- line-height: 26px;
- height: 30px;
- font-size: 1.5em;
- padding-left: 4%;
+.add_frame_header {
+ background: linear-gradient(#fbfbfb, #f8f8f8) repeat scroll 0% 0% transparent;
+ border-bottom: 1px solid rgb(226, 226, 226);
+ box-shadow: 0px 1px 0px white, 0px, -1px 0px rgb(245, 245, 245);
+ height: 39px;
+ font-size: 15px;
+
+ line-height: 26px;
+ height: 30px;
+ font-size: 1.5em;
+ padding-left: 4%;
}
+
/* xx动态框
*******************************************************************************/
-.project_acts *{border:1px solid #000000;}
-.project_acts{
- height: 250px;
+.project_acts * {
+ border: 1px solid #000000;
+}
+
+.project_acts {
+ height: 250px;
}
-.project_acts .project_acts_left{
- float: left;
- height: 100%;
- width: 61%;
+
+.project_acts .project_acts_left {
+ float: left;
+ height: 100%;
+ width: 61%;
}
-.project_acts .project_acts_right{
- height: 100%;
- margin-left: 61%;
+
+.project_acts .project_acts_right {
+ height: 100%;
+ margin-left: 61%;
}
+
/* stores 资源库
*******************************************************************************/
.line_block {
@@ -710,152 +782,361 @@ table.content-text-list tbody tr td.locked, div.memo-section .locked{
-moz-box-sizing: border-box;
-box-sizing: border-box;
}
-.resource_sum{
- height: auto;
+
+.resource_sum {
+ height: auto;
}
-.line_block p{
- margin: 20px -2px 0px 0px;
- /*background: linear-gradient(#ffffff, #e5e5e5) repeat scroll 0% 0% transparent;*/
- border-bottom: 1px solid rgb(226,226,226);
- border-top-left-radius : 6px;
- border-top-right-radius : 6px;
- box-shadow: 0px 1px 0px white, 0px, -1px 0px rgb(245,245,245);
- height: 39px;
- font-size: 15px;
- line-height: 26px;
- height: 30px;
- font-size: 1.5em;
- padding-left: 4%;
- border-bottom: 1px solid rgb(21, 165, 200);
+
+.line_block p {
+ margin: 20px -2px 0px 0px;
+ /*background: linear-gradient(#ffffff, #e5e5e5) repeat scroll 0% 0% transparent;*/
+ border-bottom: 1px solid rgb(226, 226, 226);
+ border-top-left-radius: 6px;
+ border-top-right-radius: 6px;
+ box-shadow: 0px 1px 0px white, 0px, -1px 0px rgb(245, 245, 245);
+ height: 39px;
+ font-size: 15px;
+ line-height: 26px;
+ height: 30px;
+ font-size: 1.5em;
+ padding-left: 4%;
+ border-bottom: 1px solid rgb(21, 165, 200);
}
-.resource_sum, .line_blo{
- border: 1px solid #eeeeee;
+
+.resource_sum, .line_blo {
+ border: 1px solid #eeeeee;
}
+
.filename {
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- max-width: 247px;
-}
-.line_block .table1{
- display: table;
- width: 100%;
- border-left: 1px solid #eeeeee;
- border-right: 1px solid #eeeeee;
- border-bottom: 1px solid #eeeeee;
-}
-.line_block .table_row1{
- height: 38px;
- display: table-row;
- width: 100%;
-}
-.line_block .table_cell1{
- display: table-cell;
- padding: 2px;
- border: 1px solid #FFFFFF;
- vertical-align: middle;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ max-width: 230px;
}
-.line_block .filename1{
- width: 62%;
- padding-left: 8px;
-}
-.line_block .filedown1{
- width: 19%;
- text-align: center;
-}
-.line_block .downicon1{
- width: 19%;
- text-align: center;
+.line_block .table1 {
+ display: table;
+ width: 100%;
+ border-left: 1px solid #eeeeee;
+ border-right: 1px solid #eeeeee;
+ border-bottom: 1px solid #eeeeee;
}
-.blue-color, .blue-color a{
- color: rgb(109,153,178);
+.line_block .table_row1 {
+ height: 38px;
+ display: table-row;
+ width: 100%;
}
-.gray-color, .gray-color a{
- color: rgb(153,153,153);
+
+.line_block .table_cell1 {
+ display: table-cell;
+ padding: 2px;
+ border: 1px solid #FFFFFF;
+ vertical-align: middle;
}
+
+.line_block .filename1 {
+ width: 62%;
+ padding-left: 8px;
+}
+
+.line_block .filedown1 {
+ width: 19%;
+ text-align: center;
+}
+
+.line_block .downicon1 {
+ width: 19%;
+ text-align: center;
+}
+
+.blue-color, .blue-color a {
+ color: rgb(109, 153, 178);
+}
+
+.gray-color, .gray-color a {
+ color: rgb(153, 153, 153);
+}
+
#top_field {
- max-width: 100%;
- margin: 20px auto;
+ max-width: 100%;
+ margin: 20px auto;
}
-.blueinputbar{
- -o-transform-origin: 138px 46.5px;
- -o-transition: background 0.2s cubic-bezier(0, 0, 1, 1);
- -webkit-border-bottom-left-radius: 3px;
- -webkit-border-bottom-right-radius: 3px;
- -webkit-border-radius: 3px;
- -webkit-border-top-left-radius: 3px;
- -webkit-border-top-right-radius: 3px;
- -webkit-transform-origin: 138px 46.5px;
- -webkit-transition: background 0.2s cubic-bezier(0, 0, 1, 1);
- -webkit-transition-delay: 0;
- -webkit-transition-duration: 0.2s;
- -webkit-transition-property: background;
- -webkit-transition-timing-function: cubic-bezier(0, 0, 1, 1);
- align-content: stretch;
- align-items: stretch;
- align-self: stretch;
- background: #FFFFFF;
- border-bottom: 1px solid #56B4EF;
- border-left: 1px solid #56B4EF;
- border-radius: 3px;
- border-right: 1px solid #56B4EF;
- border-top: 1px solid #56B4EF;
- color: #333333;
- justify-content: flex-start;
- margin: 0px;
- order: 0;
- outline: #333333 0px;
- overflow-wrap: break-word;
- resize: none;
- text-shadow: none;
- transform-origin: 138px 46.5px;
- transition: background 0.2s cubic-bezier(0, 0, 1, 1);
- unicode-bidi: embed;
- vertical-align: top;
- word-wrap: break-word;
+
+.blueinputbar {
+ -o-transform-origin: 138px 46.5px;
+ -o-transition: background 0.2s cubic-bezier(0, 0, 1, 1);
+ -webkit-border-bottom-left-radius: 3px;
+ -webkit-border-bottom-right-radius: 3px;
+ -webkit-border-radius: 3px;
+ -webkit-border-top-left-radius: 3px;
+ -webkit-border-top-right-radius: 3px;
+ -webkit-transform-origin: 138px 46.5px;
+ -webkit-transition: background 0.2s cubic-bezier(0, 0, 1, 1);
+ -webkit-transition-delay: 0;
+ -webkit-transition-duration: 0.2s;
+ -webkit-transition-property: background;
+ -webkit-transition-timing-function: cubic-bezier(0, 0, 1, 1);
+ align-content: stretch;
+ align-items: stretch;
+ align-self: stretch;
+ background: #FFFFFF;
+ border-bottom: 1px solid #56B4EF;
+ border-left: 1px solid #56B4EF;
+ border-radius: 3px;
+ border-right: 1px solid #56B4EF;
+ border-top: 1px solid #56B4EF;
+ color: #333333;
+ justify-content: flex-start;
+ margin: 0px;
+ order: 0;
+ outline: #333333 0px;
+ overflow-wrap: break-word;
+ resize: none;
+ text-shadow: none;
+ transform-origin: 138px 46.5px;
+ transition: background 0.2s cubic-bezier(0, 0, 1, 1);
+ unicode-bidi: embed;
+ vertical-align: top;
+ word-wrap: break-word;
}
+
input.blueinputbar:focus {
- box-shadow: rgba(0, 0, 0, 0.047) 0px 1px 3px 0px inset, rgba(82, 168, 236, 0.600) 0px 0px 5px 0px;
- border-bottom: 1px solid #56B4EF;
- border-left: 1px solid #56B4EF;
- border-radius: 3px;
- border-right: 1px solid #56B4EF;
- border-top: 1px solid #56B4EF;
+ box-shadow: rgba(0, 0, 0, 0.047) 0px 1px 3px 0px inset, rgba(82, 168, 236, 0.600) 0px 0px 5px 0px;
+ border-bottom: 1px solid #56B4EF;
+ border-left: 1px solid #56B4EF;
+ border-radius: 3px;
+ border-right: 1px solid #56B4EF;
+ border-top: 1px solid #56B4EF;
}
+
.r1 {
- font-size:13px;
- line-height: 1.7em;
- overflow-wrap: break-word;
- padding-bottom: 20px;
- /*padding-left: 20px;*/
- /*width: 50em;*/
+ font-size: 13px;
+ line-height: 1.7em;
+ overflow-wrap: break-word;
+ padding-bottom: 20px;
+ /*padding-left: 20px;*/
+ /*width: 50em;*/
}
+
.r1 .cb {
- font-size: 16px;
- color: #3333cc;
+ font-size: 16px;
+ color: #3333cc;
}
+
/* course 用户 课程 历史
*******************************************************************************/
-.courses_history{
- opacity: 0.7;
+.courses_history {
+ opacity: 0.7;
}
+
.courses_history a {
- color: #666;
+ color: #666;
}
/* issue div.issues
*******************************************************************************/
-div.issue{
- background: none repeat scroll 0 0 #FFFFEC;
- /*border: none;*/
- margin-bottom: 6px;
- padding: 10;
- border-radius: 3px;
-/* -moz-box-shadow: 3px 3px 10px rgba(100,150,205,0.1);
- -webkit-box-shadow: 3px 3px 10px rgba(100,150,205,0.1);
- box-shadow: 3px 3px 10px rgba(100,150,205,0.1);*/
+div.issue {
+ background: none repeat scroll 0 0 #FFFFEC;
+ /*border: none;*/
+ margin-bottom: 6px;
+ padding: 10;
+ border-radius: 3px;
+ /* -moz-box-shadow: 3px 3px 10px rgba(100,150,205,0.1);
+ -webkit-box-shadow: 3px 3px 10px rgba(100,150,205,0.1);
+ box-shadow: 3px 3px 10px rgba(100,150,205,0.1);*/
}
+/* project 文件列表 资源库
+*******************************************************************************/
+.tags_area {
+ height: 5px;
+}
+#ver-zebra, .file_table_des {
+ font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
+ font-size: 12px;
+ margin: 5px 10px;
+ width: 98%;
+ text-align: left;
+ border-collapse: collapse;
+ font-size: 14px;
+}
+
+#ver-zebra th {
+ font-size: 14px;
+ font-weight: normal;
+ padding: 12px 15px;
+ border-right: 1px solid #fff;
+ border-left: 1px solid #fff;
+ color: #039;
+ text-align: left;
+}
+
+#ver-zebra td {
+ padding: 8px;
+ border-right: 1px solid #fff;
+ border-left: 1px solid #fff;
+ color: #669;
+}
+
+#ver-zebra td.description {
+ background-color: white;
+ padding: 0px;
+ margin: 0px auto;
+}
+
+#ver-zebra1, .file_table_des {
+ font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
+ font-size: 12px;
+ margin: 5px 10px;
+ width: 98%;
+ text-align: left;
+ border-collapse: collapse;
+ line-height: 20px;
+ font-size: 14px;
+}
+
+#ver-zebra1 th {
+ font-size: 14px;
+ font-weight: normal;
+ padding: 12px 15px;
+ border-right: 1px solid #fff;
+ border-left: 1px solid #fff;
+ color: #039;
+ text-align: left;
+}
+
+#ver-zebra1 td {
+ padding: 8px ;
+ border-right: 1px solid #fff;
+ border-left: 1px solid #fff;
+ color: #669;
+}
+
+#ver-zebra1 td.description {
+ background-color: white;
+ padding: 0px;
+ margin: 0px auto;
+}
+
+div.tags_area {
+ padding: 2px 10px 10px 10px;
+ margin: 0px;
+ margin-bottom: 10px;
+ /*border-bottom: 1px dashed #CCCCCC;*/
+ overflow: hidden;
+ position: relative;
+}
+
+.tags_gradint {
+}
+
+.read-more {
+ padding: 5px;
+ border-top: 4px double #ddd;
+ background: #fff;
+ color: #333;
+}
+
+.read-more a {
+ padding-right: 22px;
+ background: no-repeat 100% 50%;
+ font-weight: bold;
+ text-decoration: none;
+}
+
+.read-more a:hover {
+ color: #000;
+}
+
+.vzebra-odd {
+ background: #eff2ff;
+}
+
+.vzebra-even {
+ background: #e8edff;
+}
+
+#ver-zebra #vzebra-adventure, #ver-zebra #vzebra-children {
+ background: #ffffff;
+ border-bottom: 1px solid #c8d4fd;
+}
+
+#ver-zebra #vzebra-comedy, #ver-zebra #vzebra-action {
+ background: #ffffff;
+ border-bottom: 1px solid #d6dfff;
+}
+
+#ver-zebra1 #vzebra-adventure, #ver-zebra #vzebra-children {
+ background: #ffffff;
+ border-bottom: 1px solid #c8d4fd;
+}
+
+#ver-zebra1 #vzebra-comedy, #ver-zebra #vzebra-action {
+ background: #ffffff;
+ border-bottom: 1px solid #d6dfff;
+}
+
+ver-zebra .filename {
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+}
+
+div.pagination {
+ margin: 10px 0px;
+ height: 1.5em;
+ text-align: left;
+ font-size: 13px;
+}
+
+.m5p5 {
+ display: inline-block;
+ height: auto;
+ color: white !important;
+ margin: 8px;
+ padding: 3px 7px;
+}
+
+.m5p5:hover {
+ text-decoration: none;
+ /*padding-bottom: 3px;*/
+ /*border-bottom: 1px solid #666666;*/
+ border-radius: 4px;
+ border: 1px solid #15bccf;
+ box-shadow: 3px 3px 3px #666666;
+}
+
+.relation_file_div {
+ margin: 0px 25px;
+}
+
+.relation_file_div fieldset {
+ margin: 0px 0px;
+ padding: 10px;
+ border-radius: 5px;
+ transition: all 2s linear 1s;
+}
+
+.relation_file_div input#attach_search:focus {
+ border: 1px solid #1B95C6;
+ box-shadow: 0px 0px 4px #1B95C6;
+ width: 200px;
+}
+
+.relation_file_div input#attach_search {
+ width: 150px;
+ outline: none;
+ border-radius: 5px;
+ -webkit-transition: 1s width;
+ -moz-transition: 1s width;
+ -o-transition: 1s width;
+ transition: 1s width;
+}
+.all_browse_div table .description{
+ border-bottom: 1px solid #efffff;
+}
+.all_browse_div table td{
+ vertical-align: middle;
+}
diff --git a/public/stylesheets/welcome.css b/public/stylesheets/welcome.css
index cdfacf9ed..f7756e5b8 100644
--- a/public/stylesheets/welcome.css
+++ b/public/stylesheets/welcome.css
@@ -405,6 +405,16 @@ a.attachments_list_color {
background: url('../images/list-icon.png') no-repeat scroll left center;
font-size: 10pt;
}
+ /*帖子标题前吧名*/
+ .memo_activity .memo_Bar_title{
+ display: inline-block;
+ /*color: #59ceff;*/
+ color: #e8770d;
+ font-weight: bold;
+ margin-bottom: 3px;
+ padding-left: 0px;
+ font-size: 10pt;
+ }
/*帖子的各种属性*/
.memo_activity .memo_attr{
margin-left: 20px;
@@ -442,4 +452,15 @@ a.attachments_list_color {
font-size: 10pt;
}
- /************************** 贴吧动态 结束 ****************************
\ No newline at end of file
+ /************************** 贴吧动态 结束 ****************************/
+ /************************** 学校课程 开始 ****************************/
+ .course{
+
+ }
+ .course .font_welcome_school{
+ font-family: Tahoma,"Microsoft YaHei";
+ font-weight: bold;
+ font-size: 20px;
+ color:#e8770d;
+}
+/************************** 学校课程 结束 ****************************/
\ No newline at end of file
diff --git a/test/fixtures/attachmentstypes.yml b/test/fixtures/attachmentstypes.yml
new file mode 100644
index 000000000..429b31b4b
--- /dev/null
+++ b/test/fixtures/attachmentstypes.yml
@@ -0,0 +1,9 @@
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
+
+one:
+ typeId:
+ typeName:
+
+two:
+ typeId:
+ typeName:
diff --git a/test/unit/attachmentstype_test.rb b/test/unit/attachmentstype_test.rb
new file mode 100644
index 000000000..0dcee4479
--- /dev/null
+++ b/test/unit/attachmentstype_test.rb
@@ -0,0 +1,7 @@
+require 'test_helper'
+
+class AttachmentstypeTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end