Merge branch 'szzh' of http://xianbo_trustie2@repository.trustie.net/xianbo/trustie2.git into szzh
This commit is contained in:
commit
2caf2ddf30
3
Gemfile
3
Gemfile
|
@ -21,7 +21,8 @@ gem 'acts-as-taggable-on', '2.4.1'
|
|||
gem 'spreadsheet'
|
||||
gem 'ruby-ole'
|
||||
#gem 'email_verifier', path: 'lib/email_verifier'
|
||||
|
||||
gem 'rufus-scheduler'
|
||||
gem 'dalli', path: 'lib/dalli-2.7.2'
|
||||
group :development do
|
||||
gem 'grape-swagger'
|
||||
gem 'grape-swagger-ui', git: 'https://github.com/guange2015/grape-swagger-ui.git'
|
||||
|
|
348
Gemfile.lock
348
Gemfile.lock
|
@ -1,348 +0,0 @@
|
|||
GIT
|
||||
remote: https://github.com/guange2015/grape-swagger-ui.git
|
||||
revision: 4c33439f236c174ae0e774b3435ef2547995c21d
|
||||
specs:
|
||||
grape-swagger-ui (0.0.4)
|
||||
railties (>= 3.1)
|
||||
|
||||
PATH
|
||||
remote: lib/better_errors
|
||||
specs:
|
||||
better_errors (1.1.0)
|
||||
coderay (>= 1.0.0)
|
||||
erubis (>= 2.6.6)
|
||||
|
||||
PATH
|
||||
remote: lib/rack-mini-profiler
|
||||
specs:
|
||||
rack-mini-profiler (0.9.1)
|
||||
rack (>= 1.1.3)
|
||||
|
||||
PATH
|
||||
remote: lib/seems_rateable
|
||||
specs:
|
||||
seems_rateable (1.0.13)
|
||||
jquery-rails
|
||||
rails
|
||||
|
||||
GEM
|
||||
remote: http://rubygems.org/
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
actionmailer (3.2.13)
|
||||
actionpack (= 3.2.13)
|
||||
mail (~> 2.5.3)
|
||||
actionpack (3.2.13)
|
||||
activemodel (= 3.2.13)
|
||||
activesupport (= 3.2.13)
|
||||
builder (~> 3.0.0)
|
||||
erubis (~> 2.7.0)
|
||||
journey (~> 1.0.4)
|
||||
rack (~> 1.4.5)
|
||||
rack-cache (~> 1.2)
|
||||
rack-test (~> 0.6.1)
|
||||
sprockets (~> 2.2.1)
|
||||
activemodel (3.2.13)
|
||||
activesupport (= 3.2.13)
|
||||
builder (~> 3.0.0)
|
||||
activerecord (3.2.13)
|
||||
activemodel (= 3.2.13)
|
||||
activesupport (= 3.2.13)
|
||||
arel (~> 3.0.2)
|
||||
tzinfo (~> 0.3.29)
|
||||
activeresource (3.2.13)
|
||||
activemodel (= 3.2.13)
|
||||
activesupport (= 3.2.13)
|
||||
activesupport (3.2.13)
|
||||
i18n (= 0.6.1)
|
||||
multi_json (~> 1.0)
|
||||
acts-as-taggable-on (2.4.1)
|
||||
rails (>= 3, < 5)
|
||||
arel (3.0.3)
|
||||
axiom-types (0.1.1)
|
||||
descendants_tracker (~> 0.0.4)
|
||||
ice_nine (~> 0.11.0)
|
||||
thread_safe (~> 0.3, >= 0.3.1)
|
||||
builder (3.0.0)
|
||||
capybara (2.4.1)
|
||||
mime-types (>= 1.16)
|
||||
nokogiri (>= 1.3.3)
|
||||
rack (>= 1.0.0)
|
||||
rack-test (>= 0.5.4)
|
||||
xpath (~> 2.0)
|
||||
celluloid (0.16.0)
|
||||
timers (~> 4.0.0)
|
||||
childprocess (0.5.3)
|
||||
ffi (~> 1.0, >= 1.0.11)
|
||||
climate_control (0.0.3)
|
||||
activesupport (>= 3.0)
|
||||
cocaine (0.5.4)
|
||||
climate_control (>= 0.0.3, < 1.0)
|
||||
coderay (1.0.9)
|
||||
coercible (1.0.0)
|
||||
descendants_tracker (~> 0.0.1)
|
||||
coffee-rails (3.2.2)
|
||||
coffee-script (>= 2.2.0)
|
||||
railties (~> 3.2.0)
|
||||
coffee-script (2.3.0)
|
||||
coffee-script-source
|
||||
execjs
|
||||
coffee-script-source (1.7.1)
|
||||
descendants_tracker (0.0.4)
|
||||
thread_safe (~> 0.3, >= 0.3.1)
|
||||
diff-lcs (1.2.5)
|
||||
equalizer (0.0.9)
|
||||
erubis (2.7.0)
|
||||
execjs (2.2.1)
|
||||
factory_girl (4.4.0)
|
||||
activesupport (>= 3.0.0)
|
||||
faker (1.4.3)
|
||||
i18n (~> 0.5)
|
||||
fastercsv (1.5.5)
|
||||
ffi (1.9.3)
|
||||
ffi (1.9.3-x86-mingw32)
|
||||
formatador (0.2.5)
|
||||
grape (0.9.0)
|
||||
activesupport
|
||||
builder
|
||||
hashie (>= 2.1.0)
|
||||
multi_json (>= 1.3.2)
|
||||
multi_xml (>= 0.5.2)
|
||||
rack (>= 1.3.0)
|
||||
rack-accept
|
||||
rack-mount
|
||||
virtus (>= 1.0.0)
|
||||
grape-entity (0.4.4)
|
||||
activesupport
|
||||
multi_json (>= 1.3.2)
|
||||
grape-swagger (0.8.0)
|
||||
grape
|
||||
grape-entity
|
||||
guard (2.11.1)
|
||||
formatador (>= 0.2.4)
|
||||
listen (~> 2.7)
|
||||
lumberjack (~> 1.0)
|
||||
nenv (~> 0.1)
|
||||
notiffany (~> 0.0)
|
||||
pry (>= 0.9.12)
|
||||
shellany (~> 0.0)
|
||||
thor (>= 0.18.1)
|
||||
guard-rspec (2.5.0)
|
||||
guard (>= 1.1)
|
||||
rspec (~> 2.11)
|
||||
hashie (3.3.1)
|
||||
hike (1.2.3)
|
||||
hitimes (1.2.2)
|
||||
hitimes (1.2.2-x86-mingw32)
|
||||
htmlentities (4.3.2)
|
||||
i18n (0.6.1)
|
||||
ice_nine (0.11.0)
|
||||
journey (1.0.4)
|
||||
jquery-rails (2.0.3)
|
||||
railties (>= 3.1.0, < 5.0)
|
||||
thor (~> 0.14)
|
||||
json (1.8.1)
|
||||
kaminari (0.16.1)
|
||||
actionpack (>= 3.0.0)
|
||||
activesupport (>= 3.0.0)
|
||||
libv8 (3.16.14.3)
|
||||
listen (2.8.5)
|
||||
celluloid (>= 0.15.2)
|
||||
rb-fsevent (>= 0.9.3)
|
||||
rb-inotify (>= 0.9)
|
||||
lumberjack (1.0.9)
|
||||
mail (2.5.4)
|
||||
mime-types (~> 1.16)
|
||||
treetop (~> 1.4.8)
|
||||
metaclass (0.0.4)
|
||||
method_source (0.8.2)
|
||||
mime-types (1.25.1)
|
||||
mini_portile (0.6.0)
|
||||
mocha (1.1.0)
|
||||
metaclass (~> 0.0.1)
|
||||
multi_json (1.10.1)
|
||||
multi_xml (0.5.5)
|
||||
mysql2 (0.3.11)
|
||||
mysql2 (0.3.11-x86-mingw32)
|
||||
nenv (0.2.0)
|
||||
net-ldap (0.3.1)
|
||||
nokogiri (1.6.3)
|
||||
mini_portile (= 0.6.0)
|
||||
nokogiri (1.6.3-x86-mingw32)
|
||||
mini_portile (= 0.6.0)
|
||||
notiffany (0.0.3)
|
||||
nenv (~> 0.1)
|
||||
shellany (~> 0.0)
|
||||
paperclip (3.5.4)
|
||||
activemodel (>= 3.0.0)
|
||||
activesupport (>= 3.0.0)
|
||||
cocaine (~> 0.5.3)
|
||||
mime-types
|
||||
polyglot (0.3.5)
|
||||
pry (0.9.12.6)
|
||||
coderay (~> 1.0)
|
||||
method_source (~> 0.8)
|
||||
slop (~> 3.4)
|
||||
pry (0.9.12.6-x86-mingw32)
|
||||
coderay (~> 1.0)
|
||||
method_source (~> 0.8)
|
||||
slop (~> 3.4)
|
||||
win32console (~> 1.3)
|
||||
rack (1.4.5)
|
||||
rack-accept (0.4.5)
|
||||
rack (>= 0.4)
|
||||
rack-cache (1.2)
|
||||
rack (>= 0.4)
|
||||
rack-mount (0.8.3)
|
||||
rack (>= 1.0.0)
|
||||
rack-openid (1.4.2)
|
||||
rack (>= 1.1.0)
|
||||
ruby-openid (>= 2.1.8)
|
||||
rack-raw-upload (1.1.1)
|
||||
multi_json
|
||||
rack-ssl (1.3.4)
|
||||
rack
|
||||
rack-test (0.6.2)
|
||||
rack (>= 1.0)
|
||||
rails (3.2.13)
|
||||
actionmailer (= 3.2.13)
|
||||
actionpack (= 3.2.13)
|
||||
activerecord (= 3.2.13)
|
||||
activeresource (= 3.2.13)
|
||||
activesupport (= 3.2.13)
|
||||
bundler (~> 1.0)
|
||||
railties (= 3.2.13)
|
||||
railties (3.2.13)
|
||||
actionpack (= 3.2.13)
|
||||
activesupport (= 3.2.13)
|
||||
rack-ssl (~> 1.3.2)
|
||||
rake (>= 0.8.7)
|
||||
rdoc (~> 3.4)
|
||||
thor (>= 0.14.6, < 2.0)
|
||||
rake (10.3.2)
|
||||
rb-fsevent (0.9.4)
|
||||
rb-inotify (0.9.5)
|
||||
ffi (>= 0.5.0)
|
||||
rdoc (3.12.2)
|
||||
json (~> 1.4)
|
||||
ref (1.0.5)
|
||||
rich (1.4.6)
|
||||
jquery-rails
|
||||
kaminari
|
||||
mime-types
|
||||
paperclip
|
||||
rack-raw-upload
|
||||
rails (>= 3.2.0)
|
||||
sass-rails
|
||||
rspec (2.13.0)
|
||||
rspec-core (~> 2.13.0)
|
||||
rspec-expectations (~> 2.13.0)
|
||||
rspec-mocks (~> 2.13.0)
|
||||
rspec-core (2.13.1)
|
||||
rspec-expectations (2.13.0)
|
||||
diff-lcs (>= 1.1.3, < 2.0)
|
||||
rspec-mocks (2.13.1)
|
||||
rspec-rails (2.13.1)
|
||||
actionpack (>= 3.0)
|
||||
activesupport (>= 3.0)
|
||||
railties (>= 3.0)
|
||||
rspec-core (~> 2.13.0)
|
||||
rspec-expectations (~> 2.13.0)
|
||||
rspec-mocks (~> 2.13.0)
|
||||
ruby-ole (1.2.11.7)
|
||||
ruby-openid (2.1.8)
|
||||
rubyzip (1.1.6)
|
||||
sass (3.3.10)
|
||||
sass-rails (3.2.6)
|
||||
railties (~> 3.2.0)
|
||||
sass (>= 3.1.10)
|
||||
tilt (~> 1.3)
|
||||
selenium-webdriver (2.42.0)
|
||||
childprocess (>= 0.5.0)
|
||||
multi_json (~> 1.0)
|
||||
rubyzip (~> 1.0)
|
||||
websocket (~> 1.0.4)
|
||||
shellany (0.0.1)
|
||||
shoulda (3.5.0)
|
||||
shoulda-context (~> 1.0, >= 1.0.1)
|
||||
shoulda-matchers (>= 1.4.1, < 3.0)
|
||||
shoulda-context (1.2.1)
|
||||
shoulda-matchers (2.6.1)
|
||||
activesupport (>= 3.0.0)
|
||||
slop (3.6.0)
|
||||
spreadsheet (1.0.0)
|
||||
ruby-ole (>= 1.0)
|
||||
sprockets (2.2.2)
|
||||
hike (~> 1.2)
|
||||
multi_json (~> 1.0)
|
||||
rack (~> 1.0)
|
||||
tilt (~> 1.1, != 1.3.0)
|
||||
therubyracer (0.12.1)
|
||||
libv8 (~> 3.16.14.0)
|
||||
ref
|
||||
thor (0.19.1)
|
||||
thread_safe (0.3.4)
|
||||
tilt (1.4.1)
|
||||
timers (4.0.1)
|
||||
hitimes
|
||||
treetop (1.4.15)
|
||||
polyglot
|
||||
polyglot (>= 0.3.1)
|
||||
tzinfo (0.3.40)
|
||||
uglifier (2.5.1)
|
||||
execjs (>= 0.3.0)
|
||||
json (>= 1.8.0)
|
||||
virtus (1.0.3)
|
||||
axiom-types (~> 0.1)
|
||||
coercible (~> 1.0)
|
||||
descendants_tracker (~> 0.0, >= 0.0.3)
|
||||
equalizer (~> 0.0, >= 0.0.9)
|
||||
websocket (1.0.7)
|
||||
win32console (1.3.2-x86-mingw32)
|
||||
xpath (2.0.0)
|
||||
nokogiri (~> 1.3)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
x86-mingw32
|
||||
|
||||
DEPENDENCIES
|
||||
activerecord-jdbc-adapter (= 1.2.5)
|
||||
activerecord-jdbcmysql-adapter
|
||||
acts-as-taggable-on (= 2.4.1)
|
||||
better_errors!
|
||||
builder (= 3.0.0)
|
||||
capybara (~> 2.4.1)
|
||||
coderay (~> 1.0.6)
|
||||
coffee-rails (~> 3.2.1)
|
||||
factory_girl (~> 4.4.0)
|
||||
faker
|
||||
fastercsv (~> 1.5.0)
|
||||
grape (~> 0.9.0)
|
||||
grape-entity
|
||||
grape-swagger
|
||||
grape-swagger-ui!
|
||||
guard-rspec (= 2.5.0)
|
||||
htmlentities
|
||||
i18n (~> 0.6.0)
|
||||
jquery-rails (~> 2.0.2)
|
||||
kaminari
|
||||
mocha (~> 1.1.0)
|
||||
mysql2 (= 0.3.11)
|
||||
net-ldap (~> 0.3.1)
|
||||
nokogiri (~> 1.6.3)
|
||||
paperclip (~> 3.5.4)
|
||||
rack-mini-profiler!
|
||||
rack-openid
|
||||
rails (= 3.2.13)
|
||||
rich (= 1.4.6)
|
||||
rspec-rails (= 2.13.1)
|
||||
ruby-ole
|
||||
ruby-openid (~> 2.1.4)
|
||||
sass-rails (~> 3.2.3)
|
||||
seems_rateable!
|
||||
selenium-webdriver (~> 2.42.0)
|
||||
shoulda (~> 3.5.0)
|
||||
spreadsheet
|
||||
therubyracer
|
||||
uglifier (>= 1.0.3)
|
|
@ -6,6 +6,7 @@ module Mobile
|
|||
require_relative 'apis/watches'
|
||||
require_relative 'apis/upgrade'
|
||||
require_relative 'apis/homeworks'
|
||||
require_relative 'apis/comments'
|
||||
class API < Grape::API
|
||||
version 'v1', using: :path
|
||||
format :json
|
||||
|
@ -37,6 +38,7 @@ module Mobile
|
|||
mount Apis::Watches
|
||||
mount Apis::Upgrade
|
||||
mount Apis::Homeworks
|
||||
mount Apis::Comments
|
||||
|
||||
#add_swagger_documentation ({api_version: 'v1', base_path: 'http://u06.shellinfo.cn/trustie/api'})
|
||||
#add_swagger_documentation ({api_version: 'v1', base_path: '/api'}) if Rails.env.development?
|
||||
|
|
|
@ -0,0 +1,79 @@
|
|||
#coding=utf-8
|
||||
module Mobile
|
||||
module Apis
|
||||
class Comments < Grape::API
|
||||
resource :comments do
|
||||
desc '课程通知评论'
|
||||
params do
|
||||
requires :token, type: String
|
||||
requires :comments, type: String
|
||||
end
|
||||
post ':id' do
|
||||
cs = CommentService.new
|
||||
cs_params = {
|
||||
id: params[:id],
|
||||
comment: params.reject{|k,v| [:id].include?(k)}}
|
||||
comments = cs.news_comments cs_params,current_user
|
||||
raise "create comments failed #{comments.errors.full_messages}" if comments.new_record?
|
||||
present :data, comments, with: Mobile::Entities::Comment
|
||||
present :status, 0
|
||||
end
|
||||
|
||||
desc '作业留言(教师布置的作业)'
|
||||
params do
|
||||
requires :token, type: String
|
||||
requires :message,type: String, desc: '留言'
|
||||
#optional :reference_content, type: String ,desc: '引用的内容'
|
||||
#optional :reference_user_id, type: Integer,desc: '被引用的人'
|
||||
end
|
||||
post ':id/create_homework_message' do
|
||||
cs_params = {
|
||||
id: params[:id],
|
||||
token: params[:token],
|
||||
reference_content: params[:reference_content],
|
||||
bid_message: params.reject{|k,v| [:id,:token,:reference_content].include?(k)}}
|
||||
cs = CommentService.new
|
||||
message = cs.homework_message cs_params,current_user
|
||||
present :data, message, with: Mobile::Entities::Jours
|
||||
present :status, 0
|
||||
end
|
||||
|
||||
desc '课程留言'
|
||||
params do
|
||||
requires :token, type: String
|
||||
requires :course_message,type: String, desc: '留言'
|
||||
end
|
||||
post ':id/leave_course_message' do
|
||||
cs_params = {
|
||||
id: params[:id],
|
||||
token: params[:token],
|
||||
new_form: params.reject{|k,v| [:id,:token].include?(k)}}
|
||||
cs = CommentService.new
|
||||
message = cs.leave_course_message cs_params,current_user
|
||||
present :data, message, with: Mobile::Entities::Jours
|
||||
present :status, 0
|
||||
end
|
||||
|
||||
desc '回复留言'
|
||||
params do
|
||||
requires :token, type: String
|
||||
requires :reference_id, type: Integer,desc: '所属留言树的根留言id(最顶层的非回复的留言,留言对象中的m_parent_id)'
|
||||
requires :reference_user_id,type: Integer ,desc: '被回复的留言的作者id'
|
||||
#requires :reference_message_id,type: Integer,desc: '被回复的留言的id'
|
||||
requires :user_notes,type: String,desc: '留言的内容'
|
||||
requires :jour_type,type: String,desc: '等于父留言的jour_type'
|
||||
requires :jour_id,type:Integer, desc: '等于父留言的jour_id'
|
||||
end
|
||||
post ':reference_message_id/create_reply'do
|
||||
cs = CommentService.new
|
||||
message = cs.create_reply params,current_user
|
||||
raise "create reply failed #{message.errors.full_messages}" if message.new_record?
|
||||
present :data, message, with: Mobile::Entities::Jours
|
||||
present :status, 0
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -8,10 +8,11 @@ module Mobile
|
|||
optional :school_id, type: Integer, desc: '传入学校id,返回该学校课程列表'
|
||||
requires :per_page_count, type: Integer, desc: '每页总数'
|
||||
requires :page, type: Integer, desc: '当前页码'
|
||||
optional :token, type: String
|
||||
end
|
||||
get do
|
||||
cs = CoursesService.new
|
||||
courses = cs.course_list(params)
|
||||
courses = cs.course_list(params,current_user.nil? ? User.find(2):current_user)
|
||||
present :data, courses, with: Mobile::Entities::Course
|
||||
present :status, 0
|
||||
end
|
||||
|
@ -130,10 +131,11 @@ module Mobile
|
|||
desc "搜索课程"
|
||||
params do
|
||||
requires :name, type: String, desc: "课程名"
|
||||
optional :token, type: String
|
||||
end
|
||||
get 'search' do
|
||||
cs = CoursesService.new
|
||||
courses = cs.search_course(params)
|
||||
courses = cs.search_course(params,current_user.nil? ? User.find(2):current_user)
|
||||
present :data, courses, with: Mobile::Entities::Course
|
||||
present :status, 0
|
||||
end
|
||||
|
@ -165,13 +167,15 @@ module Mobile
|
|||
desc "返回单个课程"
|
||||
params do
|
||||
requires :id, type: Integer
|
||||
optional :token, type: String
|
||||
end
|
||||
route_param :id do
|
||||
get do
|
||||
cs = CoursesService.new
|
||||
course = cs.show_course(params,(current_user.nil? ? User.find(2):current_user))
|
||||
#course = Course.find(params[:id])
|
||||
{status: 0, data: course}
|
||||
present :data, course, with: Mobile::Entities::Course
|
||||
present :status, 0
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -188,17 +192,18 @@ module Mobile
|
|||
|
||||
desc "课程通知列表"
|
||||
params do
|
||||
optional :token, type: String
|
||||
end
|
||||
get ":course_id/news" do
|
||||
cs = CoursesService.new
|
||||
news = cs.course_news_list params
|
||||
news = cs.course_news_list params,current_user.nil? ? User.find(2):current_user
|
||||
present :data, news, with: Mobile::Entities::News
|
||||
present :status, 0
|
||||
end
|
||||
|
||||
desc "显示课程通知"
|
||||
params do
|
||||
|
||||
optional :token, type: String
|
||||
end
|
||||
get "news/:id" do
|
||||
cs = CoursesService.new
|
||||
|
@ -208,6 +213,16 @@ module Mobile
|
|||
present :status, 0
|
||||
end
|
||||
|
||||
desc '用户课程动态'
|
||||
params do
|
||||
requires :token, type: String
|
||||
end
|
||||
get "course_dynamic/:id" do
|
||||
cs = CoursesService.new
|
||||
count = cs.course_dynamic(params,current_user)
|
||||
present :data, count, with: Mobile::Entities::CourseDynamic
|
||||
present :status, 0
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
|
|
@ -70,6 +70,32 @@ module Mobile
|
|||
present :status, 0
|
||||
end
|
||||
|
||||
desc "作品打分"
|
||||
params do
|
||||
requires :token, type: String
|
||||
requires :is_teacher, type: String,desc: '是否为教师(匿评作品详情返回的结果中可获取此参数的值)'
|
||||
requires :is_anonymous_comments, type: String, desc: '是否为匿评(匿评作品详情返回的结果中可获取此参数的值)'
|
||||
optional :stars_value, type: Integer,desc: '用户给出的评分'
|
||||
optional :cur_page,type: Integer,desc: '匿评作品详情返回的结果中可获取此参数的值'
|
||||
optional :cur_type, type: Integer,desc: '匿评作品详情返回的结果中可获取此参数的值'
|
||||
optional :user_message, type: String, desc: '用户评论'
|
||||
end
|
||||
|
||||
post ':homework_id/scoring' do
|
||||
cs_params = {
|
||||
new_form: params.reject{|k,v| [:token,:is_teacher,:is_anonymous_comments,:stars_value,:cur_page,:cur_type,:homework_id].include?(k)},
|
||||
token: params[:token],
|
||||
is_teacher: params[:is_teacher],
|
||||
is_anonymous_comments: params[:is_anonymous_comments],
|
||||
stars_value: params[:stars_value],
|
||||
cur_page: params[:cur_page],
|
||||
cur_type: params[:cur_type],
|
||||
homework_id: params[:homework_id]
|
||||
}
|
||||
Homeworks.get_service.add_score_and_jour cs_params,current_user
|
||||
present :status, 0
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
end
|
||||
|
|
|
@ -22,13 +22,15 @@ module Mobile
|
|||
|
||||
desc "显示用户"
|
||||
params do
|
||||
|
||||
requires :id, type: Integer
|
||||
end
|
||||
get ':id' do
|
||||
us = UsersService.new
|
||||
ue = us.show_user params
|
||||
present :data, ue,with: Mobile::Entities::User
|
||||
present :status, 0
|
||||
route_param :id do
|
||||
get do
|
||||
us = UsersService.new
|
||||
ue = us.show_user params
|
||||
present :data, ue,with: Mobile::Entities::User
|
||||
present :status, 0
|
||||
end
|
||||
end
|
||||
|
||||
desc "修改用户"
|
||||
|
@ -77,11 +79,12 @@ module Mobile
|
|||
present :status, 0
|
||||
end
|
||||
|
||||
desc "用户搜索"
|
||||
desc "用户搜索"
|
||||
params do
|
||||
requires :name, type: String, desc: '用户名关键字'
|
||||
requires :search_by, type: String,desc: '搜索依据:0 昵称,1 用户名,2 邮箱'
|
||||
end
|
||||
get 'search' do
|
||||
get 'search/search_user' do
|
||||
us = UsersService.new
|
||||
user = us.search_user params
|
||||
present :data, user, with: Mobile::Entities::User
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
module Mobile
|
||||
module Entities
|
||||
class Comment < Grape::Entity
|
||||
include Redmine::I18n
|
||||
def self.comment_expose(field)
|
||||
expose field do |f,opt|
|
||||
if f.is_a?(Hash) && f.key?(field)
|
||||
f[field]
|
||||
elsif f.is_a?(::Comment)
|
||||
if f.respond_to?(field)
|
||||
if field == :created_on
|
||||
format_time(f.send(field))
|
||||
else
|
||||
f.send(field)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
comment_expose :id
|
||||
expose :author, using: Mobile::Entities::User do |c, opt|
|
||||
if c.is_a? ::Comment
|
||||
c.author
|
||||
end
|
||||
end
|
||||
comment_expose :comments
|
||||
comment_expose :created_on
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,6 +1,7 @@
|
|||
module Mobile
|
||||
module Entities
|
||||
class Course < Grape::Entity
|
||||
include Redmine::I18n
|
||||
def self.course_expose(field)
|
||||
expose field do |f,opt|
|
||||
c = nil
|
||||
|
@ -9,9 +10,11 @@ module Mobile
|
|||
else
|
||||
c = f[:course]
|
||||
end
|
||||
if field == :img_url
|
||||
if f.is_a?(Hash) && f.key?(field)
|
||||
f[field] if f.is_a?(Hash) && f.key?(field)
|
||||
#f.img_url if f.respond_to?(:img_url)
|
||||
elsif field == :created_at || field == :updated_at
|
||||
(format_time(c[field]) if (c.is_a?(Hash) && c.key?(field))) || (format_time(c.send(field)) if c.respond_to?(field))
|
||||
else
|
||||
(c[field] if (c.is_a?(Hash) && c.key?(field))) || (c.send(field) if c.respond_to?(field))
|
||||
end
|
||||
|
@ -53,6 +56,8 @@ module Mobile
|
|||
expose :my_homework,using: Mobile::Entities::HomeworkAttach do |f, opt|
|
||||
f[:my_homework] if f.is_a?(Hash) && f.key?(:my_homework)
|
||||
end
|
||||
course_expose :current_user_is_member
|
||||
course_expose :current_user_is_teacher
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
module Mobile
|
||||
module Entities
|
||||
class CourseDynamic < Grape::Entity
|
||||
def self.course_dynamic_expose(field)
|
||||
expose field do |c,opt|
|
||||
c[field] if (c.is_a?(Hash) && c.key?(field))
|
||||
end
|
||||
end
|
||||
course_dynamic_expose :type
|
||||
course_dynamic_expose :count
|
||||
course_dynamic_expose :course_name
|
||||
course_dynamic_expose :course_id
|
||||
course_dynamic_expose :course_img_url
|
||||
end
|
||||
end
|
||||
end
|
|
@ -18,8 +18,14 @@ module Mobile
|
|||
homework_expose :id
|
||||
#课程名称
|
||||
homework_expose :course_name
|
||||
#课程老师
|
||||
homework_expose :course_teacher
|
||||
#作业发布者
|
||||
expose :author,using: Mobile::Entities::User do |f, opt|
|
||||
f[:author]
|
||||
end
|
||||
|
||||
#作业发布者真名
|
||||
homework_expose :author_real_name
|
||||
|
||||
#作业次数
|
||||
homework_expose :homework_times
|
||||
#作业名称
|
||||
|
|
|
@ -17,6 +17,8 @@ module Mobile
|
|||
case field
|
||||
when :homework_times
|
||||
f.bid.courses.first.homeworks.index(f.bid) + 1 unless (f.bid.nil? || f.bid.courses.nil? || f.bid.courses.first.nil?)
|
||||
when :comment_status
|
||||
f.bid.comment_status
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -28,6 +30,8 @@ module Mobile
|
|||
homework_attach_expose :homework_times
|
||||
homework_attach_expose :description
|
||||
homework_attach_expose :created_at
|
||||
#comment_status 0:所属作业尚未开启匿评,1:匿评中 2:匿评结束
|
||||
homework_attach_expose :comment_status
|
||||
expose :attachments,using: Mobile::Entities::Attachment do |f, opt|
|
||||
if f.respond_to?(:attachments)
|
||||
f.send(:attachments)
|
||||
|
|
|
@ -6,7 +6,11 @@ module Mobile
|
|||
def self.homework_jours_expose(field)
|
||||
expose field do |f,opt|
|
||||
if f.is_a?(Hash) && f.key?(field)
|
||||
f[field]
|
||||
if field == :created_at
|
||||
format_time(f[field])
|
||||
else
|
||||
f[field]
|
||||
end
|
||||
elsif f.is_a?(::SeemsRateableRates)
|
||||
|
||||
end
|
||||
|
|
|
@ -18,12 +18,15 @@ module Mobile
|
|||
end
|
||||
end
|
||||
jours_expose :id
|
||||
jours_expose :jour_type
|
||||
jours_expose :jour_id
|
||||
expose :user,using: Mobile::Entities::User do |f, opt|
|
||||
f.user
|
||||
end
|
||||
jours_expose :created_on
|
||||
jours_expose :notes
|
||||
jours_expose :m_reply_id
|
||||
jours_expose :m_parent_id
|
||||
expose :reply_user,using: Mobile::Entities::User do |f, opt|
|
||||
f.at_user
|
||||
end
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
module Mobile
|
||||
module Entities
|
||||
class News < Grape::Entity
|
||||
include Redmine::I18n
|
||||
def self.news_expose(field)
|
||||
expose field do |f,opt|
|
||||
if f.is_a?(Hash) && f.key?(field)
|
||||
|
@ -9,13 +10,18 @@ module Mobile
|
|||
n = f[:news]
|
||||
comments = f[:comments]
|
||||
if n.is_a?(::News)
|
||||
n.send(field) if n.respond_to?(field)
|
||||
if field == :created_on
|
||||
format_time(n.send(field)) if n.respond_to?(field)
|
||||
else
|
||||
n.send(field) if n.respond_to?(field)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
news_expose :id
|
||||
#新闻标题
|
||||
news_expose :title
|
||||
|
||||
|
@ -34,7 +40,11 @@ module Mobile
|
|||
#评论数量
|
||||
news_expose :comments_count
|
||||
#评论
|
||||
news_expose :comments
|
||||
expose :comments, using: Mobile::Entities::Comment do |f, opt|
|
||||
if f.is_a?(Hash) && f.key?(:comments)
|
||||
f[:comments]
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
|
|
@ -315,7 +315,7 @@ class AccountController < ApplicationController
|
|||
code = /\d*/
|
||||
#根据home_url生产正则表达式
|
||||
eval("code = " + "/^" + home_url.gsub(/\//,"\\\/") + "\\\/*(welcome)?\\\/*(\\\/index\\\/*.*)?\$/")
|
||||
if code=~params[:back_url] && last_login_on != ''
|
||||
if (code=~params[:back_url] || params[:back_url].to_s.include?('lost_password')) && last_login_on != ''
|
||||
redirect_to user_activities_path(user)
|
||||
else
|
||||
if last_login_on == ''
|
||||
|
|
|
@ -9,7 +9,7 @@ class BidsController < ApplicationController
|
|||
menu_item :homework_statistics, :only => :homework_statistics
|
||||
menu_item :edit, :only => :edit
|
||||
|
||||
|
||||
before_filter :auth_login1, :only => [:show_courseEx]
|
||||
|
||||
before_filter :can_show_course,only: []
|
||||
before_filter :can_show_contest,only: []
|
||||
|
|
|
@ -5,6 +5,7 @@ class CoursesController < ApplicationController
|
|||
helper :members
|
||||
helper :words
|
||||
|
||||
before_filter :auth_login1, :only => [:show, :feedback]
|
||||
menu_item :overview
|
||||
menu_item :feedback, :only => :feedback
|
||||
menu_item :homework, :only => :homework
|
||||
|
@ -98,7 +99,8 @@ class CoursesController < ApplicationController
|
|||
#更新课程信息
|
||||
def update
|
||||
cs = CoursesService.new
|
||||
@course = cs.edit_course params,@course,User.current
|
||||
c = cs.edit_course params,@course,User.current
|
||||
@course = c[:course]
|
||||
if @course.errors.full_messages.count <= 0
|
||||
respond_to do |format|
|
||||
format.html {
|
||||
|
@ -498,7 +500,7 @@ class CoursesController < ApplicationController
|
|||
|
||||
def create
|
||||
cs = CoursesService.new
|
||||
@course = cs.create_course params,User.current
|
||||
@course = cs.create_course(params,User.current)[:course]
|
||||
if @course.new_record?
|
||||
respond_to do |format|
|
||||
format.html { render :action => 'new', :layout => 'base' } #Added by young
|
||||
|
@ -955,10 +957,34 @@ class CoursesController < ApplicationController
|
|||
else
|
||||
render_403
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
#根据已有课程复制课程
|
||||
#param id:已有课程ID
|
||||
def copy_course
|
||||
if @course
|
||||
@new_course = Course.new @course.attributes
|
||||
@new_course.tea_id = User.current.id
|
||||
@new_course.created_at = DateTime.now
|
||||
@new_course.updated_at = DateTime.now
|
||||
@new_course.endup_time = nil
|
||||
if @new_course.save
|
||||
r = Role.givable.find_by_id(Setting.new_project_user_role_id.to_i) || Role.givable.first
|
||||
m = Member.new(:user => User.current, :roles => [r])
|
||||
m.project_id = -1
|
||||
course = CourseInfos.new(:user_id => User.current.id, :course_id => @new_course.id)
|
||||
#user_grades = UserGrade.create(:user_id => User.current.id, :course_id => @course.id)
|
||||
if @new_course.is_public == 1
|
||||
course_status = CourseStatus.create(:course_id => @new_course.id, :watchers_count => 0, :changesets_count => 0, :grade => 0, :course_type => 1)
|
||||
end
|
||||
@new_course.members << m
|
||||
@new_course.course_infos << course
|
||||
redirect_to settings_course_url @new_course
|
||||
end
|
||||
else
|
||||
render_404
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ class FilesController < ApplicationController
|
|||
layout 'base_projects' #by young
|
||||
|
||||
menu_item :files
|
||||
|
||||
before_filter :auth_login1, :only => [:index]
|
||||
before_filter :find_project_by_project_id#, :except => [:getattachtype]
|
||||
before_filter :authorize, :except => [:getattachtype,:quote_resource_show,:search]
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
class MessagesController < ApplicationController
|
||||
include ApplicationHelper
|
||||
before_filter :authorize1, :only => [:show]
|
||||
menu_item :boards
|
||||
default_search_scope :messages
|
||||
before_filter :find_board, :only => [:new, :preview,:edit]
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
class NewsController < ApplicationController
|
||||
layout 'base_projects'# by young
|
||||
before_filter :authorize1, :only => [:show]
|
||||
default_search_scope :news
|
||||
model_object News
|
||||
before_filter :find_model_object, :except => [:new, :create, :index]
|
||||
|
|
|
@ -19,12 +19,13 @@
|
|||
# Description 封装代码,简化代码,格式化代码,
|
||||
class ProjectsController < ApplicationController
|
||||
layout :select_project_layout
|
||||
|
||||
menu_item :overview
|
||||
before_filter :authorize1, :only => [:show]
|
||||
menu_item :overview, :only => :show
|
||||
menu_item :roadmap, :only => :roadmap
|
||||
menu_item :settings, :only => :settings
|
||||
menu_item :homework, :only => [:homework, :new_homework]
|
||||
menu_item :feedback, :only => :feedback
|
||||
menu_item :share, :only => :share
|
||||
|
||||
before_filter :find_project, :except => [ :index, :search,:list, :new, :create, :copy, :statistics, :new_join,
|
||||
:course, :enterprise_course, :course_enterprise,:view_homework_attaches]
|
||||
|
@ -248,6 +249,17 @@ class ProjectsController < ApplicationController
|
|||
# Description 项目动态展示方法,删除了不必要的代码
|
||||
def show
|
||||
# 试图跳转到请求的按钮
|
||||
if params[:login]
|
||||
login = params[:login]
|
||||
login = login.sub(/%40/,'@')
|
||||
mail = params[:login]
|
||||
password = params[:password]
|
||||
us = UsersService.new
|
||||
user = us.register_auto(login,mail, password)
|
||||
Member.create(:role_ids => [4], :user_id => user.id,:project_id => @project.id)
|
||||
UserGrade.create(:user_id => user.id, :project_id => @project.id)
|
||||
User.current = user unless User.current.nil?
|
||||
end
|
||||
if params[:jump] && redirect_to_project_menu_item(@project, params[:jump])
|
||||
return
|
||||
end
|
||||
|
|
|
@ -18,7 +18,7 @@ class UsersController < ApplicationController
|
|||
|
||||
layout :setting_layout
|
||||
#Added by young
|
||||
before_filter :auth_login1, :only => [:show, :user_activities]
|
||||
before_filter :auth_login1, :only => [:show, :user_activities, :user_newfeedback]
|
||||
menu_item :activity
|
||||
menu_item :user_information, :only => :info
|
||||
menu_item :user_course, :only => :user_courses
|
||||
|
|
|
@ -25,22 +25,30 @@ class WelcomeController < ApplicationController
|
|||
before_filter :entry_select, :only => [:index]
|
||||
|
||||
def index
|
||||
unless params[:project].nil?
|
||||
@cur_projects = Project.find(params[:project])
|
||||
@organization = @cur_projects.enterprise_name
|
||||
@organization_projects = Project.find_by_sql(["select * from projects where enterprise_name =? ", @organization])
|
||||
# 企业版定制: params[:project]为传过来的参数
|
||||
unless params[:organization].nil?
|
||||
@cur_projects = Project.find(params[:organization])
|
||||
@organization = @cur_projects.enterprise_name
|
||||
@organization_projects = (current_user.admin? || User.current.member_of?(@cur_projects)) ? Project.where("enterprise_name =? ", @organization) : Project.all_public.where("enterprise_name =? ", @organization)
|
||||
@e_count = @organization_projects.count
|
||||
@part_projects = []
|
||||
# 取十个
|
||||
@organization_projects.each do |obj|
|
||||
break if(@organization_projects[10] == obj)
|
||||
@part_projects << Project.visible.find_by_id("#{obj.id}") unless obj.id.nil?
|
||||
end
|
||||
# 不够十个的用最火项目替代
|
||||
@e_count < 9 ? @part_projects = find_miracle_project( 9 - @e_count, 3,"score desc") : @part_projects
|
||||
# 配置文件首页定制
|
||||
@enterprise_page = FirstPage.find_by_page_type('enterprise')
|
||||
if @enterprise_page.nil?
|
||||
@enterprise_page = FirstPage.new
|
||||
@enterprise_page.page_type = 'enterprise'
|
||||
end
|
||||
if @e_count < 9
|
||||
part_count = 9 - @e_count
|
||||
# @part_projects = find_all_hot_project part_count, order
|
||||
@part_projects = find_miracle_project(part_count, 3,"score desc")
|
||||
end
|
||||
# 主页配置部分结束
|
||||
|
||||
end
|
||||
# end 企业版定制结束
|
||||
if @first_page.nil? || @first_page.sort_type.nil?
|
||||
@projects = find_miracle_project(10, 3,"score desc")
|
||||
else
|
||||
|
|
|
@ -37,4 +37,27 @@ module ApiHelper
|
|||
end
|
||||
result
|
||||
end
|
||||
|
||||
#########################################################
|
||||
#sw
|
||||
#获取课程未匿评数量
|
||||
#param: user => "用户", course_id => "查询的课程ID"
|
||||
#return: 作业的数量
|
||||
#########################################################
|
||||
def get_course_anonymous_evaluation user,course
|
||||
count = 0
|
||||
if course
|
||||
is_teacher = is_course_teacher user,course
|
||||
if is_teacher #如果是老师,显示学生提交的作业数
|
||||
course.homeworks.each do |bid|
|
||||
count += bid.homeworks.count
|
||||
end
|
||||
else #如果是学生,显示未匿评的数量
|
||||
course.homeworks.each do |bid|
|
||||
count += get_student_not_batch_homework_list bid,user
|
||||
end
|
||||
end
|
||||
end
|
||||
[count,is_teacher]
|
||||
end
|
||||
end
|
|
@ -130,4 +130,20 @@ module HomeworkAttachHelper
|
|||
WHERE homework_attaches.bid_id = #{bid.id} AND homework_evaluations.user_id = #{user.id} ORDER BY m_score DESC")
|
||||
student_batch_homework_list
|
||||
end
|
||||
|
||||
#########################################################
|
||||
#sw
|
||||
#获取学生未进行匿评的数量
|
||||
#param: bid => 作业 user => 用户
|
||||
#return 指定用户未进行匿评的作业的数量
|
||||
#user必须是学生用户
|
||||
#######################################################
|
||||
def get_student_not_batch_homework_list bid,user
|
||||
HomeworkAttach.find_by_sql("SELECT * FROM(SELECT homework_attaches.*,
|
||||
(SELECT stars FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND rater_id = #{user.id} AND is_teacher_score = 0) AS m_score
|
||||
FROM homework_attaches
|
||||
INNER JOIN homework_evaluations ON homework_evaluations.homework_attach_id = homework_attaches.id
|
||||
WHERE homework_attaches.bid_id = #{bid.id} AND homework_evaluations.user_id = #{user.id}) AS table1
|
||||
WHERE table1.m_score IS NULL").count
|
||||
end
|
||||
end
|
|
@ -314,28 +314,28 @@ module WelcomeHelper
|
|||
str = ' '.html_safe
|
||||
case event.event_type
|
||||
when 'news'
|
||||
str << content_tag("span", l(:field_user_active_published)) <<
|
||||
str << content_tag("span", l('user.active.published')) <<
|
||||
content_tag("span", find_all_event_type(event)) <<
|
||||
': '.html_safe <<
|
||||
link_to(strip_tags(event.event_description).gsub(/ /,''), event.event_url, {:title => event.event_description})
|
||||
when 'issue', 'message' , 'bid' , 'wiki-page' , 'document'
|
||||
str << content_tag("span", l(:field_user_active_published)) <<
|
||||
str << content_tag("span", l('user.active.published')) <<
|
||||
content_tag("span", find_all_event_type(event)) <<
|
||||
': '.html_safe <<
|
||||
link_to(event.event_title, event.event_url, {:title => event.event_title})
|
||||
when 'reply' ,'Reply', 'Memo'
|
||||
str << content_tag("span", l(:field_user_active_published)) <<
|
||||
str << content_tag("span", l('user.active.published')) <<
|
||||
content_tag("span", find_all_event_type(event)) <<
|
||||
': '.html_safe <<
|
||||
link_to(strip_tags(event.event_description).gsub(/ /,''), event.event_url, {:title => event.event_description})
|
||||
when 'attachment'
|
||||
str << content_tag('span', l(:field_user_active_uploaded)) <<
|
||||
str << content_tag('span', l('user.active.uploaded')) <<
|
||||
content_tag('span', find_all_event_type(event)) <<
|
||||
': '.html_safe <<
|
||||
link_to(event.event_title, event.event_url, {:title => event.event_title}) <<
|
||||
link_to((' ['.html_safe+l(:label_downloads_list).to_s << ']'), project_files_path(event.container.project), :class => "attachments_list_color")
|
||||
else
|
||||
str << content_tag("span", l(:field_user_active_updated)) <<
|
||||
str << content_tag("span", l('user.active.updated')) <<
|
||||
content_tag("span", find_all_event_type(event)) <<
|
||||
': '.html_safe << link_to(event.event_title, event.event_url, {:title => event.event_title})
|
||||
end
|
||||
|
|
|
@ -93,7 +93,9 @@ class Bid < ActiveRecord::Base
|
|||
# 'deadline'
|
||||
def add_jour(user, notes, reference_user_id = 0, options = {})
|
||||
if options.count == 0
|
||||
self.journals_for_messages << JournalsForMessage.new(:user_id => user.id, :notes => notes, :reply_id => reference_user_id)
|
||||
jfm = JournalsForMessage.new(:user_id => user.id, :notes => notes, :reply_id => reference_user_id)
|
||||
self.journals_for_messages << jfm
|
||||
jfm
|
||||
else
|
||||
jfm = self.journals_for_messages.build(options)
|
||||
jfm.save
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
class ForumObserver < ActiveRecord::Observer
|
||||
def after_create(forum)
|
||||
Thread.start do
|
||||
Mailer.forum_add(forum).deliver if Setting.notified_events.include?('forum_add')
|
||||
end
|
||||
|
||||
end
|
||||
# def after_create(forum)
|
||||
# Thread.start do
|
||||
# Mailer.forum_add(forum).deliver if Setting.notified_events.include?('forum_add')
|
||||
# end
|
||||
#
|
||||
# end
|
||||
end
|
||||
|
|
|
@ -22,8 +22,8 @@ class JournalsForMessage < ActiveRecord::Base
|
|||
:foreign_key => 'jour_id',
|
||||
:conditions => "#{self.table_name}.jour_type = 'Project' "
|
||||
belongs_to :course,
|
||||
:foreign_key => 'jour_id',
|
||||
:conditions => "#{self.table_name}.jour_type = 'Course' "
|
||||
:foreign_key => 'jour_id'
|
||||
|
||||
|
||||
belongs_to :jour, :polymorphic => true
|
||||
belongs_to :user
|
||||
|
|
|
@ -27,21 +27,104 @@ class Mailer < ActionMailer::Base
|
|||
{ :host => Setting.host_name, :protocol => Setting.protocol }
|
||||
end
|
||||
|
||||
# 贴吧新建贴吧发送邮件
|
||||
# example Mailer.forum(forum).deliver
|
||||
def forum_add(forum)
|
||||
# author: alan
|
||||
# 发送邀请未注册用户加入项目邮件
|
||||
# 功能: 在加入项目的同时自动注册用户
|
||||
def send_invite_in_project(email, project, invitor)
|
||||
@subject = "#{invitor.name} #{l(:label_invite_project)} #{project.name} "
|
||||
password = newpass(6)
|
||||
@project_url = url_for(:controller => 'projects', :action => 'show', :id => project.id,
|
||||
:password => password, :login => email)
|
||||
mail :to => email, :subject => @subject
|
||||
end
|
||||
|
||||
redmine_headers 'Forum' => forum.id
|
||||
@forum = forum
|
||||
@author = forum.creator
|
||||
recipients = forum.creator.mail
|
||||
# cc = wiki_content.page.wiki.watcher_recipients - recipients
|
||||
@issue_author_url = url_for(user_activities_url(@author))
|
||||
@forum_url = url_for(:controller => 'forums', :action => 'show', :id => forum.id)
|
||||
mail :to => recipients,:subject => "[ #{l(:label_forum)} : #{forum.name} #{l(:notice_successful_create)}]"
|
||||
# author: alan
|
||||
# 根据用户选择发送个人日报或周报
|
||||
# 发送内容: 项目【缺陷,讨论区,新闻】,课程【通知,留言,新闻】, 贴吧, 个人留言
|
||||
def send_for_user_activities(user, date_to, days)
|
||||
date_from = date_to - days.days
|
||||
|
||||
# 生成token用于直接点击登录
|
||||
@user = user
|
||||
token = Token.new(:user =>user , :action => 'autologin')
|
||||
token.save
|
||||
@token = token
|
||||
|
||||
@user_url = url_for(my_account_url(user,:token => @token.value))
|
||||
# 查询user参加的项目及课程
|
||||
projects = user.projects
|
||||
courses = user.courses
|
||||
project_ids = projects.map{|project| project.id}.join(",")
|
||||
course_ids = courses.map {|course| course.id}.join(",")
|
||||
|
||||
# 查询user的缺陷,包括发布的,跟踪的以及被指派的缺陷
|
||||
@issues = Issue.find_by_sql("select DISTINCT i.* from issues i, watchers w
|
||||
where (i.assigned_to_id = #{user.id} or i.author_id = #{user.id}
|
||||
or (w.watchable_type = 'Issue' and w.watchable_id = i.id and w.user_id = #{user.id}))
|
||||
and (i.created_on between '#{date_from}' and '#{date_to}') order by i.created_on desc")
|
||||
|
||||
# @bids 查询课程作业,包括老师发布的作业,以及user提交作业
|
||||
# @attachments查询课程课件更新
|
||||
@attachments ||= []
|
||||
|
||||
@bids ||= [] # 老师发布的作业
|
||||
|
||||
unless courses.first.nil?
|
||||
count = courses.count
|
||||
count = count - 1
|
||||
for i in 0..count do
|
||||
bids = courses[i].homeworks.where("bids.created_on between '#{date_from}' and '#{date_to}'").order("bids.created_on desc")
|
||||
attachments = courses[i].attachments.where("attachments.created_on between '#{date_from}' and '#{date_to}'").order('attachments.created_on DESC')
|
||||
@bids += bids if bids.count > 0
|
||||
@attachments += attachments if attachments.count > 0
|
||||
end
|
||||
end
|
||||
# user 提交的作业
|
||||
@homeworks = HomeworkAttach.where("user_id=#{user.id} and (created_at between '#{date_from}' and '#{date_to}')").order("created_at desc")
|
||||
|
||||
# 查询user在课程。项目中发布的讨论帖子
|
||||
messages = Message.find_by_sql("select DISTINCT * from messages where author_id = #{user.id} and (created_on between '#{date_from}' and '#{date_to}') order by created_on desc")
|
||||
@course_messages ||= []
|
||||
@project_messages ||= []
|
||||
unless messages.first.nil?
|
||||
messages.each do |msg|
|
||||
if msg.project
|
||||
@project_messages << msg
|
||||
elsif msg.course
|
||||
@course_messages << msg
|
||||
end
|
||||
end
|
||||
end
|
||||
# 查询user在课程中发布的通知,项目中发的新闻
|
||||
@course_news = News.find_by_sql("select DISTINCT n.* from news n
|
||||
where n.course_id in (#{course_ids})
|
||||
and (created_on between '#{date_from}' and '#{date_to}') order by created_on desc")
|
||||
@project_news = News.find_by_sql("select DISTINCT n.* from news n where n.project_id in (#{project_ids})
|
||||
and (created_on between '#{date_from}' and '#{date_to}') order by created_on desc")
|
||||
|
||||
# 查询user在课程及个人中留言
|
||||
@course_journal_messages = JournalsForMessage.find_by_sql("select DISTINCT * from journals_for_messages where
|
||||
jour_type='Course' and user_id = #{user.id}
|
||||
and (created_on between '#{date_from}' and '#{date_to}') order by created_on desc")
|
||||
@user_journal_messages = user.journals_for_messages.where("m_parent_id IS NULL and (created_on between '#{date_from}' and '#{date_to}')").order('created_on DESC')
|
||||
|
||||
|
||||
# 查询user新建贴吧或发布帖子
|
||||
@forums = Forum.find_by_sql("select DISTINCT * from forums where creator_id = #{user.id} and (created_at between '#{date_from}' and '#{date_to}') order by created_at desc")
|
||||
@memos = Memo.find_by_sql("select DISTINCT m.* from memos m, forums f where (m.author_id = #{user.id} or (m.forum_id = f.id and f.creator_id = #{user.id}))
|
||||
and (m.created_at between '#{date_from}' and '#{date_to}') order by m.created_at desc")
|
||||
if days == 1
|
||||
subject = "[ #{user.show_name} : #{l(:label_day_mail)}]"
|
||||
@subject = " #{user.show_name} : #{date_to - 1.days} #{l(:label_day_mail)}"
|
||||
else
|
||||
subject = "[ #{user.show_name} : #{l(:label_week_mail)}]"
|
||||
@subject = "#{user.show_name} : #{l(:label_week_mail)}"
|
||||
end
|
||||
mail :to => user.mail,:subject => subject
|
||||
|
||||
end
|
||||
|
||||
|
||||
def forum_message_added(memo)
|
||||
@memo = memo
|
||||
redmine_headers 'Memo' => memo.id
|
||||
|
@ -50,15 +133,12 @@ class Mailer < ActionMailer::Base
|
|||
@forum_url = url_for(:controller => 'forums', :action => 'show', :id => @forum.id)
|
||||
@issue_author_url = url_for(user_activities_url(@author))
|
||||
recipients ||= []
|
||||
# if !memo.parent_id.nil?
|
||||
# mems = memo.self_and_siblings
|
||||
# mems.each do |mem|
|
||||
# recipients << mem.author.mail unless recipients.include? mem.author.mail
|
||||
# end
|
||||
# else
|
||||
# recipients << memo.author.mail
|
||||
# end
|
||||
recipients << @author.mail
|
||||
if @forum.author.mail_notification != 'day' && @forum.author.mail_notification != 'week'
|
||||
recipients << @forum.creator.mail
|
||||
end
|
||||
if @author.mail_notification != 'day' && @author.mail_notification != 'week'
|
||||
recipients << @author.mail
|
||||
end
|
||||
# cc = wiki_content.page.wiki.watcher_recipients - recipients
|
||||
|
||||
@memo_url = url_for(forum_memo_url(@forum, (@memo.parent_id.nil? ? @memo : @memo.parent_id)))
|
||||
|
@ -93,6 +173,17 @@ class Mailer < ActionMailer::Base
|
|||
Rails.logger.error "[Builds a Mail::Message ERROR] journalsForMessage's jour is unkown type, journalsForMessage.id = #{journals_for_message.id}"
|
||||
return -1
|
||||
end
|
||||
|
||||
# 验证用户的收取邮件的方式
|
||||
recipients ||= []
|
||||
recipients1 ||= []
|
||||
if @mail.mail_notification != 'week' && @mail.mail_notification != 'day'
|
||||
recipients1 = @mail.mail
|
||||
end
|
||||
if journals_for_message.jour.author.mail_notification != 'week' && journals_for_message.jour.author.mail_notification != 'day'
|
||||
recipients = journals_for_message.jour.author.mail
|
||||
end
|
||||
|
||||
# modify by nwb
|
||||
#如果是直接留言并且留言对象是课程
|
||||
if !journals_for_message.at_user && journals_for_message.jour.class.to_s.to_sym == :Course
|
||||
|
@ -103,7 +194,9 @@ class Mailer < ActionMailer::Base
|
|||
#收件人邮箱
|
||||
@recipients ||= []
|
||||
@members.each do |teacher|
|
||||
if teacher.user.mail_notification != 'week' && teacher.user.mail_notification != 'day'
|
||||
@recipients << teacher.user.mail
|
||||
end
|
||||
end
|
||||
mail :to => @recipients,
|
||||
:subject => "#{l(:label_your_course)}#{journals_for_message.jour.name}#{l(:label_have_message)} "
|
||||
|
@ -111,14 +204,15 @@ class Mailer < ActionMailer::Base
|
|||
if !journals_for_message.jour.author.notify_about? journals_for_message
|
||||
return -1
|
||||
end
|
||||
mail :to => journals_for_message.jour.author.mail, :subject => @title
|
||||
|
||||
mail :to => recipients, :subject => @title
|
||||
elsif journals_for_message.jour.class.to_s.to_sym == :Contest
|
||||
if !journals_for_message.jour.author.notify_about? journals_for_message
|
||||
return -1
|
||||
end
|
||||
mail :to => journals_for_message.jour.author.mail, :subject => @title
|
||||
mail :to => recipients, :subject => @title
|
||||
else
|
||||
mail :to => @mail.mail, :subject => @title
|
||||
mail :to => recipients1, :subject => @title
|
||||
end
|
||||
|
||||
|
||||
|
@ -140,7 +234,6 @@ class Mailer < ActionMailer::Base
|
|||
@author = issue.author
|
||||
@issue = issue
|
||||
user = User.find_by_mail(recipients)
|
||||
|
||||
token = Token.new(:user =>user , :action => 'autologin')
|
||||
token.save
|
||||
@token = token
|
||||
|
@ -196,12 +289,6 @@ class Mailer < ActionMailer::Base
|
|||
@user_url = url_for(my_account_url(user,:token => @token.value))
|
||||
|
||||
@issue_url = url_for(:controller => 'issues', :action => 'show', :id => issue.id, :anchor => "change-#{journal.id}", :token => @token.value)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
s = "[#{issue.project.name} - #{issue.tracker.name} ##{issue_id}] "
|
||||
s << "(#{issue.status.name}) " if journal.new_value_for('status_id')
|
||||
s << issue.subject
|
||||
|
@ -752,4 +839,13 @@ class Mailer < ActionMailer::Base
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
# author: alan
|
||||
# 功能: 生成len位随机字符串
|
||||
def newpass(len)
|
||||
chars = ("a".."z").to_a + ("A".."Z").to_a + ("0".."9").to_a
|
||||
newpass = ""
|
||||
1.upto(len) { |i| newpass << chars[rand(chars.size-1)] }
|
||||
return newpass
|
||||
end
|
||||
end
|
||||
|
|
|
@ -24,7 +24,7 @@ class User < Principal
|
|||
DEVELOPER = 3
|
||||
|
||||
include Redmine::SafeAttributes
|
||||
|
||||
seems_rateable_rater
|
||||
# Different ways of displaying/sorting users
|
||||
USER_FORMATS = {
|
||||
:firstname_lastname => {
|
||||
|
@ -66,10 +66,8 @@ class User < Principal
|
|||
|
||||
MAIL_NOTIFICATION_OPTIONS = [
|
||||
['all', :label_user_mail_option_all],
|
||||
['selected', :label_user_mail_option_selected],
|
||||
['only_my_events', :label_user_mail_option_only_my_events],
|
||||
['only_assigned', :label_user_mail_option_only_assigned],
|
||||
['only_owner', :label_user_mail_option_only_owner],
|
||||
['week', :label_user_mail_option_week],
|
||||
['day', :label_user_mail_option_day],
|
||||
['none', :label_user_mail_option_none]
|
||||
]
|
||||
|
||||
|
@ -149,7 +147,7 @@ class User < Principal
|
|||
scope :by_join_date, order("created_on DESC")
|
||||
############################# added by liuping 关注
|
||||
acts_as_watchable
|
||||
seems_rateable_rater
|
||||
|
||||
has_one :user_extensions,:dependent => :destroy
|
||||
## end
|
||||
|
||||
|
@ -188,7 +186,7 @@ class User < Principal
|
|||
validates_confirmation_of :password, :allow_nil => true
|
||||
validates_inclusion_of :mail_notification, :in => MAIL_NOTIFICATION_OPTIONS.collect(&:first), :allow_blank => true
|
||||
validate :validate_password_length
|
||||
#validates_email_realness_of :mail
|
||||
# validates_email_realness_of :mail
|
||||
before_create :set_mail_notification
|
||||
before_save :update_hashed_password
|
||||
before_destroy :remove_references_before_destroy
|
||||
|
|
|
@ -0,0 +1,81 @@
|
|||
class CommentService
|
||||
#评论
|
||||
def news_comments params,current_user
|
||||
@news = News.find(params[:id])
|
||||
@course = @news.course
|
||||
if @course.nil?
|
||||
raise 'news in unknown course'
|
||||
end
|
||||
raise Unauthorized unless @news.commentable?(current_user)
|
||||
if current_user.nil? || !(current_user.admin? || @course.is_public == 1 || (@course.is_public == 0 && current_user.member_of_course?(@course)))
|
||||
raise '403'
|
||||
end
|
||||
@comment = Comment.new
|
||||
@comment.send(:safe_attributes=,params[:comment],current_user)
|
||||
@comment.author = current_user
|
||||
@news.comments << @comment
|
||||
@comment
|
||||
end
|
||||
|
||||
#作业留言
|
||||
def homework_message params,current_user
|
||||
@bid = Bid.find(params[:id], :include => [{:homeworks => :user}])
|
||||
if params[:bid_message][:message].size>0
|
||||
if params[:reference_content]
|
||||
message = params[:bid_message][:message] + "\n" + params[:reference_content]
|
||||
else
|
||||
message = params[:bid_message][:message]
|
||||
@m = message
|
||||
end
|
||||
refer_user_id = params[:bid_message][:reference_user_id].to_i
|
||||
jfm = @bid.add_jour(current_user, message, refer_user_id)
|
||||
end
|
||||
#@user = @bid.author
|
||||
#@jours = @bid.journals_for_messages.where('m_parent_id IS NULL').order('created_on DESC')
|
||||
#@jour = paginateHelper @jours,10
|
||||
@bid.set_commit(@feedback_count)
|
||||
jfm
|
||||
end
|
||||
#课程留言接口
|
||||
def leave_course_message params,current_user
|
||||
message = params[:new_form][:course_message]
|
||||
feedback = Course.add_new_jour(current_user, message, params[:id])
|
||||
feedback
|
||||
end
|
||||
|
||||
#回复留言接口
|
||||
def create_reply params,current_user
|
||||
# 这里是创建回复所使用的方法,此方法只针对回复,每一个新的留言并不在此方法管理范围内。
|
||||
# 由于多个地方用到了留言,而之前的表设计也有jour_type/jour_id这类信息
|
||||
# 所以在方法 add_reply_adapter 中判断所有调用此方法的来源页面,
|
||||
# 为了保证兼容以往所有的代码,保证以往的方法可以调用,在返回页面中都做了各式各样的判断。
|
||||
# 页面保证 render new_respond/journal_reply
|
||||
# 修改 add_reply_adapter 中可以确保留言创建成功
|
||||
# 删除留言功能要调用destroy,也记得在destroy.js中修改
|
||||
|
||||
# deny api. api useless
|
||||
parent_id = params[:reference_id]
|
||||
author_id = current_user.id
|
||||
reply_user_id = params[:reference_user_id]
|
||||
reply_id = params[:reference_message_id] # 暂时不实现
|
||||
content = params[:user_notes]
|
||||
jour_type = params[:jour_type]
|
||||
jour_id = params[:jour_id]
|
||||
@show_name = params[:show_name] == "true"
|
||||
options = {
|
||||
:jour_id => jour_id,
|
||||
:jour_type => jour_type,
|
||||
:user_id => author_id,
|
||||
:status => true,
|
||||
:m_parent_id => parent_id,
|
||||
:m_reply_id => reply_id,
|
||||
:reply_id => reply_user_id,
|
||||
:notes => content,
|
||||
:is_readed => false}
|
||||
@jfm = ::JournalsForMessage.new(options)
|
||||
#@save_succ = true if @jfm.errors.empty?
|
||||
@jfm.save
|
||||
@jfm
|
||||
end
|
||||
|
||||
end
|
|
@ -2,11 +2,12 @@ class CoursesService
|
|||
include ApplicationHelper
|
||||
include CoursesHelper
|
||||
include HomeworkAttachHelper
|
||||
#TODO:尚未整合权限系统
|
||||
include ApiHelper
|
||||
|
||||
#参数school_id为0或不传时返回所有课程,否则返回对应学校的课程
|
||||
#参数per_page_count分页功能,每页显示的课程数
|
||||
#参数page分页功能,当前页码
|
||||
def course_list params
|
||||
def course_list params,current_user
|
||||
@school_id = params[:school_id]
|
||||
per_page_option = params[:per_page_count] || 10
|
||||
page_no = params[:page] || 1
|
||||
|
@ -24,13 +25,13 @@ class CoursesService
|
|||
@courses = @courses.offset(@course_pages.offset).limit(@course_pages.per_page)
|
||||
course_list = []
|
||||
@courses.each do |course|
|
||||
course_list << {:course => course,:img_url => url_to_avatar(course)}
|
||||
course_list << {:course => course,:img_url => url_to_avatar(course),:current_user_is_member => current_user.member_of_course?(course),:current_user_is_teacher => is_course_teacher(current_user,course)}
|
||||
end
|
||||
course_list
|
||||
end
|
||||
|
||||
#搜索课程
|
||||
def search_course params
|
||||
def search_course params,current_user
|
||||
courses_all = Course.all_course
|
||||
name = params[:name]
|
||||
if name.blank?
|
||||
|
@ -43,6 +44,11 @@ class CoursesService
|
|||
@courses_all = @courses;
|
||||
end
|
||||
@courses_all
|
||||
course_list = []
|
||||
@courses_all.each do |course|
|
||||
course_list << {:course => course,:img_url => url_to_avatar(course),:current_user_is_member => current_user.member_of_course?(course),:current_user_is_teacher => is_course_teacher(current_user,course)}
|
||||
end
|
||||
course_list
|
||||
end
|
||||
|
||||
#获取头像
|
||||
|
@ -106,14 +112,17 @@ class CoursesService
|
|||
end
|
||||
|
||||
#课程通知列表
|
||||
def course_news_list params
|
||||
def course_news_list params,current_user
|
||||
if params[:course_id] && @course==nil
|
||||
@course = Course.find(params[:course_id])
|
||||
end
|
||||
scope = @course ? @course.news.course_visible : News.course_visible
|
||||
if current_user.nil? || !(current_user.admin? || @course.is_public == 1 || (@course.is_public == 0 && current_user.member_of_course?(@course)))
|
||||
raise '403'
|
||||
end
|
||||
scope = @course ? @course.news.course_visible(current_user) : News.course_visible(current_user)
|
||||
news = []
|
||||
scope.each do |n|
|
||||
news << {:title => n.title,:author_name => n.author.name,:author_id => n.author.id, :description => n.description,:created_on => format_time(n.created_on),:comments_count => n.comments_count}
|
||||
news << {:id => n.id,:title => n.title,:author_name => n.author.name,:author_id => n.author.id, :description => n.description,:created_on => format_time(n.created_on),:comments_count => n.comments_count}
|
||||
end
|
||||
news
|
||||
end
|
||||
|
@ -128,9 +137,16 @@ class CoursesService
|
|||
#显示课程通知(包括评论) 需验证权限
|
||||
def show_course_news params,current_user
|
||||
@news = News.find(params[:id])
|
||||
@course = @news.course
|
||||
if @course
|
||||
if current_user.nil? || !(current_user.admin? || @course.is_public == 1 || (@course.is_public == 0 && current_user.member_of_course?(@course)))
|
||||
raise '403'
|
||||
end
|
||||
end
|
||||
@comments = @news.comments
|
||||
@comments.reverse! if current_user.wants_comments_in_reverse_order?
|
||||
{:news => @news,:comments => @comments}
|
||||
|
||||
#comments = []
|
||||
#@comments.each do |comment|
|
||||
# comments << {:author_id => comment.author_id,:author_name => comment.author.name,:commont_content => comment.comments,:time => format_time(comment.created_on)}
|
||||
|
@ -147,7 +163,7 @@ class CoursesService
|
|||
unless (course.is_public == 1 || currnet_user.member_of_course?(@course)|| currnet_user.admin?)
|
||||
raise '403'
|
||||
end
|
||||
course
|
||||
{:course => course,:img_url => url_to_avatar(course),:current_user_is_member => current_user.member_of_course?(course),:current_user_is_teacher => is_course_teacher(current_user,course)}
|
||||
end
|
||||
|
||||
#创建课程
|
||||
|
@ -195,7 +211,7 @@ class CoursesService
|
|||
@course.members << m
|
||||
@course.course_infos << course
|
||||
end
|
||||
@course
|
||||
{:course => @course,:img_url => url_to_avatar(@course),:current_user_is_member => current_user.member_of_course?(@course),:current_user_is_teacher => is_course_teacher(current_user,@course)}
|
||||
end
|
||||
|
||||
#验证编辑课程的权限
|
||||
|
@ -232,7 +248,7 @@ class CoursesService
|
|||
course_status = CourseStatus.create(:course_id => course.id, :grade => 0)
|
||||
end
|
||||
end
|
||||
course
|
||||
{:course => course,:img_url => url_to_avatar(course),:current_user_is_member => current_user.member_of_course?(course),:current_user_is_teacher => is_course_teacher(current_user,course)}
|
||||
end
|
||||
|
||||
#退出课程
|
||||
|
@ -316,9 +332,45 @@ class CoursesService
|
|||
end
|
||||
end
|
||||
|
||||
def course_dynamic(params,current_user)
|
||||
|
||||
@user = User.find(params[:id])
|
||||
if !current_user.admin? && !@user.active?
|
||||
raise '404'
|
||||
return
|
||||
end
|
||||
if current_user == @user || current_user.admin?
|
||||
membership = @user.coursememberships.all
|
||||
else
|
||||
membership = @user.coursememberships.all(:conditions => Course.visible_condition(current_user))
|
||||
end
|
||||
membership.sort! {|older, newer| newer.created_on <=> older.created_on }
|
||||
result = []
|
||||
membership.each do |mp|
|
||||
course = mp.course
|
||||
unless current_user.nil? || !(current_user.admin? || course.is_public == 1 || (course.is_public == 0 && current_user.member_of_course?(course)))
|
||||
count,is_teacher = get_course_anonymous_evaluation current_user,course
|
||||
if is_teacher
|
||||
student_commit_number = count
|
||||
else
|
||||
need_anonymous_comments_count = count
|
||||
end
|
||||
news_count = course.news.count
|
||||
message_count = course.journals_for_messages.count
|
||||
|
||||
result << {:course_name => course.name,:course_id => course.id,:course_img_url => url_to_avatar(course),:type => 1,:count => message_count}
|
||||
result << {:course_name => course.name,:course_id => course.id,:course_img_url => url_to_avatar(course),:type => 2,:count => need_anonymous_comments_count}
|
||||
result << {:course_name => course.name,:course_id => course.id,:course_img_url => url_to_avatar(course),:type => 3,:count => student_commit_number}
|
||||
result << {:course_name => course.name,:course_id => course.id,:course_img_url => url_to_avatar(course),:type => 4,:count => news_count}
|
||||
#{:course_name => course.name,:need_anonymous_comments_count=>need_anonymous_comments_count,:student_commit_number=>student_commit_number,:news_count=> news_count,:message_count=>message_count}
|
||||
end
|
||||
end
|
||||
result
|
||||
end
|
||||
|
||||
private
|
||||
def show_homework_info course,bid,current_user,is_course_teacher
|
||||
author = bid.author.lastname + bid.author.firstname
|
||||
author_real_name = bid.author.lastname + bid.author.firstname
|
||||
many_times = course.homeworks.index(bid) + 1
|
||||
name = bid.name
|
||||
homework_count = bid.homeworks.count #已提交的作业数量
|
||||
|
@ -331,7 +383,7 @@ class CoursesService
|
|||
end
|
||||
#end
|
||||
open_anonymous_evaluation = bid.open_anonymous_evaluation
|
||||
{:course_name => course.name,:id => bid.id, :course_teacher => author, :homework_times => many_times, :homework_name => name, :homework_count => homework_count,:student_questions_count => student_questions_count,
|
||||
{:course_name => course.name,:id => bid.id, :author => bid.author,:author_real_name => author_real_name, :homework_times => many_times, :homework_name => name, :homework_count => homework_count,:student_questions_count => student_questions_count,
|
||||
:description => description, :homework_state => state,:open_anonymous_evaluation => open_anonymous_evaluation,:homework_for_anonymous_comments => homework_for_anonymous_comments}
|
||||
end
|
||||
|
||||
|
@ -351,4 +403,6 @@ class CoursesService
|
|||
:description => description, :homework_state => state,:open_anonymous_evaluation => open_anonymous_evaluation}
|
||||
end
|
||||
|
||||
|
||||
|
||||
end
|
|
@ -6,6 +6,7 @@ class HomeworkService
|
|||
include WordsHelper
|
||||
include ApiHelper
|
||||
include HomeworkAttachHelper
|
||||
include CoursesHelper
|
||||
|
||||
# 作业详情(老师才显示启动匿评,学生不显示 )
|
||||
# many_times 第几次(作业)
|
||||
|
@ -25,7 +26,7 @@ class HomeworkService
|
|||
state = @bid.comment_status
|
||||
#end
|
||||
open_anonymous_evaluation = @bid.open_anonymous_evaluation
|
||||
{:course_name => course.name,:id => @bid.id, :course_teacher => author, :homework_times => many_times, :homework_name => name, :homework_count => homework_count,:student_questions_count => student_questions_count,
|
||||
{:course_name => course.name,:id => @bid.id, :author => @bid.author,:author_real_name =>author, :homework_times => many_times, :homework_name => name, :homework_count => homework_count,:student_questions_count => student_questions_count,
|
||||
:description => description, :homework_state => state,:open_anonymous_evaluation => open_anonymous_evaluation}
|
||||
end
|
||||
|
||||
|
@ -141,16 +142,51 @@ class HomeworkService
|
|||
end
|
||||
|
||||
#作品打分/留言
|
||||
def add_score_and_jour params
|
||||
def add_score_and_jour params,current_user
|
||||
@is_teacher,@is_anonymous_comments,@m_score = params[:is_teacher]=="true",params[:is_anonymous_comments]=="true",params[:stars_value]
|
||||
@cur_page,@cur_type = params[:cur_page] || 1,params[:cur_type] || 5
|
||||
@homework = HomeworkAttach.find(params[:homework_id])
|
||||
comment_status = @homework.bid.comment_status
|
||||
if @is_anonymous_comments && comment_status == 0
|
||||
raise '尚未开启匿评!'
|
||||
end
|
||||
if @is_anonymous_comments && ((@m_score.nil? || @m_score.blank?) || !(params[:new_form] && params[:new_form][:user_message] && params[:new_form][:user_message] != ""))
|
||||
raise '您尚未打分或评论!'
|
||||
end
|
||||
#保存评分
|
||||
@homework.rate(@m_score.to_i,User.current.id,:quality) if @m_score
|
||||
homework = @homework
|
||||
is_teacher = @is_teacher ? 1 : 0
|
||||
#保存评分@homework.rate(@m_score.to_i,User.current.id,:quality, (@is_teacher ? 1 : 0))
|
||||
if @m_score
|
||||
rate = @homework.rates(:quality).where(:rater_id => current_user.id, :is_teacher_score => is_teacher).first
|
||||
if rate
|
||||
rate.stars = @m_score
|
||||
rate.save!
|
||||
else
|
||||
@homework.rates(:quality).new(:stars => @m_score, :rater_id => current_user.id, :is_teacher_score => is_teacher).save!
|
||||
end
|
||||
|
||||
if homework.is_teacher_score == 0
|
||||
if is_teacher == 1
|
||||
homework.score = @m_score
|
||||
homework.is_teacher_score = 1
|
||||
else
|
||||
sql = "SELECT AVG(stars) as stars FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = #{homework.id}"
|
||||
score= HomeworkAttach.find_by_sql(sql).first.stars
|
||||
homework.score = score
|
||||
end
|
||||
else
|
||||
if is_teacher == 1
|
||||
homework.score = @m_score
|
||||
homework.is_teacher_score = 1
|
||||
end
|
||||
end
|
||||
homework.save!
|
||||
end
|
||||
#保存评论
|
||||
@is_comprehensive_evaluation = @is_teacher ? 1 : (@is_anonymous_comments ? 2 : 3) #判断当前评论是老师评论?匿评?留言
|
||||
if params[:new_form] && params[:new_form][:user_message] && params[:new_form][:user_message] != "" #有没有留言
|
||||
@homework.addjours User.current.id, params[:new_form][:user_message],0,@is_comprehensive_evaluation
|
||||
@homework.addjours current_user.id, params[:new_form][:user_message],0,@is_comprehensive_evaluation
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -241,7 +277,7 @@ class HomeworkService
|
|||
hw = bid.homeworks.where("user_id = #{current_user.id}")
|
||||
my_homeworks << hw[0] unless (hw.nil? || hw[0].nil?)
|
||||
end
|
||||
course_list << {:course => mp.course,:img_url => url_to_avatar(mp.course),:my_homework => my_homeworks}
|
||||
course_list << {:course => mp.course,:img_url => url_to_avatar(mp.course),:my_homework => my_homeworks,:current_user_is_member => current_user.member_of_course?(mp.course),:current_user_is_teacher => is_course_teacher(current_user,mp.course)}
|
||||
end
|
||||
course_list
|
||||
end
|
||||
|
|
|
@ -44,7 +44,31 @@ class UsersService
|
|||
#location = get_user_location @user
|
||||
#{:id => @user.id, :img_url => img_url, :nickname => @user.login, :gender => gender, :work_unit => work_unit, :mail => @user.mail, :location => location, :brief_introduction => @user.user_extensions.brief_introduction}
|
||||
end
|
||||
def register_auto(login,mail,password)
|
||||
@user = User.new
|
||||
@user.admin = false
|
||||
@user.register
|
||||
@user.login = login
|
||||
@user.mail =mail
|
||||
password_confirmation = password
|
||||
should_confirmation_password = true
|
||||
if !password.blank? && !password_confirmation.blank? && should_confirmation_password
|
||||
@user.password, @user.password_confirmation = password, password_confirmation
|
||||
elsif !password.blank? && !should_confirmation_password
|
||||
@user.password = password
|
||||
else
|
||||
@user.password = ""
|
||||
end
|
||||
|
||||
@user = automatically_register(@user)
|
||||
|
||||
if @user.id != nil
|
||||
ue = @user.user_extensions ||= UserExtensions.new
|
||||
ue.user_id = @user.id
|
||||
ue.save
|
||||
end
|
||||
@user
|
||||
end
|
||||
#显示用户
|
||||
#id用户id
|
||||
def show_user(params)
|
||||
|
@ -134,7 +158,7 @@ class UsersService
|
|||
membership.sort! {|older, newer| newer.created_on <=> older.created_on }
|
||||
course_list = []
|
||||
membership.each do |mp|
|
||||
course_list << {:course => mp.course,:img_url => url_to_avatar(mp.course)}
|
||||
course_list << {:course => mp.course,:img_url => url_to_avatar(mp.course),:current_user_is_member => current_user.member_of_course?(mp.course),:current_user_is_teacher => is_course_teacher(current_user,mp.course)}
|
||||
end
|
||||
course_list
|
||||
end
|
||||
|
|
|
@ -1,14 +1,21 @@
|
|||
<div class="attachments" style="font-weight:normal;">
|
||||
<% is_float ||= false %>
|
||||
<% for attachment in attachments %>
|
||||
<p style="width: 100%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
|
||||
<span title="<%= attachment.filename%>" id = "attachment_">
|
||||
<% if options[:length] %>
|
||||
<%= link_to_short_attachment attachment, :class => 'icon icon-attachment', :download => true,:length => options[:length] -%>
|
||||
<% else %>
|
||||
<%= link_to_short_attachment attachment, :class => 'icon icon-attachment', :download => true -%>
|
||||
<% end %>
|
||||
<%if is_float%>
|
||||
<div style="max-width:55%;white-space: nowrap; overflow: hidden; text-overflow: ellipsis;float: left;">
|
||||
<% end%>
|
||||
<span title="<%= attachment.filename%>" id = "attachment_">
|
||||
<% if options[:length] %>
|
||||
<%= link_to_attachment attachment, :class => 'icon icon-attachment', :download => true,:length => options[:length] -%>
|
||||
<% else %>
|
||||
<%= link_to_attachment attachment, :class => 'icon icon-attachment', :download => true -%>
|
||||
<% end %>
|
||||
</span>
|
||||
<%if is_float%>
|
||||
</div>
|
||||
<% end%>
|
||||
|
||||
</span>
|
||||
<% if attachment.is_text? %>
|
||||
<%= link_to image_tag('magnifier.png'),
|
||||
:controller => 'attachments',
|
||||
|
@ -19,8 +26,9 @@
|
|||
<span title="<%= attachment.description%>">
|
||||
<%= h(truncate(" - #{attachment.description}", length: options[:length] ? options[:length]:15, omission: '...')) unless attachment.description.blank? %>
|
||||
</span>
|
||||
<span class="size">(<%= number_to_human_size attachment.filesize %>)</span>
|
||||
|
||||
<span class="size">(
|
||||
<%= number_to_human_size attachment.filesize %>)
|
||||
</span>
|
||||
<% if options[:deletable] %>
|
||||
<% if attachment.container_type == 'HomeworkAttach' %>
|
||||
<%= link_to image_tag('delete.png'), {:controller => 'attachments', :action => 'delete_homework', :id => attachment.id},
|
||||
|
@ -39,8 +47,8 @@
|
|||
<% end %>
|
||||
<% end %>
|
||||
<% if options[:wrap] %>
|
||||
<br/>
|
||||
|
||||
<br/>
|
||||
|
||||
<% end %>
|
||||
<% if options[:author] %>
|
||||
<span class="author" title="<%= attachment.author%>">
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<%=link_to "主页", home_path %> >
|
||||
<%=link_to l(:field_homepage), home_path %> >
|
||||
<span>
|
||||
<%=link_to @user.name, user_path %>
|
||||
</span>
|
||||
|
@ -343,7 +343,7 @@
|
|||
<% if @user.user_extensions.identity == 2 %>
|
||||
<%= render_menu :user_enterprise_menu %>
|
||||
<% else %>
|
||||
<%= render_menu :user_menu,@user %>
|
||||
<%= render_menu :user_menu, @user %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -0,0 +1,373 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="content">
|
||||
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
||||
<%= @subject %>
|
||||
</h4>
|
||||
<% if @attachments.first || @course_news.first || @bids.first ||
|
||||
@homeworks.first || @course_journal_messages.first|| @course_messages.first %>
|
||||
<div class="wmail_main" style="padding:20px 10px 0px;">
|
||||
<h2 class="wmail_h2" style="color:#15bccf; "><%= l(:label_course_overview)%></h2>
|
||||
<% unless @course_news.first.nil? %>
|
||||
<ul class="wmail_ul" style=" list-style-type:none;clear: both;margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
|
||||
|
||||
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
||||
<%= l(:label_course_news) %>
|
||||
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @course_news.count %>)</span>
|
||||
</h4>
|
||||
|
||||
<% @course_news.each do |course_new|%>
|
||||
<li style="clear: both; list-style: none;">
|
||||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">[</span>
|
||||
|
||||
<%= link_to truncate(course_new.course.name,length: 30,omission: '...'), course_url(course_new.course, :token => @token.value),
|
||||
:class=> "wmail_column",
|
||||
:style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">]</span>
|
||||
|
||||
<%= link_to course_new.author, user_activities_url(course_new.author,:token => @token.value), :class => "wmail_name",
|
||||
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_project_notice) %></span>
|
||||
|
||||
<%= link_to truncate(course_new.title,length: 30,omission: '...'), news_url(course_new,:token => @token.value),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
%>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(course_new.created_on) %></span>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<div class="cl"></div>
|
||||
</ul><!--课程动态 end-->
|
||||
<% end %>
|
||||
<% if !@bids.first.nil? || !@homeworks.first.nil? %>
|
||||
<ul class="wmail_ul" style="clear: both;margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
|
||||
|
||||
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;"><%= l(:label_homework_overview) %><span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @bids.count %>)</span></h4>
|
||||
<% unless @bids.first.nil?%>
|
||||
<% @bids.each do |bid| %>
|
||||
<li style="clear: both; list-style: none;">
|
||||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">[</span>
|
||||
|
||||
<%= link_to truncate(bid.courses.first.name,length: 30,omission: '...'), course_url(bid.courses.first, :token => @token.value),
|
||||
:class=> "wmail_column",
|
||||
:style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">]</span>
|
||||
|
||||
<%= link_to bid.author, user_activities_url(bid.author,:token => @token.value), :class => "wmail_name",
|
||||
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_course_homework) %></span>
|
||||
|
||||
<%= link_to truncate(bid.name,length: 30,omission: '...'), course_for_bid_url(:id => bid.id,:token => @token.value),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
%>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(bid.created_on) %></span>
|
||||
</li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% unless @homeworks.first.nil? %>
|
||||
<% @homeworks.each do |homework| %>
|
||||
<li style="clear: both; list-style: none;">
|
||||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">[</span>
|
||||
|
||||
<%= link_to truncate(homework.bid.courses.first.name,length: 30,omission: '...'), course_url(homework.bid.courses.first, :token => @token.value),
|
||||
:class=> "wmail_column",
|
||||
:style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">]</span>
|
||||
|
||||
<%= link_to homework.user, user_activities_url(homework.user,:token => @token.value), :class => "wmail_name",
|
||||
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_course_submit_homework) %></span>
|
||||
|
||||
<%= link_to truncate(homework.name,length: 30,omission: '...'), course_for_bid_url(:id => homework.bid.id,:token => @token.value),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
%>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(homework.created_on) %></span>
|
||||
</li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<div class="cl"></div>
|
||||
</ul><!--作业动态 end-->
|
||||
<% end %>
|
||||
|
||||
<% unless @course_journal_messages.first.nil? %>
|
||||
<ul class="wmail_ul" style="clear: both;margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
|
||||
|
||||
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
||||
<%= l(:view_course_journals_for_messages) %>
|
||||
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @course_journal_messages.count %>)</span>
|
||||
</h4>
|
||||
|
||||
<% @course_journal_messages.each do |course_journal_message|%>
|
||||
<li style="clear: both; list-style: none;">
|
||||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">[</span>
|
||||
|
||||
<%= link_to truncate(course_journal_message.course.name,length: 30,omission: '...'), course_url(course_journal_message.course, :token => @token.value),
|
||||
:class=> "wmail_column",
|
||||
:style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">]</span>
|
||||
|
||||
<%= link_to course_journal_message.user, user_activities_url(course_journal_message.user,:token => @token.value), :class => "wmail_name",
|
||||
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_send_course_journals_for_messages) %></span>
|
||||
|
||||
<%= link_to truncate(course_journal_message.notes,length: 30,omission: '...'), course_feedback_url(course_journal_message.course,:token => @token.value),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
%>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(course_journal_message.created_on) %></span>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<div class="cl"></div>
|
||||
</ul><!--课程留言 end-->
|
||||
<% end %>
|
||||
|
||||
<% unless @course_messages.first.nil? %>
|
||||
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
|
||||
|
||||
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
||||
<%= l(:view_borad_course) %>
|
||||
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @course_journal_messages.count %>)</span>
|
||||
</h4>
|
||||
|
||||
<% @course_messages.each do |course_message|%>
|
||||
<li style="clear: both; list-style: none;">
|
||||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">[</span>
|
||||
|
||||
<%= link_to truncate(course_message.course.name,length: 30,omission: '...'), course_url(course_message.course.id, :token => @token.value),
|
||||
:class=> "wmail_column",
|
||||
:style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">]</span>
|
||||
|
||||
<%= link_to course_message.author, user_activities_url(course_message.author,:token => @token.value), :class => "wmail_name",
|
||||
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_send_course_messages) %></span>
|
||||
|
||||
<%= link_to truncate(course_message.subject,length: 30,omission: '...'),board_message_url(course_message, :board_id => course_message.board_id,:token => @token.value),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
%>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(course_message.created_on) %></span>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<div class="cl"></div>
|
||||
</ul><!--课程讨论 end-->
|
||||
<% end %>
|
||||
|
||||
<% unless @attachments.first.nil? %>
|
||||
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
|
||||
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
||||
<%= l(:label_course_attendingcontestwork_download) %>
|
||||
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @attachments.count %>)</span>
|
||||
</h4>
|
||||
|
||||
<% @attachments.each do |attachment|%>
|
||||
<li style="clear: both; list-style: none;">
|
||||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">[</span>
|
||||
|
||||
<%= link_to truncate(attachment.course.name,length: 30,omission: '...'), course_url(attachment.course, :token => @token.value),
|
||||
:class=> "wmail_column",
|
||||
:style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">]</span>
|
||||
|
||||
<%= link_to attachment.author, user_activities_url(attachment.author,:token => @token.value), :class => "wmail_name",
|
||||
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_course_file_upload) %></span>
|
||||
|
||||
<%= link_to truncate(attachment.filename,length: 30,omission: '...'),course_files_url(attachment.course,:token => @token.value),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
%>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(attachment.created_on) %></span>
|
||||
</li>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</ul><!--课件下载 end-->
|
||||
<% end %>
|
||||
</div><!--课程动态 end-->
|
||||
<% end %>
|
||||
<% if @issues.first || @project_messages.first %>
|
||||
<div class="wmail_main" style="padding:20px 10px 0px;">
|
||||
<h2 class="wmail_h2" style="color:#15bccf; "><%= l(:label_project_overview_new)%></h2>
|
||||
<% unless @issues.first.nil? %>
|
||||
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
|
||||
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
||||
<%= l(:label_issue_tracking) %>
|
||||
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @issues.count %>)</span>
|
||||
</h4>
|
||||
|
||||
<% @issues.each do |issue|%>
|
||||
<li style="clear: both; list-style: none;">
|
||||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">[</span>
|
||||
|
||||
<%= link_to truncate(issue.project.name,length: 30,omission: '...'), project_url(issue.project, :token => @token.value),
|
||||
:class=> "wmail_column",
|
||||
:style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">]</span>
|
||||
|
||||
<%= link_to issue.author, user_activities_url(issue.author,:token => @token.value), :class => "wmail_name",
|
||||
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_project_issue) %></span>
|
||||
|
||||
<%= link_to truncate(issue.subject,length: 30,omission: '...'),issue_url(issue, :token => @token.value),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
%>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(issue.created_on) %></span>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<div class="cl"></div>
|
||||
</ul><!--问题跟踪 end-->
|
||||
<% end %>
|
||||
|
||||
<% unless @project_messages.first.nil? %>
|
||||
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
|
||||
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
||||
<%= l(:project_moule_boards_show) %>
|
||||
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @project_messages.count %>)</span>
|
||||
</h4>
|
||||
|
||||
<% @project_messages.each do |project_message|%>
|
||||
<li style="clear: both; list-style: none;">
|
||||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">[</span>
|
||||
|
||||
<%= link_to truncate(project_message.project.name,length: 30,omission: '...'), project_url(project_message.project, :token => @token.value),
|
||||
:class=> "wmail_column",
|
||||
:style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">]</span>
|
||||
|
||||
<%= link_to project_message.author, user_activities_url(project_message.author,:token => @token.value), :class => "wmail_name",
|
||||
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_send_course_messages) %></span>
|
||||
|
||||
<%= link_to truncate(project_message.subject,length: 30,omission: '...'),board_message_url(project_message, :board_id => project_message.board_id,:token => @token.value),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
%>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(project_message.created_on) %></span>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<div class="cl"></div>
|
||||
</ul><!--项目论坛 end-->
|
||||
<% end %>
|
||||
|
||||
|
||||
|
||||
</div><!--项目动态 end-->
|
||||
<% end %>
|
||||
<% unless @user_journal_messages.first.nil? %>
|
||||
<div class="wmail_main" style="padding:20px 10px 0px;">
|
||||
<h2 class="wmail_h2" style="color:#15bccf; "><%= l(:label_activities) %></h2>
|
||||
|
||||
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
|
||||
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
||||
<%= l(:label_user_message) %>
|
||||
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @user_journal_messages.count %>)</span>
|
||||
</h4>
|
||||
|
||||
<% @user_journal_messages.each do |user_journal_message|%>
|
||||
<li style="clear: both; list-style: none;">
|
||||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||
|
||||
<%= link_to user_journal_message.user, user_activities_url(user_journal_message.user,:token => @token.value),
|
||||
:class => "wmail_name",
|
||||
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_show_your_message) %></span>
|
||||
|
||||
<%= link_to truncate(user_journal_message.notes,length: 30,omission: '...'),feedback_url(@user,:token => @token.value),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
%>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(user_journal_message.created_on) %></span></li>
|
||||
|
||||
<% end %>
|
||||
|
||||
<div class="cl"></div>
|
||||
</ul><!--课程动态 end-->
|
||||
|
||||
</div><!--个人动态 end-->
|
||||
<% end %>
|
||||
<% if @forums.first || @memos.first %>
|
||||
<div class="wmail_main" style="padding:20px 10px 0px;">
|
||||
<h2 class="wmail_h2" style="color:#15bccf; "><%= l(:lable_bar_active) %></h2>
|
||||
<% unless @forums.first.nil? %>
|
||||
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
|
||||
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
||||
<%= l(:label_user_forum) %>
|
||||
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @forums.count %>)</span>
|
||||
</h4>
|
||||
|
||||
<% @forums.each do |forum|%>
|
||||
<li style="clear: both; list-style: none;">
|
||||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||
|
||||
<%= link_to forum.creator, user_activities_url(forum.creator,:token => @token.value),
|
||||
:class => "wmail_name",
|
||||
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_forum_new) %></span>
|
||||
|
||||
<%= link_to truncate(forum.name,length: 30,omission: '...'),forum_url(forum,:token => @token.value),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
%>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(forum.created_at) %></span></li>
|
||||
|
||||
<% end %>
|
||||
|
||||
<div class="cl"></div>
|
||||
</ul><!-- 新建贴吧 end-->
|
||||
<% end %>
|
||||
<% unless @memos.first.nil? %>
|
||||
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
|
||||
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
||||
<%= l(:label_user_message_forum) %>
|
||||
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @memos.count %>)</span>
|
||||
</h4>
|
||||
|
||||
<% @memos.each do |memo|%>
|
||||
<li style="clear: both; list-style: none;">
|
||||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||
|
||||
<%= link_to memo.author, user_activities_url(memo.author,:token => @token.value),
|
||||
:class => "wmail_name",
|
||||
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= memo.parent_id.nil? ? l(:label_memo_new_from_forum) : l(:label_reply) %></span>
|
||||
|
||||
<%= link_to truncate(memo.subject,length: 30,omission: '...'),forum_memo_url(memo.forum, (memo.parent_id.nil? ? memo : memo.parent_id)),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
%>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(memo.created_at) %></span></li>
|
||||
|
||||
<% end %>
|
||||
|
||||
<div class="cl"></div>
|
||||
</ul><!-- 新建贴吧 end-->
|
||||
<% end %>
|
||||
</div><!--贴吧动态 end-->
|
||||
<% end %>
|
||||
<div class="wmail_foot" style="margin-top:20px;color:#2775d2; margin-left:10px;">
|
||||
<%= link_to l(:mail_footer), @user_url, :style => "margin-top:20px;color:#2775d2; margin-left:10px;" %>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
|
@ -0,0 +1,296 @@
|
|||
<%= @subject %>
|
||||
<% if @attachments.first || @course_news.first || @bids.first ||
|
||||
@homeworks.first || @course_journal_messages.first|| @course_messages.first %>
|
||||
<%= l(:label_course_overview)%>
|
||||
<% unless @course_news.first.nil? %>
|
||||
<%= l(:label_course_news) %>
|
||||
(<%= @course_news.count %>)
|
||||
|
||||
|
||||
<% @course_news.each do |course_new|%>
|
||||
|
||||
▪
|
||||
[
|
||||
|
||||
<%= link_to truncate(course_new.course.name,length: 30,omission: '...'), course_url(course_new.course, :token => @token.value)%>
|
||||
]
|
||||
|
||||
<%= link_to course_new.author, user_activities_url(course_new.author,:token => @token.value)
|
||||
%>
|
||||
<%= l(:label_project_notice) %>
|
||||
|
||||
<%= link_to truncate(course_new.title,length: 30,omission: '...'), news_url(course_new,:token => @token.value)
|
||||
|
||||
|
||||
%> <%= format_time(course_new.created_on) %>
|
||||
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
<% if !@bids.first.nil? || !@homeworks.first.nil? %>
|
||||
<%= l(:label_homework_overview) %><%= @bids.count %>
|
||||
<% unless @bids.first.nil?%>
|
||||
<% @bids.each do |bid| %>
|
||||
▪
|
||||
[
|
||||
|
||||
<%= link_to truncate(bid.courses.first.name,length: 30,omission: '...'),course_url(bid.courses.first, :token => @token.value)
|
||||
|
||||
%>
|
||||
]
|
||||
|
||||
<%= link_to bid.author, user_activities_url(bid.author,:token => @token.value)
|
||||
%>
|
||||
<%= l(:label_course_homework) %>
|
||||
|
||||
<%= link_to truncate(bid.name,length: 30,omission: '...'), course_for_bid_url(bid,:token => @token.value)
|
||||
|
||||
|
||||
%>
|
||||
<%= format_time(bid.created_on) %>
|
||||
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% unless @homeworks.first.nil? %>
|
||||
<% @homeworks.each do |homework| %>
|
||||
▪[
|
||||
|
||||
<%= link_to truncate(homework.bid.courses.first.name,length: 30,omission: '...'), course_url(homework.bid.courses.first, :token => @token.value)
|
||||
|
||||
%>
|
||||
]
|
||||
|
||||
<%= link_to homework.user, user_activities_url(homework.user,:token => @token.value)
|
||||
%>
|
||||
<%= l(:label_course_submit_homework) %>
|
||||
|
||||
<%= link_to truncate(homework.name,length: 30,omission: '...'), course_for_bid_url(homework.bid,:token => @token.value)
|
||||
|
||||
|
||||
%>
|
||||
<%= format_time(homework.created_at) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
|
||||
<!--作业动态 end-->
|
||||
<% end %>
|
||||
|
||||
<% unless @course_journal_messages.first.nil? %>
|
||||
|
||||
<%= l(:view_course_journals_for_messages) %> (<%= @course_journal_messages.count %>)
|
||||
|
||||
|
||||
<% @course_journal_messages.each do |course_journal_message|%>
|
||||
|
||||
[
|
||||
|
||||
<%= link_to truncate(course_journal_message.course.name,length: 30,omission: '...'), course_url(course_journal_message.course, :token => @token.value)
|
||||
|
||||
%>
|
||||
]
|
||||
|
||||
<%= link_to course_journal_message.user, user_activities_url(course_journal_message.user,:token => @token.value)
|
||||
%>
|
||||
<%= l(:label_send_course_journals_for_messages) %>
|
||||
|
||||
<%= link_to truncate(course_journal_message.notes,length: 30,omission: '...'), course_feedback_url(course_journal_message.course,:token => @token.value)
|
||||
|
||||
|
||||
%>
|
||||
<%= format_time(course_journal_message.created_on) %>
|
||||
|
||||
<% end %>
|
||||
|
||||
|
||||
<% end %>
|
||||
|
||||
<% unless @course_messages.first.nil? %>
|
||||
|
||||
<%= l(:view_borad_course) %>
|
||||
(<%= @course_journal_messages.count %>)
|
||||
|
||||
|
||||
<% @course_messages.each do |course_message|%>
|
||||
|
||||
▪
|
||||
[
|
||||
|
||||
<%= link_to truncate(course_message.course.name,length: 30,omission: '...'), course_url(course_message.course, :token => @token.value)
|
||||
|
||||
%>
|
||||
]
|
||||
|
||||
<%= link_to course_message.author, user_activities_url(course_message.author,:token => @token.value)
|
||||
%>
|
||||
<%= l(:label_send_course_messages) %>
|
||||
|
||||
<%= link_to truncate(course_message.subject,length: 30,omission: '...'),board_message_url(course_message, :board_id => course_message.board_id,:token => @token.value)
|
||||
|
||||
|
||||
%>
|
||||
<%= format_time(course_message.created_on) %>
|
||||
|
||||
<% end %>
|
||||
|
||||
|
||||
<% end %>
|
||||
|
||||
<% unless @attachments.first.nil? %>
|
||||
|
||||
<%= l(:label_course_attendingcontestwork_download) %>
|
||||
(<%= @attachments.count %>)
|
||||
|
||||
|
||||
<% @attachments.each do |attachment|%>
|
||||
▪[
|
||||
|
||||
<%= link_to truncate(attachment.course.name,length: 30,omission: '...'), course_url(attachment.course, :token => @token.value)
|
||||
|
||||
%>
|
||||
]
|
||||
|
||||
<%= link_to attachment.author, user_activities_url(attachment.author,:token => @token.value)
|
||||
%>
|
||||
<%= l(:label_course_file_upload) %>
|
||||
|
||||
<%= link_to truncate(attachment.filename,length: 30,omission: '...'),course_files_url(attachment.course,:token => @token.value)
|
||||
|
||||
|
||||
%>
|
||||
<%= format_time(attachment.created_on) %>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
</ul><!--课件下载 end-->
|
||||
<% end %>
|
||||
<% end %><!--课程动态 end-->
|
||||
|
||||
<% @issues.first || @project_messages.first %>
|
||||
<%= l(:label_project_overview_new)%>
|
||||
<% unless @issues.first.nil? %>
|
||||
|
||||
<%= l(:label_issue_tracking) %>
|
||||
(<%= @issues.count %>)
|
||||
|
||||
<% @issues.each do |issue|%>
|
||||
▪
|
||||
[
|
||||
|
||||
<%= link_to truncate(issue.project.name,length: 30,omission: '...'), project_url(issue.project, :token => @token.value)
|
||||
|
||||
%>
|
||||
]
|
||||
|
||||
<%= link_to issue.author, user_activities_url(issue.author,:token => @token.value)
|
||||
%>
|
||||
<%= l(:label_project_issue) %>
|
||||
|
||||
<%= link_to truncate(issue. subject,length: 30,omission: '...'),issue_url(issue, :token => @token.value)
|
||||
|
||||
|
||||
%>
|
||||
<%= format_time(issue.created_on) %>
|
||||
<% end %>
|
||||
|
||||
|
||||
<% end %>
|
||||
|
||||
<% unless @project_messages.first.nil? %>
|
||||
|
||||
<%= l(:project_moule_boards_show) %>
|
||||
(<%= @project_messages.count %>)
|
||||
|
||||
<% @project_messages.each do |project_message|%>
|
||||
▪[
|
||||
|
||||
<%= link_to truncate(project_message.project.name,length: 30,omission: '...'), project_url(project_message.project, :token => @token.value)
|
||||
|
||||
%>
|
||||
]
|
||||
|
||||
<%= link_to project_message.author, board_message_url(project_message, :board_id => project_message.board_id,:token => @token.value)
|
||||
%>
|
||||
<%= l(:label_send_course_messages) %>
|
||||
|
||||
<%= link_to truncate(project_message. subject,length: 30,omission: '...'),board_message_url(project_message, :board_id => project_message.board_id,:token => @token.value)
|
||||
|
||||
|
||||
%>
|
||||
<%= format_time(project_message.created_on) %>
|
||||
<% end %>
|
||||
|
||||
|
||||
<% end %>
|
||||
|
||||
|
||||
<% unless @user_journal_messages.first.nil? %>
|
||||
<%= l(:label_activities) %>
|
||||
|
||||
|
||||
<%= l(:label_user_message) %>
|
||||
(<%= @user_journal_messages.count %>)
|
||||
|
||||
<% @user_journal_messages.each do |user_journal_message|%>
|
||||
▪
|
||||
|
||||
<%= link_to user_journal_message.user, user_activities_url(user_journal_message.user,:token => @token.value)
|
||||
|
||||
%>
|
||||
<%= l(:label_show_your_message) %>
|
||||
|
||||
<%= link_to truncate(user_journal_message.notes,length: 30,omission: '...'), feedback_url(@user,:token => @token.value)
|
||||
|
||||
|
||||
%>
|
||||
<%= format_time(user_journal_message.created_on) %>
|
||||
|
||||
<% end %>
|
||||
|
||||
|
||||
<% end %>
|
||||
<% if @forums.first || @memos.first %>
|
||||
<%= l(:lable_bar_active) %>
|
||||
<% unless @forums.first.nil? %>
|
||||
|
||||
<%= l(:label_user_forum) %>
|
||||
(<%= @forums.count %>)
|
||||
|
||||
<% @forums.each do |forum|%>
|
||||
▪
|
||||
|
||||
<%= link_to forum.creator, user_activities_url(forum.creator,:token => @token.value) %>
|
||||
<%= l(:label_forum_new) %>
|
||||
|
||||
<%= link_to truncate(forum.name,length: 30,omission: '...'),forum_url(forum,:token => @token.value)
|
||||
%>
|
||||
<%= format_time(forum.created_at) %>
|
||||
|
||||
<% end %>
|
||||
|
||||
<!-- 新建贴吧 end-->
|
||||
<% end %>
|
||||
<% unless @memos.first.nil? %>
|
||||
|
||||
<%= l(:label_user_message_forum) %>
|
||||
(<%= @memos.count %>)
|
||||
|
||||
<% @memos.each do |memo|%>
|
||||
▪
|
||||
|
||||
<%= link_to memo.author, user_activities_url(memo.author,:token => @token.value)%>
|
||||
<%= memo.parent_id.nil? ? l(:label_memo_new_from_forum) : l(:label_reply) %>
|
||||
|
||||
<%= link_to truncate(memo.subject,length: 30,omission: '...'),forum_memo_url(memo.forum, (memo.parent_id.nil? ? memo : memo.parent_id))
|
||||
%>
|
||||
<%= format_time(memo.created_at) %>
|
||||
|
||||
<% end %>
|
||||
|
||||
|
||||
<!-- 新建贴吧 end-->
|
||||
<% end %>
|
||||
<!--贴吧动态 end-->
|
||||
<% end %>
|
||||
|
||||
<%= link_to l(:mail_footer), @user_url, :style => "margin-top:20px;color:#2775d2; margin-left:10px;" %>
|
|
@ -0,0 +1,17 @@
|
|||
|
||||
<div class="mail_box" style="border:1px solid #c8c8c8; width:570px; height: auto; padding:15px; margin-top:10px; margin-bottom:10px;">
|
||||
<ul style="list-style-type:none; margin:0; padding:0;">
|
||||
|
||||
<li style="list-style-type:none; margin:0; padding:0;"><span style="float: left;"><strong><%= l(:mail_issue_content)%></strong></span>
|
||||
<span style="float: left; width: 526px">
|
||||
<p><%= @subject %> </p>
|
||||
<p> <%= link_to @project_url, @project_url%></p>
|
||||
</span>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<div class="cl" style="margin-top: 30px; clear:both; overflow:hidden;"></div>
|
||||
</div>
|
||||
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
<%= @subject %>
|
||||
<%= link_to @project_url, @project_url%>
|
|
@ -67,7 +67,7 @@
|
|||
<p>
|
||||
<% if @memo.attachments.any?%>
|
||||
<% options = {:author => true, :deletable => @memo.deleted_attach_able_by?(User.current) } %>
|
||||
<%= render :partial => 'attachments/links', :locals => {:attachments => @memo.attachments, :options => options} %>
|
||||
<%= render :partial => 'attachments/links', :locals => {:attachments => @memo.attachments, :options => options, :is_float => true} %>
|
||||
<% end %>
|
||||
</p>
|
||||
<div class="clearfix"></div>
|
||||
|
@ -136,7 +136,7 @@
|
|||
<p>
|
||||
<% if reply.attachments.any?%>
|
||||
<% options = {:author => true, :deletable => reply.deleted_attach_able_by?(User.current) } %>
|
||||
<%= render :partial => 'attachments/links', :locals => {:attachments => reply.attachments, :options => options} %>
|
||||
<%= render :partial => 'attachments/links', :locals => {:attachments => reply.attachments, :options => options, :is_float => true} %>
|
||||
<% end %>
|
||||
</p>
|
||||
</td>
|
||||
|
|
|
@ -151,9 +151,9 @@
|
|||
<!-- modified by fq -->
|
||||
|
||||
<% if !User.current.user_extensions.nil? && !User.current.user_extensions.student_id.nil? %>
|
||||
<%= text_field_tag :no, User.current.user_extensions.student_id, :placeholder => "请输入学号" %>
|
||||
<%= text_field_tag :no, User.current.user_extensions.student_id, :placeholder => l(:label_account_identity_studentID) %>
|
||||
<% else %>
|
||||
<%= text_field_tag :no, nil, :placeholder => "请输入学号" %></span>
|
||||
<%= text_field_tag :no, nil, :placeholder => l(:label_account_identity_studentID) %></span>
|
||||
<% end %>
|
||||
|
||||
<!-- end -->
|
||||
|
@ -217,18 +217,18 @@
|
|||
<label for="occupation_name"><%= l(:field_occupation) %></label>
|
||||
<span class="required"> </span>
|
||||
<% if User.current.user_extensions.nil? %>
|
||||
<input id="province" name="province" style="display: none" type="text" value="请单击选择省份及学校" readonly>
|
||||
<input id="province" name="province" style="display: none" type="text" value=<%= l(:field_occupation_click) %> readonly>
|
||||
<input id="occupation" name="occupation" style="display: none" type="text" value="" />
|
||||
<input id="occupation_name" type="text" style="display: none" readonly/>
|
||||
<% else %>
|
||||
<% if User.current.user_extensions.identity == 3 || User.current.user_extensions.identity == 2 %>
|
||||
|
||||
<input id="province" name="province" style="display: none" type="text" value="请单击选择省份及学校" readonly>
|
||||
<input id="province" name="province" style="display: none" type="text" value=<%= l(:field_occupation_click) %> readonly>
|
||||
<input id="occupation" name="occupation" style="display: none" type="text" value="<%= @user.user_extensions.occupation %>" />
|
||||
<input id="occupation_name" type="text" style="display: none" readonly/>
|
||||
<% elsif User.current.user_extensions.school.nil? %>
|
||||
|
||||
<input id="province" name="province" style="display: none" type="text" value="请单击选择省份及学校" readonly>
|
||||
<input id="province" name="province" style="display: none" type="text" value=<%= l(:field_occupation_click) %> readonly>
|
||||
<input id="occupation" name="occupation" style="display: none" type="text" />
|
||||
<input id="occupation_name" type="text" style="display: none" readonly/>
|
||||
<% else %>
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
<% if @projects.count == 0 %>
|
||||
<h3><%= l(:label_enterprise_nil) %></h3>
|
||||
<% else %>
|
||||
<% @projects.each do |project| %>
|
||||
<% unless project.enterprise_name.blank? %>
|
||||
<% @projects.each do |organization| %>
|
||||
<% unless organization.enterprise_name.blank? %>
|
||||
<ul>
|
||||
<li ><img src="/images/organization_logo.jpg" width="30" height="30" alt="#{project.enterprise_name}" />
|
||||
<%= link_to project.enterprise_name, home_path(:project => project) %></li>
|
||||
<%= link_to organization.enterprise_name, home_path(:organization => organization) %></li>
|
||||
</ul>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<script type="text/javascript">
|
||||
function close_alert_form(){hideModal("#alert_form");}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="alert_form">
|
||||
<div class="upload_con">
|
||||
<div class="polls_alert_upload_box">
|
||||
<p class="polls_alert_box_p">
|
||||
<%= message%>
|
||||
</p>
|
||||
<div class="polls_alert_btn_box">
|
||||
<a class="upload_btn" onclick="close_alert_form();">
|
||||
确 定
|
||||
</a>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -46,7 +46,7 @@
|
|||
</a>
|
||||
</li>
|
||||
<% else%>
|
||||
<li class="pollsbtn fl ml10 pollsbtn_grey">
|
||||
<li class="pollsbtn fl ml10 pollsbtn_grey" style="margin-left: 5px;" >
|
||||
发布问卷
|
||||
</li>
|
||||
<% end%>
|
||||
|
|
|
@ -1,2 +1,10 @@
|
|||
$("#polls_<%= @poll.id %>").html("<%= escape_javascript(render :partial => 'poll',:locals => {:poll => @poll}) %>");
|
||||
alert("发布成功");
|
||||
$('#ajax-modal').html("<%= escape_javascript(render :partial => 'alert', locals: { :message => l(:label_memo_create_succ)}) %>");
|
||||
showModal('ajax-modal', '180px');
|
||||
$('#ajax-modal').css('height','111px');
|
||||
$('#ajax-modal').siblings().remove();
|
||||
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
|
||||
"<a href='#' onclick='close_alert_form();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
||||
$('#ajax-modal').parent().removeClass("alert_praise");
|
||||
$('#ajax-modal').parent().css("top","").css("left","");
|
||||
$('#ajax-modal').parent().addClass("poll_alert_form");
|
|
@ -1,2 +1,10 @@
|
|||
$("#polls_<%= @poll.id %>").html("<%= escape_javascript(render :partial => 'poll',:locals => {:poll => @poll}) %>");
|
||||
alert("取消成功");
|
||||
$('#ajax-modal').html("<%= escape_javascript(render :partial => 'alert', locals: { :message => l(:label_poll_republish_success)}) %>");
|
||||
showModal('ajax-modal', '180px');
|
||||
$('#ajax-modal').css('height','80px');
|
||||
$('#ajax-modal').siblings().remove();
|
||||
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
|
||||
"<a href='#' onclick='close_alert_form();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
||||
$('#ajax-modal').parent().removeClass("alert_praise");
|
||||
$('#ajax-modal').parent().css("top","").css("left","");
|
||||
$('#ajax-modal').parent().addClass("poll_alert_form");
|
|
@ -1,7 +1,7 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>快速进入项目通道</title>
|
||||
<title><%= l('project.join.title')%></title>
|
||||
<style>
|
||||
#popbox{ font-size:12px; font-family:"微软雅黑","宋体"; line-height:1.9; background:#fff; font-style:normal;}
|
||||
#popbox div,html,img,ul,li,p,body,h1,h2,h3,h4,p,a,table,tr,td,fieldset,input,span{ margin:0; padding:0;}
|
||||
|
@ -47,8 +47,8 @@
|
|||
<div id="popbox">
|
||||
<div class="C" >
|
||||
<div class="C_top">
|
||||
<h2>快速进入项目通道</h2>
|
||||
<p>只要持有项目的ID,就可快速申请加入所在项目。项目页面搜索不到的私有项目只能从此通道进入哦!</p>
|
||||
<h2><%= l('project.join.title')%></h2>
|
||||
<p><%= l('project.join.description')%></p>
|
||||
</div>
|
||||
<div class="C_form">
|
||||
<%= form_tag({:controller => 'applied_project',
|
||||
|
@ -58,13 +58,13 @@
|
|||
:id => 'new-watcher-form') do %>
|
||||
<ul>
|
||||
<li style="padding-top: 15px;">
|
||||
<span class="tips">项 目 ID:</span>
|
||||
<span class="tips"><%= l('project.join.id.label')%></span>
|
||||
<input type="hidden" name="project_join" value="1">
|
||||
<input type="hidden" name="user_id" value="<%= User.current.id%>">
|
||||
<input class=" width190" name="project_id" id="project_id" type="text" value="" >
|
||||
<input type="text" style="display: none"/>
|
||||
</li>
|
||||
<li class="mB5">项目ID是所在项目网址中显示的序号</li>
|
||||
<li class="mB5"><%= l('project.join.id.tips')%></li>
|
||||
<li>
|
||||
<a href="#" class="btn" style="margin-left: 50px;" onclick="submit_form(this);">
|
||||
<%= l(:label_apply_project) %>
|
||||
|
|
|
@ -15,12 +15,12 @@
|
|||
</span>
|
||||
</div>
|
||||
<strong><%= l(:field_description) %></strong>: <%= file.description %>
|
||||
<div class="c9 gray-color"> 所属分类:<%=result_come_from file%> </div>
|
||||
<div class="c9 gray-color"> <%= l('attachment.category')%><%=result_come_from file%> </div>
|
||||
<span class="gray blue-color">
|
||||
下载:<%= file.downloads%>|
|
||||
大小:<%= number_to_human_size(file.filesize) %>|
|
||||
共享者:<a class="gray" ><%= link_to file.author, user_path(file.author), target: "_blank" unless file.author.blank? %></a>|
|
||||
上传时间:<%= format_time(file.created_on) %>
|
||||
<%= l('attachment.download_num')%><%= file.downloads%>|
|
||||
<%= l('attachment.size')%><%= number_to_human_size(file.filesize) %>|
|
||||
<%= l('attachment.sharer')%><a class="gray" ><%= link_to file.author, user_path(file.author), target: "_blank" unless file.author.blank? %></a>|
|
||||
<%= l('attachment.upload_time')%><%= format_time(file.created_on) %>
|
||||
</span>
|
||||
<div style="display: none"></div>
|
||||
</td>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<hr />
|
||||
<% contests_results.each do |contest| %>
|
||||
<p class="font_description2">
|
||||
<strong><%= l(:label_tags_contest) %>:<%= link_to "#{contest.name}",
|
||||
<strong><%= l(:label_tags_contest_name) %>:<%= link_to "#{contest.name}",
|
||||
:controller => "contests",:action => "show_contest",:id => contest.id %></strong>
|
||||
<br />
|
||||
<strong><%= l(:label_tags_contest_description) %>:</strong><%= textilizable contest.description %>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<hr />
|
||||
<% courses_results.each do |course| %>
|
||||
<p class="font_description2">
|
||||
<strong><%= l(:label_course) %>:<%= link_to "#{course.name}",course_path(course) %></strong>
|
||||
<strong><%= l(:label_tags_course_name) %>:<%= link_to "#{course.name}",course_path(course) %></strong>
|
||||
<br />
|
||||
<strong><%= l(:label_new_course_description) %>:</strong><%= textilizable course.description %>
|
||||
<%= course.updated_at %>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<%= link_to '+ 添加标签', 'javascript:void(0);',
|
||||
<%= link_to l(:label_add_tag), 'javascript:void(0);',
|
||||
:class => "yellowBtn f_l",
|
||||
:onclick=>"$('#add_tag_#{obj.id}').slideToggle();" if User.current.logged? %> <!-- $('#put-tag-form-#{obj.class}-#{obj.id}').toggle(); readmore(this); -->
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
<%= l(:label_user_plural) %>(<%= @users_tags_num %>) |
|
||||
<%= l(:label_tags_call)%>(<%= @bids_tags_num %>) |
|
||||
<%= l(:field_filename)%>(<%= @attachments_tags_num %>) |
|
||||
开源项目(<%= @open_source_projects_num %>) |
|
||||
<%= l(:label_tags_opensource)%>(<%= @open_source_projects_num %>) |
|
||||
<%= l(:label_tags_contest)%>(<%= @contests_tags_num %>) |
|
||||
</div>
|
||||
<div id="show_results">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<% content_for :content do %>
|
||||
<h3 style="color: red;">总标签数:<%= @tags.size %>个</h3>
|
||||
<h3 style="color: red;"><%= l(:label_tags_count) %><%= @tags.size %>个</h3>
|
||||
<hr />
|
||||
<% i = 0 %>
|
||||
<div id="show_all_tags">
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
<div class="menu">
|
||||
<%= link_to "#{l(:label_course_new)}", new_course_path, class: 'icon icon-add' if @user == User.current %>
|
||||
<ul>
|
||||
<li mode='doing' class="on">进行中</li>
|
||||
<li mode='end'>已完结</li>
|
||||
<li mode='doing' class="on"><%= l('user.courses.doing')%></li>
|
||||
<li mode='end'><%= l('user.courses.done')%></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<div class="menu-div">
|
||||
<div class="menu">
|
||||
<span style="color: #000; font-weight: bold;">
|
||||
<%= "#{@user.name}的动态" %>
|
||||
<%= l(:label_user_activity, :value => @user.name) %>
|
||||
</span>
|
||||
<ul><%#链接绑定在页面最下方的jQuery%>
|
||||
<li mode='all' class="<%= "on" if @state.eql?(0) %>">
|
||||
|
@ -158,14 +158,14 @@
|
|||
<%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %>
|
||||
</span>
|
||||
</div>
|
||||
<div style="display: inline-block; float: right; margin-top: 0px">
|
||||
<span>
|
||||
<%= link_to l(:label_find_all_comments), respond_path(e.act_id) %>
|
||||
</span>
|
||||
<a class="font_lighter">
|
||||
<%= l(:label_comments_count, :count => e.act.commit) %>
|
||||
</a>
|
||||
</div>
|
||||
<!--<div style="display: inline-block; float: right; margin-top: 0px">-->
|
||||
<!--<span>-->
|
||||
<!--<%#= link_to l(:label_find_all_comments), respond_path(e.act_id) %>-->
|
||||
<!--</span>-->
|
||||
<!--<a class="font_lighter">-->
|
||||
<!--<%#= l(:label_comments_count, :count => e.act.commit) %>-->
|
||||
<!--</a>-->
|
||||
<!--</div>-->
|
||||
</td>
|
||||
</tr>
|
||||
<% when 'Journal' %>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<%
|
||||
select_option = []
|
||||
(select_option << [l(:label_select_project), 'projects']) if project_type == Project::ProjectType_project
|
||||
(select_option << [l(:label_select_course), 'courses']) if project_type == Project::ProjectType_course
|
||||
select_option << [l(:label_select_user), 'users']
|
||||
(select_option << [l('welcome.search.select.project'), 'projects']) if project_type == Project::ProjectType_project
|
||||
(select_option << [l('welcome.search.select.course'), 'courses']) if project_type == Project::ProjectType_course
|
||||
select_option << [l('welcome.search.select.user'), 'users']
|
||||
#select_option << ['教师', 'users_teacher'],
|
||||
#select_option << ['学生', 'users_student']
|
||||
%>
|
||||
|
@ -49,7 +49,7 @@ form #search_type{
|
|||
<%= form_tag({controller: :welcome, action: :search }, method: :get) do %>
|
||||
<div class="project-search" style="float: right">
|
||||
<div class='search_widget'>
|
||||
<%= text_field_tag :q, nil, :placeholder => l(:label_search_information), :size => 27, style: "float:left" %>
|
||||
<%= text_field_tag :q, nil, :placeholder => l('welcome.search.information'), :size => 27, style: "float:left" %>
|
||||
<%= select_tag(:search_type, options_for_select(select_option), :style => "float:right" ) %>
|
||||
</div>
|
||||
<%#= hidden_field_tag 'project_type', project_type %>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<%
|
||||
select_option = []
|
||||
(select_option << [l(:label_select_project), 'projects']) if project_type == Project::ProjectType_project
|
||||
(select_option << [l(:label_select_course), 'courses']) if project_type == Project::ProjectType_course
|
||||
select_option << [l(:label_select_user), 'users']
|
||||
(select_option << [l('welcome.search.select.project'), 'projects']) if project_type == Project::ProjectType_project
|
||||
(select_option << [l('welcome.search.select.course'), 'courses']) if project_type == Project::ProjectType_course
|
||||
select_option << [l('welcome.search.select.user'), 'users']
|
||||
%>
|
||||
<style type="text/css">
|
||||
form #q, form #search_type{
|
||||
|
@ -90,10 +90,10 @@ form #search_by
|
|||
<div class="project-search" style="float: right">
|
||||
<%= submit_tag l(:label_search), :class => "enterprise", :name => nil,:style =>"float: right; margin-left:3px;margin-top:2px" %>
|
||||
<div class='search_widget' >
|
||||
<%= text_field_tag :q, nil, :placeholder => l(:label_search_information), style:"float:left;" %>
|
||||
<%= text_field_tag :q, nil, :placeholder => l('welcome.search.information'), style:"float:left;" %>
|
||||
<input type="text" name="search_by_input" style="display: none" id="search_by_input" value="0">
|
||||
<%= select_tag(:search_type, options_for_select(select_option), :onchange => "searchTypeChange();", :style => "float:right" ) %>
|
||||
<%= select_tag(:search_by,options_for_select([[l(:label_select_user_nickname),"0"],[l(:label_select_user_showname),"1"],[l(:label_select_user_email),"2"]]), :onchange => "searchByChange();",:style => "float:right" ) %>
|
||||
<%= select_tag(:search_by,options_for_select([[l('welcome.search.select.userinfo.nickname'),"0"],[l('welcome.search.select.userinfo.showname'),"1"],[l('welcome.search.select.userinfo.email'),"2"]]), :onchange => "searchByChange();",:style => "float:right" ) %>
|
||||
</div>
|
||||
<%#= hidden_field_tag 'project_type', project_type %>
|
||||
</div>
|
||||
|
|
|
@ -140,7 +140,7 @@
|
|||
<!--搜索框-->
|
||||
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject" style="float: right;">
|
||||
<%= form_tag({controller: :welcome, action: :search }, method: :get) do %>
|
||||
<%= text_field_tag 'name', params[:name], :placeholder => l(:label_search_information), name: "name", :class => 'blueinputbar', :style => 'width:240px; padding-right:50px;'%>
|
||||
<%= text_field_tag 'name', params[:name], :placeholder => l('welcome.search.information'), name: "name", :class => 'blueinputbar', :style => 'width:240px; padding-right:50px;'%>
|
||||
|
||||
<%= hidden_field_tag 'project_type', params[:project_type] %>
|
||||
<%= submit_tag l(:label_search), :class => "enterprise", :name => "contests_search" %>
|
||||
|
|
|
@ -96,11 +96,11 @@
|
|||
year_now -= 1
|
||||
course_term = "秋季学期"
|
||||
elsif month_now < 9
|
||||
course_term = "秋季学期"
|
||||
course_term = "春季学期"
|
||||
end
|
||||
%>
|
||||
<%# (month_now >= 3 && month_now < 9) ? course_term = "春季学期" : course_term = "秋季学期" %>
|
||||
<% @school_id.nil? ? cur_school_course = [] : cur_school_course = find_miracle_course(10,7,@school_id, year_now, course_term) %>
|
||||
<% cur_school_course = @school_id.nil? ? [] : find_miracle_course(10,7,@school_id, year_now, course_term) %>
|
||||
|
||||
<% if cur_school_course.count == 0 %>
|
||||
<span>
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
<% end %>
|
||||
<% else %>
|
||||
<span class="font_welcome_school" style="color: #E8770D">
|
||||
<%= link_to @organization, options={:action => 'index', :enterprise => @organization}, html_options={ :method => 'get', :style => "color: #E8770D"} %>
|
||||
<%= @organization %>
|
||||
</span>
|
||||
<br/>
|
||||
<span class="font_welcome_trustie">
|
||||
|
@ -87,7 +87,7 @@
|
|||
<!-- 企业版项目 -->
|
||||
<% else %>
|
||||
<% if @e_count == 0 %>
|
||||
<p id="errorExplanation"><%= l(:label_enterprise_tips) %></p>
|
||||
<div id="flash_notice" class="flash notice"><%= l(:label_enterprise_tips) %></div>
|
||||
<% @projects.map do |project| %>
|
||||
<%= render :partial => 'hot_projects_list', :locals => {:project => project} %>
|
||||
<% end %>
|
||||
|
@ -95,7 +95,7 @@
|
|||
<% @organization_projects.map do |project| %>
|
||||
<%= render :partial => 'hot_projects_list', :locals => {:project => project} %>
|
||||
<% end %>
|
||||
<p id="errorExplanation"><%= l(:label_part_enterprise_tips) %></p>
|
||||
<div id="flash_notice" class="flash notice"><%= l(:label_part_enterprise_tips) %></div>
|
||||
<% @part_projects.map do |project| %>
|
||||
<%= render :partial => 'hot_projects_list', :locals => {:project => project} %>
|
||||
<% end %>
|
||||
|
|
|
@ -17,9 +17,7 @@ module RedmineApp
|
|||
# -- all .rb files in that directory are automatically loaded.
|
||||
|
||||
#verifier if email is real
|
||||
# EmailVerifier.config do |config|
|
||||
# config.verifier_email = "lizanle521@126.com"
|
||||
# end
|
||||
|
||||
|
||||
config.generators do |g|
|
||||
g.test_framework :rspec,
|
||||
|
|
|
@ -1,52 +0,0 @@
|
|||
# Default setup is given for MySQL with ruby1.9. If you're running Redmine
|
||||
# with MySQL and ruby1.8, replace the adapter name with `mysql`.
|
||||
# Examples for PostgreSQL, SQLite3 and SQL Server can be found at the end.
|
||||
# Line indentation must be 2 spaces (no tabs).
|
||||
|
||||
production:
|
||||
adapter: mysql2
|
||||
database: redmine
|
||||
host: localhost
|
||||
username: root
|
||||
password: ""
|
||||
encoding: utf8
|
||||
|
||||
development:
|
||||
adapter: mysql2
|
||||
database: redmine_development
|
||||
host: 10.107.17.20
|
||||
username: root
|
||||
password: "1234"
|
||||
encoding: utf8
|
||||
|
||||
# Warning: The database defined as "test" will be erased and
|
||||
# re-generated from your development database when you run "rake".
|
||||
# Do not set this db to the same as development or production.
|
||||
test:
|
||||
adapter: mysql2
|
||||
database: redmine_test
|
||||
host: 10.107.17.20
|
||||
username: root
|
||||
password: "1234"
|
||||
encoding: utf8
|
||||
|
||||
# PostgreSQL configuration example
|
||||
#production:
|
||||
# adapter: postgresql
|
||||
# database: redmine
|
||||
# host: localhost
|
||||
# username: postgres
|
||||
# password: "postgres"
|
||||
|
||||
# SQLite3 configuration example
|
||||
#production:
|
||||
# adapter: sqlite3
|
||||
# database: db/redmine.sqlite3
|
||||
|
||||
# SQL Server configuration example
|
||||
#production:
|
||||
# adapter: sqlserver
|
||||
# database: redmine
|
||||
# host: localhost
|
||||
# username: jenkins
|
||||
# password: jenkins
|
|
@ -8,10 +8,12 @@ RedmineApp::Application.configure do
|
|||
# Log error messages when you accidentally call methods on nil.
|
||||
config.whiny_nils = true
|
||||
config.logger = Logger.new('log/development.log', 'daily') # daily, weekly or monthly
|
||||
|
||||
|
||||
# Show full error reports and disable caching
|
||||
config.consider_all_requests_local = true
|
||||
config.action_controller.perform_caching = false
|
||||
config.cache_store = :file_store, "#{Rails.root }/public/tmp/"
|
||||
config.action_controller.perform_caching = true
|
||||
config.cache_store = :dalli_store
|
||||
# Don't care if the mailer can't send
|
||||
config.action_mailer.raise_delivery_errors = true
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ RedmineApp::Application.configure do
|
|||
# The production environment is meant for finished, "live" apps.
|
||||
# Code is not reloaded between requests
|
||||
config.cache_classes = true
|
||||
|
||||
config.cache_store = :dalli_store
|
||||
#####
|
||||
# Customize the default logger (http://ruby-doc.org/core/classes/Logger.html)
|
||||
#
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
#!/usr/bin/env ruby
|
||||
|
||||
require 'rubygems'
|
||||
require 'rufus-scheduler'
|
||||
|
||||
#users = User.where("mail_notification = 'week' or mail_notification = 'day'")
|
||||
|
||||
scheduler = Rufus::Scheduler.new
|
||||
scheduler.cron('0 0 * * 1') do
|
||||
users = User.where("mail_notification = 'week'")
|
||||
users.each do |user|
|
||||
#Rails.logger.info "send mail to #{user.show_name}(#{user.mail}) at #{Time.now}"
|
||||
Thread.start do
|
||||
Mailer.send_for_user_activities(user, Date.today, 7).deliver
|
||||
end
|
||||
end
|
||||
end
|
||||
scheduler.cron('0 0 * * *') do
|
||||
users = User.where("mail_notification = 'day'")
|
||||
users.each do |user|
|
||||
#Rails.logger.info "send mail to #{user.show_name}(#{user.mail}) at #{Time.now}"
|
||||
Thread.start do
|
||||
Mailer.send_for_user_activities(user, Date.today, 1).deliver
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1 @@
|
|||
Rails.application.config.session_store ActionDispatch::Session::CacheStore, :expire_after => 20.minutes
|
|
@ -0,0 +1,90 @@
|
|||
en:
|
||||
# Text direction: Left-to-Right (ltr) or Right-to-Left (rtl)
|
||||
direction: ltr
|
||||
|
||||
|
||||
#
|
||||
# Trustie账户模块
|
||||
#
|
||||
# 公共变量
|
||||
#
|
||||
label_max_number: "Trustie username is your public identity displayed on Trustie website, only for letters and numbers."
|
||||
field_login: Account/Email
|
||||
|
||||
field_password: Password
|
||||
text_caracters_minimum: "Must be at least %{count} characters long."
|
||||
field_password_confirmation: Confirmation
|
||||
field_new_password: New password
|
||||
notice_account_wrong_password: Wrong password
|
||||
notice_account_password_updated: "Password was successfully updated."
|
||||
notice_can_t_change_password: "This account uses an external authentication source. Impossible to change the password."
|
||||
|
||||
field_mail: Email
|
||||
field_identity_url: OpenID URL
|
||||
button_submit: Submit
|
||||
|
||||
|
||||
#
|
||||
# Trustie账户模块
|
||||
#
|
||||
# 登陆
|
||||
#
|
||||
lable_user_name: Username
|
||||
label_login_prompt: Email/Trustie account
|
||||
label_stay_logged_in: "Keep me signed in"
|
||||
label_password_lost: "Forget password?"
|
||||
button_login: Login
|
||||
# account_controller中判断用户名或密码输入有误的提示信息
|
||||
notice_account_invalid_creditentials: "Invalid user or password."
|
||||
# account_controller中判断未激活的提示信息
|
||||
notice_account_invalid_creditentials_new: "Please check your email to activate your account."
|
||||
|
||||
|
||||
#
|
||||
# Trustie账户模块
|
||||
#
|
||||
# 注册
|
||||
#
|
||||
label_register: Sign up
|
||||
label_login_with_open_id_option: or login with OpenID
|
||||
label_mail_attention: "QQ-mail may not receive this e-mail, if other mailboxes not received, probably in spam."
|
||||
label_mail_attention1: "Activation email sent for Gmail and Edu-mail which sometimes slower, please be patient."
|
||||
# register中js判断密码设置是否合法提示信息
|
||||
setting_password_min_length_limit: "Password length greater than at least %{count} characters."
|
||||
setting_password_error: "Password length inadequate or password inconsistent."
|
||||
setting_password_success: "Password set successfully."
|
||||
# account_controller中register方法判断注册成功的提示信息
|
||||
notice_account_register_done: "Successful account creation, please use the link in the registration confirmation email to activate your account, if our messages are not in your inbox, it could in the spam box, please check it carefully."
|
||||
|
||||
|
||||
#
|
||||
# Trustie账户模块
|
||||
#
|
||||
# 忘记密码
|
||||
#
|
||||
label_password_forget: Forget password
|
||||
notice_account_unknown_email: Unknown user
|
||||
# account_controller中lost_password方法判断的邮件发送提示信息
|
||||
notice_account_lost_email_sent: "An email with a temporary login link will be sent to that email address, which you can use to login and configure a new password."
|
||||
|
||||
|
||||
#
|
||||
# Trustie账户模块
|
||||
#
|
||||
# 登出
|
||||
#
|
||||
label_logout: Logout
|
||||
|
||||
|
||||
#
|
||||
# Trustie账户模块
|
||||
#
|
||||
# 激活
|
||||
#
|
||||
label_regiter_account: Registering for an account
|
||||
label_email_valid: E-mail activation
|
||||
notice_email_register_time: "Please click on the link in the email to continue to complete the registration within 24 hours"
|
||||
notice_email_arrival: "An activation email has been sent to the email address you register."
|
||||
label_check_email: "Now check your email"
|
||||
label_mail_resend: "Resend the activation email"
|
||||
notice_account_activated: "Your Trustie account has been activated. You can now sign in."
|
|
@ -0,0 +1,92 @@
|
|||
|
||||
# Chinese (China) translations for Ruby on Rails
|
||||
# by tsechingho (http://github.com/tsechingho)
|
||||
zh:
|
||||
# Text direction: Left-to-Right (ltr) or Right-to-Left (rtl)
|
||||
direction: ltr
|
||||
|
||||
|
||||
#
|
||||
# Trustie账户模块
|
||||
#
|
||||
# 公共变量
|
||||
#
|
||||
label_max_number: "登录名是在网站中显示的您的公开标识,只能为英文和数字。"
|
||||
field_login: 登录名
|
||||
|
||||
field_password: 密码
|
||||
text_caracters_minimum: "至少需要 %{count} 个字符。"
|
||||
field_password_confirmation: 密码确认
|
||||
field_new_password: 新密码
|
||||
notice_account_wrong_password: 密码错误
|
||||
notice_account_password_updated: 密码更新成功
|
||||
notice_can_t_change_password: 该帐号使用了外部认证,因此无法更改密码。
|
||||
|
||||
field_mail: 邮件地址
|
||||
field_identity_url: OpenID URL
|
||||
button_submit: 提交
|
||||
|
||||
#
|
||||
# Trustie账户模块
|
||||
#
|
||||
# 登陆
|
||||
#
|
||||
lable_user_name: 登录名
|
||||
label_login_prompt: 邮箱/登录名
|
||||
label_stay_logged_in: "保持登录状态"
|
||||
label_password_lost: "忘记密码?"
|
||||
button_login: 登录
|
||||
# account_controller中判断用户名或密码输入有误的提示信息
|
||||
notice_account_invalid_creditentials: "无效的用户名或密码"
|
||||
# account_controller中判断未激活的提示信息
|
||||
notice_account_invalid_creditentials_new: "您还未到邮箱激活"
|
||||
|
||||
|
||||
#
|
||||
# Trustie账户模块
|
||||
#
|
||||
# 注册
|
||||
#
|
||||
label_register: 注册
|
||||
label_login_with_open_id_option: 或使用OpenID登录
|
||||
label_mail_attention: "qq邮箱可能收不到此邮件,其他邮箱如果没有收到可能在垃圾邮件中,"
|
||||
label_mail_attention1: "其中gmail与教育网邮箱的激活邮件有时比较慢,请耐心等待。"
|
||||
# register中js判断密码设置是否合法提示信息
|
||||
setting_password_min_length_limit: "密码长度至少大于 %{count} 个字符。"
|
||||
setting_password_error: "密码长度不够或密码不一致"
|
||||
setting_password_success: "密码设置成功"
|
||||
# account_controller中register方法判断注册成功的提示信息
|
||||
notice_account_register_done: "帐号创建成功,请使用注册确认邮件中的链接来激活您的帐号,如果您的邮件没有在收件箱中可能在垃圾箱中,请您注意查收。"
|
||||
|
||||
|
||||
#
|
||||
# Trustie账户模块
|
||||
#
|
||||
# 忘记密码
|
||||
#
|
||||
label_password_forget: 忘记密码
|
||||
notice_account_unknown_email: 未知用户
|
||||
# account_controller中lost_password方法判断的邮件发送提示信息
|
||||
notice_account_lost_email_sent: 系统已将引导您设置新密码的邮件发送给您。
|
||||
|
||||
|
||||
#
|
||||
# Trustie账户模块
|
||||
#
|
||||
# 登出
|
||||
#
|
||||
label_logout: 退出
|
||||
|
||||
#
|
||||
# Trustie账户模块
|
||||
#
|
||||
# 激活
|
||||
#
|
||||
label_regiter_account: 注册帐号
|
||||
label_email_valid: 邮箱激活
|
||||
notice_email_register_time: 请在24小时内点击邮件中的链接继续完成注册
|
||||
notice_email_arrival: 邮件已发送到邮箱
|
||||
label_check_email: 立即查收邮件
|
||||
label_mail_resend: 重新发送激活邮件
|
||||
notice_account_activated: 您的帐号已被激活。
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
en:
|
||||
# Text direction: Left-to-Right (ltr) or Right-to-Left (rtl)
|
||||
direction: ltr
|
||||
|
||||
|
||||
#
|
||||
# Trustie管理员模块
|
||||
#
|
||||
# 管理员设置账号激活通知方式
|
||||
#
|
||||
label_registration_activation_by_email: account activation by email
|
||||
label_registration_manual_activation: manual account activation
|
||||
label_registration_automatic_activation: automatic account activation
|
|
@ -0,0 +1,16 @@
|
|||
|
||||
# Chinese (China) translations for Ruby on Rails
|
||||
# by tsechingho (http://github.com/tsechingho)
|
||||
zh:
|
||||
# Text direction: Left-to-Right (ltr) or Right-to-Left (rtl)
|
||||
direction: ltr
|
||||
|
||||
#
|
||||
# Trustie管理员模块
|
||||
#
|
||||
# 管理员设置账号激活通知方式
|
||||
#
|
||||
label_registration_activation_by_email: 通过邮件认证激活帐号
|
||||
label_registration_manual_activation: 手动激活帐号
|
||||
label_registration_automatic_activation: 自动激活帐号
|
||||
|
|
@ -0,0 +1,264 @@
|
|||
en:
|
||||
# Text direction: Left-to-Right (ltr) or Right-to-Left (rtl)
|
||||
direction: ltr
|
||||
date:
|
||||
formats:
|
||||
# Use the strftime parameters for formats.
|
||||
# When no format has been given, it uses default.
|
||||
# You can provide other formats here if you like!
|
||||
default: "%m/%d/%Y"
|
||||
short: "%b %d"
|
||||
long: "%B %d, %Y"
|
||||
|
||||
day_names: [Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday]
|
||||
abbr_day_names: [Sun, Mon, Tue, Wed, Thu, Fri, Sat]
|
||||
|
||||
# Don't forget the nil at the beginning; there's no such thing as a 0th month
|
||||
month_names: [~, January, February, March, April, May, June, July, August, September, October, November, December]
|
||||
abbr_month_names: [~, Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec]
|
||||
# Used in date_select and datime_select.
|
||||
order:
|
||||
- :year
|
||||
- :month
|
||||
- :day
|
||||
|
||||
time:
|
||||
formats:
|
||||
default: "%m/%d/%Y %I:%M %p"
|
||||
time: "%I:%M %p"
|
||||
short: "%d %b %H:%M"
|
||||
long: "%B %d, %Y %H:%M"
|
||||
am: "am"
|
||||
pm: "pm"
|
||||
|
||||
datetime:
|
||||
distance_in_words:
|
||||
half_a_minute: "half a minute"
|
||||
less_than_x_seconds:
|
||||
one: "less than 1 second"
|
||||
other: "less than %{count} seconds"
|
||||
x_seconds:
|
||||
one: "1 second"
|
||||
other: "%{count} seconds"
|
||||
less_than_x_minutes:
|
||||
one: "less than a minute"
|
||||
other: "less than %{count} minutes"
|
||||
x_minutes:
|
||||
one: "1 minute"
|
||||
other: "%{count} minutes"
|
||||
about_x_hours:
|
||||
one: "about 1 hour"
|
||||
other: "about %{count} hours"
|
||||
x_hours:
|
||||
one: "1 hour"
|
||||
other: "%{count} hours"
|
||||
x_days:
|
||||
one: "1 day"
|
||||
other: "%{count} days"
|
||||
about_x_months:
|
||||
one: "about 1 month"
|
||||
other: "about %{count} months"
|
||||
x_months:
|
||||
one: "1 month"
|
||||
other: "%{count} months"
|
||||
about_x_years:
|
||||
one: "about 1 year"
|
||||
other: "about %{count} years"
|
||||
over_x_years:
|
||||
one: "over 1 year"
|
||||
other: "over %{count} years"
|
||||
almost_x_years:
|
||||
one: "almost 1 year"
|
||||
other: "almost %{count} years"
|
||||
|
||||
errors:
|
||||
messages:
|
||||
email_verifier:
|
||||
email_not_real: must point to a real mail account
|
||||
out_of_mail_server: appears to point to dead mail server
|
||||
no_mail_server: appears to point to domain which doesn't handle e-mail
|
||||
failure: could not be checked if is real
|
||||
exception: could not be sent
|
||||
number:
|
||||
format:
|
||||
separator: "."
|
||||
delimiter: ""
|
||||
precision: 3
|
||||
|
||||
human:
|
||||
format:
|
||||
delimiter: ""
|
||||
precision: 3
|
||||
storage_units:
|
||||
format: "%n %u"
|
||||
units:
|
||||
byte:
|
||||
one: "Byte"
|
||||
other: "Bytes"
|
||||
kb: "KB"
|
||||
mb: "MB"
|
||||
gb: "GB"
|
||||
tb: "TB"
|
||||
|
||||
# Used in array.to_sentence.
|
||||
support:
|
||||
array:
|
||||
sentence_connector: "and"
|
||||
skip_last_comma: false
|
||||
|
||||
activerecord:
|
||||
errors:
|
||||
template:
|
||||
header:
|
||||
one: "1 error prohibited this %{model} from being saved"
|
||||
other: "%{count} errors prohibited this %{model} from being saved"
|
||||
messages:
|
||||
inclusion: "is not included in the list"
|
||||
exclusion: "is reserved"
|
||||
invalid: "is invalid"
|
||||
confirmation: "doesn't match confirmation"
|
||||
accepted: "must be accepted"
|
||||
empty: "can't be empty"
|
||||
blank: "can't be blank"
|
||||
too_long: "is too long (maximum is %{count} characters)"
|
||||
too_short: "is too short (minimum is %{count} characters)"
|
||||
wrong_length: "is the wrong length (should be %{count} characters)"
|
||||
taken: "has already been taken"
|
||||
not_a_number: "is not a number"
|
||||
not_a_date: "is not a valid date"
|
||||
greater_than: "must be greater than %{count}"
|
||||
greater_than_or_equal_to: "must be greater than or equal to %{count}"
|
||||
equal_to: "must be equal to %{count}"
|
||||
less_than: "must be less than %{count}"
|
||||
less_than_or_equal_to: "must be less than or equal to %{count}"
|
||||
odd: "must be odd"
|
||||
even: "must be even"
|
||||
greater_than_start_date: "must be greater than start date"
|
||||
not_same_project: "doesn't belong to the same project"
|
||||
circular_dependency: "This relation would create a circular dependency"
|
||||
cant_link_an_issue_with_a_descendant: "An issue cannot be linked to one of its subtasks"
|
||||
|
||||
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'
|
||||
general_text_yes: 'yes'
|
||||
general_lang_name: 'English'
|
||||
general_csv_separator: ','
|
||||
general_csv_decimal_separator: '.'
|
||||
general_csv_encoding: ISO-8859-1
|
||||
general_pdf_encoding: UTF-8
|
||||
general_first_day_of_week: '7'
|
||||
|
||||
actionview_instancetag_blank_option: Please select
|
||||
|
||||
|
||||
label_user: User
|
||||
label_project: Project
|
||||
label_issue: Issue
|
||||
label_requirement: Calls
|
||||
label_forum: Forum
|
||||
|
||||
label_issue_plural: Issues Tracking
|
||||
label_project_plural: Projects
|
||||
label_user_plural: Users
|
||||
field_filename: File
|
||||
|
||||
|
||||
field_description: Description
|
||||
|
||||
label_loading: Loading...
|
||||
|
||||
|
||||
#
|
||||
# Trustie按钮类
|
||||
#
|
||||
#
|
||||
#
|
||||
label_button_ok: Ok
|
||||
button_save: Save
|
||||
button_back: Back
|
||||
button_cancel: Cancel
|
||||
label_submit: Submit
|
||||
button_project_tags_add: Add
|
||||
label_more: More
|
||||
button_download: Download
|
||||
|
||||
#
|
||||
# Trustie上传头像模块
|
||||
#
|
||||
#
|
||||
#
|
||||
button_upload_photo: Upload photo
|
||||
button_delete_file: delete
|
||||
text_are_you_sure: Are you sure?
|
||||
error_attachment_too_big: "This file cannot be uploaded because it exceeds the maximum allowed file size (%{max_size})"
|
||||
error_pic_type: "Only supports the following image formats:"
|
||||
|
||||
|
||||
#
|
||||
# Trustie标签模块
|
||||
#
|
||||
# 标签
|
||||
#
|
||||
label_tag: Tag
|
||||
label_tags_no: no tags now!
|
||||
label_more_tags: More
|
||||
label_add_tag: '+ Add tags'
|
||||
|
||||
label_tags_count: "The total number of tags:"
|
||||
|
||||
label_tags_selected: Selected Tags
|
||||
label_tags_related: Related Tags
|
||||
label_tags_search_result: Search Results
|
||||
label_tags_numbers: "Tag numbers:"
|
||||
|
||||
label_tags_call: Calls
|
||||
label_tags_contest: Competition tag
|
||||
label_tags_opensource: Open source projects
|
||||
|
||||
label_tags_all_objects: all objects
|
||||
|
||||
label_tags_bid: Call name
|
||||
label_tags_bid_description: call description
|
||||
|
||||
label_tags_course_name: Course Title
|
||||
label_new_course_description: Description
|
||||
|
||||
label_tags_issue: "issue:"
|
||||
label_tags_issue_description: issue description
|
||||
|
||||
label_tags_project_name: "Project name:"
|
||||
label_tags_project_description: "Project description:"
|
||||
|
||||
label_tags_user_mail: "User E-mail:"
|
||||
label_tags_user_name: "User Name:"
|
||||
|
||||
label_tags_contest_name: Contest name
|
||||
label_tags_contest_description: Contest description
|
||||
|
||||
label_tags_forum_description: Forum description
|
||||
label_tags_forum: Call forum
|
||||
|
||||
label_attachment: Files
|
||||
attachment:
|
||||
category: "From:"
|
||||
download_num: "Downloads:"
|
||||
size: "Size:"
|
||||
sharer: "Sharer:"
|
||||
upload_time: "Upload time:"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Trustie
|
||||
#
|
||||
#
|
||||
#
|
||||
|
||||
|
|
@ -0,0 +1,267 @@
|
|||
|
||||
# Chinese (China) translations for Ruby on Rails
|
||||
# by tsechingho (http://github.com/tsechingho)
|
||||
zh:
|
||||
# Text direction: Left-to-Right (ltr) or Right-to-Left (rtl)
|
||||
direction: ltr
|
||||
jquery:
|
||||
locale: "zh-CN"
|
||||
date:
|
||||
formats:
|
||||
# Use the strftime parameters for formats.
|
||||
# When no format has been given, it uses default.
|
||||
# You can provide other formats here if you like!
|
||||
default: "%Y-%m-%d"
|
||||
short: "%b%d日"
|
||||
long: "%Y年%b%d日"
|
||||
zh_date:
|
||||
formats:
|
||||
default: "%Y年%m月%d日"
|
||||
|
||||
day_names: [星期天, 星期一, 星期二, 星期三, 星期四, 星期五, 星期六]
|
||||
abbr_day_names: [日, 一, 二, 三, 四, 五, 六]
|
||||
|
||||
# Don't forget the nil at the beginning; there's no such thing as a 0th month
|
||||
month_names: [~, 一月, 二月, 三月, 四月, 五月, 六月, 七月, 八月, 九月, 十月, 十一月, 十二月]
|
||||
abbr_month_names: [~, 1月, 2月, 3月, 4月, 5月, 6月, 7月, 8月, 9月, 10月, 11月, 12月]
|
||||
# Used in date_select and datime_select.
|
||||
order:
|
||||
- :year
|
||||
- :month
|
||||
- :day
|
||||
|
||||
|
||||
errors:
|
||||
messages:
|
||||
email_verifier:
|
||||
email_not_real: 必须指定一个真实的邮箱地址
|
||||
out_of_mail_server: 指向了一个已停用的邮箱服务器
|
||||
no_mail_server: 域名地址没有邮件功能
|
||||
failure: 邮箱地址不能被验证
|
||||
exception: 邮箱不能发送成功
|
||||
|
||||
|
||||
time:
|
||||
formats:
|
||||
default: "%Y年%b%d日 %A %H:%M:%S"
|
||||
time: "%H:%M"
|
||||
short: "%b%d日 %H:%M"
|
||||
long: "%Y年%b%d日 %H:%M"
|
||||
am: "上午"
|
||||
pm: "下午"
|
||||
|
||||
datetime:
|
||||
distance_in_words:
|
||||
half_a_minute: "半分钟"
|
||||
less_than_x_seconds:
|
||||
one: "1秒内"
|
||||
other: "少于 %{count} 秒"
|
||||
x_seconds:
|
||||
one: "1秒"
|
||||
other: "%{count} 秒"
|
||||
less_than_x_minutes:
|
||||
one: "1分钟内"
|
||||
other: "少于 %{count} 分钟"
|
||||
x_minutes:
|
||||
one: "1分钟"
|
||||
other: "%{count} 分钟"
|
||||
about_x_hours:
|
||||
one: "大约1小时"
|
||||
other: "大约 %{count} 小时"
|
||||
x_hours:
|
||||
one: "1 小时"
|
||||
other: "%{count} 小时"
|
||||
x_days:
|
||||
one: "1天"
|
||||
other: "%{count} 天"
|
||||
about_x_months:
|
||||
one: "大约1个月"
|
||||
other: "大约 %{count} 个月"
|
||||
x_months:
|
||||
one: "1个月"
|
||||
other: "%{count} 个月"
|
||||
about_x_years:
|
||||
one: "大约1年"
|
||||
other: "大约 %{count} 年"
|
||||
over_x_years:
|
||||
one: "超过1年"
|
||||
other: "超过 %{count} 年"
|
||||
almost_x_years:
|
||||
one: "将近 1 年"
|
||||
other: "将近 %{count} 年"
|
||||
|
||||
number:
|
||||
# Default format for numbers
|
||||
format:
|
||||
separator: "."
|
||||
delimiter: ""
|
||||
precision: 3
|
||||
human:
|
||||
format:
|
||||
delimiter: ""
|
||||
precision: 3
|
||||
storage_units:
|
||||
format: "%n %u"
|
||||
units:
|
||||
byte:
|
||||
one: "Byte"
|
||||
other: "Bytes"
|
||||
kb: "KB"
|
||||
mb: "MB"
|
||||
gb: "GB"
|
||||
tb: "TB"
|
||||
|
||||
# Used in array.to_sentence.
|
||||
support:
|
||||
array:
|
||||
sentence_connector: "和"
|
||||
skip_last_comma: false
|
||||
|
||||
activerecord:
|
||||
errors:
|
||||
template:
|
||||
header:
|
||||
one: "由于发生了一个错误 %{model} 无法保存"
|
||||
other: "%{count} 个错误使得 %{model} 无法保存"
|
||||
messages:
|
||||
inclusion: "不包含于列表中"
|
||||
exclusion: "是保留关键字"
|
||||
invalid: "是无效的"
|
||||
confirmation: "与确认值不匹配"
|
||||
accepted: "必须是可被接受的"
|
||||
empty: "不能留空"
|
||||
blank: "不能为空字符"
|
||||
too_long: "过长(最长为 %{count} 个字符)"
|
||||
too_short: "过短(最短为 %{count} 个字符)"
|
||||
wrong_length: "长度非法(必须为 %{count} 个字符)"
|
||||
taken: "已经被使用"
|
||||
not_a_number: "不是数字"
|
||||
not_a_date: "不是合法日期"
|
||||
greater_than: "必须大于 %{count}"
|
||||
greater_than_or_equal_to: "必须大于或等于 %{count}"
|
||||
equal_to: "必须等于 %{count}"
|
||||
less_than: "必须小于 %{count}"
|
||||
less_than_or_equal_to: "必须小于或等于 %{count}"
|
||||
odd: "必须为单数"
|
||||
even: "必须为双数"
|
||||
greater_than_start_date: "必须在起始日期之后"
|
||||
not_same_project: "不属于同一个项目"
|
||||
circular_dependency: "此关联将导致循环依赖"
|
||||
cant_link_an_issue_with_a_descendant: "问题不能关联到它的子任务"
|
||||
groupname_repeat: "该班名已存在"
|
||||
|
||||
attachment_all: "全部"
|
||||
attachment_sufix_browse: "文件类型"
|
||||
attachment_browse: "内容类型"
|
||||
attachment_type: '分类'
|
||||
general_text_No: '否'
|
||||
general_text_Yes: '是'
|
||||
general_text_no: '否'
|
||||
general_text_yes: '是'
|
||||
general_lang_name: 'Simplified Chinese (简体中文)'
|
||||
general_csv_separator: ','
|
||||
general_csv_decimal_separator: '.'
|
||||
general_csv_encoding: gb18030
|
||||
general_pdf_encoding: gb18030
|
||||
general_first_day_of_week: '7'
|
||||
|
||||
actionview_instancetag_blank_option: 请选择
|
||||
|
||||
label_user: 用户
|
||||
label_project: 项目
|
||||
label_issue: 问题
|
||||
label_requirement: 需求
|
||||
label_forum: 公共贴吧
|
||||
|
||||
|
||||
field_description: 描述
|
||||
|
||||
label_loading: 载入中...
|
||||
|
||||
#
|
||||
# Trustie按钮类
|
||||
#
|
||||
#
|
||||
#
|
||||
label_button_ok: 确定
|
||||
button_save: 保存
|
||||
button_back: 返回
|
||||
button_cancel: 取消
|
||||
label_submit: 提交
|
||||
button_project_tags_add: 增加
|
||||
label_more: 更多>>
|
||||
button_download: 下载
|
||||
|
||||
#
|
||||
# Trustie上传头像模块
|
||||
#
|
||||
#
|
||||
#
|
||||
button_upload_photo: 上传图片
|
||||
button_delete_file: 删除
|
||||
text_are_you_sure: 您确定要删除吗?
|
||||
error_attachment_too_big: 该文件无法上传。超过文件大小限制 (%{max_size})
|
||||
error_pic_type: "仅支持如下图片格式:"
|
||||
|
||||
|
||||
#
|
||||
# Trustie标签模块
|
||||
#
|
||||
# 标签
|
||||
#
|
||||
label_tag: 标签
|
||||
label_tags_no: 暂无标签!
|
||||
label_more_tags: 更多
|
||||
label_add_tag: "+ 添加标签"
|
||||
|
||||
label_tags_count: "总标签数:"
|
||||
|
||||
label_tags_selected: 已选标签
|
||||
label_tags_related: 相关标签
|
||||
label_tags_search_result: 搜索结果
|
||||
label_tags_numbers: "Tag统计:"
|
||||
|
||||
label_issue_plural: 问题跟踪
|
||||
label_project_plural: 项目列表
|
||||
label_user_plural: 用户列表
|
||||
label_tags_call: 需求
|
||||
field_filename: 文件
|
||||
label_tags_contest: 竞赛标签
|
||||
label_tags_opensource: 开源项目
|
||||
|
||||
|
||||
|
||||
|
||||
label_tags_all_objects: 所有
|
||||
|
||||
label_tags_bid: 需求名称
|
||||
label_tags_bid_description: 需求描述
|
||||
|
||||
label_tags_course_name: 课程名称
|
||||
label_new_course_description: 课程描述
|
||||
|
||||
label_tags_issue: "问题名称:"
|
||||
label_tags_issue_description: 问题描述
|
||||
|
||||
label_tags_project_name: "项目名称:"
|
||||
label_tags_project_description: "项目描述:"
|
||||
|
||||
label_tags_user_mail: "用户邮箱:"
|
||||
label_tags_user_name: "用户名:"
|
||||
|
||||
label_tags_contest_name: 竞赛名称
|
||||
label_tags_contest_description: 竞赛描述
|
||||
|
||||
label_tags_forum_description: 贴吧描述
|
||||
label_tags_forum: 贴吧名称
|
||||
|
||||
label_attachment: 文件
|
||||
attachment:
|
||||
category: "所属分类:"
|
||||
download_num: "下载:"
|
||||
size: "大小:"
|
||||
sharer: "共享者:"
|
||||
upload_time: "上传时间:"
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
en:
|
||||
# Text direction: Left-to-Right (ltr) or Right-to-Left (rtl)
|
||||
direction: ltr
|
|
@ -0,0 +1,22 @@
|
|||
|
||||
# Chinese (China) translations for Ruby on Rails
|
||||
# by tsechingho (http://github.com/tsechingho)
|
||||
zh:
|
||||
# Text direction: Left-to-Right (ltr) or Right-to-Left (rtl)
|
||||
direction: ltr
|
||||
#
|
||||
# Trustie按钮类
|
||||
#
|
||||
# 底部承办单位等信息
|
||||
#
|
||||
label_hosted_organization: 主办单位
|
||||
label_hosted_by: 国防科学技术大学并行与分布处理国家重点实验室
|
||||
label_sponsor: 计算机科学与技术系
|
||||
label_co_organizer_NUDT: 国防科学技术大学计算机学院
|
||||
label_co_organizer_EECS: 北京大学信息科学技术学院软件研究所
|
||||
label_co_organizer_BHU: 北京航空航天大学计算机学院
|
||||
label_co_organizer_CAS: 中国科学院软件研究所
|
||||
label_co_organizer_InforS: 山东中创软件商用中间件股份有限公司
|
||||
label_rights_reserved: 版权©2007~2014
|
||||
label_contact_us: 联系我们
|
||||
label_license: 湘ICP备09019772
|
|
@ -0,0 +1,4 @@
|
|||
en:
|
||||
# Text direction: Left-to-Right (ltr) or Right-to-Left (rtl)
|
||||
direction: ltr
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
|
||||
# Chinese (China) translations for Ruby on Rails
|
||||
# by tsechingho (http://github.com/tsechingho)
|
||||
zh:
|
||||
# Text direction: Left-to-Right (ltr) or Right-to-Left (rtl)
|
||||
direction: ltr
|
|
@ -0,0 +1,4 @@
|
|||
en:
|
||||
# Text direction: Left-to-Right (ltr) or Right-to-Left (rtl)
|
||||
direction: ltr
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
|
||||
# Chinese (China) translations for Ruby on Rails
|
||||
# by tsechingho (http://github.com/tsechingho)
|
||||
zh:
|
||||
# Text direction: Left-to-Right (ltr) or Right-to-Left (rtl)
|
||||
direction: ltr
|
||||
|
||||
|
||||
|
||||
#
|
||||
# 课程托管平台
|
||||
#
|
||||
# 课程资源上传
|
||||
#
|
||||
label_file_upload: 资源文件
|
||||
label_file_upload_error_messages: "上传出现错误,请您检查您的网络环境,并刷新页面重新上传。"
|
||||
button_confirm: 确认
|
|
@ -1,174 +1,5 @@
|
|||
en:
|
||||
# Text direction: Left-to-Right (ltr) or Right-to-Left (rtl)
|
||||
direction: ltr
|
||||
date:
|
||||
formats:
|
||||
# Use the strftime parameters for formats.
|
||||
# When no format has been given, it uses default.
|
||||
# You can provide other formats here if you like!
|
||||
default: "%m/%d/%Y"
|
||||
short: "%b %d"
|
||||
long: "%B %d, %Y"
|
||||
|
||||
day_names: [Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday]
|
||||
abbr_day_names: [Sun, Mon, Tue, Wed, Thu, Fri, Sat]
|
||||
|
||||
# Don't forget the nil at the beginning; there's no such thing as a 0th month
|
||||
month_names: [~, January, February, March, April, May, June, July, August, September, October, November, December]
|
||||
abbr_month_names: [~, Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec]
|
||||
# Used in date_select and datime_select.
|
||||
order:
|
||||
- :year
|
||||
- :month
|
||||
- :day
|
||||
|
||||
time:
|
||||
formats:
|
||||
default: "%m/%d/%Y %I:%M %p"
|
||||
time: "%I:%M %p"
|
||||
short: "%d %b %H:%M"
|
||||
long: "%B %d, %Y %H:%M"
|
||||
am: "am"
|
||||
pm: "pm"
|
||||
|
||||
datetime:
|
||||
distance_in_words:
|
||||
half_a_minute: "half a minute"
|
||||
less_than_x_seconds:
|
||||
one: "less than 1 second"
|
||||
other: "less than %{count} seconds"
|
||||
x_seconds:
|
||||
one: "1 second"
|
||||
other: "%{count} seconds"
|
||||
less_than_x_minutes:
|
||||
one: "less than a minute"
|
||||
other: "less than %{count} minutes"
|
||||
x_minutes:
|
||||
one: "1 minute"
|
||||
other: "%{count} minutes"
|
||||
about_x_hours:
|
||||
one: "about 1 hour"
|
||||
other: "about %{count} hours"
|
||||
x_hours:
|
||||
one: "1 hour"
|
||||
other: "%{count} hours"
|
||||
x_days:
|
||||
one: "1 day"
|
||||
other: "%{count} days"
|
||||
about_x_months:
|
||||
one: "about 1 month"
|
||||
other: "about %{count} months"
|
||||
x_months:
|
||||
one: "1 month"
|
||||
other: "%{count} months"
|
||||
about_x_years:
|
||||
one: "about 1 year"
|
||||
other: "about %{count} years"
|
||||
over_x_years:
|
||||
one: "over 1 year"
|
||||
other: "over %{count} years"
|
||||
almost_x_years:
|
||||
one: "almost 1 year"
|
||||
other: "almost %{count} years"
|
||||
|
||||
errors:
|
||||
messages:
|
||||
email_verifier:
|
||||
email_not_real: must point to a real mail account
|
||||
out_of_mail_server: appears to point to dead mail server
|
||||
no_mail_server: appears to point to domain which doesn't handle e-mail
|
||||
failure: could not be checked if is real
|
||||
exception: could not be sent
|
||||
number:
|
||||
format:
|
||||
separator: "."
|
||||
delimiter: ""
|
||||
precision: 3
|
||||
|
||||
human:
|
||||
format:
|
||||
delimiter: ""
|
||||
precision: 3
|
||||
storage_units:
|
||||
format: "%n %u"
|
||||
units:
|
||||
byte:
|
||||
one: "Byte"
|
||||
other: "Bytes"
|
||||
kb: "KB"
|
||||
mb: "MB"
|
||||
gb: "GB"
|
||||
tb: "TB"
|
||||
|
||||
# Used in array.to_sentence.
|
||||
support:
|
||||
array:
|
||||
sentence_connector: "and"
|
||||
skip_last_comma: false
|
||||
|
||||
activerecord:
|
||||
errors:
|
||||
template:
|
||||
header:
|
||||
one: "1 error prohibited this %{model} from being saved"
|
||||
other: "%{count} errors prohibited this %{model} from being saved"
|
||||
messages:
|
||||
inclusion: "is not included in the list"
|
||||
exclusion: "is reserved"
|
||||
invalid: "is invalid"
|
||||
confirmation: "doesn't match confirmation"
|
||||
accepted: "must be accepted"
|
||||
empty: "can't be empty"
|
||||
blank: "can't be blank"
|
||||
too_long: "is too long (maximum is %{count} characters)"
|
||||
too_short: "is too short (minimum is %{count} characters)"
|
||||
wrong_length: "is the wrong length (should be %{count} characters)"
|
||||
taken: "has already been taken"
|
||||
not_a_number: "is not a number"
|
||||
not_a_date: "is not a valid date"
|
||||
greater_than: "must be greater than %{count}"
|
||||
greater_than_or_equal_to: "must be greater than or equal to %{count}"
|
||||
equal_to: "must be equal to %{count}"
|
||||
less_than: "must be less than %{count}"
|
||||
less_than_or_equal_to: "must be less than or equal to %{count}"
|
||||
odd: "must be odd"
|
||||
even: "must be even"
|
||||
greater_than_start_date: "must be greater than start date"
|
||||
not_same_project: "doesn't belong to the same project"
|
||||
circular_dependency: "This relation would create a circular dependency"
|
||||
cant_link_an_issue_with_a_descendant: "An issue cannot be linked to one of its subtasks"
|
||||
|
||||
|
||||
|
||||
|
||||
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'
|
||||
general_text_yes: 'yes'
|
||||
general_lang_name: 'English'
|
||||
general_csv_separator: ','
|
||||
general_csv_decimal_separator: '.'
|
||||
general_csv_encoding: ISO-8859-1
|
||||
general_pdf_encoding: UTF-8
|
||||
general_first_day_of_week: '7'
|
||||
|
||||
label_approve: Approve
|
||||
label_refusal: Refusal
|
||||
notice_account_updated: Account was successfully updated.
|
||||
notice_account_invalid_creditentials: Invalid user or password
|
||||
notice_account_password_updated: Password was successfully updated.
|
||||
notice_account_wrong_password: Wrong password
|
||||
notice_account_register_done: Account was successfully created. To activate your account, click on the link that was emailed to you.
|
||||
notice_account_unknown_email: Unknown user.
|
||||
notice_can_t_change_password: This account uses an external authentication source. Impossible to change the password.
|
||||
notice_account_lost_email_sent: An email with instructions to choose a new password has been sent to you.
|
||||
notice_account_activated: Your account has been activated. You can now log in.
|
||||
|
||||
notice_successful_create: Successful creation.
|
||||
notice_successful_update: Successful update.
|
||||
notice_successful_delete: Successful deletion.
|
||||
|
@ -180,8 +11,7 @@ en:
|
|||
notice_not_authorized_archived_project: The project you're trying to access has been archived.
|
||||
notice_email_sent: "An email was sent to %{value}"
|
||||
notice_email_error: "An error occurred while sending mail (%{value})"
|
||||
notice_feeds_access_key_reseted: Your RSS access key was reset.
|
||||
notice_api_access_key_reseted: Your API access key was reset.
|
||||
|
||||
notice_failed_to_save_issues: "Failed to save %{count} issue(s) on %{total} selected: %{ids}."
|
||||
notice_failed_to_save_time_entries: "Failed to save %{count} time entrie(s) on %{total} selected: %{ids}."
|
||||
notice_failed_to_save_members: "Failed to save member(s): %{errors}."
|
||||
|
@ -217,7 +47,7 @@ en:
|
|||
error_workflow_copy_target: 'Please select target tracker(s) and role(s)'
|
||||
error_unable_delete_issue_status: 'Unable to delete issue status'
|
||||
error_unable_to_connect: "Unable to connect (%{value})"
|
||||
error_attachment_too_big: "This file cannot be uploaded because it exceeds the maximum allowed file size (%{max_size})"
|
||||
|
||||
error_session_expired: "Your session has expired. Please login again."
|
||||
warning_attachments_not_saved: "%{count} file(s) could not be saved."
|
||||
|
||||
|
@ -238,12 +68,8 @@ en:
|
|||
|
||||
|
||||
field_name: Name
|
||||
field_description: Description
|
||||
|
||||
field_summary: Summary
|
||||
field_is_required: Required
|
||||
field_firstname: Name
|
||||
field_lastname: Last name
|
||||
field_mail: Email
|
||||
field_job_category: Job category # added by bai
|
||||
field_filename: File
|
||||
field_file_dense: File Dense
|
||||
|
@ -279,14 +105,10 @@ en:
|
|||
field_homepage: Homepage
|
||||
field_parent: Subproject of
|
||||
field_is_in_roadmap: Issues displayed in roadmap
|
||||
field_login: Account/Email
|
||||
field_mail_notification: Email notifications
|
||||
field_admin: Administrator
|
||||
field_last_login_on: Last connection
|
||||
field_language: Language
|
||||
|
||||
field_effective_date: Date
|
||||
field_new_password: New password
|
||||
field_password_confirmation: Confirmation
|
||||
field_version: Version
|
||||
field_type: Type
|
||||
field_host: Host
|
||||
|
@ -521,7 +343,6 @@ en:
|
|||
|
||||
# edit by meng
|
||||
lable_hot_course: Hot Courses
|
||||
lable_user_active: User Movements
|
||||
label_course_join_student: Join a course
|
||||
label_contest_modify_settings: Configuration
|
||||
bale_news_notice: Add a notification
|
||||
|
@ -534,9 +355,9 @@ en:
|
|||
label_relation_files: Select an existing resource
|
||||
# Personal signature tips
|
||||
label_my_brief_introduction: How are feeling today? Leave your footprints ~
|
||||
label_submit: Submit
|
||||
|
||||
# create course and course info
|
||||
label_tags_course_name: Course Title
|
||||
|
||||
label_new_course_password: Password
|
||||
label_new_course_description: Description
|
||||
field_open_student: Student list is public?
|
||||
|
@ -571,11 +392,9 @@ en:
|
|||
label_technical_support: Support :
|
||||
label_feedback: Feedback
|
||||
#end
|
||||
label_user: User
|
||||
label_user_plural: Users
|
||||
label_user_new: New user
|
||||
label_user_anonymous: Anonymous
|
||||
label_project: Project
|
||||
label_activity_project: 'Project: ' #added by bai
|
||||
|
||||
label_project_plural: Projects
|
||||
|
@ -602,7 +421,6 @@ en:
|
|||
other: "%{count} projects"
|
||||
label_project_all: All Projects
|
||||
label_project_latest: Latest projects
|
||||
label_issue: Issue
|
||||
label_issue_new: New issue
|
||||
label_issue_plural: Issues Tracking
|
||||
label_issue_view_all: View all issues
|
||||
|
@ -616,8 +434,8 @@ en:
|
|||
label_document_new: New document
|
||||
label_document_plural: Documents
|
||||
label_document_added: Document added
|
||||
label_forum_message_added: Message added
|
||||
label_forum_add: Forum added
|
||||
label_forum_message_added: Forum's message added
|
||||
#label_forum_add: Forum added
|
||||
label_document_public_info: "If you don't choose public, only the project's members can see the document."
|
||||
label_role: Role
|
||||
label_role_plural: Roles
|
||||
|
@ -646,22 +464,17 @@ en:
|
|||
label_information: Information
|
||||
label_information_plural: Information
|
||||
label_please_login: Please log in
|
||||
label_login_with_open_id_option: or login with OpenID
|
||||
label_home: Home
|
||||
label_my_page: My page
|
||||
label_my_account: My account
|
||||
|
||||
label_my_message: Msgs
|
||||
label_my_projects: My projects
|
||||
label_my_page_block: My page block
|
||||
label_administration: Administration
|
||||
label_login: Login
|
||||
# edit by meng
|
||||
# Logout
|
||||
label_logout: Logout
|
||||
# end
|
||||
label_help: Help
|
||||
label_reported_issues: Reported issues
|
||||
label_assigned_to_me_issues: Issues assigned to me
|
||||
|
||||
label_last_login: Last connection
|
||||
label_registered_on: Registered on
|
||||
label_activity: Activities
|
||||
|
@ -812,7 +625,6 @@ en:
|
|||
label_repository_plural: Repositories
|
||||
label_browse: Browse
|
||||
label_branch: Branch
|
||||
label_tag: Tag
|
||||
label_revision: Revision
|
||||
label_revision_plural: Revisions
|
||||
label_revision_id: "Revision %{value}"
|
||||
|
@ -850,7 +662,7 @@ en:
|
|||
label_feed_plural: Feeds
|
||||
label_changes_details: Details of all changes
|
||||
label_issue_tracking: Issue tracking
|
||||
label_spent_time: Spent time
|
||||
|
||||
label_overall_spent_time: Overall spent time
|
||||
label_f_hour: "%{value} hour"
|
||||
label_f_hour_plural: "%{value} hours"
|
||||
|
@ -869,7 +681,7 @@ en:
|
|||
label_watched_issues: Watched issues
|
||||
label_related_issues: Related issues
|
||||
label_applied_status: Applied status
|
||||
label_loading: Loading...
|
||||
|
||||
label_relation_new: New relation
|
||||
label_relation_delete: Delete relation
|
||||
label_relates_to: Related to
|
||||
|
@ -928,16 +740,8 @@ en:
|
|||
label_theme: Theme
|
||||
label_default: Default
|
||||
label_search_titles_only: Search titles only
|
||||
label_user_mail_option_all: "For any event on all my projects"
|
||||
label_user_mail_option_selected: "For any event on the selected projects only..."
|
||||
label_user_mail_option_none: "No events"
|
||||
label_user_mail_option_only_my_events: "Only for things I watch or I'm involved in"
|
||||
label_user_mail_option_only_assigned: "Only for things I am assigned to"
|
||||
label_user_mail_option_only_owner: "Only for things I am the owner of"
|
||||
label_user_mail_no_self_notified: "I don't want to be notified of changes that I make myself"
|
||||
label_registration_activation_by_email: account activation by email
|
||||
label_registration_manual_activation: manual account activation
|
||||
label_registration_automatic_activation: automatic account activation
|
||||
|
||||
|
||||
label_display_per_page: "Per page: %{value}"
|
||||
label_age: Age
|
||||
label_change_properties: Change properties
|
||||
|
@ -1018,8 +822,6 @@ en:
|
|||
label_gantt_progress_line: Progress line
|
||||
label_files_filter: Files Filter:
|
||||
|
||||
button_submit: Submit
|
||||
button_save: Save
|
||||
button_check_all: Check all
|
||||
button_uncheck_all: Uncheck all
|
||||
button_collapse_all: Collapse all
|
||||
|
@ -1035,13 +837,11 @@ en:
|
|||
button_clear: Cancel query
|
||||
button_lock: Lock
|
||||
button_unlock: Unlock
|
||||
button_download: Download
|
||||
button_list: List
|
||||
button_view: View
|
||||
button_move: Move
|
||||
button_move_and_follow: Move and follow
|
||||
button_back: Back
|
||||
button_cancel: Cancel
|
||||
|
||||
button_activate: Activate
|
||||
button_sort: Sort
|
||||
button_log_time: Log time
|
||||
|
@ -1053,7 +853,7 @@ en:
|
|||
button_unarchive: Unarchive
|
||||
button_reset: Reset
|
||||
button_rename: Rename
|
||||
button_change_password: Change password
|
||||
|
||||
button_copy: Copy
|
||||
button_copy_and_follow: Copy and follow
|
||||
button_annotate: Annotate
|
||||
|
@ -1089,7 +889,7 @@ en:
|
|||
text_project_destroy_confirmation: Are you sure you want to delete this project and related data?
|
||||
text_subprojects_destroy_warning: "Its subproject(s): %{value} will be also deleted."
|
||||
text_workflow_edit: Select a role and a tracker to edit the workflow
|
||||
text_are_you_sure: Are you sure?
|
||||
|
||||
text_journal_changed: "%{label} changed from %{old} to %{new}"
|
||||
text_journal_changed_no_detail: "%{label} updated"
|
||||
text_journal_set_to: "%{label} set to %{value}"
|
||||
|
@ -1099,7 +899,6 @@ en:
|
|||
text_tip_issue_end_day: issue ending this day
|
||||
text_tip_issue_begin_end_day: issue beginning and ending this day
|
||||
text_caracters_maximum: "%{count} characters maximum."
|
||||
text_caracters_minimum: "Must be at least %{count} characters long."
|
||||
text_length_between: "Length between %{min} and %{max} characters."
|
||||
text_tracker_no_workflow: No workflow defined for this tracker
|
||||
text_unallowed_characters: Unallowed characters
|
||||
|
@ -1194,7 +993,7 @@ en:
|
|||
description_message_content: Message content
|
||||
description_query_sort_criteria_attribute: Sort attribute
|
||||
description_query_sort_criteria_direction: Sort direction
|
||||
description_user_mail_notification: Mail notification settings
|
||||
|
||||
description_available_columns: Available Columns
|
||||
description_selected_columns: Selected Columns
|
||||
description_all_columns: All Columns
|
||||
|
@ -1208,7 +1007,7 @@ en:
|
|||
|
||||
#modify by mkz
|
||||
#by young
|
||||
label_requirement: Calls
|
||||
|
||||
label_requirement_focus: Calls # modified by bai
|
||||
label_developer: Users
|
||||
label_investor: Investor:
|
||||
|
@ -1221,7 +1020,6 @@ en:
|
|||
label_version_display_settings: Display settings
|
||||
label_versions_progress: Complete schedule
|
||||
label_versions_description: Versions description
|
||||
label_my_photo: My photo
|
||||
label_documents_sort: Order setting:
|
||||
label_activities_settings: Display settings
|
||||
#end
|
||||
|
@ -1235,7 +1033,7 @@ en:
|
|||
label_user_edit: "Edit information"
|
||||
label_my_course: "My Course"
|
||||
label_user_info: "User information" #huang 添加
|
||||
label_user_watcher: "Following" # huang添加的 # modified by bai
|
||||
label_user_watcher: "Followers" # huang添加的 # modified by bai
|
||||
label_user_fans: "Followed by" # modified by bai
|
||||
|
||||
# modify by men
|
||||
|
@ -1258,20 +1056,14 @@ en:
|
|||
label_project_newother: "See other comments"
|
||||
label_project_newshare: "has shared"
|
||||
label_project_newadd: "added"
|
||||
label_project_unadd: "No project,go to creat it!"
|
||||
label_project_un: "You haven't joined any project!"
|
||||
|
||||
#end by huang
|
||||
|
||||
#added by liuping
|
||||
button_unfollow: Unfollow
|
||||
button_follow: Follow
|
||||
label_delete_confirm: Confirm delete?
|
||||
label_more_tags: More
|
||||
label_tags_bid: Call name
|
||||
label_tags_bid_description: call description
|
||||
label_tags_issue_description: issue description
|
||||
label_tags_all_objects: all objects
|
||||
label_apply_project: Apply Project
|
||||
|
||||
label_exit_project: Exit Project
|
||||
label_apply_project_waiting: "Application has been submitted, please wait for administrator review."
|
||||
label_unapply_project: Unsubscribe
|
||||
|
@ -1375,7 +1167,7 @@ en:
|
|||
label_requirement_bargain_money: type in your rewards(ex. money, reward, grade)
|
||||
label_wrong_budget: The error format of money
|
||||
label_wrong_date: wrong date format, input right date yyyy-mm-dd
|
||||
button_upload_photo: Upload photo
|
||||
|
||||
label_leave_me_message: left a message to me
|
||||
label_leave_others_message: leave message to him/her
|
||||
label_leave_a_message: Leave him/her a message:
|
||||
|
@ -1432,13 +1224,7 @@ en:
|
|||
label_project_no_activity: The project has no activities now!
|
||||
label_follow_no_requirement: You don't have followed any requirements!
|
||||
label_no_user_respond_you: There is no respond for you!
|
||||
label_tags_issue: issue:
|
||||
label_tags_project_name: Project name:
|
||||
label_tags_project_description: Project description:
|
||||
label_tags_user_mail: User E-mail:
|
||||
label_tags_user_name: User Name:
|
||||
label_tags_numbers: Tag numbers:
|
||||
label_max_number: Open label nickname is displayed on the web site of your,Must be at most 25 characters long.
|
||||
|
||||
label_all_revisions: All revisions:
|
||||
label_repository_name: Repository name
|
||||
label_upassword_info: The password can be shared in the group
|
||||
|
@ -1452,21 +1238,20 @@ en:
|
|||
label_issue_tread_over: Treaded over!
|
||||
label_issue_appraise_over: Appraised over!
|
||||
label_welcome_my_respond: Please leave your comments and suggestions here!
|
||||
label_no_current_fans: the user has no fans now
|
||||
label_no_current_watchers: the user hasn't watched others
|
||||
label_no_current_fans: The user has no fans now
|
||||
label_no_current_watchers: The user hasn't watched others
|
||||
label_project_tool_response: Response
|
||||
label_course_feedback: Feedback
|
||||
label_tags_search_result: Search Results
|
||||
label_active_call: call
|
||||
label_tags_call: Calls
|
||||
label_user_extensions: Other information
|
||||
|
||||
|
||||
label_boy: Man
|
||||
label_girl: Woman
|
||||
field_gender: Gender
|
||||
field_birthday: Birthday
|
||||
field_brief_introduction: Info
|
||||
field_location: Location
|
||||
field_occupation: Position
|
||||
|
||||
field_work_experience: Work experience(year)
|
||||
field_zip_code: Zip code
|
||||
label_reward: reward:
|
||||
|
@ -1478,15 +1263,12 @@ en:
|
|||
label_bids_credit_number: points
|
||||
field_budget: reward
|
||||
field_deadline: deadline
|
||||
label_tags_selected: Selected Tags
|
||||
label_tags_related: Related Tags
|
||||
button_project_tags_add: Add
|
||||
|
||||
label_issue_query_condition: Query condition
|
||||
label_homework_source: Task
|
||||
label_issue_query: Query
|
||||
label_issue_cancel_query: Cancel query
|
||||
field_reward_type: The type of reward
|
||||
label_tags_no: no tags now!
|
||||
label_bid_publish: published
|
||||
label_bid_project: projects
|
||||
label_project_no_follow: The project hasn't been followed now!
|
||||
|
@ -1508,24 +1290,20 @@ en:
|
|||
#end
|
||||
label_bids_published: published
|
||||
label_bids_published_ago: ago
|
||||
label_welcome_trustie: Trustie
|
||||
label_welcome_trustie_project: Online projects hosting platform
|
||||
label_welcome_trustie_course: Online Courses practice platform
|
||||
label_welcome_trustie_contest: Online Contests practice platform
|
||||
label_welcome_trustie_project_description: Software for Chinese college students and practitioners to provide social-oriented project management, code hosting, resource sharing, cooperation and exchange.
|
||||
label_welcome_trustie_course_description: Teachers and Students for Chinese universities to provide social-oriented curriculum management, resource sharing, cooperation achieved, collaborative research.
|
||||
label_welcome_trustie_contest_description: Software for Chinese college students and practitioners to provide social-oriented contest management, code hosting, resource sharing, cooperation and exchange.
|
||||
label_welcome_trustie_description: a socialized collaboration platform for project management, collaborative research, software development and software crowdsourcing for creative university students and entrepreneurs.
|
||||
label_user_project: Projects
|
||||
# label_welcome_trustie: Trustie
|
||||
# label_welcome_trustie_project: Online projects hosting platform
|
||||
# label_welcome_trustie_course: Online Courses practice platform
|
||||
# label_welcome_trustie_contest: Online Contests practice platform
|
||||
# label_welcome_trustie_project_description: Software for Chinese college students and practitioners to provide social-oriented project management, code hosting, resource sharing, cooperation and exchange.
|
||||
# label_welcome_trustie_course_description: Teachers and Students for Chinese universities to provide social-oriented curriculum management, resource sharing, cooperation achieved, collaborative research.
|
||||
# label_welcome_trustie_contest_description: Software for Chinese college students and practitioners to provide social-oriented contest management, code hosting, resource sharing, cooperation and exchange.
|
||||
# label_welcome_trustie_description: a socialized collaboration platform for project management, collaborative research, software development and software crowdsourcing for creative university students and entrepreneurs.
|
||||
label_bid_respond_quote: Respond
|
||||
label_bid_if_agreement: If you like me, please press me #bai
|
||||
label_bid_respond_delete: Delete
|
||||
label_newfeedback_message: messages
|
||||
label_newfeedback_quote: Respond
|
||||
label_newfeedback_delete: Delete
|
||||
label_user_all_activity: All activities
|
||||
label_user_activity_myself: About me
|
||||
label_user_all_respond: All replies
|
||||
label_layouts_feedback: Messages
|
||||
label_have_feedback: Have
|
||||
label_of_feedback: Of
|
||||
|
@ -1554,9 +1332,8 @@ en:
|
|||
label_school_all: Schools
|
||||
label_school_not_fount: Not found by your input query condition.
|
||||
label_other: Other
|
||||
label_gender: Gender
|
||||
label_gender_male: male
|
||||
label_gender_female: female
|
||||
|
||||
|
||||
label_location: Location
|
||||
#end
|
||||
label_course: Course
|
||||
|
@ -1589,11 +1366,6 @@ en:
|
|||
label_technicl_title_associate_professor: Associate professor
|
||||
label_technicl_title_lecturer: Lecturer
|
||||
label_technicl_title_teaching_assistant: Teaching assistant
|
||||
label_account_identity_teacher: Teacher
|
||||
label_account_identity_student: Student
|
||||
label_account_identity_developer: Developer
|
||||
label_account_identity_enterprise: Enterprise
|
||||
label_account_identity_choose: --Please choose your identity--
|
||||
label_enter_college: College Entrance
|
||||
lable_enter_enterprise: Enterprise Entrance
|
||||
label_homework_info: Status
|
||||
|
@ -1602,8 +1374,7 @@ en:
|
|||
label_my_question: Please raise your questions here!
|
||||
label_teacher_homework: "Teacher's name"
|
||||
label_course_homework: Corresponding courses
|
||||
label_course_done: finished courses
|
||||
label_course_doing: Doing course
|
||||
|
||||
label_limit_time: Deadline
|
||||
label_commit_homework: Submitted Task
|
||||
label_no_course_project: No submitted work!
|
||||
|
@ -1632,7 +1403,6 @@ en:
|
|||
zero: Task
|
||||
one: Task
|
||||
other: Tasks
|
||||
label_project_course_unadd: You have no course,creat one now!
|
||||
label_my_create_honework_no_homework: no task now!
|
||||
label_my_homework_no_homework: no task now!
|
||||
label_x_member:
|
||||
|
@ -1697,7 +1467,7 @@ en:
|
|||
label_in_course: in course
|
||||
label_assign_homework: assigned homewok
|
||||
label_noawards: No awards
|
||||
label_user_location: Location
|
||||
|
||||
label_requirement_enterprise: Requirements
|
||||
label_requirement_enterprise_list: Requirements List
|
||||
label_contest_innovate: Competition community
|
||||
|
@ -1719,9 +1489,7 @@ en:
|
|||
label_memo_new: new memo
|
||||
label_memo_edit: edit memo
|
||||
label_project_module_forums: Forums
|
||||
label_forum: Forum
|
||||
label_tags_forum_description: Forum description
|
||||
label_tags_forum: Call forum
|
||||
|
||||
label_memo_locked: 'Topic is locked'
|
||||
label_downloads_list: enter file list.
|
||||
label_sumbit_empty: search bar need container.
|
||||
|
@ -1734,7 +1502,6 @@ en:
|
|||
|
||||
label_your_course: your course
|
||||
label_have_message : have a new message
|
||||
label_login_prompt: Email/NickName
|
||||
:lable_not_receive_mail: Click here don't receive email form site!
|
||||
#added by linchun as competition#
|
||||
|
||||
|
@ -1752,21 +1519,29 @@ en:
|
|||
|
||||
|
||||
|
||||
# Trustie账户
|
||||
# edit by meng
|
||||
# Trustie账户> 登陆
|
||||
lable_user_name: Username
|
||||
field_password: Password
|
||||
field_identity_url: OpenID URL
|
||||
label_stay_logged_in: Keep me signed in
|
||||
label_password_lost: Forget password?
|
||||
button_login: Login
|
||||
|
||||
|
||||
# Trustie账户> 注册
|
||||
label_register: Sign up
|
||||
|
||||
#
|
||||
# Trustie个人主页
|
||||
#
|
||||
# Trustie个人主页>
|
||||
# 动态栏
|
||||
label_user_activity: "%{name} Activities"
|
||||
label_user_all_activity: All activities
|
||||
label_user_activity_myself: About me
|
||||
label_user_all_respond: All replies
|
||||
# 项目栏
|
||||
label_project_unadd: "No project, go to creat it!"
|
||||
label_project_un: "You haven't joined any project yet!"
|
||||
|
||||
|
||||
label_has_watched_project: The projects of attention
|
||||
label_project_take: The projects of participation
|
||||
|
||||
|
||||
|
||||
|
||||
# 托管平台主页
|
||||
# edit by meng
|
||||
# 托管平台主页> 顶部菜单
|
||||
|
@ -1781,14 +1556,17 @@ en:
|
|||
label_stores_index: Resource search
|
||||
|
||||
# 托管平台主页 > 搜索提示信息
|
||||
label_search_information: Please input the keywords!
|
||||
# 托管平台主页 > 下拉列表
|
||||
label_select_project: project
|
||||
label_select_course: course
|
||||
label_select_user: user
|
||||
label_select_user_nickname: nickname
|
||||
label_select_user_showname: name
|
||||
label_select_user_email: email
|
||||
welcome:
|
||||
search:
|
||||
information: "Please input the keywords!" # 搜索提示信息
|
||||
select: # 下拉列表
|
||||
project: project
|
||||
course: course
|
||||
user: user
|
||||
userinfo:
|
||||
nickname: nickname
|
||||
showname: name
|
||||
email: email
|
||||
|
||||
# 托管平台主页 > 下方托管平台链接
|
||||
label_projects_management_platform: Projects-platform
|
||||
|
@ -1807,18 +1585,18 @@ en:
|
|||
label_rights_reserved: ©2007~2014
|
||||
label_contact_us: Contact
|
||||
# 英文版不需要显示国内许可证 ,需要页面做判断
|
||||
#label_license: 湘ICP备09019772
|
||||
# label_license: 湘ICP备09019772
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# 项目托管平台
|
||||
# 项目托管平台主页 >主旨
|
||||
label_project_trustie:
|
||||
label_project_trustie_theme:
|
||||
# 项目托管平台主页 > 主旨
|
||||
label_welcome_trustie_project: Trustie online projects hosting platform
|
||||
label_welcome_trustie_project_description: "Software for Chinese college students and practitioners to provide social-oriented project management, code hosting, resource sharing, cooperation and exchange."
|
||||
|
||||
# 项目托管平台主页 >热门项目栏
|
||||
# 项目托管平台主页 > 热门项目栏
|
||||
lable_hot_projects: Hot Projects
|
||||
label_project_new: New project
|
||||
label_join_project: Join a project
|
||||
|
@ -1827,12 +1605,15 @@ en:
|
|||
label_project_score_tips: "Considering all activities of the project, project's score reflects the activity level of project"
|
||||
label_project_score: Score
|
||||
|
||||
# 项目托管平台主页 >用户动态栏
|
||||
lable_user_active: User Movements
|
||||
field_user_active_published: released
|
||||
field_user_active_uploaded: uploaded
|
||||
field_user_active_updated: updated
|
||||
field_user_active_unknow: Unknown content
|
||||
# 项目托管平台主页 > 用户动态栏
|
||||
lable_user_active: Recent Activities
|
||||
user:
|
||||
active:
|
||||
published: released
|
||||
uploaded: uploaded
|
||||
updated: updated
|
||||
unknow: Unknown content
|
||||
|
||||
|
||||
field_user_active_news: ' news'
|
||||
field_user_active_issue: ' issue'
|
||||
|
@ -1854,17 +1635,16 @@ en:
|
|||
# "缺陷 #1869 (已解决):subject"
|
||||
# tracker.name和status在数据库中以中文字段形式存储
|
||||
|
||||
# 项目托管平台主页 >贴吧动态栏
|
||||
lable_bar_active: Bar Posts
|
||||
# 项目托管平台主页 > 贴吧动态栏
|
||||
lable_bar_active: Recent Posts
|
||||
label_my_question: My-question
|
||||
label_my_feedback: My-feedback
|
||||
label_more: More
|
||||
label_updated_time: "Updated %{value} ago"
|
||||
label_question_sponsor: Sponsor
|
||||
label_final_reply: Last-reply
|
||||
|
||||
|
||||
# 项目托管平台 >新建项目
|
||||
# 项目托管平台 > 新建项目
|
||||
label_project_new_description: "A project can be used to do anything that requires distributed collaboration."
|
||||
field_name: Name
|
||||
field_description: Description
|
||||
|
@ -1876,27 +1656,36 @@ en:
|
|||
button_create: Create
|
||||
|
||||
|
||||
# 项目托管平台 >加入项目
|
||||
|
||||
|
||||
|
||||
# 项目托管平台 > 加入项目
|
||||
|
||||
project:
|
||||
join:
|
||||
title: 快速进入项目通道
|
||||
description: "只要持有项目的ID,就可快速申请加入所在项目。项目页面搜索不到的私有项目只能从此通道进入哦!"
|
||||
id:
|
||||
label: "Project ID:"
|
||||
tips: "Project ID is the number within the project's url"
|
||||
|
||||
# 公共
|
||||
label_apply_project: Apply Project
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# 课程托管平台主页
|
||||
# 课程托管平台主页 >主旨
|
||||
label_course_trustie:
|
||||
label_course_trustie_theme:
|
||||
# 课程托管平台主页 >
|
||||
# 课程托管平台主页 > 主旨
|
||||
label_welcome_trustie_course: Trustie online courses practice platform
|
||||
label_welcome_trustie_course_description: Teachers and Students for Chinese universities to provide social-oriented curriculum management, resource sharing, cooperation achieved, collaborative research.
|
||||
# 课程托管平台主页 >
|
||||
|
||||
|
||||
# 竞赛托管平台主页
|
||||
# 竞赛托管平台主页 >主旨
|
||||
label_contest_trustie:
|
||||
label_contest_trustie_theme:
|
||||
# 竞赛托管平台主页 >
|
||||
# 竞赛托管平台主页 > 主旨
|
||||
label_welcome_trustie_contest: Trustie online contests practice platform
|
||||
label_welcome_trustie_contest_description: Software for Chinese college students and practitioners to provide social-oriented contest management, code hosting, resource sharing, cooperation and exchange.
|
||||
# 竞赛托管平台主页 >
|
||||
|
||||
|
||||
# edit by meng
|
||||
|
@ -1985,11 +1774,10 @@ en:
|
|||
label_user_login_attending_contest: You are not logged in, please log in and then join the competition!
|
||||
label_contest_description_no: No description
|
||||
label_no_contest_softapplication: No application
|
||||
label_button_ok: Ok
|
||||
label_tags_contest: Competition tag
|
||||
|
||||
label_final_scores: Final scores
|
||||
label_rating_person_amount: Rating person
|
||||
label_tags_contest_description: Contest description
|
||||
|
||||
label_release_add_contest_succeed: The application succeed released and added!
|
||||
label_add_contest_succeed_fail: Added fails, the application has been joined the competition!
|
||||
label_no_ftapplication: No application
|
||||
|
@ -2061,8 +1849,7 @@ en:
|
|||
# ajax异步验证
|
||||
modal_valid_passing: can be used.
|
||||
|
||||
label_company_name: Company Name
|
||||
notice_account_invalid_creditentials_new: You have not to the mailbox activation
|
||||
|
||||
label_school_no_course: The school did not offer any courses, you can view other school curriculum
|
||||
label_school_less_course: The school offers courses in less, you can view other school curriculum
|
||||
label_file_not_found: Sorry, the file can't be downloaded now!
|
||||
|
@ -2076,9 +1863,8 @@ en:
|
|||
label_my_school: My school
|
||||
label_all_schol: All school
|
||||
label_select_province: Please select the provinces
|
||||
label_search_conditions_not_null: The search conditions can not be empty
|
||||
lable_school_list: List of schools
|
||||
button_delete_file: delete
|
||||
label_search_conditions_not_null: The search conditions cannot be blank
|
||||
|
||||
label_attachment: attachment
|
||||
label_max_length: A maximum of 250 characters
|
||||
label_create_person: Create personnel
|
||||
|
@ -2089,4 +1875,4 @@ en:
|
|||
label_anonymous: Anonymous
|
||||
label_submit_comments: Submit_comments
|
||||
label_course_empty_select: You have not selected course!
|
||||
label_enterprise_page_made: enterprise_page
|
||||
label_enterprise_page_made: enterprise_page
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
en:
|
||||
# Text direction: Left-to-Right (ltr) or Right-to-Left (rtl)
|
||||
direction: ltr
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
|
||||
# Chinese (China) translations for Ruby on Rails
|
||||
# by tsechingho (http://github.com/tsechingho)
|
||||
zh:
|
||||
# Text direction: Left-to-Right (ltr) or Right-to-Left (rtl)
|
||||
direction: ltr
|
||||
|
||||
|
||||
#
|
||||
# 邮件模块
|
||||
#
|
||||
# 项目问题跟踪邮件
|
||||
#
|
||||
mail_issue_greetings: "亲爱的Trustie用户,您好!"
|
||||
mail_issue_footer: "退订该邮件!"
|
||||
mail_issue_title_userin: "在"
|
||||
mail_issue_title_active: "中有了一个与您相关的最新活动,请您关注!"
|
||||
mail_issue_subject: "标题:"
|
||||
mail_issue_content: "内容:"
|
||||
mail_issue_sent_from: "来源:"
|
||||
mail_issue_from_project: "项目问题跟踪"
|
||||
mail_issue_attachments: "附件:"
|
||||
mail_issue_reply: "我要回复"
|
|
@ -0,0 +1,91 @@
|
|||
en:
|
||||
# Text direction: Left-to-Right (ltr) or Right-to-Left (rtl)
|
||||
direction: ltr
|
||||
#
|
||||
# Trustie个人模块
|
||||
#
|
||||
# 修改资料
|
||||
#
|
||||
label_my_account: My account
|
||||
|
||||
label_my_photo: My photo
|
||||
|
||||
label_information_plural: Information
|
||||
|
||||
label_account_identity_teacher: Teacher
|
||||
label_account_identity_student: Student
|
||||
label_account_identity_developer: Developer
|
||||
label_account_identity_enterprise: Enterprise
|
||||
label_account_identity_choose: "--Please choose your identity--"
|
||||
label_account_identity_studentID: "Please enter the student ID"
|
||||
|
||||
field_is_required: Required
|
||||
field_firstname: Name
|
||||
firstname_empty: "Name cannot be blank"
|
||||
field_firstname_eg: "(eg:Jack Chen,请填写[Jack])"
|
||||
field_lastname: Lastname
|
||||
lastname_empty: Lastname cannot be blank
|
||||
enterprise_empty: The enterprise name cannot be blank
|
||||
field_lastname_eg: "(eg:Jack Chen,请填写[Chen])"
|
||||
|
||||
label_company_name: Company Name
|
||||
|
||||
label_gender: Gender
|
||||
label_gender_male: male
|
||||
label_gender_female: female
|
||||
|
||||
field_occupation: Position
|
||||
field_occupation_click: "Click to select provinces and schools"
|
||||
lable_school_list: List of schools
|
||||
|
||||
field_language: Language
|
||||
|
||||
location: #地区信息在JS中都是中文信息,需要全部翻译
|
||||
labelname: 地区
|
||||
select:
|
||||
click: --请选择省份--
|
||||
|
||||
field_mail_notification: Email notifications
|
||||
description_user_mail_notification: Mail notification settings
|
||||
label_user_mail_option_all: "For any event on all my projects"
|
||||
label_user_mail_option_selected: "For any event on the selected projects only..."
|
||||
label_user_mail_option_none: "No events"
|
||||
label_user_mail_option_only_my_events: "Only for things I watch or I'm involved in"
|
||||
label_user_mail_option_only_assigned: "Only for things I am assigned to"
|
||||
label_user_mail_option_only_owner: "Only for things I am the owner of"
|
||||
label_user_mail_no_self_notified: "I don't want to be notified of changes that I make myself"
|
||||
|
||||
label_user_extensions: Other information
|
||||
|
||||
notice_account_updated: Account was successfully updated.
|
||||
#
|
||||
# Trustie个人模块
|
||||
#
|
||||
# 修改密码
|
||||
#
|
||||
button_change_password: Change password
|
||||
|
||||
|
||||
#
|
||||
# Trustie个人账户模块
|
||||
#
|
||||
# 可否删除?
|
||||
#
|
||||
label_reported_issues: Reported issues
|
||||
label_assigned_to_me_issues: Issues assigned to me
|
||||
label_watched_issues: Watched issues
|
||||
label_news_latest: Latest news
|
||||
label_calendar: Calendar
|
||||
label_document_plural: Documents
|
||||
label_spent_time: Spent time
|
||||
|
||||
|
||||
#
|
||||
# Trustie个人账户模块
|
||||
#
|
||||
# 可否删除?
|
||||
#
|
||||
notice_account_deleted: "Your account has been permanently deleted."
|
||||
notice_feeds_access_key_reseted: Your RSS access key was reset.
|
||||
notice_api_access_key_reseted: Your API access key was reset.
|
||||
|
|
@ -0,0 +1,101 @@
|
|||
|
||||
# Chinese (China) translations for Ruby on Rails
|
||||
# by tsechingho (http://github.com/tsechingho)
|
||||
zh:
|
||||
#
|
||||
# Trustie个人账户模块
|
||||
#
|
||||
# 公共类
|
||||
#
|
||||
|
||||
field_occupation: 工作单位
|
||||
label_company_name: 组织名
|
||||
label_location: 位置
|
||||
label_identity: 身份
|
||||
|
||||
#
|
||||
# Trustie个人账户模块
|
||||
#
|
||||
# 修改资料
|
||||
#
|
||||
label_my_account: 我的帐号
|
||||
|
||||
label_my_photo: 我的头像
|
||||
|
||||
label_information_plural: 信息
|
||||
|
||||
label_account_identity_choose: --请选择身份--
|
||||
label_account_identity_teacher: 教师
|
||||
label_account_identity_student: 学生
|
||||
label_account_identity_developer: 开发者
|
||||
label_account_identity_enterprise: 组织
|
||||
label_account_identity_studentID: 请输入学号
|
||||
|
||||
field_is_required: 必填
|
||||
field_firstname: 名字
|
||||
firstname_empty: 名字不能为空
|
||||
field_firstname_eg: '(例:张三丰,请填写[三丰])'
|
||||
field_lastname: 姓氏
|
||||
lastname_empty: 姓氏不能为空
|
||||
enterprise_empty: 企业名不能为空
|
||||
field_lastname_eg: '(例:张三丰,请填写[张])'
|
||||
|
||||
label_gender: 性别
|
||||
label_gender_male: 男
|
||||
label_gender_female: 女
|
||||
|
||||
field_occupation_click: 请单击选择省份及学校
|
||||
lable_school_list: 学校列表
|
||||
|
||||
field_language: 语言
|
||||
|
||||
location: #地区信息在JS中都是中文信息,需要全部翻译
|
||||
labelname: 地区
|
||||
select:
|
||||
click: --请选择省份--
|
||||
|
||||
field_mail_notification: 邮件通知
|
||||
description_user_mail_notification: 邮件通知设置
|
||||
label_user_mail_option_selected: "收取选中项目的所有通知..."
|
||||
label_user_mail_option_none: "不收取任何通知"
|
||||
label_user_mail_option_only_my_events: "只收取我跟踪或参与的项目的通知"
|
||||
label_user_mail_option_only_assigned: "只收取分配给我的"
|
||||
label_user_mail_option_only_owner: 只收取由我创建的
|
||||
label_user_mail_no_self_notified: "不要发送对我自己提交的修改的通知"
|
||||
|
||||
label_user_extensions: 其他信息
|
||||
|
||||
notice_account_updated: 帐号更新成功
|
||||
|
||||
|
||||
#
|
||||
# Trustie个人账户模块
|
||||
#
|
||||
# 修改密码
|
||||
#
|
||||
button_change_password: 修改密码
|
||||
|
||||
|
||||
#
|
||||
# Trustie个人账户模块
|
||||
#
|
||||
# 可否删除?
|
||||
#
|
||||
label_assigned_to_me_issues: 指派给我的问题
|
||||
label_reported_issues: 已报告的问题
|
||||
label_watched_issues: 跟踪的问题
|
||||
label_news_latest: 最近的新闻
|
||||
label_calendar: 日历
|
||||
label_document_plural: 文档
|
||||
label_spent_time: 耗时
|
||||
|
||||
|
||||
#
|
||||
# Trustie个人账户模块
|
||||
#
|
||||
# 可否删除?
|
||||
#
|
||||
notice_account_deleted: 您的账号已被永久删除(账号已无法恢复)
|
||||
notice_feeds_access_key_reseted: 您的RSS存取键已被重置。
|
||||
notice_api_access_key_reseted: 您的API访问键已被重置。
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
en:
|
||||
# Text direction: Left-to-Right (ltr) or Right-to-Left (rtl)
|
||||
direction: ltr
|
||||
|
||||
|
||||
|
||||
|
||||
label_user_location: Location
|
|
@ -0,0 +1,81 @@
|
|||
|
||||
# Chinese (China) translations for Ruby on Rails
|
||||
# by tsechingho (http://github.com/tsechingho)
|
||||
zh:
|
||||
# Text direction: Left-to-Right (ltr) or Right-to-Left (rtl)
|
||||
direction: ltr
|
||||
#
|
||||
# Trustie平台导航
|
||||
#
|
||||
# 顶部菜单
|
||||
#
|
||||
field_homepage: 主页
|
||||
label_project_deposit: 项目托管
|
||||
label_course_practice: 课程实践
|
||||
label_forum_all: 公共贴吧
|
||||
label_school_all: 中国高校
|
||||
label_contest_innovate: 创新竞赛
|
||||
label_software_user: 软件创客
|
||||
label_requirement_enterprise: 软件众包
|
||||
label_stores_index: 资源搜索
|
||||
label_login: 登录
|
||||
|
||||
|
||||
#
|
||||
# 项目托管平台主
|
||||
#
|
||||
# 主旨
|
||||
#
|
||||
label_welcome_trustie_project: Trustie在线项目托管平台
|
||||
label_welcome_trustie_project_description: "面向中国大学生与软件从业者,提供社交化的项目管理、代码托管、资源共享、合作交流。"
|
||||
|
||||
|
||||
#
|
||||
# 课程托管平台
|
||||
#
|
||||
# 主旨
|
||||
#
|
||||
label_welcome_trustie_course: Trustie在线课程实践平台
|
||||
label_welcome_trustie_course_description: "面向中国高校教师与大学生,提供社交化的课程管理、资源共享、合作实验、协同研究。"
|
||||
|
||||
|
||||
#
|
||||
# 竞赛托管平台
|
||||
#
|
||||
# 主旨
|
||||
#
|
||||
label_welcome_trustie_contest: Trustie在线竞赛实战平台
|
||||
label_welcome_trustie_contest_description: "面向中国大学生与编程爱好者,提供社交化的竞赛管理、应用管理、代码托管、合作交流。"
|
||||
|
||||
#
|
||||
# Trustie平台导航
|
||||
#
|
||||
# 搜索
|
||||
#
|
||||
welcome:
|
||||
search:
|
||||
information: 请输入要搜索的关键字 # 搜索提示信息
|
||||
select: # 下拉列表
|
||||
project: 项目
|
||||
course: 课程
|
||||
user: 用户
|
||||
userinfo:
|
||||
nickname: 昵称
|
||||
showname: 姓名
|
||||
email: 邮箱
|
||||
#
|
||||
# Trustie平台导航
|
||||
#
|
||||
# 下方托管平台链接
|
||||
#
|
||||
label_projects_management_platform: 项目托管平台
|
||||
label_courses_management_platform: 课程实践平台
|
||||
label_contests_management_platform: 竞赛托管平台
|
||||
|
||||
|
||||
#
|
||||
# Trustie平台导航
|
||||
#
|
||||
# 各模块内导航
|
||||
#
|
||||
label_user_location: 当前位置
|
|
@ -0,0 +1,6 @@
|
|||
en:
|
||||
# Text direction: Left-to-Right (ltr) or Right-to-Left (rtl)
|
||||
direction: ltr
|
||||
|
||||
label_approve: Approve
|
||||
label_refusal: Refusal
|
|
@ -0,0 +1,60 @@
|
|||
|
||||
# Chinese (China) translations for Ruby on Rails
|
||||
# by tsechingho (http://github.com/tsechingho)
|
||||
zh:
|
||||
# Text direction: Left-to-Right (ltr) or Right-to-Left (rtl)
|
||||
direction: ltr
|
||||
|
||||
#
|
||||
# 项目托管平台主页
|
||||
#
|
||||
# 热门项目栏
|
||||
#
|
||||
lable_hot_projects: 热门项目
|
||||
label_project_new: 新建项目
|
||||
label_join_project: 加入项目
|
||||
label_private: 私有
|
||||
label_project_member_amount: "%{count}人"
|
||||
label_project_score_tips: 项目得分,综合考虑了项目的各项活动,反映了该项目的活跃程度
|
||||
label_project_score: 项目评分
|
||||
|
||||
|
||||
#
|
||||
# 项目托管平台
|
||||
#
|
||||
# 新建项目
|
||||
#
|
||||
label_project_new_description: '项目可以是软件开发项目,也可以是协作研究项目。'
|
||||
field_name: 名称
|
||||
field_description: 描述
|
||||
field_identifier: 标识
|
||||
text_length_between: "长度必须在 %{min} 到 %{max} 个字符之间。"
|
||||
text_project_identifier_info: "小写字母(a-z)、数字、破折号(-)和下划线(_)可以使用。<br />一旦保存,标识无法修改。"
|
||||
field_is_public: 公开
|
||||
field_hidden_repo: 隐藏代码库
|
||||
button_create: 提交
|
||||
|
||||
|
||||
#
|
||||
# 项目托管平台
|
||||
#
|
||||
# 加入项目
|
||||
#
|
||||
project:
|
||||
join:
|
||||
title: 快速进入项目通道
|
||||
description: "只要持有项目的ID,就可快速申请加入所在项目。项目页面搜索不到的私有项目只能从此通道进入哦!"
|
||||
id:
|
||||
label: "项目ID:"
|
||||
tips: "项目ID是所在项目网址中显示的序号"
|
||||
# 公共
|
||||
label_apply_project: 申请加入
|
||||
|
||||
|
||||
#
|
||||
# 项目托管平台
|
||||
#
|
||||
# 项目配置
|
||||
#
|
||||
label_approve: 批准
|
||||
label_refusal: 拒绝
|
|
@ -0,0 +1,19 @@
|
|||
en:
|
||||
# Text direction: Left-to-Right (ltr) or Right-to-Left (rtl)
|
||||
direction: ltr
|
||||
#
|
||||
# Trustie账户模块
|
||||
#
|
||||
# 公共变量
|
||||
#
|
||||
|
||||
|
||||
|
||||
|
||||
label_project_course_un: "The user is not enrolled in any course yet. "
|
||||
label_project_course_unadd: "You have no course,creat one now!"
|
||||
label_project_cousre_studentun: "You have not joined any course, come and join now!"
|
||||
user:
|
||||
courses:
|
||||
doing: Strating
|
||||
done: Finished
|
|
@ -0,0 +1,139 @@
|
|||
|
||||
# Chinese (China) translations for Ruby on Rails
|
||||
# by tsechingho (http://github.com/tsechingho)
|
||||
zh:
|
||||
# Text direction: Left-to-Right (ltr) or Right-to-Left (rtl)
|
||||
direction: ltr
|
||||
|
||||
#
|
||||
# 项目托管平台主页
|
||||
#
|
||||
# 用户动态栏
|
||||
#
|
||||
lable_user_active: 用户动态
|
||||
user:
|
||||
active:
|
||||
published: 发表了
|
||||
uploaded: 上传了
|
||||
updated: 更新了
|
||||
|
||||
field_user_active_unknow: 未知内容
|
||||
field_user_active_news: 新闻
|
||||
field_user_active_issue: 问题
|
||||
field_user_active_attachment: 附件
|
||||
field_user_active_message: 主题
|
||||
field_user_active_reply: 回复
|
||||
field_user_active_bid: 作业
|
||||
field_user_active_memo: 主题
|
||||
field_user_active_document: 文件
|
||||
field_user_active_changeset: 版本库
|
||||
field_user_active_issue_note: 问题说明
|
||||
|
||||
field_updated_on: 更新于
|
||||
field_time_ago: 前
|
||||
field_active_reply: "回复("
|
||||
# 用户动态中event.title和event.description
|
||||
# 通过act_as_event方法的option配置
|
||||
# "#{o.tracker.name} ##{o.id} (#{o.status}): #{o.subject}"
|
||||
# "缺陷 #1869 (已解决):subject"
|
||||
# 而tracker.name和status在数据库中以中文字段形式存储
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Trustie用户主页
|
||||
#
|
||||
# top-content
|
||||
#
|
||||
label_user_home: 创客空间
|
||||
|
||||
|
||||
#
|
||||
# Trustie用户主页
|
||||
#
|
||||
# 左边栏
|
||||
#
|
||||
label_user_edit: "修改资料"
|
||||
|
||||
label_user_score: 个人综合得分
|
||||
label_user_score_of_topic: 帖子得分
|
||||
label_user_score_of_project: 项目得分
|
||||
label_user_score_of_activity: 活跃度得分
|
||||
label_user_score_of_influence: 影响力得分
|
||||
label_user_score_of_collaboration: 协同得分
|
||||
label_user_score_of_skill: 技术得分
|
||||
label_user_score_of_active: 项目贡献得分
|
||||
|
||||
label_user_info: "个人简介" #huang 添加
|
||||
label_user_watcher: "关注" # huang添加的
|
||||
label_user_fans: "粉丝"
|
||||
label_x_user_fans:
|
||||
zero: 粉丝
|
||||
one: 粉丝
|
||||
other: 粉丝
|
||||
|
||||
label_brief_introduction: 个性签名
|
||||
label_my_brief_introduction: 今天的心情如何?留下你的脚印吧~
|
||||
|
||||
label_user_joinin: "加入时间"
|
||||
label_user_login: "最后登录"
|
||||
label_technical_title: 职称
|
||||
label_bidding_user_studentcode: 学号
|
||||
label_account_developer: 开发者
|
||||
label_account_student: 学生
|
||||
|
||||
|
||||
#
|
||||
# Trustie用户主页
|
||||
#
|
||||
# 菜单栏
|
||||
#
|
||||
label_activity: 动态
|
||||
label_user_course: 课程
|
||||
label_user_project: 项目
|
||||
label_user_newfeedback: 留言
|
||||
|
||||
|
||||
#
|
||||
# Trustie个人主页
|
||||
#
|
||||
# Trustie个人主页>
|
||||
# 动态栏
|
||||
label_user_activity: "%{name}的动态"
|
||||
label_user_all_activity: 所有动态
|
||||
label_user_activity_myself: 我的动态
|
||||
label_user_all_respond: 所有反馈
|
||||
|
||||
label_i_new_activity: 有了新活动在
|
||||
label_have_feedback: 有了
|
||||
label_of_feedback: 的
|
||||
label_layouts_feedback: 留言
|
||||
label_new_activity: 有了最新动态
|
||||
|
||||
# 项目栏
|
||||
label_project_unadd: "暂无项目,赶快去创建吧!"
|
||||
label_project_un: "该用户暂未参与任何项目!"
|
||||
|
||||
label_has_watched_project: 关注的项目
|
||||
label_project_take: 参与的项目
|
||||
|
||||
|
||||
#
|
||||
# Trustie用户主页
|
||||
#
|
||||
# 课程栏
|
||||
#
|
||||
label_project_course_un: "该用户暂未加入任何课程!"
|
||||
label_project_course_unadd: "你还未创建课程,赶快去创建吧!"
|
||||
label_project_cousre_studentun: "你还未加入任何课程,赶快加入吧!"
|
||||
user:
|
||||
courses:
|
||||
doing: 进行中的课程
|
||||
done: 已结束的课程
|
||||
|
||||
|
||||
#
|
||||
# Trustie用户主页
|
||||
#
|
||||
# 留言栏
|
||||
#
|
|
@ -203,7 +203,7 @@ zh:
|
|||
notice_unable_delete_time_entry: 无法删除工时
|
||||
notice_issue_done_ratios_updated: 问题完成度已更新。
|
||||
notice_gantt_chart_truncated: "这个表是截断的因为它超过了可以显示的最大数量(%{max})"
|
||||
|
||||
|
||||
error_complete_occupation: "请您填写工作单位,否则本系统的部分功能将无法正常使用。"
|
||||
error_attachment_empty: "添加文件出错!"
|
||||
|
||||
|
@ -245,9 +245,12 @@ zh:
|
|||
label_course_closed: 关闭
|
||||
label_course_reload: 重开
|
||||
label_course_closed_tips: "确定要%{desc}课程?"
|
||||
# end
|
||||
# end
|
||||
field_name: 名称
|
||||
field_enterprise_name: 组织名称
|
||||
|
||||
label_week_mail: 一周动态
|
||||
label_day_mail: 一日动态
|
||||
#added by huang
|
||||
field_tea_name: 教师
|
||||
field_couurse_time: 学时
|
||||
|
@ -497,6 +500,9 @@ zh:
|
|||
permission_paret_in_homework: 加入作业
|
||||
permission_view_homework_attaches: 查看作业附件
|
||||
permission_view_course_journals_for_messages: 查看课程留言
|
||||
view_course_journals_for_messages: 课程留言
|
||||
label_send_course_journals_for_messages: 发布了留言
|
||||
label_send_course_messages: 发布了讨论
|
||||
permission_select_course_modules: 选择课程模块
|
||||
permission_view_course_files: 查看课程资源
|
||||
permission_add_course: 新建课程
|
||||
|
@ -511,6 +517,7 @@ zh:
|
|||
permission_upload_attachments: 资源上传
|
||||
|
||||
project_module_issue_tracking: 问题跟踪
|
||||
project_moule_boards_show: 项目论坛
|
||||
project_module_time_tracking: 时间跟踪
|
||||
project_module_news: 新闻
|
||||
project_module_documents: 文档
|
||||
|
@ -566,7 +573,7 @@ zh:
|
|||
label_document_new: 新建文档
|
||||
label_document_plural: 文档
|
||||
label_document_added: 文档已添加
|
||||
label_forum_message_added: 发帖成功
|
||||
label_forum_message_added: 贴吧发帖成功
|
||||
label_forum_add: 贴吧创建成功
|
||||
label_message_reply: 回帖人
|
||||
label_document_public_info: (打钩为公开,不打钩则不公开,若不公开,仅项目成员可见该文档。)
|
||||
|
@ -633,7 +640,7 @@ zh:
|
|||
label_enterprise_into: 进入企业
|
||||
label_college_into: 进入高校
|
||||
label_investor: 投资人:
|
||||
lable_contest_user: 竞赛发布人
|
||||
lable_contest_user: 竞赛发布人
|
||||
label_user_home: 创客空间
|
||||
label_user_location: 当前位置
|
||||
label_course_term: 开课学期
|
||||
|
@ -657,6 +664,10 @@ zh:
|
|||
label_user_login_attending_contest: 您还没有登录,请登录后参赛
|
||||
label_user_login_score_and_comment: 您还没有登录,请登录后对作品进行打分评价
|
||||
label_user_login_notificationcomment: 您还没有登录,请登录后参加评论
|
||||
label_user_forum: 您的贴吧
|
||||
label_user_message_forum: 您的帖子
|
||||
label_user_message: 您的留言
|
||||
label_show_your_message: 给您的留言
|
||||
#end
|
||||
#by huang # modified by bai
|
||||
label_college: 高校进入
|
||||
|
@ -683,7 +694,7 @@ zh:
|
|||
label_edit_homework: 修改作业
|
||||
label_delete_homework: 删除作业
|
||||
label_new_homework: 创建作业
|
||||
|
||||
|
||||
#end
|
||||
label_my_page: 我的工作台
|
||||
label_my_account: 我的帐号
|
||||
|
@ -727,6 +738,7 @@ zh:
|
|||
label_attachment: 文件
|
||||
label_attachment_new: 新建文件
|
||||
label_file_upload: 上传资料
|
||||
label_course_file_upload: 上传了课件
|
||||
label_attachment_delete: 删除文件
|
||||
label_attachment_plural: 文件
|
||||
label_file_added: 文件已添加
|
||||
|
@ -745,6 +757,9 @@ zh:
|
|||
label_settings: 配置
|
||||
label_overview: 近期动态
|
||||
label_course_overview: "课程动态"
|
||||
label_project_overview_new: "项目动态"
|
||||
label_forums_overview: "贴吧动态"
|
||||
label_homework_overview: 作业动态
|
||||
label_question_student: 作业交流 #bai
|
||||
label_homework_commit: 提交作业 #huang
|
||||
label_homework_info: 提交情况 #huang
|
||||
|
@ -956,7 +971,9 @@ zh:
|
|||
label_theme: 主题
|
||||
label_default: 默认
|
||||
label_search_titles_only: 仅在标题中搜索
|
||||
label_user_mail_option_all: "收取我的项目的所有通知"
|
||||
label_user_mail_option_all: "收取我的所有通知"
|
||||
label_user_mail_option_week: "按周收取我的所有通知"
|
||||
label_user_mail_option_day: "按天收取我的所有通知"
|
||||
label_must_answer: "必答"
|
||||
label_poll_title: 问卷调查_问卷页面
|
||||
#huang
|
||||
|
@ -992,14 +1009,15 @@ zh:
|
|||
label_project_newother: "查看其他评论"
|
||||
label_project_newshare: "分享了"
|
||||
label_project_notice: "发布了通知:"
|
||||
label_project_issue: "发布了问题:"
|
||||
label_project_newadd: "添加了"
|
||||
label_project_unadd: "暂无项目,赶快去创建吧!"
|
||||
label_project_un: "该用户暂未参与任何项目!"
|
||||
label_project_course_un: "该用户暂未加入任何课程!"
|
||||
label_project_course_unadd: "你还未创建课程,赶快去创建吧!"
|
||||
label_project_cousre_studentun: "你还未加入任何课程,赶快加入吧!"
|
||||
label_project_course_unadd: "你还未创建课程,赶快去创建吧!"
|
||||
label_project_cousre_studentun: "你还未加入任何课程,赶快加入吧!"
|
||||
#end by huang
|
||||
label_user_mail_option_selected: "收取选中项目的所有通知..."
|
||||
label_user_mail_option_selected: "收取选中项目的所有通知"
|
||||
label_user_mail_option_none: "不收取任何通知"
|
||||
label_user_mail_option_only_my_events: "只收取我跟踪或参与的项目的通知"
|
||||
label_user_mail_option_only_assigned: "只收取分配给我的"
|
||||
|
@ -1383,20 +1401,20 @@ zh:
|
|||
label_since_last_commits: 距离上次提交时间
|
||||
label_users_on_trustie: 用户
|
||||
label_front: 第一页
|
||||
label_commit_on: 次提交
|
||||
label_commit_on: 次提交
|
||||
label_uncommit_homework: 暂无学生提交作业!
|
||||
#modify by men
|
||||
label_x_commit_on:
|
||||
zero: 次提交
|
||||
one: 次提交
|
||||
other: 次提交
|
||||
label_x_commit_on:
|
||||
zero: 次提交
|
||||
one: 次提交
|
||||
other: 次提交
|
||||
#end
|
||||
label_follow_people: 个关注者
|
||||
#modify by men
|
||||
label_x_follow_people:
|
||||
zero: 个关注者
|
||||
one: 个关注者
|
||||
other: 个关注者
|
||||
other: 个关注者
|
||||
#end
|
||||
label_member_since: 加入
|
||||
label_contribute_to: 参与了 %{project_count} 个项目:
|
||||
|
@ -1410,7 +1428,7 @@ zh:
|
|||
label_question_number: 第%{question_number}题:
|
||||
label_complete_question: 答题已完成
|
||||
#modify by men
|
||||
label_x_total_commit:
|
||||
label_x_total_commit:
|
||||
zero: 共 %{count} 次提交
|
||||
one: 共 %{count} 次提交
|
||||
other: 共 %{count} 次提交
|
||||
|
@ -1442,7 +1460,7 @@ zh:
|
|||
label_exit_project: 退出项目
|
||||
label_apply_project_waiting: 已处理申请,请等待管理员审核
|
||||
label_unapply_project: 取消申请
|
||||
|
||||
|
||||
#fq
|
||||
button_leave_meassge: 留言
|
||||
button_clear_meassge: 清除留言
|
||||
|
@ -1453,22 +1471,22 @@ zh:
|
|||
button_more: 更多
|
||||
label_user_response: 用户留言
|
||||
label_student_response: 作业答疑 # modified by bai
|
||||
label_bidding_project: 参与项目
|
||||
label_bidding_project: 参与项目
|
||||
label_homework_project: 已提交作业 #huang
|
||||
button_bidding: 我要参加
|
||||
field_enterprise: '企业:'
|
||||
|
||||
|
||||
no_attachmens_allowed: 提交作业不能为空
|
||||
|
||||
|
||||
button_bidding_homework: 参加竞标 #huang
|
||||
field_homework_type: 提交形式 #bai
|
||||
label_homework_respond: 作业情况
|
||||
|
||||
label_bid_me: 我要应标
|
||||
label_new_call: 发布需求
|
||||
|
||||
|
||||
label_newtype_contest: 发布竞赛
|
||||
|
||||
|
||||
label_user_information: "与我相关"
|
||||
label_bid_succeed: "作业创建成功"
|
||||
label_wrong_budget: 错误的金额格式
|
||||
|
@ -1480,7 +1498,7 @@ zh:
|
|||
label_bidding_homework_committed: 你已经提交过作业,不能重复提交!
|
||||
label_bidding_fail: 应标失败,该项目已经应标
|
||||
label_bidding_homework_fail: 作业提交失败,该作业已经被提交!
|
||||
|
||||
|
||||
label_requirement_list: 需求列表
|
||||
|
||||
label_x_biding_project: #modify by men
|
||||
|
@ -1591,6 +1609,7 @@ zh:
|
|||
label_exist_repository_path: 定义已有版本库URL路径,定义格式file://, http://, https://, svn://
|
||||
label_project_no_activity: 该项目暂无动态!
|
||||
label_course_homework_un: 暂未发布任何作业
|
||||
label_course_homework: 发布了作业
|
||||
label_follow_no_requirement: 暂未关注任何需求!
|
||||
label_no_user_respond_you: 暂无任何用户对您进行反馈!
|
||||
label_tags_issue: 问题名称:
|
||||
|
@ -1641,7 +1660,7 @@ zh:
|
|||
label_credit: 学分:
|
||||
label_choose_reward: 选择奖励方式
|
||||
label_money: 货币
|
||||
label_reward_1: 其他
|
||||
label_reward_1: 其他
|
||||
label_bids_credit: 学分
|
||||
label_bids_credit_number: 分
|
||||
field_budget: 奖励
|
||||
|
@ -1662,6 +1681,7 @@ zh:
|
|||
label_project_no_follow: 该项目暂未被关注!
|
||||
label_no_bid_project: 暂无参与项目
|
||||
label_no_course_project: 暂无已提交的作业!
|
||||
label_course_submit_homework: 提交了作业
|
||||
label_bids_reward_method: 奖励方式 :
|
||||
label_bids_reward_what: 输入奖励内容
|
||||
label_call_bonus: 奖金
|
||||
|
@ -1706,7 +1726,7 @@ zh:
|
|||
lable_close_evaluation: 该作业未开启互评功能
|
||||
lable_has_evaluation: 您已进行过评价
|
||||
#modify by men
|
||||
label_x_welcome_participate:
|
||||
label_x_welcome_participate:
|
||||
zero: 参与了
|
||||
one: 参与了
|
||||
other: 参与了
|
||||
|
@ -1769,6 +1789,7 @@ zh:
|
|||
label_wiki_number: wiki的数量
|
||||
label_message_number: 留言的数量
|
||||
label_activity_number: 个人动态数量
|
||||
label_activities: 个人动态
|
||||
label_issue_message_number: 对issue的留言数量
|
||||
label_code_submit_number: 代码提交次数
|
||||
label_topic_number: 讨论区发言数量
|
||||
|
@ -1785,19 +1806,19 @@ zh:
|
|||
label_code_submit_number: 代码提交数量
|
||||
label_topic_number: 讨论区帖子数量
|
||||
label_files_filter: 资源过滤:
|
||||
|
||||
|
||||
label_course_contribute_to: 参与了 %{project_count} 个项目:
|
||||
label_x_course_contribute_to:
|
||||
zero: "参与了 %{count} 个课程:"
|
||||
one: "参与了 %{count} 个课程:"
|
||||
other: "参与了 %{count} 个课程:"
|
||||
|
||||
|
||||
label_join_contest: 加入竞赛
|
||||
label_exit_contest: 退出竞赛
|
||||
label_participator: 参与者
|
||||
label_contest_modify_settings: 配置竞赛
|
||||
label_contest_modify_settings: 配置竞赛
|
||||
label_no_current_participate: 该竞赛暂无参与者
|
||||
|
||||
|
||||
#end
|
||||
|
||||
label_joined_course: 参加的课程
|
||||
|
@ -1820,8 +1841,8 @@ zh:
|
|||
label_contest_joincontest: 参加竞赛
|
||||
label_contest_notification: 竞赛通知
|
||||
#end
|
||||
|
||||
label_x_course_data:
|
||||
|
||||
label_x_course_data:
|
||||
zero: 资料
|
||||
one: 资料
|
||||
other: 资料
|
||||
|
@ -1833,10 +1854,10 @@ zh:
|
|||
zero: 教师
|
||||
one: 教师
|
||||
other: 教师
|
||||
|
||||
|
||||
label_homework_statistics: 作业统计
|
||||
label_technical_title: 职称
|
||||
|
||||
|
||||
# added by william 无english版本
|
||||
label_bidding_results: 应标结果
|
||||
label_bid_end: 该需求已经结束!
|
||||
|
@ -1849,23 +1870,23 @@ zh:
|
|||
label_excellence_reward: 优秀奖
|
||||
label_comfort_reward: 入围奖
|
||||
label_course_settings: 课程设置
|
||||
|
||||
|
||||
#added by nie
|
||||
label_x_task:
|
||||
label_x_task:
|
||||
zero: 份作业
|
||||
one: 份作业
|
||||
other: 份作业
|
||||
label_x_member:
|
||||
label_x_member:
|
||||
zero: 个成员
|
||||
one: 个成员
|
||||
other: 个成员
|
||||
label_x_data:
|
||||
label_x_data:
|
||||
zero: 份资料
|
||||
one: 份资料
|
||||
other: 份资料
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#add by men
|
||||
label_technicl_title_professor: 教授
|
||||
label_technicl_title_associate_professor: 副教授
|
||||
|
@ -1888,14 +1909,15 @@ zh:
|
|||
label_bid_contest_show_course_name: 课程名称
|
||||
label_bid_contest_show_teacher_name: 教师
|
||||
label_contest_list: 竞赛列表
|
||||
|
||||
label_x_base_courses_member:
|
||||
|
||||
label_x_base_courses_member:
|
||||
zero: 成员
|
||||
one: 成员
|
||||
other: 成员
|
||||
|
||||
|
||||
label_bids_task_list: 作业列表
|
||||
label_join_course: 加入
|
||||
label_invite_project: 邀请您加入项目
|
||||
label_exit_course: 退出
|
||||
label_exit_group: 退出当前分班
|
||||
label_new_join: 加入
|
||||
|
@ -1912,14 +1934,14 @@ zh:
|
|||
label_has_been: 已经被
|
||||
label_course_userd_by: 个课程引用
|
||||
no_file_dowmload: 该作业没有任何的附件可以下载
|
||||
|
||||
|
||||
role_of_course: 课程角色
|
||||
label_student: 学生
|
||||
|
||||
|
||||
#added by Wen
|
||||
label_school_not_fount: 没有符合的高校信息
|
||||
|
||||
|
||||
|
||||
|
||||
label_project_grade: 项目得分
|
||||
label_user_grade: 个人得分
|
||||
label_user_for_project_grade: 个人得分
|
||||
|
@ -1954,6 +1976,7 @@ zh:
|
|||
label_hot_project: '热门项目'
|
||||
label_borad_project: 项目讨论区
|
||||
label_borad_course: 课程讨论区
|
||||
view_borad_course: 课程讨论
|
||||
label_memo_create_succ: 发布成功
|
||||
label_memo_create_fail: 发布失败
|
||||
label_forum_create_succ: 贴吧新建成功
|
||||
|
@ -1991,7 +2014,7 @@ zh:
|
|||
label_upload_softwarepackage: 上传软件包
|
||||
label_upload_cuttingphoto: 上传截图
|
||||
label_contests_reward_method: 奖励方式
|
||||
label_system_platform: 系统平台
|
||||
label_system_platform: 系统平台
|
||||
label_nextstep: 下一步
|
||||
label_participate: 参赛者
|
||||
label_setting: 配置
|
||||
|
@ -2059,7 +2082,7 @@ zh:
|
|||
label_attending_contest: 我要参赛
|
||||
label_contest_notification: 竞赛通知
|
||||
label_company_name: 组织名
|
||||
|
||||
|
||||
label_coursefile_sharingarea: 课程资源共享区
|
||||
label_sort_by_activity: 按动态数排序
|
||||
label_homework: 课程作业
|
||||
|
@ -2095,7 +2118,7 @@ zh:
|
|||
label_attending_contest: 参加竞赛
|
||||
label_new_attendingcontest_work: 新建参赛作品
|
||||
label_workname_lengthlimit: 25个汉字以内
|
||||
label_workdescription_lengthlimit: 125个汉字以内,用','隔开
|
||||
label_workdescription_lengthlimit: "125个汉字以内,用','隔开"
|
||||
label_please_input_password: 请输入竞赛密码
|
||||
label_please_select_project: 请选择项目
|
||||
label_upload_softworkpacket_photo: 上传作品软件包和作品截图
|
||||
|
@ -2111,12 +2134,13 @@ zh:
|
|||
notice_attendingcontest_work_successfully_created: 恭喜您,参赛作品创建成功!
|
||||
notice_softapplication_was_successfully_updated: 恭喜您,参赛作品更新成功!
|
||||
notice_attendingcontest_work_failed_created: 参赛产品创建失败
|
||||
|
||||
|
||||
label_attendingcontestwork_belongs_contest: 所属竞赛
|
||||
label_attendingcontestwork_belongs_type: 所属类别
|
||||
label_attendingcontestwork_release_person: 发布人员
|
||||
label_attendingcontestwork_adaptive_system: 系统支持
|
||||
label_attendingcontestwork_download: 作品下载
|
||||
label_course_attendingcontestwork_download: 课件下载
|
||||
label_attendingcontestwork_developers: 开发人员
|
||||
label_attendingcontestwork_average_scores: 平均评分
|
||||
label_attendingcontestwork_release_time: 发布时间
|
||||
|
@ -2133,13 +2157,13 @@ zh:
|
|||
label_release_time: 发布时间
|
||||
label_reply: 回复
|
||||
label_weixin: 微信扫码
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Trustie账户模块
|
||||
# edit by meng
|
||||
# edit by meng
|
||||
# Trustie账户模块> 登陆
|
||||
lable_user_name: 登录名
|
||||
label_login_prompt: 邮箱/登录名
|
||||
|
@ -2152,15 +2176,15 @@ zh:
|
|||
notice_account_invalid_creditentials: 无效的用户名或密码
|
||||
# account_controller中判断未激活的提示信息
|
||||
notice_account_invalid_creditentials_new: 您还未到邮箱激活
|
||||
|
||||
|
||||
|
||||
|
||||
# Trustie账户模块> 注册
|
||||
# 页面中密码和确认密码不一致信息,正则判断,邮件地址合法等信息由application_helper中error_messages_for方法来判断提示信息
|
||||
# rails本身机制ActiveRecord提供
|
||||
# 在model层的 validates_方法进行辅助验校
|
||||
# 其输出的提示信息在国际化yml中的activerecord中配置
|
||||
label_register: 注册
|
||||
label_login_with_open_id_option: 或使用OpenID登录
|
||||
label_login_with_open_id_option: 或使用OpenID登录
|
||||
field_login: 登录名
|
||||
label_max_number: 登录名是在网站中显示的您的公开标识,只能为英文和数字。
|
||||
field_password: 密码
|
||||
|
@ -2176,21 +2200,21 @@ zh:
|
|||
setting_password_success: 密码设置成功
|
||||
# account_controller中register方法判断注册成功的提示信息
|
||||
notice_account_register_done: 帐号创建成功,请使用注册确认邮件中的链接来激活您的帐号, 如果您的邮件没有在收件箱中可能在垃圾箱中,请您注意查收。
|
||||
|
||||
|
||||
|
||||
|
||||
# Trustie账户模块 >忘记密码
|
||||
label_password_forget: 忘记密码
|
||||
# field_mail: 邮件地址
|
||||
# (Trustie账户模块> 注册)变量
|
||||
# button_submit: 提交
|
||||
# (Trustie账户模块> 注册 )变量
|
||||
notice_account_unknown_email: 未知用户
|
||||
# (Trustie账户模块> 注册 )变量
|
||||
notice_account_unknown_email: 未知用户
|
||||
# account_controller中lost_password方法判断的邮件发送提示信息
|
||||
notice_account_lost_email_sent: 系统已将引导您设置新密码的邮件发送给您。
|
||||
|
||||
|
||||
|
||||
|
||||
# Trustie账户模块 >重置密码
|
||||
# label_password_forget: 忘记密码
|
||||
# label_password_forget: 忘记密码
|
||||
# (Trustie账户模块> 忘记密码)变量
|
||||
field_new_password: 新密码
|
||||
# text_caracters_minimum: "至少需要 %{count} 个字符。"
|
||||
|
@ -2200,42 +2224,42 @@ zh:
|
|||
notice_account_password_updated: 密码更新成功
|
||||
notice_can_t_change_password: 该帐号使用了外部认证,因此无法更改密码。
|
||||
button_save: 保存
|
||||
|
||||
|
||||
|
||||
|
||||
# Trustie账户模块 >登出
|
||||
label_logout: 退出
|
||||
|
||||
|
||||
|
||||
|
||||
# Trustie账户模块 >激活
|
||||
label_regiter_account: 注册帐号
|
||||
label_email_valid: 邮箱激活
|
||||
notice_email_register_time: 请在24小时内点击邮件中的链接继续完成注册
|
||||
notice_email_arrival: 邮件已发送到邮箱
|
||||
notice_email_arrival: 邮件已发送到邮箱
|
||||
label_check_email: 立即查收邮件
|
||||
label_mail_resend: 重新发送激活邮件
|
||||
label_mail_resend: 重新发送激活邮件
|
||||
notice_account_activated: 您的帐号已被激活。
|
||||
|
||||
|
||||
|
||||
|
||||
# 托管平台主页
|
||||
|
||||
|
||||
|
||||
|
||||
# 托管平台主页
|
||||
# edit by meng
|
||||
# 托管平台主页> 顶部菜单>
|
||||
# 托管平台主页> 顶部菜单>
|
||||
field_homepage: 主页
|
||||
label_project_deposit: 项目托管
|
||||
label_course_practice: 课程实践
|
||||
label_forum_all: 公共贴吧
|
||||
|
||||
label_forum_all: 公共贴吧
|
||||
|
||||
label_enterprise_all: 组织
|
||||
label_contest_innovate: 创新竞赛
|
||||
label_contest_innovate: 创新竞赛
|
||||
label_software_user: 软件创客
|
||||
label_requirement_enterprise: 软件众包
|
||||
label_stores_index: 资源搜索
|
||||
|
||||
# 托管平台主页> 顶部菜单>
|
||||
|
||||
|
||||
|
||||
|
||||
# 托管平台主页> 顶部菜单>
|
||||
|
||||
|
||||
|
||||
# 托管平台主页 > 搜索提示信息
|
||||
label_search_information: 请输入要搜索的关键字
|
||||
# 托管平台主页 > 下拉列表
|
||||
|
@ -2245,12 +2269,12 @@ zh:
|
|||
label_select_user_nickname: 昵称
|
||||
label_select_user_showname: 姓名
|
||||
label_select_user_email: 邮箱
|
||||
|
||||
|
||||
# 托管平台主页 > 下方托管平台链接
|
||||
label_projects_management_platform: 项目托管平台
|
||||
label_courses_management_platform: 课程实践平台
|
||||
label_contests_management_platform: 竞赛托管平台
|
||||
|
||||
|
||||
# 托管平台主页 > 底部承办单位等信息
|
||||
label_hosted_organization: 主办单位
|
||||
label_hosted_by: 国防科学技术大学并行与分布处理国家重点实验室
|
||||
|
@ -2260,20 +2284,20 @@ zh:
|
|||
label_co_organizer_BHU: 北京航空航天大学计算机学院
|
||||
label_co_organizer_CAS: 中国科学院软件研究所
|
||||
label_co_organizer_InforS: 山东中创软件商用中间件股份有限公司
|
||||
label_rights_reserved: 版权©2007~2014
|
||||
label_rights_reserved: 版权?2007~2014
|
||||
label_contact_us: 联系我们
|
||||
# 英文版不需要显示国内许可证
|
||||
label_license: 湘ICP备09019772
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# 项目托管平台主页
|
||||
|
||||
|
||||
|
||||
# 项目托管平台主页
|
||||
# 项目托管平台主页 >主旨
|
||||
label_project_trustie: Trustie在线项目托管平台
|
||||
label_project_trustie_theme: ", 面向中国大学生与软件从业者,提供社交化的项目管理、代码托管、资源共享、合作交流。"
|
||||
|
||||
|
||||
# 项目托管平台主页 >热门项目栏
|
||||
lable_hot_projects: 热门项目
|
||||
label_project_new: 新建项目
|
||||
|
@ -2282,9 +2306,15 @@ zh:
|
|||
label_project_member_amount: "%{count}人"
|
||||
label_project_score_tips: 项目得分,综合考虑了项目的各项活动,反映了该项目的活跃程度
|
||||
label_project_score: 项目评分
|
||||
|
||||
|
||||
# 项目托管平台主页 >用户动态栏
|
||||
lable_user_active: 用户动态
|
||||
user:
|
||||
active:
|
||||
published: 发布了
|
||||
uploaded: 上传了
|
||||
updated: 修改了
|
||||
unknow: Unknown content
|
||||
field_user_active_published: 发表了
|
||||
field_user_active_uploaded: 上传了
|
||||
field_user_active_updated: 更新了
|
||||
|
@ -2294,11 +2324,11 @@ zh:
|
|||
field_user_active_attachment: 附件
|
||||
field_user_active_message: 主题
|
||||
field_user_active_reply: 回复
|
||||
field_user_active_bid: 作业
|
||||
field_user_active_bid: 作业
|
||||
field_user_active_memo: 主题
|
||||
field_user_active_document: 文件
|
||||
field_user_active_changeset: 版本库
|
||||
field_user_active_issue_note: 问题说明
|
||||
field_user_active_issue_note: 问题说明
|
||||
field_updated_on: 更新于
|
||||
field_time_ago: 前
|
||||
field_active_reply: "回复("
|
||||
|
@ -2307,7 +2337,7 @@ zh:
|
|||
# "#{o.tracker.name} ##{o.id} (#{o.status}): #{o.subject}"
|
||||
# "缺陷 #1869 (已解决):subject"
|
||||
# 而tracker.name和status在数据库中以中文字段形式存储
|
||||
|
||||
|
||||
# 项目托管平台主页 >用户动态栏
|
||||
lable_bar_active: 贴吧动态
|
||||
label_my_question: 我要提问
|
||||
|
@ -2317,7 +2347,7 @@ zh:
|
|||
label_question_sponsor: 楼主
|
||||
label_final_reply: 最后回复
|
||||
|
||||
|
||||
|
||||
# 项目托管平台 >新建项目
|
||||
label_project_new_description: '项目可以是软件开发项目,也可以是协作研究项目。'
|
||||
field_name: 名称
|
||||
|
@ -2325,12 +2355,12 @@ zh:
|
|||
field_identifier: 标识
|
||||
text_length_between: "长度必须在 %{min} 到 %{max} 个字符之间。"
|
||||
text_project_identifier_info: "小写字母(a-z)、数字、破折号(-)和下划线(_)可以使用。<br />一旦保存,标识无法修改。"
|
||||
field_is_public: 公开
|
||||
field_is_public: 公开
|
||||
field_hidden_repo: 隐藏代码库
|
||||
button_create: 提交
|
||||
|
||||
|
||||
# 项目托管平台 >加入项目
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -2341,21 +2371,21 @@ zh:
|
|||
label_course_trustie: Trustie在线课程实践平台
|
||||
label_course_trustie_theme: ", 面向中国高校教师与大学生,提供社交化的课程管理、资源共享、合作实验、协同研究。"
|
||||
# 课程托管平台主页 >
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# 竞赛托管平台
|
||||
# 竞赛托管平台主页 >主旨
|
||||
label_contest_trustie: Trustie在线竞赛实战平台
|
||||
label_contest_trustie_theme: ", 面向中国大学生与编程爱好者,提供社交化的竞赛管理、应用管理、代码托管、合作交流。"
|
||||
# 竞赛托管平台主页 >
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# 邮件系统
|
||||
# 邮件 >激活邮件
|
||||
# edit by meng
|
||||
|
@ -2370,40 +2400,40 @@ zh:
|
|||
mail_issue_from_project: "项目问题跟踪"
|
||||
mail_issue_attachments: "附件:"
|
||||
mail_issue_reply: "我要回复"
|
||||
|
||||
mail_footer: "退订Trustie社区任务提醒?"
|
||||
# 课程资源上传
|
||||
# edit by meng
|
||||
# edit by meng
|
||||
# 课程资源上传>
|
||||
label_file_upload: 资源文件
|
||||
label_file_upload_error_messages: "上传出现错误,请您检查您的网络环境,并刷新页面重新上传。"
|
||||
button_confirm: 确认
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
label_work_quantity: 个作品
|
||||
|
||||
# label_organizers: 主办单位
|
||||
# label_organizers_information: 国防科学技术大学并行与分布处理国家重点实验室
|
||||
# label_organizers_information_institute: 计算机科学与技术系
|
||||
# label_copyright: 版权
|
||||
# label_copyright: 版权
|
||||
# label_contact_us: 联系我们
|
||||
# label_record: 湘ICP备09019772
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
label_check_comment: 查看通知评论
|
||||
label_notification: 通知公告
|
||||
label_course_ad_description: 课程模块正在优化中,使用过程中如有问题请您与我们联系,感谢大家的支持!
|
||||
label_course_adcolick: 请点击:
|
||||
label_coursejoin_tip: 提示:加入课程才有权限查看或提交作业,“加入”按钮见课程图标右侧!
|
||||
#end
|
||||
#end
|
||||
|
||||
#end
|
||||
|
||||
|
||||
# ajax异步验证
|
||||
modal_valid_passing: 可以使用
|
||||
label_bug: 漏洞
|
||||
|
@ -2486,6 +2516,7 @@ zh:
|
|||
label_poll_result: 问卷调查_问卷统计
|
||||
label_answer: 答案:
|
||||
label_poll_answer_valid_result: 以上为有效问答题答案!
|
||||
label_poll_republish_success: 取消成功
|
||||
label_answer_total: 总计:
|
||||
label_join_project: 加入项目
|
||||
label_technical_support: 技术支持:
|
||||
|
@ -2520,9 +2551,9 @@ zh:
|
|||
|
||||
# 项目企业模块
|
||||
|
||||
label_all_enterprises: 所有企业
|
||||
label_all_enterprises: 所有组织
|
||||
label_my_enterprise: 我的企业
|
||||
label_enterprise_tips: 暂时还没有该企业对应的项目,系统的其它项目您可能会感兴趣!
|
||||
label_part_enterprise_tips: 您可能对系统的其它项目会感兴趣!
|
||||
label_enterprise_nil: 该模块为最新上线模块,目前还未有项目关联到企业!
|
||||
label_enterprise_tips: 该组织暂时还没创建公开项目,您可能会对系统的其它项目感兴趣!
|
||||
label_part_enterprise_tips: 您可能对系统的其它项目感兴趣!
|
||||
label_enterprise_nil: 该模块为最新上线模块,目前还没有创建企业项目!
|
||||
label_enterprises: 组织
|
||||
|
|
|
@ -682,6 +682,7 @@ RedmineApp::Application.routes.draw do
|
|||
match 'valid_ajax', :to => 'courses#valid_ajax', :via => :get
|
||||
post 'join_in/join_group', :to => 'courses#join_group', :as => 'join_group'
|
||||
delete 'join_in/join_group', :to => 'courses#unjoin_group'
|
||||
get 'copy_course'
|
||||
end
|
||||
collection do
|
||||
match 'join_private_courses', :via => [:get, :post]
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
lib/dalli.rb b1fd9d39df06608fcae5bcf46e9940f95b186d22
|
||||
lib/dalli/ring.rb e2cd42d8b963e669e2c8a83791fa56ec94f9ec55
|
||||
lib/dalli/server.rb a42d734f9b3d654886c86f04fb4f0352e7147b1e
|
||||
lib/dalli/client.rb 11afa0d702c68a151c87ea6e7ccdc863cf03884f
|
||||
lib/dalli/socket.rb 18b7243332ec2dafa9a17c195944e321b684e67e
|
||||
lib/dalli/options.rb d7ecb4c52b4ae2b222f319813234297e0951f82a
|
||||
lib/dalli/version.rb fff3231b7f52d7fa1dabb78bf1f67dcef95c5378
|
||||
lib/dalli/railtie.rb 63dc0fe85790a10225e867774f2c611d1c1ac46c
|
||||
lib/dalli/compressor.rb 13b0cf3f607bd8bc9f969679b0b6e9dcb0a059d7
|
||||
lib/dalli/cas/client.rb 983ded7ec738ed4502658150123e9c5ad7e3faa1
|
||||
lib/rack/session/dalli.rb 2696ad72e8f9d7f5ceb232db0c8d9a8916192edb
|
||||
lib/active_support/cache/dalli_store.rb 010d880e0f297d92b26c8f44e446add9d4fedfa2
|
||||
lib/action_dispatch/middleware/session/dalli_store.rb 62236273ea28a91502871f31aa600e038358931a
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,12 @@
|
|||
source 'https://rubygems.org'
|
||||
|
||||
gemspec
|
||||
|
||||
gem 'rake'
|
||||
gem 'kgio', :platform => :mri
|
||||
gem 'appraisal'
|
||||
gem 'connection_pool'
|
||||
|
||||
group :test do
|
||||
gem 'simplecov'
|
||||
end
|
|
@ -0,0 +1,412 @@
|
|||
Dalli Changelog
|
||||
=====================
|
||||
|
||||
2.7.2
|
||||
==========
|
||||
|
||||
- The fix for #423 didn't make it into the released 2.7.1 gem somehow.
|
||||
|
||||
2.7.1
|
||||
==========
|
||||
|
||||
- Rack session will check if servers are up on initialization (arthurnn, #423)
|
||||
- Add support for IPv6 addresses in hex form, ie: "[::1]:11211" (dplummer, #428)
|
||||
- Add symbol support for namespace (jingkai #431)
|
||||
- Support expiration intervals longer than 30 days (leonid-shevtsov #436)
|
||||
|
||||
2.7.0
|
||||
==========
|
||||
|
||||
- BREAKING CHANGE:
|
||||
Dalli::Client#add and #replace now return a truthy value, not boolean true or false.
|
||||
- Multithreading support with dalli\_store:
|
||||
Use :pool\_size to create a pool of shared, threadsafe Dalli clients in Rails:
|
||||
```ruby
|
||||
config.cache_store = :dalli_store, "cache-1.example.com", "cache-2.example.com", :compress => true, :pool_size => 5, :expires_in => 300
|
||||
```
|
||||
This will ensure the Rails.cache singleton does not become a source of contention.
|
||||
**PLEASE NOTE** Rails's :mem\_cache\_store does not support pooling as of
|
||||
Rails 4.0. You must use :dalli\_store.
|
||||
|
||||
- Implement `version` for retrieving version of connected servers [dterei, #384]
|
||||
- Implement `fetch_multi` for batched read/write [sorentwo, #380]
|
||||
- Add more support for safe updates with multiple writers: [philipmw, #395]
|
||||
`require 'dalli/cas/client'` augments Dalli::Client with the following methods:
|
||||
* Get value with CAS: `[value, cas] = get_cas(key)`
|
||||
`get_cas(key) {|value, cas| ...}`
|
||||
* Get multiple values with CAS: `get_multi_cas(k1, k2, ...) {|value, metadata| cas = metadata[:cas]}`
|
||||
* Set value with CAS: `new_cas = set_cas(key, value, cas, ttl, options)`
|
||||
* Replace value with CAS: `replace_cas(key, new_value, cas, ttl, options)`
|
||||
* Delete value with CAS: `delete_cas(key, cas)`
|
||||
- Fix bug with get key with "Not found" value [uzzz, #375]
|
||||
|
||||
2.6.4
|
||||
=======
|
||||
|
||||
- Fix ADD command, aka `write(unless_exist: true)` (pitr, #365)
|
||||
- Upgrade test suite from mini\_shoulda to minitest.
|
||||
- Even more performance improvements for get\_multi (xaop, #331)
|
||||
|
||||
2.6.3
|
||||
=======
|
||||
|
||||
- Support specific stats by passing `:items` or `:slabs` to `stats` method [bukhamseen]
|
||||
- Fix 'can't modify frozen String' errors in `ActiveSupport::Cache::DalliStore` [dblock]
|
||||
- Protect against objects with custom equality checking [theron17]
|
||||
- Warn if value for key is too large to store [locriani]
|
||||
|
||||
2.6.2
|
||||
=======
|
||||
|
||||
- Properly handle missing RubyInline
|
||||
|
||||
2.6.1
|
||||
=======
|
||||
|
||||
- Add optional native C binary search for ring, add:
|
||||
|
||||
gem 'RubyInline'
|
||||
|
||||
to your Gemfile to get a 10% speedup when using many servers.
|
||||
You will see no improvement if you are only using one server.
|
||||
|
||||
- More get_multi performance optimization [xaop, #315]
|
||||
- Add lambda support for cache namespaces [joshwlewis, #311]
|
||||
|
||||
2.6.0
|
||||
=======
|
||||
|
||||
- read_multi optimization, now checks local_cache [chendo, #306]
|
||||
- Re-implement get_multi to be non-blocking [tmm1, #295]
|
||||
- Add `dalli` accessor to dalli_store to access the underlying
|
||||
Dalli::Client, for things like `get_multi`.
|
||||
- Add `Dalli::GzipCompressor`, primarily for compatibility with nginx's HttpMemcachedModule using `memcached_gzip_flag`
|
||||
|
||||
2.5.0
|
||||
=======
|
||||
|
||||
- Don't escape non-ASCII keys, memcached binary protocol doesn't care. [#257]
|
||||
- :dalli_store now implements LocalCache [#236]
|
||||
- Removed lots of old session_store test code, tests now all run without a default memcached server [#275]
|
||||
- Changed Dalli ActiveSupport adapter to always attempt instrumentation [brianmario, #284]
|
||||
- Change write operations (add/set/replace) to return false when value is too large to store [brianmario, #283]
|
||||
- Allowing different compressors per client [naseem]
|
||||
|
||||
2.4.0
|
||||
=======
|
||||
- Added the ability to swap out the compressed used to [de]compress cache data [brianmario, #276]
|
||||
- Fix get\_multi performance issues with lots of memcached servers [tmm1]
|
||||
- Throw more specific exceptions [tmm1]
|
||||
- Allowing different types of serialization per client [naseem]
|
||||
|
||||
2.3.0
|
||||
=======
|
||||
- Added the ability to swap out the serializer used to [de]serialize cache data [brianmario, #274]
|
||||
|
||||
2.2.1
|
||||
=======
|
||||
|
||||
- Fix issues with ENV-based connections. [#266]
|
||||
- Fix problem with SessionStore in Rails 4.0 [#265]
|
||||
|
||||
2.2.0
|
||||
=======
|
||||
|
||||
- Add Rack session with\_lock helper, for Rails 4.0 support [#264]
|
||||
- Accept connection string in the form of a URL (e.g., memcached://user:pass@hostname:port) [glenngillen]
|
||||
- Add touch operation [#228, uzzz]
|
||||
|
||||
2.1.0
|
||||
=======
|
||||
|
||||
- Add Railtie to auto-configure Dalli when included in Gemfile [#217, steveklabnik]
|
||||
|
||||
2.0.5
|
||||
=======
|
||||
|
||||
- Create proper keys for arrays of objects passed as keys [twinturbo, #211]
|
||||
- Handle long key with namespace [#212]
|
||||
- Add NODELAY to TCP socket options [#206]
|
||||
|
||||
2.0.4
|
||||
=======
|
||||
|
||||
- Dalli no longer needs to be reset after Unicorn/Passenger fork [#208]
|
||||
- Add option to re-raise errors rescued in the session and cache stores. [pitr, #200]
|
||||
- DalliStore#fetch called the block if the cached value == false [#205]
|
||||
- DalliStore should have accessible options [#195]
|
||||
- Add silence and mute support for DalliStore [#207]
|
||||
- Tracked down and fixed socket corruption due to Timeout [#146]
|
||||
|
||||
2.0.3
|
||||
=======
|
||||
|
||||
- Allow proper retrieval of stored `false` values [laserlemon, #197]
|
||||
- Allow non-ascii and whitespace keys, only the text protocol has those restrictions [#145]
|
||||
- Fix DalliStore#delete error-handling [#196]
|
||||
|
||||
2.0.2
|
||||
=======
|
||||
|
||||
- Fix all dalli\_store operations to handle nil options [#190]
|
||||
- Increment and decrement with :initial => nil now return nil (lawrencepit, #112)
|
||||
|
||||
2.0.1
|
||||
=======
|
||||
|
||||
- Fix nil option handling in dalli\_store#write [#188]
|
||||
|
||||
2.0.0
|
||||
=======
|
||||
|
||||
- Reimplemented the Rails' dalli\_store to remove use of
|
||||
ActiveSupport::Cache::Entry which added 109 bytes overhead to every
|
||||
value stored, was a performance bottleneck and duplicated a lot of
|
||||
functionality already in Dalli. One benchmark went from 4.0 sec to 3.0
|
||||
sec with the new dalli\_store. [#173]
|
||||
- Added reset\_stats operation [#155]
|
||||
- Added support for configuring keepalive on TCP connections to memcached servers (@bianster, #180)
|
||||
|
||||
Notes:
|
||||
|
||||
* data stored with dalli\_store 2.x is NOT backwards compatible with 1.x.
|
||||
Upgraders are advised to namespace their keys and roll out the 2.x
|
||||
upgrade slowly so keys do not clash and caches are warmed.
|
||||
`config.cache_store = :dalli_store, :expires_in => 24.hours.to_i, :namespace => 'myapp2'`
|
||||
* data stored with plain Dalli::Client API is unchanged.
|
||||
* removed support for dalli\_store's race\_condition\_ttl option.
|
||||
* removed support for em-synchrony and unix socket connection options.
|
||||
* removed support for Ruby 1.8.6
|
||||
* removed memcache-client compability layer and upgrade documentation.
|
||||
|
||||
|
||||
1.1.5
|
||||
=======
|
||||
|
||||
- Coerce input to incr/decr to integer via #to\_i [#165]
|
||||
- Convert test suite to minitest/spec (crigor, #166)
|
||||
- Fix encoding issue with keys [#162]
|
||||
- Fix double namespacing with Rails and dalli\_store. [#160]
|
||||
|
||||
1.1.4
|
||||
=======
|
||||
|
||||
- Use 127.0.0.1 instead of localhost as default to avoid IPv6 issues
|
||||
- Extend DalliStore's :expires\_in when :race\_condition\_ttl is also used.
|
||||
- Fix :expires\_in option not propogating from DalliStore to Client, GH-136
|
||||
- Added support for native Rack session store. Until now, Dalli's
|
||||
session store has required Rails. Now you can use Dalli to store
|
||||
sessions for any Rack application.
|
||||
|
||||
require 'rack/session/dalli'
|
||||
use Rack::Session::Dalli, :memcache_server => 'localhost:11211', :compression => true
|
||||
|
||||
1.1.3
|
||||
=======
|
||||
|
||||
- Support Rails's autoloading hack for loading sessions with objects
|
||||
whose classes have not be required yet, GH-129
|
||||
- Support Unix sockets for connectivity. Shows a 2x performance
|
||||
increase but keep in mind they only work on localhost. (dfens)
|
||||
|
||||
1.1.2
|
||||
=======
|
||||
|
||||
- Fix incompatibility with latest Rack session API when destroying
|
||||
sessions, thanks @twinge!
|
||||
|
||||
1.1.1
|
||||
=======
|
||||
|
||||
v1.1.0 was a bad release. Yanked.
|
||||
|
||||
1.1.0
|
||||
=======
|
||||
|
||||
- Remove support for Rails 2.3, add support for Rails 3.1
|
||||
- Fix socket failure retry logic, now you can restart memcached and Dalli won't complain!
|
||||
- Add support for fibered operation via em-synchrony (eliaslevy)
|
||||
- Gracefully handle write timeouts, GH-99
|
||||
- Only issue bug warning for unexpected StandardErrors, GH-102
|
||||
- Add travis-ci build support (ryanlecompte)
|
||||
- Gracefully handle errors in get_multi (michaelfairley)
|
||||
- Misc fixes from crash2burn, fphilipe, igreg, raggi
|
||||
|
||||
1.0.5
|
||||
=======
|
||||
|
||||
- Fix socket failure retry logic, now you can restart memcached and Dalli won't complain!
|
||||
|
||||
1.0.4
|
||||
=======
|
||||
|
||||
- Handle non-ASCII key content in dalli_store
|
||||
- Accept key array for read_multi in dalli_store
|
||||
- Fix multithreaded race condition in creation of mutex
|
||||
|
||||
1.0.3
|
||||
=======
|
||||
|
||||
- Better handling of application marshalling errors
|
||||
- Work around jruby IO#sysread compatibility issue
|
||||
|
||||
|
||||
1.0.2
|
||||
=======
|
||||
|
||||
- Allow browser session cookies (blindsey)
|
||||
- Compatibility fixes (mwynholds)
|
||||
- Add backwards compatibility module for memcache-client, require 'dalli/memcache-client'. It makes
|
||||
Dalli more compatible with memcache-client and prints out a warning any time you do something that
|
||||
is no longer supported so you can fix your code.
|
||||
|
||||
1.0.1
|
||||
=======
|
||||
|
||||
- Explicitly handle application marshalling bugs, GH-56
|
||||
- Add support for username/password as options, to allow multiple bucket access
|
||||
from the same Ruby process, GH-52
|
||||
- Add support for >1MB values with :value_max_bytes option, GH-54 (r-stu31)
|
||||
- Add support for default TTL, :expires_in, in Rails 2.3. (Steven Novotny)
|
||||
config.cache_store = :dalli_store, 'localhost:11211', {:expires_in => 4.hours}
|
||||
|
||||
|
||||
1.0.0
|
||||
=======
|
||||
|
||||
Welcome gucki as a Dalli committer!
|
||||
|
||||
- Fix network and namespace issues in get_multi (gucki)
|
||||
- Better handling of unmarshalling errors (mperham)
|
||||
|
||||
0.11.2
|
||||
=======
|
||||
|
||||
- Major reworking of socket error and failover handling (gucki)
|
||||
- Add basic JRuby support (mperham)
|
||||
|
||||
0.11.1
|
||||
======
|
||||
|
||||
- Minor fixes, doc updates.
|
||||
- Add optional support for kgio sockets, gives a 10-15% performance boost.
|
||||
|
||||
0.11.0
|
||||
======
|
||||
|
||||
Warning: this release changes how Dalli marshals data. I do not guarantee compatibility until 1.0 but I will increment the minor version every time a release breaks compatibility until 1.0.
|
||||
|
||||
IT IS HIGHLY RECOMMENDED YOU FLUSH YOUR CACHE BEFORE UPGRADING.
|
||||
|
||||
- multi() now works reentrantly.
|
||||
- Added new Dalli::Client option for default TTLs, :expires_in, defaults to 0 (aka forever).
|
||||
- Added new Dalli::Client option, :compression, to enable auto-compression of values.
|
||||
- Refactor how Dalli stores data on the server. Values are now tagged
|
||||
as "marshalled" or "compressed" so they can be automatically deserialized
|
||||
without the client having to know how they were stored.
|
||||
|
||||
0.10.1
|
||||
======
|
||||
|
||||
- Prefer server config from environment, fixes Heroku session store issues (thanks JoshMcKin)
|
||||
- Better handling of non-ASCII values (size -> bytesize)
|
||||
- Assert that keys are ASCII only
|
||||
|
||||
0.10.0
|
||||
======
|
||||
|
||||
Warning: this release changed how Rails marshals data with Dalli. Unfortunately previous versions double marshalled values. It is possible that data stored with previous versions of Dalli will not work with this version.
|
||||
|
||||
IT IS HIGHLY RECOMMENDED YOU FLUSH YOUR CACHE BEFORE UPGRADING.
|
||||
|
||||
- Rework how the Rails cache store does value marshalling.
|
||||
- Rework old server version detection to avoid a socket read hang.
|
||||
- Refactor the Rails 2.3 :dalli\_store to be closer to :mem\_cache\_store.
|
||||
- Better documentation for session store config (plukevdh)
|
||||
|
||||
0.9.10
|
||||
----
|
||||
|
||||
- Better server retry logic (next2you)
|
||||
- Rails 3.1 compatibility (gucki)
|
||||
|
||||
|
||||
0.9.9
|
||||
----
|
||||
|
||||
- Add support for *_multi operations for add, set, replace and delete. This implements
|
||||
pipelined network operations; Dalli disables network replies so we're not limited by
|
||||
latency, allowing for much higher throughput.
|
||||
|
||||
dc = Dalli::Client.new
|
||||
dc.multi do
|
||||
dc.set 'a', 1
|
||||
dc.set 'b', 2
|
||||
dc.set 'c', 3
|
||||
dc.delete 'd'
|
||||
end
|
||||
- Minor fix to set the continuum sorted by value (kangster)
|
||||
- Implement session store with Rails 2.3. Update docs.
|
||||
|
||||
0.9.8
|
||||
-----
|
||||
|
||||
- Implement namespace support
|
||||
- Misc fixes
|
||||
|
||||
|
||||
0.9.7
|
||||
-----
|
||||
|
||||
- Small fix for NewRelic integration.
|
||||
- Detect and fail on older memcached servers (pre-1.4).
|
||||
|
||||
0.9.6
|
||||
-----
|
||||
|
||||
- Patches for Rails 3.0.1 integration.
|
||||
|
||||
0.9.5
|
||||
-----
|
||||
|
||||
- Major design change - raw support is back to maximize compatibility with Rails
|
||||
and the increment/decrement operations. You can now pass :raw => true to most methods
|
||||
to bypass (un)marshalling.
|
||||
- Support symbols as keys (ddollar)
|
||||
- Rails 2.3 bug fixes
|
||||
|
||||
|
||||
0.9.4
|
||||
-----
|
||||
|
||||
- Dalli support now in rack-bug (http://github.com/brynary/rack-bug), give it a try!
|
||||
- Namespace support for Rails 2.3 (bpardee)
|
||||
- Bug fixes
|
||||
|
||||
|
||||
0.9.3
|
||||
-----
|
||||
|
||||
- Rails 2.3 support (beanieboi)
|
||||
- Rails SessionStore support
|
||||
- Passenger integration
|
||||
- memcache-client upgrade docs, see Upgrade.md
|
||||
|
||||
|
||||
0.9.2
|
||||
----
|
||||
|
||||
- Verify proper operation in Heroku.
|
||||
|
||||
|
||||
0.9.1
|
||||
----
|
||||
|
||||
- Add fetch and cas operations (mperham)
|
||||
- Add incr and decr operations (mperham)
|
||||
- Initial support for SASL authentication via the MEMCACHE_{USERNAME,PASSWORD} environment variables, needed for Heroku (mperham)
|
||||
|
||||
0.9.0
|
||||
-----
|
||||
|
||||
- Initial gem release.
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue