Merge branch 'develop' into yuanke
This commit is contained in:
commit
5b0ef6ada0
1
1234567
1
1234567
|
@ -1 +0,0 @@
|
|||
{"access_token":"bFlabz0uBcoIBfWL7nBJkgpl26aOWDy-dyCOvH_MjUo_hMOOKG83WV1cCL1MG6H-AE-6eMI0iyLoOoAMv9Y3pFFsLYD-GAGr3UH9fT8OqeHMDlFhXyRTvHv9l2QPHGpcARUcCGANEH","expires_in":7200,"got_token_at":1462934760}
|
2
Gemfile
2
Gemfile
|
@ -1,5 +1,5 @@
|
|||
source 'https://rubygems.org/'
|
||||
### 这里执行bundle config mirror.https://rubygems.org https://gems.ruby-china.org 切换到ruby-china源
|
||||
### <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD><EFBFBD>bundle config mirror.https://rubygems.org https://gems.ruby-china.org <20>л<EFBFBD><D0BB><EFBFBD>ruby-chinaԴ
|
||||
|
||||
unless RUBY_PLATFORM =~ /w32/
|
||||
# unix-like only
|
||||
|
|
|
@ -0,0 +1,386 @@
|
|||
GIT
|
||||
remote: http://github.com/guange2015/wechat.git
|
||||
revision: a18c3d6603cb1aa7bd1fe887b17f67426be01f35
|
||||
specs:
|
||||
wechat (0.7.1)
|
||||
activerecord (>= 3.2, < 5.1.x)
|
||||
http (~> 1.0, >= 1.0.1)
|
||||
nokogiri (>= 1.6.0)
|
||||
thor
|
||||
|
||||
PATH
|
||||
remote: lib/gitlab-cli
|
||||
specs:
|
||||
gitlab (3.2.0)
|
||||
httparty
|
||||
terminal-table
|
||||
|
||||
PATH
|
||||
remote: lib/grack
|
||||
specs:
|
||||
grack (2.0.2)
|
||||
rack (~> 1.4.5)
|
||||
|
||||
PATH
|
||||
remote: lib/rails_kindeditor
|
||||
specs:
|
||||
rails_kindeditor (0.4.5)
|
||||
carrierwave
|
||||
mini_magick
|
||||
|
||||
GEM
|
||||
remote: https://ruby.taobao.org/
|
||||
specs:
|
||||
actionmailer (3.2.22.2)
|
||||
actionpack (= 3.2.22.2)
|
||||
mail (~> 2.5.4)
|
||||
actionpack (3.2.22.2)
|
||||
activemodel (= 3.2.22.2)
|
||||
activesupport (= 3.2.22.2)
|
||||
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.22.2)
|
||||
activesupport (= 3.2.22.2)
|
||||
builder (~> 3.0.0)
|
||||
activerecord (3.2.22.2)
|
||||
activemodel (= 3.2.22.2)
|
||||
activesupport (= 3.2.22.2)
|
||||
arel (~> 3.0.2)
|
||||
tzinfo (~> 0.3.29)
|
||||
activeresource (3.2.22.2)
|
||||
activemodel (= 3.2.22.2)
|
||||
activesupport (= 3.2.22.2)
|
||||
activesupport (3.2.22.2)
|
||||
i18n (~> 0.6, >= 0.6.4)
|
||||
multi_json (~> 1.0)
|
||||
acts-as-taggable-on (2.4.1)
|
||||
rails (>= 3, < 5)
|
||||
addressable (2.4.0)
|
||||
ansi (1.5.0)
|
||||
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)
|
||||
better_errors (1.1.0)
|
||||
coderay (>= 1.0.0)
|
||||
erubis (>= 2.6.6)
|
||||
binding_of_caller (0.7.2)
|
||||
debug_inspector (>= 0.0.1)
|
||||
builder (3.0.0)
|
||||
byebug (8.2.2)
|
||||
carrierwave (0.10.0)
|
||||
activemodel (>= 3.2.0)
|
||||
activesupport (>= 3.2.0)
|
||||
json (>= 1.7)
|
||||
mime-types (>= 1.16)
|
||||
chinese_pinyin (1.0.0)
|
||||
climate_control (0.0.3)
|
||||
activesupport (>= 3.0)
|
||||
cocaine (0.5.8)
|
||||
climate_control (>= 0.0.3, < 1.0)
|
||||
coderay (1.1.1)
|
||||
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.4.1)
|
||||
coffee-script-source
|
||||
execjs
|
||||
coffee-script-source (1.10.0)
|
||||
daemons (1.2.3)
|
||||
debug_inspector (0.0.2)
|
||||
delayed_job (4.1.1)
|
||||
activesupport (>= 3.0, < 5.0)
|
||||
delayed_job_active_record (4.1.0)
|
||||
activerecord (>= 3.0, < 5)
|
||||
delayed_job (>= 3.0, < 5)
|
||||
descendants_tracker (0.0.4)
|
||||
thread_safe (~> 0.3, >= 0.3.1)
|
||||
diff-lcs (1.2.5)
|
||||
domain_name (0.5.20160216)
|
||||
unf (>= 0.0.5, < 1.0.0)
|
||||
elasticsearch (1.0.15)
|
||||
elasticsearch-api (= 1.0.15)
|
||||
elasticsearch-transport (= 1.0.15)
|
||||
elasticsearch-api (1.0.15)
|
||||
multi_json
|
||||
elasticsearch-model (0.1.8)
|
||||
activesupport (> 3)
|
||||
elasticsearch (> 0.4)
|
||||
hashie
|
||||
elasticsearch-rails (0.1.8)
|
||||
elasticsearch-transport (1.0.15)
|
||||
faraday
|
||||
multi_json
|
||||
equalizer (0.0.11)
|
||||
erubis (2.7.0)
|
||||
execjs (2.6.0)
|
||||
factory_girl (4.5.0)
|
||||
activesupport (>= 3.0.0)
|
||||
factory_girl_rails (4.6.0)
|
||||
factory_girl (~> 4.5.0)
|
||||
railties (>= 3.0.0)
|
||||
faraday (0.9.2)
|
||||
multipart-post (>= 1.2, < 3)
|
||||
fastercsv (1.5.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.8)
|
||||
activesupport
|
||||
multi_json (>= 1.3.2)
|
||||
grape-swagger (0.10.4)
|
||||
grape (>= 0.8.0)
|
||||
grape-entity (< 0.5.0)
|
||||
hashie (3.4.3)
|
||||
hike (1.2.3)
|
||||
htmlentities (4.3.4)
|
||||
http (1.0.2)
|
||||
addressable (~> 2.3)
|
||||
http-cookie (~> 1.0)
|
||||
http-form_data (~> 1.0.1)
|
||||
http_parser.rb (~> 0.6.0)
|
||||
http-cookie (1.0.2)
|
||||
domain_name (~> 0.5)
|
||||
http-form_data (1.0.1)
|
||||
http_parser.rb (0.6.0)
|
||||
httparty (0.13.7)
|
||||
json (~> 1.8)
|
||||
multi_xml (>= 0.5.2)
|
||||
i18n (0.6.11)
|
||||
ice_nine (0.11.2)
|
||||
iconv (1.0.4)
|
||||
journey (1.0.4)
|
||||
jquery-rails (2.0.3)
|
||||
railties (>= 3.1.0, < 5.0)
|
||||
thor (~> 0.14)
|
||||
json (1.8.3)
|
||||
kaminari (0.16.3)
|
||||
actionpack (>= 3.0.0)
|
||||
activesupport (>= 3.0.0)
|
||||
libv8 (3.16.14.13)
|
||||
mail (2.5.4)
|
||||
mime-types (~> 1.16)
|
||||
treetop (~> 1.4.8)
|
||||
method_source (0.8.2)
|
||||
mime-types (1.25.1)
|
||||
mini_magick (4.4.0)
|
||||
mini_portile2 (2.0.0)
|
||||
multi_json (1.11.2)
|
||||
multi_xml (0.5.5)
|
||||
multipart-post (2.0.0)
|
||||
mysql2 (0.3.18)
|
||||
net-ldap (0.3.1)
|
||||
netrc (0.11.0)
|
||||
nokogiri (1.6.7.2)
|
||||
mini_portile2 (~> 2.0.0.rc2)
|
||||
paperclip (3.5.4)
|
||||
activemodel (>= 3.0.0)
|
||||
activesupport (>= 3.0.0)
|
||||
cocaine (~> 0.5.3)
|
||||
mime-types
|
||||
polyglot (0.3.5)
|
||||
pry (0.10.3)
|
||||
coderay (~> 1.1.0)
|
||||
method_source (~> 0.8.1)
|
||||
slop (~> 3.4)
|
||||
pry-byebug (3.3.0)
|
||||
byebug (~> 8.0)
|
||||
pry (~> 0.10)
|
||||
pry-rails (0.3.4)
|
||||
pry (>= 0.9.10)
|
||||
pry-stack_explorer (0.4.9.2)
|
||||
binding_of_caller (>= 0.7)
|
||||
pry (>= 0.9.11)
|
||||
rack (1.4.7)
|
||||
rack-accept (0.4.5)
|
||||
rack (>= 0.4)
|
||||
rack-cache (1.6.1)
|
||||
rack (>= 0.4)
|
||||
rack-cors (0.4.0)
|
||||
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.3)
|
||||
rack (>= 1.0)
|
||||
rails (3.2.22.2)
|
||||
actionmailer (= 3.2.22.2)
|
||||
actionpack (= 3.2.22.2)
|
||||
activerecord (= 3.2.22.2)
|
||||
activeresource (= 3.2.22.2)
|
||||
activesupport (= 3.2.22.2)
|
||||
bundler (~> 1.0)
|
||||
railties (= 3.2.22.2)
|
||||
railties (3.2.22.2)
|
||||
actionpack (= 3.2.22.2)
|
||||
activesupport (= 3.2.22.2)
|
||||
rack-ssl (~> 1.3.2)
|
||||
rake (>= 0.8.7)
|
||||
rdoc (~> 3.4)
|
||||
thor (>= 0.14.6, < 2.0)
|
||||
rake (10.5.0)
|
||||
rdoc (3.12.2)
|
||||
json (~> 1.4)
|
||||
redis (3.2.2)
|
||||
redis-actionpack (3.2.4)
|
||||
actionpack (~> 3.2.0)
|
||||
redis-rack (~> 1.4.4)
|
||||
redis-store (~> 1.1.4)
|
||||
redis-activesupport (3.2.5)
|
||||
activesupport (~> 3.2.0)
|
||||
redis-store (~> 1.1.0)
|
||||
redis-rack (1.4.4)
|
||||
rack (~> 1.4.0)
|
||||
redis-store (~> 1.1.4)
|
||||
redis-rails (3.2.4)
|
||||
redis-actionpack (~> 3.2.4)
|
||||
redis-activesupport (~> 3.2.4)
|
||||
redis-store (~> 1.1.4)
|
||||
redis-store (1.1.7)
|
||||
redis (>= 2.2)
|
||||
ref (2.0.0)
|
||||
rest-client (1.8.0)
|
||||
http-cookie (>= 1.0.2, < 2.0)
|
||||
mime-types (>= 1.16, < 3.0)
|
||||
netrc (~> 0.7)
|
||||
rich (1.4.6)
|
||||
jquery-rails
|
||||
kaminari
|
||||
mime-types
|
||||
paperclip
|
||||
rack-raw-upload
|
||||
rails (>= 3.2.0)
|
||||
sass-rails
|
||||
rspec-core (3.4.3)
|
||||
rspec-support (~> 3.4.0)
|
||||
rspec-expectations (3.4.0)
|
||||
diff-lcs (>= 1.2.0, < 2.0)
|
||||
rspec-support (~> 3.4.0)
|
||||
rspec-mocks (3.4.1)
|
||||
diff-lcs (>= 1.2.0, < 2.0)
|
||||
rspec-support (~> 3.4.0)
|
||||
rspec-rails (3.4.2)
|
||||
actionpack (>= 3.0, < 4.3)
|
||||
activesupport (>= 3.0, < 4.3)
|
||||
railties (>= 3.0, < 4.3)
|
||||
rspec-core (~> 3.4.0)
|
||||
rspec-expectations (~> 3.4.0)
|
||||
rspec-mocks (~> 3.4.0)
|
||||
rspec-support (~> 3.4.0)
|
||||
rspec-support (3.4.1)
|
||||
ruby-ole (1.2.12)
|
||||
ruby-openid (2.1.8)
|
||||
rubyzip (1.2.0)
|
||||
sass (3.4.21)
|
||||
sass-rails (3.2.6)
|
||||
railties (~> 3.2.0)
|
||||
sass (>= 3.1.10)
|
||||
tilt (~> 1.3)
|
||||
seems_rateable (1.0.13)
|
||||
jquery-rails
|
||||
rails
|
||||
slop (3.6.0)
|
||||
spreadsheet (1.1.1)
|
||||
ruby-ole (>= 1.0)
|
||||
sprockets (2.2.3)
|
||||
hike (~> 1.2)
|
||||
multi_json (~> 1.0)
|
||||
rack (~> 1.0)
|
||||
tilt (~> 1.1, != 1.3.0)
|
||||
terminal-table (1.5.2)
|
||||
therubyracer (0.12.2)
|
||||
libv8 (~> 3.16.14.0)
|
||||
ref
|
||||
thor (0.19.1)
|
||||
thread_safe (0.3.5)
|
||||
tilt (1.4.1)
|
||||
treetop (1.4.15)
|
||||
polyglot
|
||||
polyglot (>= 0.3.1)
|
||||
tzinfo (0.3.46)
|
||||
uglifier (2.7.2)
|
||||
execjs (>= 0.3.0)
|
||||
json (>= 1.8.0)
|
||||
unf (0.1.4)
|
||||
unf_ext
|
||||
unf_ext (0.0.7.2)
|
||||
virtus (1.0.5)
|
||||
axiom-types (~> 0.1)
|
||||
coercible (~> 1.0)
|
||||
descendants_tracker (~> 0.0, >= 0.0.3)
|
||||
equalizer (~> 0.0, >= 0.0.9)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
acts-as-taggable-on (= 2.4.1)
|
||||
ansi
|
||||
better_errors (~> 1.1.0)
|
||||
binding_of_caller
|
||||
builder (= 3.0.0)
|
||||
chinese_pinyin
|
||||
coderay (~> 1.1.0)
|
||||
coffee-rails (~> 3.2.1)
|
||||
daemons
|
||||
delayed_job_active_record
|
||||
elasticsearch-model
|
||||
elasticsearch-rails
|
||||
factory_girl_rails
|
||||
fastercsv (~> 1.5.0)
|
||||
gitlab!
|
||||
grack!
|
||||
grape (~> 0.9.0)
|
||||
grape-entity
|
||||
grape-swagger
|
||||
htmlentities
|
||||
i18n (~> 0.6.0)
|
||||
iconv
|
||||
jquery-rails (~> 2.0.2)
|
||||
kaminari
|
||||
mysql2 (= 0.3.18)
|
||||
net-ldap (~> 0.3.1)
|
||||
paperclip (~> 3.5.4)
|
||||
pry-byebug
|
||||
pry-rails
|
||||
pry-stack_explorer
|
||||
rack-cors
|
||||
rack-openid
|
||||
rails (~> 3.2)
|
||||
rails_kindeditor!
|
||||
redis-rails
|
||||
rest-client
|
||||
rich (= 1.4.6)
|
||||
rspec-rails (~> 3.0)
|
||||
ruby-ole
|
||||
ruby-openid (~> 2.1.4)
|
||||
rubyzip
|
||||
sass-rails (~> 3.2.3)
|
||||
seems_rateable (~> 1.0.13)
|
||||
spreadsheet
|
||||
therubyracer
|
||||
uglifier (>= 1.0.3)
|
||||
wechat!
|
||||
|
||||
BUNDLED WITH
|
||||
1.10.6
|
|
@ -0,0 +1,112 @@
|
|||
source 'http://rubygems.org/'
|
||||
### ÕâÀïÖ´ÐÐbundle config mirror.https://rubygems.org https://gems.ruby-china.org Çл»µ½ruby-chinaÔ´
|
||||
|
||||
unless RUBY_PLATFORM =~ /w32/
|
||||
# unix-like only
|
||||
gem 'iconv'
|
||||
end
|
||||
|
||||
gem 'certified'
|
||||
|
||||
gem 'wechat',path: 'lib/wechat'
|
||||
gem 'grack', path:'lib/grack'
|
||||
gem 'gitlab', path: 'lib/gitlab-cli'
|
||||
gem 'rest-client'
|
||||
gem "mysql2", "= 0.3.18"
|
||||
gem 'redis-rails'
|
||||
gem 'rubyzip'
|
||||
gem 'delayed_job_active_record'#, :group => :production
|
||||
gem 'daemons'
|
||||
gem 'grape', '~> 0.9.0'
|
||||
gem 'grape-entity'
|
||||
gem 'rack-cors', :require => 'rack/cors'
|
||||
gem 'seems_rateable', '~> 1.0.13'
|
||||
gem 'rails', '~> 3.2'
|
||||
gem "jquery-rails", "~> 2.0.2"
|
||||
gem "i18n", "~> 0.6.0"
|
||||
gem 'coderay', '~> 1.1.0'
|
||||
gem "fastercsv", "~> 1.5.0", :platforms => [:mri_18, :mingw_18, :jruby]
|
||||
gem "builder", "3.0.0"
|
||||
gem 'acts-as-taggable-on', '2.4.1'
|
||||
gem 'spreadsheet'
|
||||
gem 'ruby-ole'
|
||||
gem 'rails_kindeditor',path:'lib/rails_kindeditor'
|
||||
#gem "rmagick", ">= 2.0.0"
|
||||
gem 'binding_of_caller'
|
||||
gem 'chinese_pinyin'
|
||||
# gem 'sunspot_rails', '~> 1.3.3'
|
||||
# gem 'sunspot_solr'
|
||||
# gem 'sunspot'
|
||||
# gem 'progress_bar'
|
||||
gem 'ansi'
|
||||
|
||||
gem 'kaminari'
|
||||
gem 'elasticsearch-model'
|
||||
gem 'elasticsearch-rails'
|
||||
|
||||
|
||||
### profile
|
||||
#gem 'oneapm_rpm'
|
||||
|
||||
group :development do
|
||||
gem 'grape-swagger'
|
||||
gem 'better_errors', '~> 1.1.0'
|
||||
# gem "query_reviewer"
|
||||
# gem 'rack-mini-profiler', '~> 0.9.3'
|
||||
if RUBY_PLATFORM =~ /w32/
|
||||
gem 'win32console'
|
||||
end
|
||||
end
|
||||
|
||||
group :development, :test do
|
||||
unless RUBY_PLATFORM =~ /w32/
|
||||
gem 'pry-rails'
|
||||
if RUBY_VERSION >= '2.0.0'
|
||||
gem 'pry-byebug'
|
||||
end
|
||||
gem 'pry-stack_explorer'
|
||||
if RUBY_PLATFORM =~ /darwin/
|
||||
gem 'puma'
|
||||
end
|
||||
end
|
||||
|
||||
gem 'rspec-rails', '~> 3.0'
|
||||
gem 'factory_girl_rails'
|
||||
end
|
||||
|
||||
# Gems used only for assets and not required
|
||||
# in production environments by default.
|
||||
group :assets do
|
||||
gem 'sass-rails', '~> 3.2.3'
|
||||
gem 'coffee-rails', '~> 3.2.1'
|
||||
|
||||
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
|
||||
gem 'therubyracer', :platforms => :ruby
|
||||
|
||||
gem 'uglifier', '>= 1.0.3'
|
||||
end
|
||||
|
||||
# Optional gem for LDAP authentication
|
||||
group :ldap do
|
||||
gem "net-ldap", "~> 0.3.1"
|
||||
end
|
||||
|
||||
|
||||
# Optional gem for OpenID authentication
|
||||
group :openid do
|
||||
gem "ruby-openid", "~> 2.1.4", :require => "openid"
|
||||
gem "rack-openid"
|
||||
end
|
||||
|
||||
|
||||
database_file = File.join(File.dirname(__FILE__), "config/database.yml")
|
||||
if File.exist?(database_file)
|
||||
else
|
||||
warn("Please configure your config/database.yml first")
|
||||
end
|
||||
|
||||
# Load plugins' Gemfiles
|
||||
Dir.glob File.expand_path("../plugins/*/Gemfile", __FILE__) do |file|
|
||||
puts "Loading #{file} ..." if $DEBUG # `ruby -d` or `bundle -v`
|
||||
instance_eval File.read(file)
|
||||
end
|
|
@ -33,10 +33,10 @@ module Mobile
|
|||
shield_project_ids = ShieldActivity.select("shield_id").where("container_type='User' and container_id=#{user.id} and shield_type='Project'").map(&:shield_id)
|
||||
shield_course_ids = ShieldActivity.select("shield_id").where("container_type='User' and container_id=#{user.id} and shield_type='Course'").map(&:shield_id)
|
||||
page = params[:page] ? params[:page] : 0
|
||||
user_project_ids = (user.projects.map{|project| project.id}-shield_project_ids).empty? ? "(-1)" : "(" + (user.projects.map{|project| project.id}-shield_project_ids).join(",") + ")"
|
||||
user_course_ids = (user.courses.map{|course| course.id}-shield_course_ids).empty? ? "(-1)" : "(" + (user.courses.map{|course| course.id}-shield_course_ids).join(",") + ")"
|
||||
user_project_ids = (user.projects.visible.map{|project| project.id}-shield_project_ids).empty? ? "(-1)" : "(" + (user.projects.map{|project| project.id}-shield_project_ids).join(",") + ")"
|
||||
user_course_ids = (user.courses.visible.where("is_delete = 0").map{|course| course.id}-shield_course_ids).empty? ? "(-1)" : "(" + (user.courses.map{|course| course.id}-shield_course_ids).join(",") + ")"
|
||||
course_types = "('Message','News','HomeworkCommon','Poll','Course')"
|
||||
project_types = "('Message','Issue','ProjectCreateInfo')"
|
||||
project_types = "('Message','Issue','Project')"
|
||||
principal_types = "JournalsForMessage"
|
||||
watched_user_ids = User.watched_by(user.id).count == 0 ? " " : ("," + User.watched_by(user.id).map{|u| u.id.to_s }.join(','))
|
||||
user_ids = "(" + user.id.to_s + watched_user_ids + ")"
|
||||
|
|
|
@ -14,7 +14,7 @@ module Mobile
|
|||
else
|
||||
case f
|
||||
when :user_act
|
||||
if ac.act_type == "ProjectCreateInfo"
|
||||
if ac.act_type == "Project"
|
||||
ac unless ac.nil?
|
||||
else
|
||||
ac.act unless ac.nil? || ac.act.nil?
|
||||
|
@ -84,10 +84,10 @@ module Mobile
|
|||
elsif ac.container_type == "Project"
|
||||
case ac.act_type
|
||||
when "Issue"
|
||||
"项目缺陷"
|
||||
"项目问题"
|
||||
when "Message"
|
||||
"项目讨论区"
|
||||
when "ProjectCreateInfo"
|
||||
when "Project"
|
||||
"项目"
|
||||
end
|
||||
end
|
||||
|
@ -101,7 +101,7 @@ module Mobile
|
|||
expose :container_type #课程/项目/博客/个人
|
||||
expose :author, using: Mobile::Entities::User do |a, opt| #用户信息
|
||||
if a.is_a? ::UserActivity
|
||||
if a.act_type == "ProjectCreateInfo"
|
||||
if a.act_type == "Project"
|
||||
get_user(get_project(a.act_id).user_id)
|
||||
elsif !a.act.nil?
|
||||
if a.act_type == 'Issue' || a.act_type == 'News' || a.act_type == 'Message' || a.act_type == 'BlogComment'
|
||||
|
|
|
@ -162,6 +162,7 @@ class CoursesController < ApplicationController
|
|||
@subPage_title = l :label_student_list
|
||||
@canShowCode = User.current.allowed_to?(:as_teacher,@course) && params[:role] != '1'
|
||||
# @is_remote = true
|
||||
@sort_type = 'score'
|
||||
@score_sort_by = "desc"
|
||||
q = "#{params[:name].strip}"
|
||||
if params[:incourse]
|
||||
|
@ -185,9 +186,11 @@ class CoursesController < ApplicationController
|
|||
group.course_id = @course.id
|
||||
group.save
|
||||
end
|
||||
@sort_type = 'score'
|
||||
@score_sort_by = "desc"
|
||||
@canShowCode = User.current.allowed_to?(:as_teacher,@course) && params[:role] != '1'
|
||||
@is_remote = true
|
||||
@members = student_homework_score(0,0, 10,"desc")
|
||||
@members = student_homework_score(0,0, 10,@score_sort_by)
|
||||
@course_groups = @course.course_groups
|
||||
end
|
||||
|
||||
|
@ -196,7 +199,9 @@ class CoursesController < ApplicationController
|
|||
@subPage_title = l :label_student_list
|
||||
@canShowCode = isCourseTeacher(User.current.id,@course) && params[:role] != '1'
|
||||
@is_remote = true
|
||||
|
||||
@sort_type = 'score'
|
||||
@score_sort_by = "desc"
|
||||
@members = student_homework_score(0,0, 10,@score_sort_by)
|
||||
@course_groups = @course.course_groups
|
||||
end
|
||||
|
||||
|
@ -281,6 +286,7 @@ class CoursesController < ApplicationController
|
|||
@render_file = 'new_member_list'
|
||||
@canShowCode = isCourseTeacher(User.current.id,@course) && params[:role] != '1'
|
||||
@is_remote = true
|
||||
@sort_type = 'score'
|
||||
@score_sort_by = "desc"
|
||||
if params[:group_id] && params[:group_id] != "0"
|
||||
@group = CourseGroup.find(params[:group_id])
|
||||
|
@ -298,6 +304,7 @@ class CoursesController < ApplicationController
|
|||
|
||||
@render_file = 'new_member_list'
|
||||
@score_sort_by = "desc"
|
||||
@sort_type = "score"
|
||||
@canShowCode = User.current.allowed_to?(:as_teacher,@course) && params[:role] != '1'
|
||||
@role = params[:role].nil? ? '2':params[:role]
|
||||
@is_remote = true
|
||||
|
@ -312,7 +319,7 @@ class CoursesController < ApplicationController
|
|||
if @course.open_student == 1 || User.current.member_of_course?(@course)
|
||||
@subPage_title = l :label_student_list
|
||||
page = params[:page].nil? ? 0 : (params['page'].to_i - 1)
|
||||
@all_members = student_homework_score(0,page, 10,"desc")
|
||||
@all_members = student_homework_score(0,page, 10,@score_sort_by)
|
||||
@members = @all_members
|
||||
else
|
||||
render_403
|
||||
|
@ -350,28 +357,29 @@ class CoursesController < ApplicationController
|
|||
@subPage_title = l :label_student_list
|
||||
@render_file = 'new_member_list'
|
||||
@is_remote = true
|
||||
@sort_type = params[:sort_type] if params[:sort_type]
|
||||
@score_sort_by = params[:sort_by] if params[:sort_by]
|
||||
@search_name = params[:search_name] if params[:search_name]
|
||||
group_id = params[:group_id]
|
||||
if !@search_name.nil?
|
||||
if group_id == '0'
|
||||
page = params[:page].nil? ? 0 : (params['page'].to_i - 1)
|
||||
@results = searchmember_by_name(student_homework_score(0,0,0,@score_sort_by), @search_name)
|
||||
@results = searchmember_by_name(student_homework_score(0,0,0,@score_sort_by,@sort_type), @search_name)
|
||||
@result_count = @results.count
|
||||
# @results = paginateHelper @results, 10
|
||||
else
|
||||
@group = CourseGroup.find(group_id)
|
||||
@results = searchmember_by_name(student_homework_score(group_id, 0, 0,@score_sort_by),@search_name)
|
||||
@results = searchmember_by_name(student_homework_score(group_id, 0, 0,@score_sort_by,@sort_type),@search_name)
|
||||
@result_count = @results.count
|
||||
# @results = paginateHelper @results, 10
|
||||
end
|
||||
else
|
||||
if group_id == '0'
|
||||
page = params[:page].nil? ? 0 : (params['page'].to_i - 1)
|
||||
@results = student_homework_score(0,page, 10,@score_sort_by)
|
||||
@results = student_homework_score(0,page, 10,@score_sort_by,@sort_type)
|
||||
else
|
||||
@group = CourseGroup.find(group_id)
|
||||
@results = student_homework_score(group_id, 0, 0,@score_sort_by)
|
||||
@results = student_homework_score(group_id, 0, 0,@score_sort_by,@sort_type)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -384,6 +392,15 @@ class CoursesController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
# 显示每个学生的作业评分详情
|
||||
def show_member_act_score
|
||||
@member = Member.find(params[:member_id]) if params[:member_id]
|
||||
respond_to do |format|
|
||||
format.html {render :layout => 'course_base'}
|
||||
format.js
|
||||
end
|
||||
end
|
||||
|
||||
def handle_course courses, activities
|
||||
course_activity_count_array=activities.values()
|
||||
course_array=[]
|
||||
|
@ -1149,7 +1166,7 @@ class CoursesController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
def student_homework_score(groupid,start_from, nums, score_sort_by)
|
||||
def student_homework_score(groupid,start_from, nums, score_sort_by, sort_type = 'score')
|
||||
start_from = start_from * nums
|
||||
sql_select = ""
|
||||
if groupid == 0
|
||||
|
@ -1159,11 +1176,13 @@ class CoursesController < ApplicationController
|
|||
WHERE student_works.homework_common_id = homework_commons.id
|
||||
AND homework_commons.course_id = #{@course.id}
|
||||
AND student_works.user_id = members.user_id
|
||||
) AS score
|
||||
) AS score,(SELECT (message_num*2 + message_reply_num*1 + news_reply_num*1 + news_num*1 +
|
||||
resource_num*5 + journal_num*1 + homework_journal_num*1 ) FROM `course_contributor_scores` AS ccs WHERE ccs.course_id = 577 AND ccs.user_id = members.user_id
|
||||
) AS act_score
|
||||
FROM members
|
||||
JOIN students_for_courses
|
||||
ON students_for_courses.student_id = members.user_id AND students_for_courses.course_id = members.course_id
|
||||
WHERE members.course_id = #{@course.id} ORDER BY score #{score_sort_by}"
|
||||
WHERE members.course_id = #{@course.id} ORDER BY #{sort_type} #{score_sort_by}"
|
||||
else
|
||||
sql_select = "SELECT members.*,(
|
||||
SELECT SUM(student_works.work_score)
|
||||
|
@ -1171,11 +1190,13 @@ class CoursesController < ApplicationController
|
|||
WHERE student_works.homework_common_id = homework_commons.id
|
||||
AND homework_commons.course_id = #{@course.id}
|
||||
AND student_works.user_id = members.user_id
|
||||
) AS score
|
||||
) AS score,(SELECT (message_num*2 + message_reply_num*1 + news_reply_num*1 + news_num*1 +
|
||||
resource_num*5 + journal_num*1 + homework_journal_num*1 ) FROM `course_contributor_scores` AS ccs WHERE ccs.course_id = 577 AND ccs.user_id = members.user_id
|
||||
) AS act_score
|
||||
FROM members
|
||||
JOIN students_for_courses
|
||||
ON students_for_courses.student_id = members.user_id AND students_for_courses.course_id = members.course_id
|
||||
WHERE members.course_id = #{@course.id} AND members.course_group_id = #{groupid} ORDER BY score #{score_sort_by}"
|
||||
WHERE members.course_id = #{@course.id} AND members.course_group_id = #{groupid} ORDER BY #{sort_type} #{score_sort_by}"
|
||||
end
|
||||
sql = ActiveRecord::Base.connection()
|
||||
homework_scores = Member.find_by_sql(sql_select)
|
||||
|
@ -1225,8 +1246,7 @@ class CoursesController < ApplicationController
|
|||
sheet1[5,i+4] = "第"+(i+1).to_s+"次"
|
||||
end
|
||||
sheet1[5,homeworks.count+4] = "总成绩"
|
||||
sheet1[5,0] = "排名"
|
||||
sheet1[5,0] = "排名"
|
||||
sheet1[5,homeworks.count+5] = "活跃度"
|
||||
count_row = 6
|
||||
members.each_with_index do |member, i|
|
||||
sheet1[count_row,0]= i+1
|
||||
|
@ -1236,14 +1256,15 @@ class CoursesController < ApplicationController
|
|||
homeworks.each_with_index do |homework, j|
|
||||
student_works = homework.student_works.where("user_id = #{member.user.id}")
|
||||
if student_works.empty?
|
||||
sheet1[count_row,j+4] = format("%0.2f",0)
|
||||
sheet1[count_row,j+4] = 0
|
||||
else
|
||||
final_score = student_works.first.final_score.nil? ? 0 : student_works.first.final_score
|
||||
score = final_score - student_works.first.absence_penalty - student_works.first.late_penalty
|
||||
sheet1[count_row,j+4] = format("%0.2f",score <0 ? 0:score)
|
||||
sheet1[count_row,j+4] = score <0 ? 0:score.round(2)
|
||||
end
|
||||
end
|
||||
sheet1[count_row,homeworks.count+4] = format("%0.2f",member.score.nil? ? 0:member.score.to_s)
|
||||
sheet1[count_row,homeworks.count+4] = member.score.nil? ? 0:member.score.round(2)
|
||||
sheet1[count_row,homeworks.count+5] = member.act_score.nil? ? 0:member.act_score
|
||||
count_row += 1
|
||||
end
|
||||
|
||||
|
|
|
@ -20,15 +20,16 @@ class HomeworkCommonController < ApplicationController
|
|||
@page = params[:page] ? params[:page].to_i + 1 : 0
|
||||
@is_teacher = User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,@course))
|
||||
if @is_teacher
|
||||
@homeworks = @course.homework_commons.order("updated_at desc").limit(10).offset(@page * 10)
|
||||
#@homeworks = @course.homework_commons.order("created_at desc").limit(10).offset(@page * 10)
|
||||
@homework_commons = @course.homework_commons.order("created_at desc")
|
||||
else
|
||||
@homeworks = @course.homework_commons.where("publish_time <= '#{Date.today}'").order("updated_at desc").limit(10).offset(@page * 10)
|
||||
#@homeworks = @course.homework_commons.where("publish_time <= '#{Date.today}'").order("created_at desc").limit(10).offset(@page * 10)
|
||||
@homework_commons = @course.homework_commons.where("publish_time <= '#{Date.today}'").order("created_at desc")
|
||||
end
|
||||
@is_student = User.current.logged? && (User.current.admin? || (User.current.member_of_course?(@course) && !@is_teacher))
|
||||
@is_new = params[:is_new]
|
||||
|
||||
@homeworks = paginateHelper @homework_commons,10
|
||||
#设置at已读
|
||||
@homeworks.each do |homework|
|
||||
homework.journals_for_messages.each do |j|
|
||||
|
@ -291,9 +292,9 @@ class HomeworkCommonController < ApplicationController
|
|||
|
||||
def open_student_works
|
||||
if @homework.is_open == 0
|
||||
@homework.update_attribute(:is_open, 1)
|
||||
@homework.update_column('is_open', 1)
|
||||
else
|
||||
@homework.update_attribute(:is_open, 0)
|
||||
@homework.update_column('is_open', 0)
|
||||
end
|
||||
@user_activity_id = params[:user_activity_id]
|
||||
@is_in_course = params[:is_in_course] if params[:is_in_course]
|
||||
|
@ -440,7 +441,7 @@ class HomeworkCommonController < ApplicationController
|
|||
puts time
|
||||
s_time = time
|
||||
if format_time(time) > format_time(h.updated_at)
|
||||
h.update_attribute(:updated_at, s_time)
|
||||
h.update_column('updated_at', s_time)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -127,7 +127,7 @@ class OrganizationsController < ApplicationController
|
|||
case params[:type]
|
||||
when nil
|
||||
@org_activities = OrgActivity.where("(container_id =? and container_type =?) " +
|
||||
"or (container_type ='Project' and org_act_type in ('Issue','Message','ProjectCreateInfo') and container_id in (#{project_ids.join(',')})) "+
|
||||
"or (container_type ='Project' and org_act_type in ('Issue','Message','Project') and container_id in (#{project_ids.join(',')})) "+
|
||||
"or (container_type ='Course' and org_act_type in #{course_types} and container_id in (#{course_ids.join(',')}))",
|
||||
@organization.id, 'Organization').order('updated_at desc').page(params[:page] || 1).per(10)
|
||||
when 'project_issue'
|
||||
|
|
|
@ -27,8 +27,10 @@ class SsosController < ApplicationController
|
|||
## 加入组织
|
||||
@organization = Organization.find(82)
|
||||
unless @organization.org_members.exists?(user_id: sso.user_id)
|
||||
member = OrgMember.new(:user_id => sso.user_id)
|
||||
member = OrgMember.create(:user_id => sso.user_id, :created_at => Time.now)
|
||||
# member = OrgMember.new(:user_id => sso.user_id)
|
||||
@organization.org_members << member
|
||||
OrgMemberRole.create(:org_member_id => member.id, :role_id => 12)
|
||||
end
|
||||
|
||||
## 选择性跳转
|
||||
|
@ -55,10 +57,7 @@ class SsosController < ApplicationController
|
|||
end
|
||||
|
||||
def parse(auth)
|
||||
crypted_str = Base64.decode64(base64_safe(auth))
|
||||
pkey = OpenSSL::PKey::RSA.new(File.new(File.join(Rails.root,"config/private.key")))
|
||||
content = pkey.private_decrypt(crypted_str,OpenSSL::PKey::RSA::PKCS1_PADDING)
|
||||
# content = pkey.private_decrypt(crypted_str)
|
||||
content = decrypt(auth)
|
||||
ActiveSupport::JSON.decode(content)
|
||||
end
|
||||
|
||||
|
@ -68,4 +67,20 @@ class SsosController < ApplicationController
|
|||
sso
|
||||
end
|
||||
|
||||
def decrypt(auth)
|
||||
crypted_str = Base64.decode64(base64_safe(auth))
|
||||
pkey = OpenSSL::PKey::RSA.new(File.new(File.join(Rails.root,"config/private.key")))
|
||||
|
||||
#to large
|
||||
max_dec_len = 1024/8
|
||||
size = (crypted_str.size + max_dec_len-1) / max_dec_len
|
||||
|
||||
content = ''
|
||||
size.times do |time|
|
||||
tmps = crypted_str[time*max_dec_len, max_dec_len]
|
||||
content += pkey.private_decrypt(tmps,OpenSSL::PKey::RSA::PKCS1_PADDING)
|
||||
end
|
||||
content
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -832,7 +832,7 @@ class StudentWorkController < ApplicationController
|
|||
stu_score = StudentWorksScore.find_by_sql("SELECT AVG(score) AS score FROM (SELECT * FROM (SELECT * FROM student_works_scores WHERE student_work_id = #{@work.id} AND reviewer_role = 3 ORDER BY created_at DESC) AS t GROUP BY user_id) AS a")
|
||||
@work.student_score = stu_score.first.score.try(:round, 2).to_f
|
||||
end
|
||||
@homework.update_attributes(:updated_at => Time.now)
|
||||
@homework.update_column('updated_at', Time.now)
|
||||
update_course_activity(@homework.class,@homework.id)
|
||||
update_user_activity(@homework.class,@homework.id)
|
||||
update_org_activity(@homework.class,@homework.id)
|
||||
|
|
|
@ -589,7 +589,7 @@ class UsersController < ApplicationController
|
|||
new_homework.homework_detail_programing.save if new_homework.homework_detail_programing
|
||||
new_homework.homework_detail_group.save if new_homework.homework_detail_group
|
||||
end
|
||||
homework.update_attribute(:quotes, homework.quotes+1)
|
||||
homework.update_column(:quotes, homework.quotes+1)
|
||||
end
|
||||
@homework = homework
|
||||
respond_to do |format|
|
||||
|
@ -862,7 +862,7 @@ class UsersController < ApplicationController
|
|||
|
||||
student_work.save
|
||||
send_message_to_teacher(student_work)
|
||||
homework.update_attributes(:updated_at => Time.now)
|
||||
homework.update_column(:updated_at, Time.now)
|
||||
update_course_activity(homework.class,homework.id)
|
||||
update_user_activity(homework.class,homework.id)
|
||||
update_org_activity(homework.class,homework.id)
|
||||
|
@ -950,7 +950,7 @@ class UsersController < ApplicationController
|
|||
homework_detail_group.save if homework_detail_group
|
||||
if params[:quotes] && !params[:quotes].blank?
|
||||
quotes_homework = HomeworkCommon.find params[:quotes].to_i
|
||||
quotes_homework.update_attribute(:quotes, quotes_homework.quotes+1)
|
||||
quotes_homework.update_column(:quotes, quotes_homework.quotes+1)
|
||||
end
|
||||
if params[:is_in_course] == "1"
|
||||
redirect_to homework_common_index_path(:course => homework.course_id)
|
||||
|
@ -1373,7 +1373,7 @@ class UsersController < ApplicationController
|
|||
user_project_ids = (@user.projects.visible.map{|project| project.id}-shield_project_ids).empty? ? "(-1)" : "(" + (@user.projects.visible.map{|project| project.id}-shield_project_ids).join(",") + ")"
|
||||
user_course_ids = (@user.courses.visible.where("is_delete = 0").map{|course| course.id}-shield_course_ids).empty? ? "(-1)" : "(" + (@user.courses.visible.where("is_delete = 0").map{|course| course.id}-shield_course_ids).join(",") + ")"
|
||||
course_types = "('Message','News','HomeworkCommon','Poll','Course','JournalsForMessage')"
|
||||
project_types = "('Message','Issue','ProjectCreateInfo')"
|
||||
project_types = "('Message','Issue','Project')"
|
||||
principal_types = "JournalsForMessage"
|
||||
if params[:type].present?
|
||||
case params[:type]
|
||||
|
@ -2618,9 +2618,6 @@ class UsersController < ApplicationController
|
|||
|
||||
# 获取我的资源
|
||||
def get_my_resources author_id, user_course_ids, user_project_ids, order, score
|
||||
unless author_id.to_i.to_s == author_id
|
||||
author_id = User.find_by_login(author_id).id
|
||||
end
|
||||
attachments = Attachment.where("(author_id = #{author_id} and is_publish = 1 and container_id is not null and container_type in('OrgSubfield','Principal','Issue','Document','Message','News','StudentWorkScore','HomewCommon')) "+
|
||||
"or (container_type = 'Course' and container_id in (#{user_course_ids.empty? ? '0': user_course_ids.join(',')}) and is_publish = 1 and container_id is not null)" +
|
||||
"or (container_type = 'Project' and container_id in (#{user_project_ids.empty? ? '0': user_project_ids.join(',')}) and is_publish = 1 and container_id is not null)" ).order("#{order.nil? ? 'created_on' : order} #{score}")
|
||||
|
@ -2628,7 +2625,6 @@ class UsersController < ApplicationController
|
|||
|
||||
# 获取我的资源查询结果
|
||||
def get_my_resources_search (author_id, user_course_ids, user_project_ids, order, score, search)
|
||||
author_id = User.find_by_login(author_id).id
|
||||
@attachments = Attachment.where("((author_id = #{author_id} and is_publish = 1 and container_id is not null and container_type in('Project','OrgSubfield','Principal','Course','Issue','Document','Message','News','StudentWorkScore','HomewCommon')) "+
|
||||
"or (container_type = 'Course' and container_id in (#{user_course_ids.empty? ? '0': user_course_ids.join(',')}) and is_publish = 1 and container_id is not null)" +
|
||||
"or (container_type = 'Project' and container_id in (#{user_project_ids.empty? ? '0': user_project_ids.join(',')}) and is_publish = 1 and container_id is not null)) and (filename like :p)" ,:p => search).order("#{order.nil? ? 'created_on' : order} #{score}")
|
||||
|
@ -2636,7 +2632,6 @@ class UsersController < ApplicationController
|
|||
|
||||
# 获取我的课程资源
|
||||
def get_course_resources author_id, user_course_ids, order, score
|
||||
author_id = User.find_by_login(author_id).id
|
||||
attchments = Attachment.where("(author_id = #{author_id} and is_publish = 1 and container_id is not null and container_type = 'Course')"+
|
||||
"or (container_type = 'Course' and container_id in (#{user_course_ids.empty? ? '0': user_course_ids.join(',')})
|
||||
and is_publish = 1 and container_id is not null)" ).order("#{order.nil? ? 'created_on' : order} #{score}")
|
||||
|
@ -2644,7 +2639,6 @@ class UsersController < ApplicationController
|
|||
|
||||
# 获取我的课程资源中搜索结果
|
||||
def get_course_resources_search author_id, user_course_ids, order, score, search
|
||||
author_id = User.find_by_login(author_id).id
|
||||
attchments = Attachment.where("((author_id = #{author_id} and is_publish = 1 and container_id is not null and container_type = 'Course')"+
|
||||
"or (container_type = 'Course' and container_id in (#{user_course_ids.empty? ? '0': user_course_ids.join(',')})
|
||||
and is_publish = 1 and container_id is not null)) and (filename like :p)", :p => search ).order("#{order.nil? ? 'created_on' : order} #{score}")
|
||||
|
@ -2662,7 +2656,6 @@ class UsersController < ApplicationController
|
|||
|
||||
# 获取我的项目资源
|
||||
def get_project_resources author_id, user_project_ids, order, score
|
||||
author_id = User.find_by_login(author_id).id
|
||||
attchments = Attachment.where("(author_id = #{author_id} and is_publish = 1 and container_id is not null and container_type = 'Project') "+
|
||||
"or (container_type = 'Project' and container_id in (#{user_project_ids.empty? ? '0': user_project_ids.join(',')})
|
||||
and is_publish = 1 and container_id is not null)").order("#{order.nil? ? 'created_on' : order} #{score}")
|
||||
|
@ -2670,7 +2663,6 @@ class UsersController < ApplicationController
|
|||
|
||||
# 获取我的项目资源搜索
|
||||
def get_project_resources_search author_id, user_project_ids, order, score, search
|
||||
author_id = User.find_by_login(author_id).id
|
||||
attchments = Attachment.where("((author_id = #{author_id} and is_publish = 1 and container_id is not null and container_type = 'Project') "+
|
||||
"or (container_type = 'Project' and container_id in (#{user_project_ids.empty? ? '0': user_project_ids.join(',')})
|
||||
and is_publish = 1 and container_id is not null)) and (filename like :p)", :p => search ).order("#{order.nil? ? 'created_on' : order} #{score}")
|
||||
|
@ -2688,14 +2680,12 @@ class UsersController < ApplicationController
|
|||
|
||||
# 获取我上传的附件
|
||||
def get_attch_resources author_id, order, score
|
||||
author_id = User.find_by_login(author_id).id
|
||||
attchments = Attachment.where("(author_id = #{author_id} and is_publish = 1 and container_id is not null and container_type in('Project','OrgSubfield','Principal','Course','Issue',
|
||||
'Document','Message','News','StudentWorkScore','HomewCommon'))").order("#{order.nil? ? 'created_on' : order} #{score}")
|
||||
end
|
||||
|
||||
# 获取我上传的附件搜索结果
|
||||
def get_attch_resources_search author_id, order, score, search
|
||||
author_id = User.find_by_login(author_id).id
|
||||
attchments = Attachment.where("(author_id = #{author_id} and is_publish = 1 and container_id is not null and container_type in('Project','OrgSubfield','Principal','Course','Issue',
|
||||
'Document','Message','News','StudentWorkScore','HomewCommon')) and (filename like :p)", :p => search ).order("#{order.nil? ? 'created_on' : order} #{score}")
|
||||
end
|
||||
|
@ -2714,13 +2704,11 @@ class UsersController < ApplicationController
|
|||
|
||||
# 获取我的用户类型资源
|
||||
def get_principal_resources author_id, order, score
|
||||
author_id = User.find_by_login(author_id).id
|
||||
attchments = Attachment.where("author_id = #{author_id} and is_publish = 1 and container_id is not null and container_type = 'Principal'").order("#{order.nil? ? 'created_on' : order} #{score}")
|
||||
end
|
||||
|
||||
# 获取我的用户类型资源搜索
|
||||
def get_principal_resources_search author_id, order, score, search
|
||||
author_id = User.find_by_login(author_id).id
|
||||
attchments = Attachment.where("(author_id = #{author_id} and is_publish = 1 and container_id is not null and container_type = 'Principal') and (filename like :p)", :p => search).order("#{order.nil? ? 'created_on' : order} #{score}")
|
||||
end
|
||||
|
||||
|
|
|
@ -166,7 +166,7 @@ class WechatsController < ActionController::Base
|
|||
raise "非法操作, code不存在" unless params[:code]
|
||||
openid = get_openid_from_code(params[:code])
|
||||
raise "无法获取到openid" unless openid
|
||||
raise "此微信号已绑定用户, 不能得复绑定" if user_binded?(openid)
|
||||
raise "此微信号已绑定用户, 不能重复绑定" if user_binded?(openid)
|
||||
|
||||
user, last_login_on = User.try_to_login(params[:username], params[:password])
|
||||
raise "用户名或密码错误,请重新登录" unless user
|
||||
|
@ -211,7 +211,7 @@ class WechatsController < ActionController::Base
|
|||
user_project_ids = (@user.projects.visible.map{|project| project.id}-shield_project_ids).empty? ? "(-1)" : "(" + (@user.projects.visible.map{|project| project.id}-shield_project_ids).join(",") + ")"
|
||||
user_course_ids = (@user.courses.visible.map{|course| course.id}-shield_course_ids).empty? ? "(-1)" : "(" + (@user.courses.visible.map{|course| course.id}-shield_course_ids).join(",") + ")"
|
||||
course_types = "('Message','News','HomeworkCommon','Poll','Course')"
|
||||
project_types = "('Message','Issue','ProjectCreateInfo')"
|
||||
project_types = "('Message','Issue','Project')"
|
||||
principal_types = "JournalsForMessage"
|
||||
|
||||
blog_ids = "("+@user.blog.id.to_s+","+((User.watched_by(@user.id).count == 0 )? '0' :User.watched_by(@user.id).map{|u| u.blog.id}.join(','))+")"
|
||||
|
|
|
@ -34,13 +34,6 @@ module ApplicationHelper
|
|||
def_delegators :wiki_helper, :wikitoolbar_for, :heads_for_wiki_formatter
|
||||
|
||||
|
||||
def user_path(resource, parameters = {})
|
||||
if Fixnum === resource
|
||||
resource = User.find(resource)
|
||||
end
|
||||
super
|
||||
end
|
||||
|
||||
# def user_blogs_path(resource,parameters={})
|
||||
# super
|
||||
# end
|
||||
|
@ -95,11 +88,13 @@ module ApplicationHelper
|
|||
|
||||
# 获取组织成员中文名字
|
||||
def get_org_member_role_name member
|
||||
case member.roles[0].name
|
||||
when 'orgManager'
|
||||
'管理人员'
|
||||
when 'orgMember'
|
||||
'组织成员'
|
||||
unless member.roles[0].nil?
|
||||
case member.roles[0].name
|
||||
when 'orgManager'
|
||||
'管理人员'
|
||||
when 'orgMember'
|
||||
'组织成员'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -3094,6 +3089,10 @@ def host_with_protocol
|
|||
return Setting.protocol + "://" + Setting.host_name
|
||||
end
|
||||
|
||||
def secdomain_with_protocol secdomain
|
||||
return Setting.protocol + "://" + secdomain + ".trustie.net"
|
||||
end
|
||||
|
||||
|
||||
#获取回复的所有父节点
|
||||
def get_reply_parents parents_rely, comment
|
||||
|
@ -3248,3 +3247,14 @@ def strip_html(text,len=0,endss="...")
|
|||
end
|
||||
return ss
|
||||
end
|
||||
|
||||
def get_hw_index(hw,is_teacher)
|
||||
if is_teacher
|
||||
homeworks = hw.course.homework_commons.order("created_at asc")
|
||||
else
|
||||
homeworks = hw.course.homework_commons.where("publish_time <= '#{Date.today}'").order("created_at asc")
|
||||
end
|
||||
hw_ids = homeworks.map{|hw| hw.id} if !homeworks.empty?
|
||||
index = hw_ids.index(hw.id)
|
||||
return index
|
||||
end
|
||||
|
|
|
@ -5,8 +5,7 @@ class CourseActivity < ActiveRecord::Base
|
|||
belongs_to :course
|
||||
belongs_to :user
|
||||
has_many :user_acts, :class_name => 'UserAcivity',:as =>:act
|
||||
after_save :add_user_activity, :add_org_activity
|
||||
after_create :add_course_lead
|
||||
after_create :add_course_lead,:add_user_activity, :add_org_activity
|
||||
before_destroy :destroy_user_activity, :destroy_org_activity
|
||||
|
||||
#在个人动态里面增加当前动态
|
||||
|
|
|
@ -20,7 +20,7 @@ class ForgeActivity < ActiveRecord::Base
|
|||
validates :forge_act_id,presence: true
|
||||
validates :forge_act_type, presence: true
|
||||
has_many :user_acts, :class_name => 'UserAcivity',:as =>:act
|
||||
after_save :add_user_activity, :add_org_activity
|
||||
after_create :add_user_activity, :add_org_activity
|
||||
before_destroy :destroy_user_activity, :destroy_org_activity
|
||||
|
||||
#在个人动态里面增加当前动态
|
||||
|
|
|
@ -29,7 +29,7 @@ class HomeworkCommon < ActiveRecord::Base
|
|||
:description => :description,
|
||||
:author => :author,
|
||||
:url => Proc.new {|o| {:controller => 'student_work', :action => 'index', :homework => o.id}}
|
||||
after_create :act_as_activity, :send_mail, :act_as_course_message
|
||||
after_create :act_as_activity, :send_mail,:act_as_course_message
|
||||
after_update :update_activity, :wechat_message
|
||||
after_save :act_as_course_activity
|
||||
after_destroy :delete_kindeditor_assets
|
||||
|
@ -59,7 +59,7 @@ class HomeworkCommon < ActiveRecord::Base
|
|||
else
|
||||
self.course.members.each do |m|
|
||||
# if m.user_id != self.user_id
|
||||
self.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => self.course_id, :viewed => false)
|
||||
#self.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => self.course_id, :viewed => false)
|
||||
count = ShieldWechatMessage.where("container_type='User' and container_id=#{m.user_id} and shield_type='Course' and shield_id=#{self.course_id}").count
|
||||
if count == 0
|
||||
ws = WechatService.new
|
||||
|
|
|
@ -164,7 +164,20 @@ class Issue < ActiveRecord::Base
|
|||
count = ShieldWechatMessage.where("container_type='User' and container_id=#{m.user_id} and shield_type='Project' and shield_id=#{self.project_id}").count
|
||||
if m.user_id != self.author_id && count == 0
|
||||
ws = WechatService.new
|
||||
content = strip_html self.project.name + " 有新缺陷了:" + self.subject.html_safe, 200
|
||||
str = " 有新缺陷了: "
|
||||
case self.tracker_id
|
||||
when 1
|
||||
str = " 有新缺陷了: "
|
||||
when 2
|
||||
str = " 有新功能了: "
|
||||
when 3
|
||||
str = " 有新支持了: "
|
||||
when 4
|
||||
str = " 有新任务了: "
|
||||
when 5
|
||||
str = " 有新周报了: "
|
||||
end
|
||||
content = strip_html self.project.name + str + self.subject.html_safe, 200
|
||||
ws.message_update_template m.user_id, "issues", self.id, "#{l(:label_new_issue_template)}", content, format_time(self.created_on)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -260,6 +260,10 @@ class JournalsForMessage < ActiveRecord::Base
|
|||
if self.user_id != self.jour.user_id
|
||||
self.course_messages << CourseMessage.new(:user_id => self.jour.user_id,:course_id => self.jour.course.id, :viewed => false)
|
||||
end
|
||||
else
|
||||
if self.user_id != self.parent.user_id
|
||||
self.course_messages << CourseMessage.new(:user_id => self.parent.user_id,:course_id => self.jour.course.id, :viewed => false)
|
||||
end
|
||||
end
|
||||
count = ShieldWechatMessage.where("container_type='User' and container_id=#{self.jour.user_id} and shield_type='Course' and shield_id=#{self.jour.course_id}").count
|
||||
if count == 0
|
||||
|
|
|
@ -274,7 +274,7 @@ class Message < ActiveRecord::Base
|
|||
else # 回帖
|
||||
parent_author_id = Message.find(self.parent_id).author_id
|
||||
if parent_author_id != self.author_id # 只针对主贴回复,回复自己的帖子不发消息
|
||||
#self.course_messages << CourseMessage.new(:user_id => parent_author_id, :course_id => self.board.course_id, :viewed => false)
|
||||
self.course_messages << CourseMessage.new(:user_id => parent_author_id, :course_id => self.board.course_id, :viewed => false)
|
||||
count = ShieldWechatMessage.where("container_type='User' and container_id=#{parent_author_id} and shield_type='Course' and shield_id=#{self.board.course_id}").count
|
||||
if count == 0
|
||||
content = strip_html self.content.html_safe, 200
|
||||
|
@ -297,7 +297,7 @@ class Message < ActiveRecord::Base
|
|||
else # 回帖
|
||||
parent_author_id = Message.find(self.parent_id).author_id
|
||||
if parent_author_id != self.author_id # 只针对主贴回复,回复自己的帖子不发消息
|
||||
#self.forge_messages << ForgeMessage.new(:user_id => parent_author_id, :project_id => self.board.project_id, :viewed => false)
|
||||
self.forge_messages << ForgeMessage.new(:user_id => parent_author_id, :project_id => self.board.project_id, :viewed => false)
|
||||
count = ShieldWechatMessage.where("container_type='User' and container_id=#{parent_author_id} and shield_type='Project' and shield_id=#{self.board.project_id}").count
|
||||
if count == 0
|
||||
content = strip_html self.content.html_safe, 200
|
||||
|
|
|
@ -62,7 +62,7 @@ class News < ActiveRecord::Base
|
|||
:author_key => :author_id
|
||||
acts_as_watchable
|
||||
|
||||
after_create :act_as_activity,:act_as_forge_activity, :act_as_course_activity, :add_author_as_watcher, :send_mail, :add_news_count, :act_as_student_score
|
||||
after_create :act_as_activity,:act_as_forge_activity, :act_as_course_activity, :add_author_as_watcher, :send_mail, :add_news_count, :act_as_student_score, :act_as_system_message
|
||||
after_update :update_activity
|
||||
after_destroy :delete_kindeditor_assets, :decrease_news_count, :delete_org_activities, :down_course_score
|
||||
|
||||
|
@ -169,7 +169,7 @@ class News < ActiveRecord::Base
|
|||
if self.course
|
||||
self.course.members.each do |m|
|
||||
if m.user_id != self.author_id
|
||||
self.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => self.course_id, :viewed => false)
|
||||
#self.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => self.course_id, :viewed => false)
|
||||
count = ShieldWechatMessage.where("container_type='User' and container_id=#{m.user_id} and shield_type='Course' and shield_id=#{self.course_id}").count
|
||||
if count == 0
|
||||
ws = WechatService.new
|
||||
|
|
|
@ -30,4 +30,8 @@ class Organization < ActiveRecord::Base
|
|||
def allow_set_teachers
|
||||
self.allow_teacher.to_i == 1 ? true : false
|
||||
end
|
||||
|
||||
def secdomain_name
|
||||
Secdomain.where("sub_type=2 and pid=?", self.id).first.try(:subname)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
#coding=utf-8
|
||||
|
||||
require 'base64'
|
||||
|
||||
class Sso < ActiveRecord::Base
|
||||
belongs_to :user
|
||||
attr_accessible :email, :name, :openid, :password, :school, :sex, :user, :user_id
|
||||
|
|
|
@ -1103,9 +1103,6 @@ class User < Principal
|
|||
# super
|
||||
end
|
||||
|
||||
def to_param
|
||||
login
|
||||
end
|
||||
# Salts all existing unsalted passwords
|
||||
# It changes password storage scheme from SHA1(password) to SHA1(salt + SHA1(password))
|
||||
# This method is used in the SaltPasswords migration and is to be kept as is
|
||||
|
|
|
@ -68,16 +68,15 @@
|
|||
params.submit_btn = $("input[nhname='submit_btn']",params.div_form);
|
||||
params.cancel_btn = $("input[nhname='cancel_btn']",params.div_form);
|
||||
params.height = 55;
|
||||
if(params.textarea.data('init') == undefined){
|
||||
params.editor = init_editor(params);
|
||||
init_form(params);
|
||||
params.cancel_btn.click(function(){
|
||||
nh_reset_form(params);
|
||||
});
|
||||
params.submit_btn.one('click', function () {
|
||||
params.form.submit();
|
||||
});
|
||||
}
|
||||
params.editor = init_editor(params);
|
||||
init_form(params);
|
||||
params.cancel_btn.click(function(){
|
||||
nh_reset_form(params);
|
||||
});
|
||||
params.submit_btn.one('click', function () {
|
||||
params.form.submit();
|
||||
});
|
||||
params.textarea.data('init',1);
|
||||
params.cancel_btn.click();
|
||||
toggleAndSettingWordsVal(params.div_form, params.textarea);
|
||||
setTimeout(function(){
|
||||
|
@ -87,7 +86,6 @@
|
|||
params.textarea.hide();
|
||||
}
|
||||
},300);
|
||||
params.textarea.data('init',1);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -24,16 +24,24 @@
|
|||
<ul class="st_box_top">
|
||||
<li class="ml50" style="padding-right: 5px;"><a href="">姓名</a></li>
|
||||
<li class="ml10" style="padding-right: 15px;"><a href="">学号</a></li>
|
||||
<li style="padding-right: 55px; margin-left: 260px;"><a href="">分班</a></li>
|
||||
<li style="margin-left: 25px;">
|
||||
<%= link_to '作业积分', member_score_sort_course_path(:sort_by => (@score_sort_by == "desc" ? "asc" : "desc"), :group_id => (@group ? @group.id : 0),:search_name => (@search_name ? @search_name : nil)) ,:result => members,method: 'get', remote: true%>
|
||||
<% if @score_sort_by == 'desc' %>
|
||||
<li style="padding-right: 55px; margin-left: 160px;"><a href="">分班</a></li>
|
||||
<li class="st_list_score ml10">
|
||||
<%= link_to '作业积分', member_score_sort_course_path(:sort_type => 'score', :sort_by => (@score_sort_by == "desc" ? "asc" : "desc"), :group_id => (@group ? @group.id : 0),:search_name => (@search_name ? @search_name : nil)) ,:result => members,method: 'get', remote: true, :class => 'ml25'%>
|
||||
<% if @sort_type == "score" && @score_sort_by == 'desc' %>
|
||||
<a id="pic" href="javascript:" class= "st_down"></a>
|
||||
<% else %>
|
||||
<% elsif @sort_type == "score" && @score_sort_by == 'asc' %>
|
||||
<a id="pic" href="javascript:" class= "st_up"></a>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="ml50"><a href="javascript:void(0)" >加入时间</a></li>
|
||||
<li class="st_list_score">
|
||||
<%= link_to '活跃度', member_score_sort_course_path(:sort_type => 'act_score', :sort_by => (@score_sort_by == "desc" ? "asc" : "desc"), :group_id => (@group ? @group.id : 0),:search_name => (@search_name ? @search_name : nil)) ,:result => members,method: 'get', remote: true, :class => 'ml35'%>
|
||||
<% if @sort_type == "act_score" && @score_sort_by == 'desc' %>
|
||||
<a id="pic" href="javascript:" class= "st_down"></a>
|
||||
<% elsif @sort_type == "act_score" && @score_sort_by == 'asc' %>
|
||||
<a id="pic" href="javascript:" class= "st_up"></a>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="ml20"><a href="javascript:void(0)" >加入时间</a></li>
|
||||
</ul>
|
||||
<div class="cl"></div><!--st_box_top end-->
|
||||
|
||||
|
@ -61,21 +69,21 @@
|
|||
</ul>
|
||||
<% if User.current.allowed_to?(:as_teacher, @course) || User.current.admin? %>
|
||||
<% if @course.course_groups.nil? || @group %>
|
||||
<div class="select-class-option fl" style="margin-left: 105px;">
|
||||
<div class="select-class-option fl" style="margin-left: 5px;">
|
||||
<span style="width: 100px; text-align: center; float: left;" class="hidden"><%=member.course_group_id == 0 ? "暂无" : member.course_group.name %></span>
|
||||
</div>
|
||||
<% else %>
|
||||
<%= form_tag({:controller => 'courses', :action => 'teacher_assign_group', :id => @course.id,:user_id => member.user_id},:remote=>'true', :method => 'post', :id=>"join_group_form_#{member.id}", :class => 'query_form') do %>
|
||||
<div class="select-class-option fl" style="margin-left: 105px;"><span style="width: 100px; text-align: center; float: left;" class="hidden"><%=member.course_group_id == 0 ? "暂无" : member.course_group.name %></span>
|
||||
<div class="select-class-option fl" style="margin-left: 5px;"><span style="width: 100px; text-align: center; float: left;" class="hidden"><%=member.course_group_id == 0 ? "暂无" : member.course_group.name %></span>
|
||||
<a style="display: inline-block;" href="javascript:void(0)" class="pic_edit2 ml5"></a>
|
||||
</div>
|
||||
<%= select( :name,:group_id, course_group_option(@course),
|
||||
{ :include_blank => false,:selected => member.course_group_id},
|
||||
{:onchange=>"join_group_function('#join_group_form_#{member.id}');", :id =>"course_group_id", :name => "course_group_id",:class=>"w125 undis class-edit fl", :style => "margin-left: 105px;"}) %>
|
||||
{:onchange=>"join_group_function('#join_group_form_#{member.id}');", :id =>"course_group_id", :name => "course_group_id",:class=>"w125 undis class-edit fl", :style => "margin-left: 5px;"}) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<div class="select-class-option fl" style="margin-left: 105px;">
|
||||
<div class="select-class-option fl" style="margin-left: 5px;">
|
||||
<span style="width: 100px; text-align: center; float: left;" class="hidden"><%=member.course_group_id == 0 ? "暂无" : member.course_group.name %></span>
|
||||
</div>
|
||||
<% end %>
|
||||
|
@ -83,7 +91,12 @@
|
|||
:action => 'show_member_score',
|
||||
:member_id => member.id,
|
||||
:remote => true},
|
||||
:class => 'ml25 c_red' %>
|
||||
:class => 'st_list_score c_red' %>
|
||||
<%= link_to member.act_score.nil? ? 0 : member.act_score.to_s, {
|
||||
:action => 'show_member_act_score',
|
||||
:member_id => member.id,
|
||||
:remote => true},
|
||||
:class => 'st_list_score c_red' %>
|
||||
<span class="fr mr15 c_grey"><%= format_date(member.created_on)%></span>
|
||||
<%= call_hook(:view_projects_settings_members_table_row, { :course => @course, :member => member}) %>
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
<style>
|
||||
.tscore_con h2{ display:block; background:#eaeaea; font-size:14px; color:#343333; height:31px; width: auto; text-align: center; padding-top:5px;}
|
||||
.tscore_box li{ height:25px;}
|
||||
</style>
|
||||
|
||||
|
||||
<div class="tscore_con" id="user_score">
|
||||
<% act_score = CourseContributorScore.where("user_id = ? and course_id = ?", member.user_id, member.course_id).first %>
|
||||
<h2><%= member.user.show_name %> 活跃度计算</h2>
|
||||
<% if act_score.nil? %>
|
||||
<div style="padding-left: 40px;padding-bottom: 2px;padding-right: 2px;padding-top: 10px;">
|
||||
资源发布数 x 5 = 0 x 5 = 0</br>
|
||||
问答发布数 x 2 = 0 x 2 = 0</br>
|
||||
通知发布数 x 1 = 0 x 1 = 0</br>
|
||||
问答回帖数 x 1 = 0 x 1 = 0</br>
|
||||
作业留言数 x 1 = 0 x 1 = 0</br>
|
||||
通知留言数 x 1 = 0 x 1 = 0</br>
|
||||
课程留言数 x 1 = 0 x 1 = 0</br>
|
||||
总得分:0
|
||||
</div>
|
||||
<% else %>
|
||||
<% total_score = act_score.resource_num.to_i * 5 + act_score.message_num.to_i * 2 +
|
||||
act_score.message_reply_num.to_i * 1 + act_score.journal_num.to_i * 1 +
|
||||
+ act_score.homework_journal_num.to_i * 1 + act_score.news_reply_num.to_i * 1 +
|
||||
act_score.news_num.to_i * 1 %>
|
||||
<div style="padding-left: 40px;padding-bottom: 2px;padding-right: 2px;padding-top: 10px;">
|
||||
资源发布数 x 5 = <%= act_score.resource_num.to_i %> x 5 = <%= act_score.resource_num.to_i * 5 %></br>
|
||||
问答发布数 x 2 = <%= act_score.message_num.to_i %> x 2 = <%= act_score.message_num.to_i * 2 %></br>
|
||||
通知发布数 x 1 = <%= act_score.news_num.to_i %> x 1 = <%= act_score.news_num.to_i %></br>
|
||||
问答回帖数 x 1 = <%= act_score.message_reply_num.to_i %> x 1 = <%= act_score.message_reply_num.to_i %></br>
|
||||
作业留言数 x 1 = <%= act_score.homework_journal_num.to_i %> x 1 = <%= act_score.homework_journal_num.to_i %></br>
|
||||
通知留言数 x 1 = <%= act_score.news_reply_num.to_i %> x 1 = <%= act_score.news_reply_num.to_i %></br>
|
||||
课程留言数 x 1 = <%= act_score.journal_num.to_i %> x 1 = <%= act_score.journal_num.to_i %></br>
|
||||
总得分:<%=total_score %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
</div>
|
|
@ -28,7 +28,7 @@
|
|||
</span>
|
||||
</li>
|
||||
<% end %>
|
||||
<li><span class="c_blue03 w280">作业积分(总分)</span><span class="c_red w70"><%= format("%0.2f",(@member_score.student_work_score_sum).first.score) %></span></li>
|
||||
<li><span class="c_blue03 w280">作业积分(总分)</span><span class="c_red w70"><%= format("%0.2f",(@member_score.student_work_score_sum).first.score.nil? ? 0 : (@member_score.student_work_score_sum).first.score) %></span></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
$("#st_groups").html("<%= escape_javascript( render :partial => 'new_groups_name', locals: {:course_groups => @course_groups})%>");
|
||||
$("#st_groups").html("<%= escape_javascript( render :partial => 'new_groups_name', locals: {:course_groups => @course_groups})%>");
|
||||
$("#member_content").html("<%= escape_javascript( render :partial => 'new_member_list', :locals => {:members => @members})%>");
|
|
@ -0,0 +1,7 @@
|
|||
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'courses/show_member_act_score', :locals => {:member => @member}) %>');
|
||||
showModal('ajax-modal', '300px');
|
||||
$('#ajax-modal').siblings().remove();
|
||||
$('#ajax-modal').before("<span>" +
|
||||
"<a href='javascript:void(0)' onclick='hidden_homework_score_form();'><img src='/images/bid/close.png' width='26px' height='26px' style='margin-left: 275px;' /></a></span>");
|
||||
$('#ajax-modal').parent().css("top","30%").css("left","40%").css("position","fixed").css("border","3px solid #269ac9");
|
||||
$('#ajax-modal').parent().addClass("new-watcher");
|
|
@ -8,7 +8,7 @@
|
|||
<%= link_to image_tag(url_to_avatar(file.author), :width => 50, :height => 50), user_path(file.author) %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTitle break_word mt-4">
|
||||
<div class="homepagePostTitle break_word">
|
||||
<%# 如果有历史版本则提供历史版本下载 %>
|
||||
<% if file.attachment_histories.count == 0 %>
|
||||
<%= link_to file.is_public? ? truncate(file.filename, length: 45) : truncate(file.filename,length: 35, omission: '...'),
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<%= link_to image_tag(url_to_avatar(file.author), :width => 50, :height => 50), user_path(file.author) %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTitle break_word mt-4">
|
||||
<div class="homepagePostTitle break_word">
|
||||
<%# 如果有历史版本则提供历史版本下载 %>
|
||||
<% if file.attachment_histories.count == 0 %>
|
||||
<%= link_to truncate(file.filename,length: 35, omission: '...'),
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<%= link_to image_tag(url_to_avatar(file.author), :width => 50, :height => 50), user_path(file.author) %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTitle break_word mt-4">
|
||||
<div class="homepagePostTitle break_word">
|
||||
<%# 如果有历史版本则提供历史版本下载 %>
|
||||
<% if file.attachment_histories.count == 0 %>
|
||||
<%= link_to truncate(file.filename,length: 35, omission: '...'),
|
||||
|
|
|
@ -73,6 +73,12 @@
|
|||
<% end%>
|
||||
<%= render :partial => 'users/user_homework_list', :locals => {:homework_commons => @homeworks,:page => 0,:is_in_course => 1,:course_id => @course.id} %>
|
||||
|
||||
<div style="width:210px; text-align:center; margin:0 auto;">
|
||||
<ul class="wlist" style=" border:none; display:inline-block; float:none; margin-top:10px;">
|
||||
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<%= link_to image_tag(url_to_avatar(reply.user), :width => "33", :height => "33"), user_path(reply.user_id), :alt => "用户头像" %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher mt-4">
|
||||
<div class="homepagePostReplyPublisher">
|
||||
<% if reply.try(:user).try(:realname) == ' ' %>
|
||||
<%= link_to reply.try(:user), user_path(reply.user_id), :class => "newsBlue mr10 f14" %>
|
||||
<% else %>
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
|
||||
scrollPic.speed = 10; //移动速度(单位毫秒,越小越快)
|
||||
scrollPic.space = 10; //每次移动像素(单位px,越大越快)
|
||||
scrollPic.autoPlay = true; //自动播放
|
||||
scrollPic.autoPlay = false; //自动播放
|
||||
scrollPic.autoPlayTime = 3; //自动播放间隔时间(秒)
|
||||
|
||||
scrollPic.initialize(); //初始化
|
||||
|
@ -60,13 +60,12 @@
|
|||
<!--内容开始-->
|
||||
<header>
|
||||
<div class="sn-header">
|
||||
<%= render :partial => 'organizations/org_logined_header' %>
|
||||
<div class="sn-row sn-bg-white">
|
||||
<div class="sn-logo">
|
||||
<% if @org_logo_attchment.blank? %>
|
||||
<img src="/images/org_new_style/logo.jpg" width="367" height="63" class="sn-mt13" alt=""/>
|
||||
<% if @org_logo_attchment.blank? || !User.current.logged? %>
|
||||
<img src="/images/org_new_style/logo.jpg" width="367" height="63" class="sn-mt13 sn-fl" alt=""/>
|
||||
<% else %>
|
||||
<img src="/attachments/<%= @org_logo_attchment.id %>/<%= @org_logo_attchment.filename %>" width="367" height="63" class="sn-mt13" alt="">
|
||||
<img src="/attachments/<%= @org_logo_attchment.id %>/<%= @org_logo_attchment.filename %>" width="367" height="63" class="sn-mt13 sn-fl" alt="">
|
||||
<% end %>
|
||||
<% if User.current.admin_of_org?(@organization) %>
|
||||
<a href="#" class="sn-logo-add" title="点击替换LOGO" onclick="org_new_files_upload();"></a>
|
||||
|
@ -74,6 +73,7 @@
|
|||
<!--<a href="javascript:void(0);" class="sn-search-button sn-mt28"></a>-->
|
||||
|
||||
<!--<input type="text" class="sn-search-input sn-mt28" placeholder="搜索" />-->
|
||||
<%= render :partial => 'organizations/org_logined_header' %>
|
||||
</div>
|
||||
</div>
|
||||
<!--导航-->
|
||||
|
|
|
@ -94,7 +94,7 @@
|
|||
<%= link_to image_tag(url_to_avatar(reply.author), :width => 33,:height => 33), user_path(reply.author) %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher mt-4"><a href="<%=user_path(reply.author)%>" class="newsBlue mr10 f14"><%= reply.author.name%></a><%= format_date(reply.created_at) %></div>
|
||||
<div class="homepagePostReplyPublisher"><a href="<%=user_path(reply.author)%>" class="newsBlue mr10 f14"><%= reply.author.name%></a><%= format_date(reply.created_at) %></div>
|
||||
<div class="homepagePostReplyContent" id="activity_description_<%= reply.id %>"><%= reply.content.html_safe%></div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
<%= render :partial => 'organizations/org_project_issue', :locals => {:activity => Issue.find(act.org_act_id),:user_activity_id =>act.id} %>
|
||||
<% when 'Message' %>
|
||||
<%= render :partial => 'organizations/project_message', :locals => {:activity => Message.find(act.org_act_id),:user_activity_id =>act.id} %>
|
||||
<% when 'ProjectCreateInfo'%>
|
||||
<% when 'Project'%>
|
||||
<%= render :partial => 'organizations/project_create', :locals => {:activity => act,:user_activity_id =>act.id} %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.teacher} %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo break_word mt-4">
|
||||
<div class="homepagePostTo break_word">
|
||||
<% if activity.try(:teacher).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:teacher), user_url_in_org(activity.tea_id), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
|
@ -39,4 +39,4 @@
|
|||
$(function(){
|
||||
user_card_show_hide();
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.user} %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo break_word mt-4">
|
||||
<div class="homepagePostTo break_word">
|
||||
<% if activity.try(:user).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:user), user_url_in_org(activity.user_id), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
|
@ -210,9 +210,9 @@
|
|||
|
||||
<div class="mr10 mb10 mt10 fl w100 fontGrey2" style="text-align: center;">
|
||||
<% if project.is_public || User.current.member_of?(project) || User.current.admin? %>
|
||||
<%= link_to image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius"),project_url_in_org(project.id),:id=>"project_img_"+project.id.to_s+"_"+activity.id.to_s,:alt =>"项目头像" %>
|
||||
<%= link_to image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius relatePImage"),project_url_in_org(project.id),:id=>"project_img_"+project.id.to_s+"_"+activity.id.to_s,:alt =>"项目头像" %>
|
||||
<% else %>
|
||||
<%= image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius",:id=>"project_img_"+project.id.to_s+"_"+activity.id.to_s,:alt =>"项目头像") %>
|
||||
<%= image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius relatePImage",:id=>"project_img_"+project.id.to_s+"_"+activity.id.to_s,:alt =>"项目头像") %>
|
||||
<% end %>
|
||||
<% com_time = project.project_score.commit_time %>
|
||||
<% time=project.updated_on %>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo break_word mt-4">
|
||||
<div class="homepagePostTo break_word">
|
||||
<% if activity.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:author), user_url_in_org(activity.author_id), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
|
@ -108,7 +108,7 @@
|
|||
<%= link_to image_tag(url_to_avatar(reply.author), :width => "33", :height => "33"), user_url_in_org(reply.author_id), :alt => "用户头像" %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher mt-4">
|
||||
<div class="homepagePostReplyPublisher">
|
||||
<% if reply.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to reply.try(:author), user_url_in_org(reply.author_id), :class => "newsBlue mr10 f14" %>
|
||||
<% else %>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo break_word mt-4">
|
||||
<div class="homepagePostTo break_word">
|
||||
<% if @ctivity.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:author), user_url_in_org(activity.author_id), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
|
@ -77,7 +77,7 @@
|
|||
<%= link_to image_tag(url_to_avatar(comment.author), :width => "33", :height => "33"), user_url_in_org(comment.author_id), :alt => "用户头像" %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher mt-4">
|
||||
<div class="homepagePostReplyPublisher">
|
||||
<% if comment.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to comment.try(:author), user_url_in_org(comment.author_id), :class => "newsBlue mr10 f14" %>
|
||||
<% else %>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.user} %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo break_word mt-4">
|
||||
<div class="homepagePostTo break_word">
|
||||
<% if activity.try(:user).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:user), user_url_in_org(activity.user_id), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
|
|
|
@ -1,37 +1,31 @@
|
|||
<% if User.current.logged? %>
|
||||
<div class="sn-row sn-bg-grey">
|
||||
<div class="sn-login2">
|
||||
<div class="navHomepageProfile sn-mt4" id="navHomepageProfile">
|
||||
<ul>
|
||||
<li class="homepageProfileMenuIcon fr" id="homepageProfileMenuIcon">
|
||||
<%= link_to "<div class='mt5 mb8 user-img' id='user_avatar'>#{image_tag(url_to_avatar(User.current), :class => "portraitRadius",:alt=>"头像", :id => "nh_user_logo")}</div>".html_safe, user_activities_path(User.current.id) %>
|
||||
<%#= link_to image_tag(url_to_avatar(User.current)), user_url_in_org(User.current.id), :alt => '用户头像', :target => '_blank', :class => "fr user-img" %>
|
||||
<ul class="topnav_login_list none sn-f12" id="topnav_login_list" style="text-align:left;">
|
||||
<li>
|
||||
<%= link_to "修改资料", my_account_path, :class => "menuGrey"%>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to "我的组织", user_organizations_user_path(:id => User.current.id), :class => "menuGrey"%>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to "新建组织", new_organization_path, :class => "menuGrey"%>
|
||||
</li>
|
||||
<!--<li><a href="javascript:void(0);" class="menuGrey">账号设置</a> </li>-->
|
||||
<li>
|
||||
<%= link_to "退出", logout_url_without_domain, :class => "menuGrey", :method => "post"%>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="navHomepageProfile" id="navHomepageProfile">
|
||||
<ul>
|
||||
<li class="homepageProfileMenuIcon fr sn-mt23" id="homepageProfileMenuIcon">
|
||||
<%= link_to "<div class='user-img' id='user_avatar'>#{image_tag(url_to_avatar(User.current), :class => "portraitRadius",:alt=>"头像", :id => "nh_user_logo")}</div>".html_safe, user_activities_path(User.current.id) %>
|
||||
<%#= link_to image_tag(url_to_avatar(User.current)), user_url_in_org(User.current.id), :alt => '用户头像', :target => '_blank', :class => "fr user-img" %>
|
||||
<ul class="topnav_login_list none sn-f12" id="topnav_login_list" style="text-align:left;">
|
||||
<li>
|
||||
<%= link_to "修改资料", my_account_path, :class => "menuGrey"%>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to "我的组织", user_organizations_user_path(:id => User.current.id), :class => "menuGrey"%>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to "新建组织", new_organization_path, :class => "menuGrey"%>
|
||||
</li>
|
||||
<!--<li><a href="javascript:void(0);" class="menuGrey">账号设置</a> </li>-->
|
||||
<li>
|
||||
<%= link_to "退出", logout_url_without_domain, :class => "menuGrey", :method => "post"%>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="sn-row sn-bg-grey">
|
||||
<div class="sn-login">
|
||||
<a href="<%= signin_url_without_domain %>" class="sn-link-blue">登录</a> |
|
||||
<a href="<%= register_url_without_domain %>" class="sn-link-blue">注册</a>
|
||||
</div>
|
||||
<div class="sn-fr">
|
||||
<a href="<%= signin_url_without_domain %>" class="sn-link-blue">登录</a> |
|
||||
<a href="<%= register_url_without_domain %>" class="sn-link-blue">注册</a>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<%= render :partial => 'organizations/org_project_issue', :locals => {:activity => act.forge_act,:user_activity_id =>act.id} %>
|
||||
<% when 'Message' %>
|
||||
<%= render :partial => 'organizations/project_message', :locals => {:activity => act.forge_act,:user_activity_id =>act.id} %>
|
||||
<% when 'ProjectCreateInfo'%>
|
||||
<% when 'Project'%>
|
||||
<%= render :partial => 'organizations/project_create', :locals => {:activity => act,:user_activity_id =>act.id} %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo break_word mt-4">
|
||||
<div class="homepagePostTo break_word">
|
||||
<% if activity.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:author), user_url_in_org(activity.author_id), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
|
@ -88,7 +88,7 @@
|
|||
<%= link_to image_tag(url_to_avatar(reply.user), :width => "33", :height => "33"), user_url_in_org(reply.user_id), :alt => "用户头像" %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher mt-4">
|
||||
<div class="homepagePostReplyPublisher">
|
||||
<% if reply.try(:user).try(:realname) == ' ' %>
|
||||
<%= link_to reply.try(:user), user_url_in_org(reply.user_id), :class => "newsBlue mr10 f14" %>
|
||||
<% else %>
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
<% if is_default_field?(field) %>
|
||||
<% case field.name %>
|
||||
<% when 'course' %>
|
||||
|
@ -26,7 +25,7 @@
|
|||
<div class="sn-news-txt">
|
||||
<div class="sn-news-wrap"><%= activity.description.to_s.html_safe %></div>
|
||||
</div>
|
||||
<div class="sn-read-more"><%=link_to "查看全文>>", activity.name.to_s, student_work_index_url_in_org(activity.id), :target => "_blank", :class => "sn-link-grey2 sn-fr" %></div>
|
||||
<div class="sn-read-more"><%=link_to "查看全文>>", student_work_index_url_in_org(activity.id), :target => "_blank", :class => "sn-link-grey2 sn-fr" %></div>
|
||||
</div>
|
||||
<% elsif act.org_act_type == "Message" %>
|
||||
<% activity = Message.find(act.org_act_id) %>
|
||||
|
@ -44,7 +43,7 @@
|
|||
<div class="sn-news-txt">
|
||||
<div class="sn-news-wrap"><%= activity.content.to_s.html_safe %></div>
|
||||
</div>
|
||||
<div class="sn-read-more"><%=link_to "查看全文>>", activity.parent_id.nil? ? activity.subject.to_s.html_safe : activity.parent.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class => "sn-link-grey2 sn-fr" %></div>
|
||||
<div class="sn-read-more"><%=link_to "查看全文>>", board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class => "sn-link-grey2 sn-fr" %></div>
|
||||
</div>
|
||||
<% elsif act.org_act_type == "News" %>
|
||||
<% activity = News.find(act.org_act_id) %>
|
||||
|
@ -63,7 +62,7 @@
|
|||
<div class="sn-news-wrap"><%= activity.description.to_s.html_safe %></div>
|
||||
</div>
|
||||
|
||||
<div class="sn-read-more"><%=link_to "查看全文>>", activity.title.to_s, news_url_in_org(activity.id), :target => "_blank", :class => "sn-link-grey2 sn-fr" %></div>
|
||||
<div class="sn-read-more"><%=link_to "查看全文>>", news_url_in_org(activity.id), :target => "_blank", :class => "sn-link-grey2 sn-fr" %></div>
|
||||
</div>
|
||||
<% elsif act.org_act_type == "Poll" %>
|
||||
<% activity = Poll.find(act.org_act_id) %>
|
||||
|
@ -88,7 +87,7 @@
|
|||
<div class="sn-news-txt">
|
||||
<div class="sn-news-wrap"><%= activity.polls_description.to_s.html_safe %></div>
|
||||
</div>
|
||||
<div class="sn-read-more"><%=link_to "查看全文>>", poll_name, Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => "_blank", :class => "sn-link-grey2 sn-fr" %></div>
|
||||
<div class="sn-read-more"><%=link_to "查看全文>>", Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => "_blank", :class => "sn-link-grey2 sn-fr" %></div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
@ -119,7 +118,7 @@
|
|||
<div class="sn-news-txt">
|
||||
<div class="sn-news-wrap"><%= activity.description.to_s.html_safe %></div>
|
||||
</div>
|
||||
<div class="sn-read-more"><%=link_to "查看全文>>", activity.subject.to_s, issue_url_in_org(activity.id), :target => "_blank", :class => "sn-link-grey2 sn-fr" %></div>
|
||||
<div class="sn-read-more"><%=link_to "查看全文>>", issue_url_in_org(activity.id), :target => "_blank", :class => "sn-link-grey2 sn-fr" %></div>
|
||||
</div>
|
||||
<% elsif act.org_act_type == "Message" %>
|
||||
<% activity = Message.find(act.org_act_id) %>
|
||||
|
@ -137,7 +136,7 @@
|
|||
<div class="sn-news-txt">
|
||||
<div class="sn-news-wrap"><%= activity.content.to_s.html_safe %></div>
|
||||
</div>
|
||||
<div class="sn-read-more"><%=link_to "查看全文>>", activity.parent_id.nil? ? activity.subject.to_s.html_safe : activity.parent.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class => "sn-link-grey2 sn-fr" %></div>
|
||||
<div class="sn-read-more"><%=link_to "查看全文>>", board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class => "sn-link-grey2 sn-fr" %></div>
|
||||
</div>
|
||||
<% elsif act.org_act_type == "News" %>
|
||||
<% activity = News.find(act.org_act_id) %>
|
||||
|
@ -217,7 +216,7 @@
|
|||
<div class="sn-news-txt">
|
||||
<div class="sn-news-wrap"><%= content.to_s.html_safe %></div>
|
||||
</div>
|
||||
<div class="sn-read-more"><%=link_to "查看全文>>", message.parent_id.nil? ? message.subject.to_s.html_safe : message.parent.subject.to_s.html_safe, board_message_url_in_org(message.board.id,message.id), :target => "_blank", :class => "sn-link-grey2 sn-fr" %></div>
|
||||
<div class="sn-read-more"><%=link_to "查看全文>>", board_message_url_in_org(message.board.id,message.id), :target => "_blank", :class => "sn-link-grey2 sn-fr" %></div>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="sn-news-bigbox fl">
|
||||
|
@ -239,9 +238,9 @@
|
|||
</div>
|
||||
<div class="sn-read-more">
|
||||
<% if message.parent_id.nil? %>
|
||||
<%=link_to "查看全文>>", message.subject.to_s.html_safe, board_message_path(message.board,message), :target => "_blank", :class => "sn-link-grey2 sn-fr" %>
|
||||
<%=link_to "查看全文>>", board_message_path(message.board,message), :target => "_blank", :class => "sn-link-grey2 sn-fr" %>
|
||||
<% else %>
|
||||
<%=link_to "查看全文>>", message.parent.subject.to_s.html_safe, board_message_path(message.board,activity), :target => "_blank", :class => "sn-link-grey2 sn-fr" %>
|
||||
<%=link_to "查看全文>>", board_message_path(message.board,activity), :target => "_blank", :class => "sn-link-grey2 sn-fr" %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -263,7 +262,7 @@
|
|||
<div class="sn-news-txt">
|
||||
<div class="sn-news-wrap"><%= news.description.to_s.html_safe %></div>
|
||||
</div>
|
||||
<div class="sn-read-more"><%=link_to "查看全文>>", news.title.to_s, news_path(news), :target => "_blank", :class => "sn-link-grey2 sn-fr" %></div>
|
||||
<div class="sn-read-more"><%=link_to "查看全文>>", news_path(news), :target => "_blank", :class => "sn-link-grey2 sn-fr" %></div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo break_word mt-4">
|
||||
<div class="homepagePostTo break_word">
|
||||
<% if activity.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:author), user_url_in_org(activity.author_id), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
|
@ -113,7 +113,7 @@
|
|||
<%= link_to image_tag(url_to_avatar(reply.author), :width => "33", :height => "33"), user_url_in_org(reply.author_id), :alt => "用户头像" %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher mt-4">
|
||||
<div class="homepagePostReplyPublisher">
|
||||
<% if reply.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to reply.try(:author), user_url_in_org(reply.author_id), :class => "newsBlue mr10 f14" %>
|
||||
<% else %>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo break_word mt-4">
|
||||
<div class="homepagePostTo break_word">
|
||||
<% if activity.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:author), user_url_in_org(activity.author_id), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
|
@ -97,7 +97,7 @@
|
|||
<%= link_to image_tag(url_to_avatar(comment.author), :width => "33", :height => "33"), user_url_in_org(comment.author_id), :alt => "用户头像" %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher mt-4">
|
||||
<div class="homepagePostReplyPublisher">
|
||||
<% if comment.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to comment.try(:author), user_url_in_org(comment.author_id), :class => "newsBlue mr10 f14" %>
|
||||
<% else %>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<%= render :partial => 'users/show_detail_info', :locals => {:user => user} %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo break_word mt-4">
|
||||
<div class="homepagePostTo break_word">
|
||||
<% if user.try(:realname) == ' ' %>
|
||||
<%= link_to user, user_url_in_org(user.id), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
|
@ -41,4 +41,4 @@
|
|||
$(function(){
|
||||
user_card_show_hide();
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo break_word mt-4">
|
||||
<div class="homepagePostTo break_word">
|
||||
<% if activity.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:author), user_url_in_org(activity.author_id), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
|
@ -87,7 +87,7 @@
|
|||
<%= link_to image_tag(url_to_avatar(reply.author), :width => "33", :height => "33"), user_url_in_org(reply.author_id), :alt => "用户头像" %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher mt-4">
|
||||
<div class="homepagePostReplyPublisher">
|
||||
<% if reply.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to reply.try(:author), user_url_in_org(reply.author_id), :class => "newsBlue mr10 f14" %>
|
||||
<% else %>
|
||||
|
|
|
@ -109,9 +109,14 @@
|
|||
<div class="fr orgMemContainer">
|
||||
<div class="orgMemberAdd">
|
||||
<p class="fontBlue fb mb5">添加成员</p>
|
||||
<%= form_tag url_for(:controller => 'org_member',:action => 'create',:org=>@organization),:id=>'org_member_add_form',:remote=>true do |f|%>
|
||||
<%= form_tag url_for(:controller => 'org_member', :action => 'create', :org => @organization),:id=>'org_member_add_form',:remote=>true do |f|%>
|
||||
<input type="text" id="not_org_member_search" name="orgAddSearch" placeholder="支持姓名、邮箱、登录名搜索" class="orgAddSearch mb20" />
|
||||
<%= javascript_tag "observeSearchfield('not_org_member_search', null, '#{ escape_javascript host_with_protocol + "/org_member/org_member_autocomplete?" + {:org=> @organization.id}.to_query }')" %>
|
||||
<%# if @organization.secdomain_name.nil? %>
|
||||
<%= javascript_tag "observeSearchfield('not_org_member_search', null, '#{ escape_javascript host_with_protocol + "/org_member/org_member_autocomplete?" + {:org=> @organization.id}.to_query }')" %>
|
||||
<%# else %>
|
||||
<%#= javascript_tag "observeSearchfield('not_org_member_search', null, '#{ escape_javascript secdomain_with_protocol(@organization.secdomain_name) + "/org_member/org_member_autocomplete?" + {:org=> @organization.id}.to_query }')" %>
|
||||
<%# end %>
|
||||
|
||||
<div id="principals_for_new_member">
|
||||
<%= find_user_not_in_current_org_by_name(@project) %>
|
||||
</div>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo break_word mt-4">
|
||||
<div class="homepagePostTo break_word">
|
||||
<% if activity.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<%= render :partial => 'users/show_detail_info', :locals => {:user => user} %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo break_word mt-4">
|
||||
<div class="homepagePostTo break_word">
|
||||
<% if user.try(:realname) == ' ' %>
|
||||
<%= link_to user, user_path(user), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
|
@ -41,4 +41,4 @@
|
|||
$(function(){
|
||||
user_card_show_hide();
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
|
|
@ -80,6 +80,9 @@
|
|||
if(params.content.isEmpty()){
|
||||
params.contentmsg.html('内容不能为空');
|
||||
params.contentmsg.css({color:'#ff0000'});
|
||||
params.submit_btn.one('click', function(){
|
||||
params.form.submit();
|
||||
});
|
||||
}else{
|
||||
params.contentmsg.html('填写正确');
|
||||
params.contentmsg.css({color:'#008000'});
|
||||
|
@ -124,7 +127,9 @@
|
|||
issubmit:true,
|
||||
content:params.editor,
|
||||
contentmsg:params.contentmsg,
|
||||
textarea:params.textarea
|
||||
textarea:params.textarea,
|
||||
submit_btn:params.submit_btn,
|
||||
form:params.form
|
||||
});
|
||||
if(is_checked){
|
||||
if(flag){
|
||||
|
@ -161,13 +166,15 @@
|
|||
params.contentmsg = $("p[nhname='contentmsg']",params.div_form);
|
||||
params.toolbar_container = $("div[nhname='toolbar_container']",params.div_form);
|
||||
params.cancel_btn = $("input[nhname='cancel_btn']",params.div_form);
|
||||
if(params.textarea.data('init') == undefined){
|
||||
params.editor = init_editor(params);
|
||||
init_form(params);
|
||||
params.cancel_btn.click(function(){
|
||||
nh_reset_form(params);
|
||||
});
|
||||
}
|
||||
params.submit_btn = $("input[nhname='submit_btn']",params.div_form);
|
||||
params.editor = init_editor(params);
|
||||
init_form(params);
|
||||
params.submit_btn.one('click', function () {
|
||||
params.form.submit();
|
||||
});
|
||||
params.cancel_btn.click(function(){
|
||||
nh_reset_form(params);
|
||||
});
|
||||
params.cancel_btn.click();
|
||||
toggleAndSettingWordsVal(params.div_form, params.textarea);
|
||||
setTimeout(function(){
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo break_word mt-4">
|
||||
<div class="homepagePostTo break_word">
|
||||
<% if activity.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
|
@ -77,7 +77,7 @@
|
|||
<%= link_to image_tag(url_to_avatar(comment.author), :width => "33", :height => "33"), user_path(comment.author_id), :alt => "用户头像" %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher mt-4">
|
||||
<div class="homepagePostReplyPublisher">
|
||||
<% if comment.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to comment.try(:author), user_path(comment.author_id), :class => "newsBlue mr10 f14" %>
|
||||
<% else %>
|
||||
|
@ -125,4 +125,4 @@
|
|||
$(function(){
|
||||
user_card_show_hide();
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><div class="navHomepageLogo fl"><%= link_to image_tag(url_to_avatar(User.find(ma.apply_user_id)), :width => "30", :height => "30"), user_path(User.find(ma.apply_user_id)) %></div></a></li>
|
||||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><div class="navHomepageLogo fl"><%= link_to image_tag(url_to_avatar(User.find(ma.apply_user_id)), :width => "30", :height => "30"), user_path(User.find(ma.apply_user_id)), :target => '_blank' %></div></a></li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%= link_to User.find(ma.apply_user_id).show_name,
|
||||
user_path(User.find(ma.apply_user_id)), :class => "newsBlue homepageNewsPublisher" %>
|
||||
user_path(User.find(ma.apply_user_id)), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">申请引用作业:</span>
|
||||
</li>
|
||||
<li class="<%=(ma.apply_result == 0 || ma.apply_result.nil?) ? 'homepageHomeworkContent2' : 'homepageHomeworkContent' %> fl">
|
||||
<% content = ma.content.nil? ? '' : ':'+ ma.content.to_s %>
|
||||
<%= link_to User.find(ma.apply_user_id).show_name+"申请引用作业\""+"#{HomeworkCommon.find(ma.course_message_id).name}"+"\"#{content}", student_work_index_path(:homework => ma.course_message.id), :title => User.find(ma.apply_user_id).show_name+"申请引用作业\""+"#{HomeworkCommon.find(ma.course_message_id).name}"+"\"#{content}",:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey "}" %>
|
||||
<%= link_to User.find(ma.apply_user_id).show_name+"申请引用作业\""+"#{HomeworkCommon.find(ma.course_message_id).name}"+"\"#{content}", student_work_index_path(:homework => ma.course_message.id), :title => User.find(ma.apply_user_id).show_name+"申请引用作业\""+"#{HomeworkCommon.find(ma.course_message_id).name}"+"\"#{content}",:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey "}", :target => '_blank' %>
|
||||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
</li>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<div class="orig_cont clearfix">
|
||||
<% unless comment.parent.nil? %>
|
||||
<div id="comment_reply_<%=comment.id %>">
|
||||
<div>
|
||||
<%=render :partial => 'users/comment_reply', :locals => {:comment => comment.parent} %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo break_word mt-4">
|
||||
<div class="homepagePostTo break_word">
|
||||
<% if activity.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
|
@ -43,4 +43,4 @@
|
|||
$(function(){
|
||||
user_card_show_hide();
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.teacher} %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo break_word mt-4">
|
||||
<div class="homepagePostTo break_word">
|
||||
<% if activity.try(:teacher).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:teacher), user_path(activity.tea_id), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
|
@ -39,4 +39,4 @@
|
|||
$(function(){
|
||||
user_card_show_hide();
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.user} %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo break_word mt-4">
|
||||
<div class="homepagePostTo break_word">
|
||||
<% if activity.try(:user).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:user), user_path(activity.user_id,:host=>Setting.host_user), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
|
@ -216,9 +216,9 @@
|
|||
|
||||
<div class="mr10 mb10 mt10 fl w100 fontGrey2" style="text-align: center;">
|
||||
<% if project.is_public || User.current.member_of?(project) || User.current.admin? %>
|
||||
<%= link_to image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius"),project_path(project.id,:host=>Setting.host_name),:id=>"project_img_"+project.id.to_s+"_"+activity.id.to_s,:alt =>"项目头像" %>
|
||||
<%= link_to image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius relatePImage"),project_path(project.id,:host=>Setting.host_name),:id=>"project_img_"+project.id.to_s+"_"+activity.id.to_s,:alt =>"项目头像" %>
|
||||
<% else %>
|
||||
<%= image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius",:id=>"project_img_"+project.id.to_s+"_"+activity.id.to_s,:alt =>"项目头像") %>
|
||||
<%= image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius relatePImage",:id=>"project_img_"+project.id.to_s+"_"+activity.id.to_s,:alt =>"项目头像") %>
|
||||
<% end %>
|
||||
<% com_time = project.project_score.commit_time %>
|
||||
<% time=project.updated_on %>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.user} %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo break_word mt-4">
|
||||
<div class="homepagePostTo break_word">
|
||||
<% if activity.try(:user).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:user), user_path(activity.user_id), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo break_word mt-4">
|
||||
<div class="homepagePostTo break_word">
|
||||
<% if activity.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:author), user_path(activity.author_id, :host=>Setting.host_user), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
|
@ -125,7 +125,7 @@
|
|||
<%= link_to image_tag(url_to_avatar(reply.author), :width => "33", :height => "33"), user_path(reply.author_id,:host=>Setting.host_user), :alt => "用户头像" %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher mt-4">
|
||||
<div class="homepagePostReplyPublisher">
|
||||
<% if reply.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to reply.try(:author), user_path(reply.author_id,:host=>Setting.host_user), :class => "newsBlue mr10 f14" %>
|
||||
<% else %>
|
||||
|
@ -179,4 +179,4 @@
|
|||
$(function(){
|
||||
user_card_show_hide();
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo break_word mt-4">
|
||||
<div class="homepagePostTo break_word">
|
||||
<% if @ctivity.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
|
@ -102,7 +102,7 @@
|
|||
<%= link_to image_tag(url_to_avatar(comment.author), :width => "33", :height => "33"), user_path(comment.author_id), :alt => "用户头像" %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher mt-4">
|
||||
<div class="homepagePostReplyPublisher">
|
||||
<% if comment.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to comment.try(:author), user_path(comment.author_id), :class => "newsBlue mr10 f14" %>
|
||||
<% else %>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.user} %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo break_word mt-4">
|
||||
<div class="homepagePostTo break_word">
|
||||
<% if activity.try(:user).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:user), user_path(activity.user_id), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<li class="<%=(ma.status == 0 || ma.status.nil?) ? 'homepageHomeworkContent2' : 'homepageHomeworkContent' %> fl">
|
||||
<a href="javascript:void(0);" class="newsGrey">
|
||||
<%= link_to User.find(ma.course_message_id).name+"申请成为课程\""+"#{Course.find(ma.course_id).name}"+"\"的"+"#{ma.content == '9' ? "教师" : "教辅"}", user_path(User.find(ma.course_message_id), :course_id => ma.course_id),
|
||||
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}" %>
|
||||
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
</a>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo break_word mt-4">
|
||||
<div class="homepagePostTo break_word">
|
||||
<% if activity.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
|
@ -43,4 +43,4 @@
|
|||
$(function(){
|
||||
user_card_show_hide();
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<%= render :partial => 'users/show_detail_info', :locals => {:user => user} %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo break_word mt-4">
|
||||
<div class="homepagePostTo break_word">
|
||||
<% if user.try(:realname) == ' ' %>
|
||||
<%= link_to user, user_path(user), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
|
@ -41,4 +41,4 @@
|
|||
$(function(){
|
||||
user_card_show_hide();
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<div class="homepagePostPortrait">
|
||||
<a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="50" height="50" alt="用户头像"/></a></div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo mt-4"><a href="javascript:void(0);" class="newsBlue mr15">尹教授</a> TO
|
||||
<div class="homepagePostTo"><a href="javascript:void(0);" class="newsBlue mr15">尹教授</a> TO
|
||||
<a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a></div>
|
||||
<div class="homepagePostTitle">
|
||||
<a href="javascript:void(0);" class="postGrey">ckeditor值设置的默认在光标聚焦控件后应自动消失的处理(文档名称)</a></div>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo break_word mt-4">
|
||||
<div class="homepagePostTo break_word">
|
||||
<% if activity.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
|
@ -100,4 +100,4 @@
|
|||
$(function(){
|
||||
user_card_show_hide();
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
<%= link_to image_tag(url_to_avatar(reply.user), :width => "33", :height => "33"), user_path(reply.user_id), :alt => "用户头像" %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher mt-4">
|
||||
<div class="homepagePostReplyPublisher">
|
||||
<% if reply.try(:user).try(:realname) == ' ' %>
|
||||
<%= link_to reply.try(:user), user_path(reply.user_id), :class => "newsBlue mr10 f14" %>
|
||||
<% else %>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<div class="homepagePostPortrait">
|
||||
<a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="50" height="50" alt="用户头像"/></a></div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo mt-4"><a href="javascript:void(0);" class="newsBlue mr15">尹教授</a> TO
|
||||
<div class="homepagePostTo"><a href="javascript:void(0);" class="newsBlue mr15">尹教授</a> TO
|
||||
<a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a></div>
|
||||
<div class="homepagePostTitle">
|
||||
<a href="javascript:void(0);" class="postGrey">ckeditor值设置的默认在光标聚焦控件后应自动消失的处理(项目日志)</a></div>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo break_word mt-4">
|
||||
<div class="homepagePostTo break_word">
|
||||
<% if activity.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
|
@ -120,7 +120,7 @@
|
|||
<%= link_to image_tag(url_to_avatar(reply.author), :width => "33", :height => "33"), user_path(reply.author_id), :alt => "用户头像" %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher mt-4">
|
||||
<div class="homepagePostReplyPublisher">
|
||||
<% if reply.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to reply.try(:author), user_path(reply.author_id), :class => "newsBlue mr10 f14" %>
|
||||
<% else %>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo break_word mt-4">
|
||||
<div class="homepagePostTo break_word">
|
||||
<% if @ctivity.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
|
@ -99,7 +99,7 @@
|
|||
<%= link_to image_tag(url_to_avatar(comment.author), :width => "33", :height => "33"), user_path(comment.author_id), :alt => "用户头像" %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher mt-4">
|
||||
<div class="homepagePostReplyPublisher">
|
||||
<% if comment.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to comment.try(:author), user_path(comment.author_id), :class => "newsBlue mr10 f14" %>
|
||||
<% else %>
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
sd_create_editor_from_data(<%= user_activity.id %>, null, "100%", "<%= user_activity.class.to_s %>");
|
||||
});
|
||||
</script>
|
||||
<% if user_activity.act_type == "ProjectCreateInfo" %>
|
||||
<% if user_activity.act_type == "Project" %>
|
||||
<%= render :partial => 'project_create', :locals => {:activity => user_activity,:user_activity_id =>user_activity.id} %>
|
||||
<% else %>
|
||||
<% act= user_activity.act %>
|
||||
|
@ -94,7 +94,7 @@
|
|||
<%# end %>
|
||||
<% when 'Message' %>
|
||||
<%= render :partial => 'project_message', :locals => {:activity => act,:user_activity_id =>user_activity.id,:is_course=>0,:is_board=>0} %>
|
||||
<% when 'ProjectCreateInfo'%>
|
||||
<% when 'Project'%>
|
||||
<%# cache (act) do %>
|
||||
<%= render :partial => 'project_create', :locals => {:activity => act,:user_activity_id =>user_activity.id} %>
|
||||
<%# end %>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo break_word mt-4">
|
||||
<div class="homepagePostTo break_word">
|
||||
<% if @ctivity.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
|
@ -16,13 +16,13 @@
|
|||
<div class="homepagePostTitle break_word"> <!--+"(通知标题)"-->
|
||||
<div class="fl">
|
||||
<%= link_to activity.title.to_s, user_blog_blog_comment_path(:user_id=>activity.author_id,:blog_id=>activity.blog_id,:id=>activity.id,:in_act => true), :class => "postGrey" %>
|
||||
<% if activity.locked%>
|
||||
<span class="locked_btn_cir ml10" title="已锁定"> </span>
|
||||
<% end%>
|
||||
<% if activity.sticky == 1%>
|
||||
<span class="sticky_btn_cir ml10">置顶</span>
|
||||
<% end%>
|
||||
</div>
|
||||
<% if activity.sticky == 1%>
|
||||
<span class="sticky_btn_cir ml10">置顶</span>
|
||||
<% end%>
|
||||
<% if activity.locked%>
|
||||
<span class="locked_btn_cir ml10 fl" title="已锁定"> </span>
|
||||
<% end%>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
||||
|
@ -83,7 +83,7 @@
|
|||
<%= link_to image_tag(url_to_avatar(comment.author), :width => "33", :height => "33"), user_path(comment.author_id), :alt => "用户头像" %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher mt-4">
|
||||
<div class="homepagePostReplyPublisher">
|
||||
<% if comment.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to comment.try(:author), user_path(comment.author_id), :class => "newsBlue mr10 f14" %>
|
||||
<% else %>
|
||||
|
|
|
@ -5,13 +5,18 @@
|
|||
<%=link_to image_tag(url_to_avatar(homework_common.user),width:"50px", height: "50px"), user_activities_path(homework_common.user.id)%>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo mt-4">
|
||||
<div class="homepagePostTo">
|
||||
<%= link_to homework_common.user.show_name, user_activities_path(homework_common.user_id), :class => "newsBlue mr15"%>
|
||||
TO
|
||||
<%= link_to homework_common.course.name, course_path(homework_common.course_id), :class => "newsBlue ml15"%>
|
||||
</div>
|
||||
<span class="homepagePostTitle hidden fl m_w505">
|
||||
<%= link_to homework_common.name,student_work_index_path(:homework => homework_common.id),:class => "postGrey"%>
|
||||
<% if is_in_course == 1%>
|
||||
<% index = get_hw_index(homework_common, is_teacher) %>
|
||||
<%= link_to "<span class='fontBlue2'>作业#{index+1}:</span>".html_safe+homework_common.name,student_work_index_path(:homework => homework_common.id),:class => "postGrey"%>
|
||||
<% else %>
|
||||
<%= link_to homework_common.name,student_work_index_path(:homework => homework_common.id),:class => "postGrey"%>
|
||||
<% end %>
|
||||
</span>
|
||||
|
||||
<% if homework_common.homework_detail_manual%>
|
||||
|
@ -219,9 +224,9 @@
|
|||
|
||||
<div class="mr10 mb10 mt10 fl w100 fontGrey2" style="text-align: center;">
|
||||
<% if project.is_public || User.current.member_of?(project) || User.current.admin? %>
|
||||
<%= link_to image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius"),project_path(project.id,:host=>Setting.host_name),:id=>"project_img_"+project.id.to_s+"_"+homework_common.id.to_s,:alt =>"项目头像" %>
|
||||
<%= link_to image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius relatePImage"),project_path(project.id,:host=>Setting.host_name),:id=>"project_img_"+project.id.to_s+"_"+homework_common.id.to_s,:alt =>"项目头像" %>
|
||||
<% else %>
|
||||
<%= image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius",:id=>"project_img_"+project.id.to_s+"_"+homework_common.id.to_s,:alt =>"项目头像") %>
|
||||
<%= image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius relatePImage",:id=>"project_img_"+project.id.to_s+"_"+homework_common.id.to_s,:alt =>"项目头像") %>
|
||||
<% end %>
|
||||
<% com_time = project.project_score.commit_time %>
|
||||
<% time=project.updated_on %>
|
||||
|
@ -352,12 +357,16 @@
|
|||
<% else %>
|
||||
<div class="orig_cont clearfix">
|
||||
<div class="orig_cont clearfix">
|
||||
<div id="comment_reply_<%=parents_rely[length - 1].id %>">
|
||||
<div>
|
||||
<%=render :partial => 'users/comment_reply', :locals => {:comment => parents_rely[length - 1]} %>
|
||||
</div>
|
||||
<%=render :partial => 'users/comment_reply_detail', :locals => {:comment => parents_rely[length - 2]} %>
|
||||
</div>
|
||||
<div class="orig_cont_hide clearfix"><span class="orig_icon" >↓ </span><span class="orig_icon" style="display:none;" > ↑</span><%= link_to '点击展开隐藏楼层', show_all_replies_users_path(:comment => comment),:remote=>true %></div>
|
||||
<div class="orig_cont_hide clearfix">
|
||||
<span class="orig_icon" >↓ </span>
|
||||
<span class="orig_icon" style="display:none;" > ↑</span>
|
||||
<%= link_to '点击展开隐藏楼层', show_all_replies_users_path(:comment => comment),:remote=>true %>
|
||||
</div>
|
||||
<%=render :partial => 'users/comment_reply_detail', :locals => {:comment => parents_rely[0]} %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
<% if homework_commons.count == 10%>
|
||||
<% if is_in_course == 1%>
|
||||
<!-- 在课程内 -->
|
||||
<%= link_to "点击展开更多",homework_common_index_path(:course => course_id,:page => page,:is_in_course => is_in_course),:id => "user_show_more_homework",:remote => "true",:class => "loadMore f_grey"%>
|
||||
<%#= link_to "点击展开更多",homework_common_index_path(:course => course_id,:page => page,:is_in_course => is_in_course),:id => "user_show_more_homework",:remote => "true",:class => "loadMore f_grey"%>
|
||||
<% else%>
|
||||
<!-- 在个人主页 -->
|
||||
<%= link_to "点击展开更多",student_homeworks_user_path(User.current.id,:page => page,:is_in_course => is_in_course),:id => "user_show_more_homework",:remote => "true",:class => "loadMore f_grey"%>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<% if ma.class == CourseMessage %>
|
||||
<% if ma.course_message_type == "News" %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.author), :width => "30", :height => "30"),user_path(ma.course_message.author) %></a></li>
|
||||
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了通知:</span></li>
|
||||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.author), :width => "30", :height => "30"),user_path(ma.course_message.author), :target => '_blank' %></a></li>
|
||||
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了通知:</span></li>
|
||||
<li class="homepageNewsContent fl">
|
||||
<%= link_to ma.course_message.title, {:controller => 'news', :action => 'show', :id => ma.course_message.id },
|
||||
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
|
||||
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
<!--:onmouseover =>"message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
</li>
|
||||
|
@ -21,11 +21,11 @@
|
|||
<% end %>
|
||||
<% if ma.course_message_type == "Comment" %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.author), :width => "30", :height => "30"), user_path(ma.course_message.author) %></a></li>
|
||||
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">评论了通知:</span></li>
|
||||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.author), :width => "30", :height => "30"), user_path(ma.course_message.author), :target => '_blank' %></a></li>
|
||||
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">评论了通知:</span></li>
|
||||
<li class="homepageNewsContent fl">
|
||||
<%= link_to ma.course_message.commented.title, {:controller => 'news', :action => 'show', :id => ma.course_message.commented.id },
|
||||
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
|
||||
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" , :target => '_blank'%>
|
||||
<!--:onmouseover =>"message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
</li>
|
||||
|
@ -41,19 +41,19 @@
|
|||
<% end %>
|
||||
<% if ma.course_message_type == "HomeworkCommon" && ma.status.nil?%>
|
||||
<ul class="homepageNewsList fl">
|
||||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a></li>
|
||||
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师", user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
|
||||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user), :target => '_blank' %></a></li>
|
||||
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师", user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了课程作业:</span>
|
||||
</li>
|
||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||
<% if !User.current.allowed_to?(:as_teacher, ma.course_message.course) && cur_user_works_for_homework(ma.course_message).nil? %>
|
||||
<%= link_to "作业标题:" + ma.course_message.name, new_student_work_path(:homework => ma.course_message.id),
|
||||
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
|
||||
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
<!--:onmouseover =>"message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
<% else %>
|
||||
<%= link_to "作业标题:" + ma.course_message.name, student_work_index_path(:homework => ma.course_message.id),
|
||||
:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
|
||||
:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
<% end %>
|
||||
|
@ -100,13 +100,13 @@
|
|||
<% end %>
|
||||
<% if ma.course_message_type == "HomeworkCommon" && ma.status == 1 %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a></li>
|
||||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user), :target => '_blank' %></a></li>
|
||||
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.user.lastname + ma.course_message.user.firstname + '老师',
|
||||
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :title => "#{ma.course_message.user.lastname + ma.course_message.user.firstname}老师" %>
|
||||
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :title => "#{ma.course_message.user.lastname + ma.course_message.user.firstname}老师", :target => '_blank' %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布的作业:</span></li>
|
||||
<li class="homepageHomeworkContent fl">
|
||||
<%= link_to "作业标题:" + ma.course_message.name, student_work_index_path(:homework => ma.course_message.id),
|
||||
:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
|
||||
:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
</li>
|
||||
|
@ -136,17 +136,17 @@
|
|||
<% if ma.course_message_type == "HomeworkCommon" && ma.status == 2 %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<a href="javascript:void(0);"><%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a>
|
||||
<a href="javascript:void(0);"><%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user), :target => '_blank' %></a>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%= link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师",
|
||||
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
|
||||
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">启动了作业匿评:</span>
|
||||
</li>
|
||||
<li class="homepageNewsContent fl">
|
||||
<%= link_to "作业标题:" + ma.course_message.name, student_work_index_path(:homework => ma.course_message.id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
||||
:onmouseover => "message_titile_show($(this),event)",
|
||||
:onmouseout => "message_titile_hide($(this))" %>
|
||||
:onmouseout => "message_titile_hide($(this))", :target => '_blank' %>
|
||||
</li>
|
||||
<div style="display: none" class="message_title_red system_message_style">
|
||||
<p>
|
||||
|
@ -170,12 +170,12 @@
|
|||
<!--作品关闭匿评-->
|
||||
<% if ma.course_message_type == "HomeworkCommon" && ma.status == 3 %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a></li>
|
||||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user), :target => '_blank' %></a></li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师",
|
||||
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">关闭了作业匿评:</span></li>
|
||||
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">关闭了作业匿评:</span></li>
|
||||
<li class="homepageNewsContent fl">
|
||||
<%= link_to "作业标题:" + ma.course_message.name, student_work_index_path(:homework => ma.course_message.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
|
||||
<%= link_to "作业标题:" + ma.course_message.name, student_work_index_path(:homework => ma.course_message.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
<!--:onmouseover =>"message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))"%>-->
|
||||
</li>
|
||||
|
@ -202,15 +202,15 @@
|
|||
<% if ma.course_message_type == "HomeworkCommon" && ma.status == 4 %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<a href="javascript:void(0);"><%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a>
|
||||
<a href="javascript:void(0);"><%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user), :target => '_blank' %></a>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%= link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师",
|
||||
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
|
||||
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">启动作业匿评失败</span>
|
||||
</li>
|
||||
<li class="homepageNewsContent fl">
|
||||
<%= link_to truncate(ma.course_message.name,:length=>25)+'(失败原因:提交作品的人数低于2人)', student_work_index_path(:homework => ma.course_message.id), :class => "#{ma.viewed == 0 ? "c_red" : "newsGrey "}" %>
|
||||
<%= link_to truncate(ma.course_message.name,:length=>25)+'(失败原因:提交作品的人数低于2人)', student_work_index_path(:homework => ma.course_message.id), :class => "#{ma.viewed == 0 ? "c_red" : "newsGrey "}", :target => '_blank' %>
|
||||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
</li>
|
||||
|
@ -239,15 +239,19 @@
|
|||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><div class="navHomepageLogo fl"><%= image_tag(url_to_avatar(User.find(ma.apply_user_id)), width: "30px", height: "30px", class: "mt3") %></div></a></li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%= link_to ma.course_message.user.show_name,
|
||||
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>"><%= ma.apply_result == 1 ? '同意' : '拒绝'%>引用作业:</span>
|
||||
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="<%= ma.viewed == 0 ? 'homepageNewsTypeNotRead fl':'homepageNewsType fl' %>"><%= ma.apply_result == 1 ? '同意' : '拒绝'%>引用作业:</span>
|
||||
</li>
|
||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||
<% link_str = ma.apply_result == 1 ?
|
||||
'您申请引用作业"'+HomeworkCommon.find(ma.course_message_id).name+'"的申请已通过'
|
||||
:
|
||||
'您申请引用作业"'+HomeworkCommon.find(ma.course_message_id).name+'"的申请被拒绝' %>
|
||||
<%= link_to link_str, student_work_index_path(:homework => ma.course_message.id), :title => link_str,:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey "}" %>
|
||||
<% if User.current.member_of_course?(ma.course_message.course) || User.current.admin? || ma.course_message.is_open == 1 %>
|
||||
<%= link_to link_str, student_work_index_path(:homework => ma.course_message.id), :title => link_str,:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey "}", :target => '_blank' %>
|
||||
<% else %>
|
||||
<span title='<%=link_str %>' style="color:#4b4b4b; cursor: default;" class="<%= ma.viewed == 0 ? 'newsBlack' : 'newsGrey'%>"><%=link_str %></span>
|
||||
<% end %>
|
||||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
</a>
|
||||
|
@ -257,11 +261,11 @@
|
|||
<% end %>
|
||||
<% if ma.course_message_type == "Poll" %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a></li>
|
||||
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了问卷:</span></li>
|
||||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user), :target => '_blank' %></a></li>
|
||||
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了问卷:</span></li>
|
||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||
<%= link_to format_activity_title(" #{ma.course_message.polls_name.nil? ? "未命名问卷" : ma.course_message.polls_name}"), poll_path(ma.course_message.id),
|
||||
:class=>"#{ma.viewed==0?"newsBlack":"newsGrey"}" %>
|
||||
:class=>"#{ma.viewed==0?"newsBlack":"newsGrey"}", :target => '_blank' %>
|
||||
<!--:onmouseover =>"message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
</a></li>
|
||||
|
@ -273,14 +277,14 @@
|
|||
<% end %>
|
||||
<% if ma.course_message_type == "Message" %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.author), :width => "30", :height => "30"), user_path(ma.course_message.author) %></a></li>
|
||||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.author), :width => "30", :height => "30"), user_path(ma.course_message.author), :target => '_blank' %></a></li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">
|
||||
<%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">
|
||||
<%= ma.course_message.parent_id.nil? ? "发布了课程帖子:" : "评论了课程帖子:" %></span></li>
|
||||
<% if ma.course_message.parent_id.nil? %>
|
||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||
<%= link_to ma.course_message.subject, course_boards_path(ma.course_message.course, :parent_id => ma.course_message.parent_id ? ma.course_message.parent_id : ma.course_message.id, :topic_id => ma.course_message.id),
|
||||
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}" %>
|
||||
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
<!--:onmouseover =>"message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
</a></li>
|
||||
|
@ -294,7 +298,7 @@
|
|||
<% else %>
|
||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||
<%= link_to ma.course_message.content.html_safe, course_boards_path(ma.course_message.course, :parent_id => ma.course_message.parent_id ? ma.course_message.parent_id : ma.course_message.id, :topic_id => ma.course_message.id),
|
||||
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}" %>
|
||||
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
<!--:onmouseover =>"message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
</a></li>
|
||||
|
@ -314,9 +318,9 @@
|
|||
<ul class="homepageNewsList fl">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<% if ma.course_message.reviewer_role == 3 %>
|
||||
<%=link_to image_tag(url_to_avatar(""), :width => "30", :height => "30") %>
|
||||
<%=link_to image_tag(url_to_avatar(""), :width => "30", :height => "30"), :target => '_blank' %>
|
||||
<% else %>
|
||||
<%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %>
|
||||
<%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user), :target => '_blank' %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
|
@ -324,7 +328,7 @@
|
|||
<span class="newsBlue homepageNewsPublisher">匿名用户</span>
|
||||
<% else %>
|
||||
<%= link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师",
|
||||
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
|
||||
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<% end %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">
|
||||
<%= ma.status == 0 ? "评阅了您的作品:" : "重新评阅了您的作品:" %>
|
||||
|
@ -333,7 +337,7 @@
|
|||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||
<% unless ma.content.nil? %>
|
||||
<%= link_to ma.content.html_safe, student_work_index_path(:homework => ma.course_message.student_work.homework_common_id),
|
||||
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
|
||||
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
<!--:onmouseover =>"message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
</a></li>
|
||||
|
@ -365,14 +369,14 @@
|
|||
<% if params[:type] != 'homework' %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<a href="javascript:void(0);"><%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a>
|
||||
<a href="javascript:void(0);"><%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user), :target => '_blank' %></a>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl"><%= link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
|
||||
<li class="homepageNewsPubType fl"><%= link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">在课程中留言了:</span>
|
||||
</li>
|
||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||
<%= link_to ma.course_message.notes.html_safe, course_feedback_path(:id => ma.course_id),
|
||||
:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
|
||||
:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
</a>
|
||||
|
@ -386,14 +390,20 @@
|
|||
<% elsif ma.course_message.jour_type == 'HomeworkCommon' %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<a href="javascript:void(0);"><%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a>
|
||||
<a href="javascript:void(0);"><%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user), :target => '_blank' %></a>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl"><%= link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">回复了您的作业:</span>
|
||||
<li class="homepageNewsPubType fl"><%= link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">
|
||||
<% if ma.course_message.m_parent_id.nil? %>
|
||||
回复了您的作业:
|
||||
<% else %>
|
||||
回复了您:
|
||||
<% end %>
|
||||
</span>
|
||||
</li>
|
||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||
<%= link_to ma.course_message.notes.html_safe, homework_common_index_url_in_org( ma.course_id),
|
||||
:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
|
||||
:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
</a>
|
||||
|
@ -406,16 +416,16 @@
|
|||
<% else %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<a href="javascript:void(0);"><%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a>
|
||||
<a href="javascript:void(0);"><%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user), :target => '_blank' %></a>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%= link_to ma.course_message.user.lastname + ma.course_message.user.firstname +
|
||||
"#{ma.course_message.user.allowed_to?(:as_teacher, ma.course)?"老师":"同学"}",
|
||||
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
|
||||
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">回复了作品评论:</span>
|
||||
</li>
|
||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||
<%= link_to ma.course_message.notes, student_work_index_path(:homework => ma.course_message.jour.student_work.homework_common_id,:show_work_id => ma.course_message.jour.student_work_id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
|
||||
<%= link_to ma.course_message.notes, student_work_index_path(:homework => ma.course_message.jour.student_work.homework_common_id,:show_work_id => ma.course_message.jour.student_work_id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
</a>
|
||||
|
@ -439,14 +449,14 @@
|
|||
<!-- 作业迟交,不能参与匿评提醒消息 -->
|
||||
<% if ma.course_message_type == "StudentWork" && !ma.course_message.homework_common.nil? && !User.current.allowed_to?(:as_teacher, ma.course_message.homework_common.course) %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%= link_to image_tag(url_to_avatar(ma.course_message.homework_common.user), :width => "30", :height => "30"), user_path(ma.course_message.homework_common.user) %></a></li>
|
||||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%= link_to image_tag(url_to_avatar(ma.course_message.homework_common.user), :width => "30", :height => "30"), user_path(ma.course_message.homework_common.user), :target => '_blank' %></a></li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=link_to ma.course_message.homework_common.user.show_name+"老师", user_path(ma.course_message.homework_common.user), :class => "newsBlue homepageNewsPublisher" %>
|
||||
<%=link_to ma.course_message.homework_common.user.show_name+"老师", user_path(ma.course_message.homework_common.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布的作业:</span>
|
||||
</li>
|
||||
<li class="homepageHomeworkContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||
<%= link_to "作业标题:" + ma.course_message.homework_common.name, student_work_index_path(:homework => ma.course_message.homework_common_id),
|
||||
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}" %>
|
||||
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
</a>
|
||||
|
@ -474,16 +484,16 @@
|
|||
<% if ma.course_message_type == "StudentWork" && ma.status == 1 %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<a href="javascript:void(0);"><%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a>
|
||||
<a href="javascript:void(0);"><%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user), :target => '_blank' %></a>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%= link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "同学",
|
||||
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
|
||||
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">重新提交了作品:</span>
|
||||
</li>
|
||||
<li class="homepageNewsContent fl">
|
||||
<%= link_to "作业标题:" + ma.course_message.name, student_work_index_path(:homework => ma.course_message.homework_common_id, :show_work_id => ma.course_message_id),
|
||||
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
|
||||
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
<%#= link_to truncate(ma.course_message.name,:length=>25)+'(失败原因:提交作品的人数低于2人)', student_work_index_path(:homework => ma.course_message.id), :class => "#{ma.viewed == 0 ? "c_red" : "newsGrey "}" %>
|
||||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
|
@ -495,16 +505,16 @@
|
|||
<% if ma.course_message_type == "StudentWork" && ma.status == 2 %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<a href="javascript:void(0);"><%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a>
|
||||
<a href="javascript:void(0);"><%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user), :target => '_blank' %></a>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%= link_to ma.course_message.user.show_name+ "同学",
|
||||
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
|
||||
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">追加新附件了:</span>
|
||||
</li>
|
||||
<li class="homepageNewsContent fl">
|
||||
<%= link_to "作业标题:" + ma.course_message.homework_common.name, student_work_index_path(:homework => ma.course_message.homework_common_id, :show_work_id => ma.course_message_id),
|
||||
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
|
||||
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
</li>
|
||||
|
@ -523,7 +533,7 @@
|
|||
</li>
|
||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||
<%= link_to "课程名称:" + ma.course_message.name, course_path(ma.course_message),
|
||||
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}" %>
|
||||
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
</a></li>
|
||||
|
@ -565,7 +575,7 @@
|
|||
'您申请成为课程"'+Course.find(ma.course_id).name+'"的'+(ma.content == '9' ? '老师' : '教辅')+'申请已通过'
|
||||
:
|
||||
'您申请成为课程"'+Course.find(ma.course_id).name+'"的'+(ma.content == '9' ? '老师' : '教辅')+'的申请被拒绝', course_path(Course.find(ma.course_id)),
|
||||
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}" %>
|
||||
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
</a>
|
||||
|
@ -588,14 +598,14 @@
|
|||
<% if ma.course_message_type == "JoinCourse" and ma.status == 0 %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(User.find(ma.course_message_id)), :width => "30", :height => "30"), user_path(ma.course_message_id) %></a>
|
||||
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(User.find(ma.course_message_id)), :width => "30", :height => "30"), user_path(ma.course_message_id), :target => '_blank' %></a>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=link_to User.find(ma.course_message_id), user_path(User.find(ma.course_message_id)), :class => "newsBlue homepageNewsPublisher" %>
|
||||
<%=link_to User.find(ma.course_message_id), user_path(User.find(ma.course_message_id)), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">将您加入了课程:</span>
|
||||
</li>
|
||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||
<%= link_to ma.course.name, course_member_path(ma.course), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
|
||||
<%= link_to ma.course.name, course_member_path(ma.course), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
</a>
|
||||
|
@ -629,7 +639,7 @@
|
|||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">您增加了新的课程成员:</span>
|
||||
</li>
|
||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||
<%= link_to User.find(ma.course_message_id).login+"("+(User.find(ma.course_message_id).realname ? User.find(ma.course_message_id).realname : User.find(ma.course_message_id).login) +")", user_path(ma.course_message_id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
|
||||
<%= link_to User.find(ma.course_message_id).login+"("+(User.find(ma.course_message_id).realname ? User.find(ma.course_message_id).realname : User.find(ma.course_message_id).login) +")", user_path(ma.course_message_id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
</a>
|
||||
|
@ -656,14 +666,14 @@
|
|||
<% if ma.course_message_type == "RemoveFromCourse" %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(User.find(ma.course_message_id)), :width => "30", :height => "30"), user_path(ma.course_message_id) %></a>
|
||||
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(User.find(ma.course_message_id)), :width => "30", :height => "30"), user_path(ma.course_message_id), :target => '_blank' %></a>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=link_to User.find(ma.course_message_id), user_path(User.find(ma.course_message_id)), :class => "newsBlue homepageNewsPublisher" %>
|
||||
<%=link_to User.find(ma.course_message_id), user_path(User.find(ma.course_message_id)), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">将您移出了课程:</span>
|
||||
</li>
|
||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||
<%= link_to ma.course.name, member_course_path(ma.course), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
|
||||
<%= link_to ma.course.name, member_course_path(ma.course), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
</a>
|
||||
|
@ -690,12 +700,12 @@
|
|||
<!--老师发布测验 发给学生看-->
|
||||
<% if ma.course_message_type == "Exercise" && ma.status == 2 %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a></li>
|
||||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user), :target => '_blank' %></a></li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<span><%=link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师",
|
||||
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %></span><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了课程测验 :</span></li>
|
||||
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %></span><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了课程测验 :</span></li>
|
||||
<li class="homepageNewsContent fl">
|
||||
<%= link_to "测验题目:" + ma.course_message.exercise_name, exercise_path(:id => ma.course_message.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
|
||||
<%= link_to "测验题目:" + ma.course_message.exercise_name, exercise_path(:id => ma.course_message.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
<!--:onmouseover =>"message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))"%>-->
|
||||
</li>
|
||||
|
@ -727,12 +737,12 @@
|
|||
|
||||
<% if ma.course_message_type == "Exercise" && ma.status == 3 %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a></li>
|
||||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user), :target => '_blank' %></a></li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<span> <%=link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师",
|
||||
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %></span><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布的测验:</span></li>
|
||||
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %></span><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布的测验:</span></li>
|
||||
<li class="homepageHomeworkContent fl">
|
||||
<%= link_to "测验题目:" + ma.course_message.exercise_name, exercise_path(:id => ma.course_message.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
|
||||
<%= link_to "测验题目:" + ma.course_message.exercise_name, exercise_path(:id => ma.course_message.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
<!--:onmouseover =>"message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))"%>-->
|
||||
|
||||
|
|
|
@ -3,14 +3,14 @@
|
|||
<% if ma.forge_message_type == "AppliedProject" %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.forge_message.user), :width => "30", :height => "30"), user_path(ma.forge_message.user) %></a>
|
||||
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.forge_message.user), :width => "30", :height => "30"), user_path(ma.forge_message.user), :target => '_blank' %></a>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=link_to ma.forge_message.user, user_path(ma.forge_message.user), :class => "newsBlue homepageNewsPublisher" %>
|
||||
<%=link_to ma.forge_message.user, user_path(ma.forge_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">申请加入项目:</span>
|
||||
</li>
|
||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||
<%= link_to ma.project, settings_project_path(:id => ma.project, :tab => "members"), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
|
||||
<%= link_to ma.project, settings_project_path(:id => ma.project, :tab => "members"), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
</a>
|
||||
|
@ -23,14 +23,14 @@
|
|||
<% unless ma.project.nil? %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(User.find(ma.forge_message_id)), :width => "30", :height => "30"), user_path(ma.forge_message_id) %></a>
|
||||
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(User.find(ma.forge_message_id)), :width => "30", :height => "30"), user_path(ma.forge_message_id), :target => '_blank' %></a>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=link_to User.find(ma.forge_message_id), user_path(User.find(ma.forge_message_id)), :class => "newsBlue homepageNewsPublisher" %>
|
||||
<%=link_to User.find(ma.forge_message_id), user_path(User.find(ma.forge_message_id)), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">将您加入了项目:</span>
|
||||
</li>
|
||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||
<%= link_to ma.project, project_member_path(ma.project), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
|
||||
<%= link_to ma.project, project_member_path(ma.project), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
</a>
|
||||
|
@ -44,14 +44,14 @@
|
|||
<% unless ma.project.nil? %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(User.find(ma.forge_message_id)), :width => "30", :height => "30"), user_path(ma.forge_message_id) %></a>
|
||||
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(User.find(ma.forge_message_id)), :width => "30", :height => "30"), user_path(ma.forge_message_id), :target => '_blank' %></a>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=link_to User.find(ma.forge_message_id), user_path(User.find(ma.forge_message_id)), :class => "newsBlue homepageNewsPublisher" %>
|
||||
<%=link_to User.find(ma.forge_message_id), user_path(User.find(ma.forge_message_id)), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">将您移出了项目:</span>
|
||||
</li>
|
||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||
<%= link_to ma.project, member_project_path(ma.project), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
|
||||
<%= link_to ma.project, member_project_path(ma.project), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
</a>
|
||||
|
@ -65,10 +65,10 @@
|
|||
<% inviter = User.find(ma.forge_message_id) %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(inviter), :width => "30", :height => "30"), user_path(inviter) %></a>
|
||||
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(inviter), :width => "30", :height => "30"), user_path(inviter), :target => '_blank' %></a>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=link_to inviter, user_path(inviter), :class => "newsBlue homepageNewsPublisher" %>
|
||||
<%=link_to inviter, user_path(inviter), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class='<%= ma.viewed == 0 ? 'homepageNewsTypeNotRead fl' : 'homepageNewsType fl' %>'>邀请你加入项目:</span>
|
||||
</li>
|
||||
<% if ma.user.member_of?(ma.project) %>
|
||||
|
@ -77,7 +77,7 @@
|
|||
<li class="homepageHomeworkContent fl">
|
||||
<% end %>
|
||||
<%= link_to ma.project, project_path(ma.project),
|
||||
:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
|
||||
:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
</li>
|
||||
|
@ -86,7 +86,7 @@
|
|||
<%=link_to "同意加入", {:controller => 'projects', :action => 'member', :id => ma.project_id, :message_id =>ma.id, :key => ma.secret_key},
|
||||
:value => ma.secret_key,
|
||||
:class => "green_btn_cir ml10",
|
||||
:style => "color:#fff" %>
|
||||
:style => "color:#fff", :target => '_blank' %>
|
||||
</li>
|
||||
<% end %>
|
||||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
|
@ -96,14 +96,14 @@
|
|||
<% if ma.status == 1%>
|
||||
<ul class="homepageNewsList fl">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author) %></a>
|
||||
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author), :target => '_blank' %></a>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher" %>
|
||||
<%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>"><%= ma.forge_message.tracker_id == 5 ? "发布的周报:":"指派给你的问题:"%></span>
|
||||
</li>
|
||||
<li class="homepageHomeworkContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||
<%= link_to ma.forge_message.subject, issue_path(:id => ma.forge_message.id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
|
||||
<%= link_to ma.forge_message.subject, issue_path(:id => ma.forge_message.id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
</a>
|
||||
|
@ -114,14 +114,14 @@
|
|||
<% else %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author) %></a>
|
||||
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author), :target => '_blank' %></a>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher" %>
|
||||
<%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>"><%= ma.forge_message.tracker_id == 5 ? "发布了周报:":"指派了问题给你:"%></span>
|
||||
</li>
|
||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||
<%= link_to ma.forge_message.subject, issue_path(:id => ma.forge_message.id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
|
||||
<%= link_to ma.forge_message.subject, issue_path(:id => ma.forge_message.id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
</a>
|
||||
|
@ -133,16 +133,16 @@
|
|||
<% if ma.forge_message_type == "Journal" %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.forge_message.user), :width => "30", :height => "30"), user_path(ma.forge_message.user) %></a>
|
||||
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.forge_message.user), :width => "30", :height => "30"), user_path(ma.forge_message.user), :target => '_blank' %></a>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=link_to ma.forge_message.user, user_path(ma.forge_message.user), :class => "newsBlue homepageNewsPublisher" %>
|
||||
<%=link_to ma.forge_message.user, user_path(ma.forge_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">
|
||||
更新了问题状态:</span>
|
||||
</li>
|
||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||
<%= link_to ma.forge_message.journalized.subject,
|
||||
issue_path(:id => ma.forge_message.journalized_id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
|
||||
issue_path(:id => ma.forge_message.journalized_id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
<!--:onmouseover =>"message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
</a>
|
||||
|
@ -152,13 +152,13 @@
|
|||
<% end %>
|
||||
<% if ma.forge_message_type == "Message" %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author) %></a></li>
|
||||
<li class="homepageNewsPubType fl"><%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher" %>
|
||||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author), :target => '_blank' %></a></li>
|
||||
<li class="homepageNewsPubType fl"><%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>"><%= ma.forge_message.parent_id.nil? ? "发布了项目帖子:" : "评论了项目帖子:" %></span></li>
|
||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||
<%= link_to ma.forge_message.subject, project_boards_path(ma.forge_message.project,
|
||||
:parent_id => ma.forge_message.parent_id ? ma.forge_message.parent_id : ma.forge_message.id,
|
||||
:topic_id => ma.forge_message.id), :class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}" %>
|
||||
:topic_id => ma.forge_message.id), :class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
</a>
|
||||
|
@ -169,15 +169,15 @@
|
|||
<% if ma.forge_message_type == "News" %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author) %></a>
|
||||
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author), :target => '_blank' %></a>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher" %>
|
||||
<%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了新闻:</span>
|
||||
</li>
|
||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||
<%= link_to ("#{ma.forge_message.title.html_safe}"), {:controller => 'news', :action => 'show', :id => ma.forge_message.id},
|
||||
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
|
||||
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
</a>
|
||||
|
@ -187,12 +187,12 @@
|
|||
<% end %>
|
||||
<% if ma.forge_message_type == "Comment" %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author) %></a></li>
|
||||
<li class="homepageNewsPubType fl"><%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher" %>
|
||||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author), :target => '_blank' %></a></li>
|
||||
<li class="homepageNewsPubType fl"><%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">评论了新闻:</span></li>
|
||||
<li class="homepageNewsContent fl">
|
||||
<%= link_to "#{ma.forge_message.commented.title}",
|
||||
{:controller => 'news', :action => 'show', :id => ma.forge_message.commented.id },:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
|
||||
{:controller => 'news', :action => 'show', :id => ma.forge_message.commented.id },:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
</li>
|
||||
|
|
|
@ -2,22 +2,22 @@
|
|||
<% if ma.memo_type == "Memo" %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.memo.author), :width => "30", :height => "30"), user_path(ma.memo.author) %></a>
|
||||
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.memo.author), :width => "30", :height => "30"), user_path(ma.memo.author), :target => '_blank' %></a>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=link_to ma.memo.author, user_path(ma.memo.author), :class => "newsBlue homepageNewsPublisher" %>
|
||||
<%=link_to ma.memo.author, user_path(ma.memo.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>" ><%= ma.memo.parent_id.nil? ? "在贴吧发布帖子:" : "回复了贴吧帖子:" %></span>
|
||||
</li>
|
||||
<% if ma.memo.parent_id.nil? %>
|
||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||
<%= link_to ma.memo.subject, forum_memo_path(ma.memo.forum_id, ma.memo.parent_id ? ma.memo.parent_id: ma.memo.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
|
||||
<%= link_to ma.memo.subject, forum_memo_path(ma.memo.forum_id, ma.memo.parent_id ? ma.memo.parent_id: ma.memo.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
<!--:onmouseover =>"message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
</a>
|
||||
</li>
|
||||
<% else %>
|
||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||
<%= link_to ma.memo.content.html_safe, forum_memo_path(ma.memo.forum_id, ma.memo.parent_id ? ma.memo.parent_id: ma.memo.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
|
||||
<%= link_to ma.memo.content.html_safe, forum_memo_path(ma.memo.forum_id, ma.memo.parent_id ? ma.memo.parent_id: ma.memo.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
<!--:onmouseover =>"message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
</a>
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
<% if ma.message_type == 'ApplySubdomain'%>
|
||||
<ul class="homepageNewsList fl">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.organization), :width => "30", :height => "30"), organization_path(ma.organization_id) %></a>
|
||||
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.organization), :width => "30", :height => "30"), organization_path(ma.organization_id), :target => '_blank' %></a>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=link_to ma.organization.name, organization_path(ma.organization_id), :class => "newsBlue homepageNewsPublisher" %>
|
||||
<%=link_to ma.organization.name, organization_path(ma.organization_id), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class='<%= ma.viewed == 0 ? 'homepageNewsTypeNotRead fl' : 'homepageNewsType fl' %>'>申请子域名:</span>
|
||||
</li>
|
||||
<li class="homepageHomeworkContent fl">
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<li class="homepageSystenMessageContent fl">
|
||||
|
||||
<%= link_to ma.subject.blank? ? (ma.content.nil? ? ma.description.html_safe : ma.content.html_safe) : ma.subject, user_system_messages_path(User.current),
|
||||
:id => "content_link_#{ma.id}" %>
|
||||
:id => "content_link_#{ma.id}", :target => '_blank' %>
|
||||
<!--:onmouseover =>"message_titile_show($(this),event);",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this));"-->
|
||||
</li>
|
||||
|
|
|
@ -2,14 +2,14 @@
|
|||
<% if ma.journals_for_message_type == "JournalsForMessage" %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.journals_for_message.user), :width => "30", :height => "30"), user_path(ma.journals_for_message.user) %></a>
|
||||
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.journals_for_message.user), :width => "30", :height => "30"), user_path(ma.journals_for_message.user), :target => '_blank' %></a>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=link_to ma.journals_for_message.user, user_path(ma.journals_for_message.user), :class => "newsBlue homepageNewsPublisher" %>
|
||||
<%=link_to ma.journals_for_message.user, user_path(ma.journals_for_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>"><%= ma.journals_for_message.reply_id == 0 ? "给你留言了:" : "回复了你的留言:" %></span>
|
||||
</li>
|
||||
<li class="homepageNewsContent fl">
|
||||
<%= link_to ma.journals_for_message.notes.gsub("<p>","").gsub("</p>","").gsub("<br />","").html_safe, feedback_path(ma.journals_for_message.jour_id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}"%>
|
||||
<%= link_to ma.journals_for_message.notes.gsub("<p>","").gsub("</p>","").gsub("<br />","").html_safe, feedback_path(ma.journals_for_message.jour_id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank'%>
|
||||
<!--:onmouseover =>"message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
</li>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<%= image_tag("/images/trustie_logo1.png", :width => "50", :height => "50") %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo break_word mt-4">
|
||||
<div class="homepagePostTo break_word">
|
||||
<span class="fl"><span style="color:#0781b4;">Trustie平台 </span>发布了系统消息:</span>
|
||||
<span style="color:#0781b4; max-width:470px; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;vertical-align: top;"><%= system_message.subject.nil? ? "系统消息" : system_message.subject %></span>
|
||||
</div>
|
||||
|
|
|
@ -11,7 +11,8 @@
|
|||
<%= hidden_field_tag 'show_name',params[:show_name],:value => show_name.nil? ? true : show_name %>
|
||||
|
||||
<div class="fl" style="padding-top:5px;" nhname="toolbar_container"></div>
|
||||
<%= submit_tag l(:button_feedback_respond), :name => nil ,
|
||||
<input nhname="submit_btn" type="button" class="reply_btn" value="<%=l(:button_feedback_respond) %>"/>
|
||||
<%#= submit_tag l(:button_feedback_respond), :name => nil ,
|
||||
:class => "reply_btn"%>
|
||||
<input nhname="cancel_btn" type="button" style="display:none;"/>
|
||||
|
||||
|
|
|
@ -53,6 +53,11 @@ module RedmineApp
|
|||
# Configure the default encoding used in templates for Ruby 1.9.
|
||||
config.encoding = "utf-8"
|
||||
|
||||
#disable [deprecated] I18n.enforce_available_locales will default to true in the future.
|
||||
# If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false
|
||||
# to avoid this message.
|
||||
#I18n.config.enforce_available_locales = false
|
||||
|
||||
# Configure sensitive parameters which will be filtered from the log file.
|
||||
config.filter_parameters += [:password]
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ button:
|
|||
url: "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxc09454f171153c2d&redirect_uri=https://www.trustie.net/assets/wechat/app.html#/activities?response_type=code&scope=snsapi_base&state=123#wechat_redirect"
|
||||
-
|
||||
type: "click"
|
||||
name: "意见返馈"
|
||||
name: "意见反馈"
|
||||
key: "FEEDBACK"
|
||||
-
|
||||
name: "更多"
|
||||
|
|
|
@ -1068,6 +1068,7 @@ RedmineApp::Application.routes.draw do
|
|||
match "addgroups", :via => [:post, :get]
|
||||
match 'deletegroup', :via => [:delete]
|
||||
match 'show_member_score', :via => [:get]
|
||||
match 'show_member_act_score', :via => [:get]
|
||||
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'
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
class DeleteEmptyApplyHomework < ActiveRecord::Migration
|
||||
def up
|
||||
count = ApplyHomework.all.count / 30 + 2
|
||||
transaction do
|
||||
for i in 1 ... count do i
|
||||
ApplyHomework.page(i).per(30).each do |ah|
|
||||
homework = HomeworkCommon.where("id = ?",ah.homework_common_id)
|
||||
if homework.empty?
|
||||
ah.destroy
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
|
@ -0,0 +1,52 @@
|
|||
class AlterCourseContributorScoreDefault < ActiveRecord::Migration
|
||||
def up
|
||||
change_column :course_contributor_scores, :message_num, :integer, :default => 0
|
||||
change_column :course_contributor_scores, :message_reply_num, :integer, :default => 0
|
||||
change_column :course_contributor_scores, :news_reply_num, :integer, :default => 0
|
||||
change_column :course_contributor_scores, :news_num, :integer, :default => 0
|
||||
change_column :course_contributor_scores, :resource_num, :integer, :default => 0
|
||||
change_column :course_contributor_scores, :journal_num, :integer, :default => 0
|
||||
change_column :course_contributor_scores, :journal_reply_num, :integer, :default => 0
|
||||
change_column :course_contributor_scores, :homework_journal_num, :integer, :default => 0
|
||||
change_column :course_contributor_scores, :total_score, :integer, :default => 0
|
||||
|
||||
count = CourseContributorScore.all.count / 30 + 2
|
||||
transaction do
|
||||
for i in 1 ... count do i
|
||||
CourseContributorScore.page(i).per(30).each do |cs|
|
||||
if cs.message_num.nil?
|
||||
cs.message_num = 0
|
||||
end
|
||||
if cs.message_reply_num.nil?
|
||||
cs.message_reply_num = 0
|
||||
end
|
||||
if cs.news_reply_num.nil?
|
||||
cs.news_reply_num = 0
|
||||
end
|
||||
if cs.news_num.nil?
|
||||
cs.news_num = 0
|
||||
end
|
||||
if cs.resource_num.nil?
|
||||
cs.resource_num = 0
|
||||
end
|
||||
if cs.journal_num.nil?
|
||||
cs.journal_num = 0
|
||||
end
|
||||
if cs.journal_reply_num.nil?
|
||||
cs.journal_reply_num = 0
|
||||
end
|
||||
if cs.homework_journal_num.nil?
|
||||
cs.homework_journal_num = 0
|
||||
end
|
||||
if cs.total_score.nil?
|
||||
cs.total_score = 0
|
||||
end
|
||||
cs.save
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
|
@ -0,0 +1,9 @@
|
|||
class ChangeUserActivitiesData < ActiveRecord::Migration
|
||||
def up
|
||||
execute("update user_activities set act_type = 'Project' where act_type = 'ProjectCreateInfo'")
|
||||
execute("update org_activities set org_act_type = 'Project' where org_act_type = 'ProjectCreateInfo'")
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
26
db/schema.rb
26
db/schema.rb
|
@ -11,7 +11,12 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20160511055221) do
|
||||
<<<<<<< HEAD
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20160513120002) do
|
||||
=======
|
||||
ActiveRecord::Schema.define(:version => 20160513021204) do
|
||||
>>>>>>> weixin_guange
|
||||
|
||||
create_table "activities", :force => true do |t|
|
||||
t.integer "act_id", :null => false
|
||||
|
@ -1107,6 +1112,23 @@ ActiveRecord::Schema.define(:version => 20160511055221) do
|
|||
t.integer "viewed_count", :default => 0
|
||||
end
|
||||
|
||||
create_table "mess", :id => false, :force => true do |t|
|
||||
t.string "课程名"
|
||||
t.integer "课程ID", :default => 0, :null => false
|
||||
t.string "教师姓", :default => "", :null => false
|
||||
t.string "教师名", :limit => 30, :default => "", :null => false
|
||||
t.string "主贴名", :default => "", :null => false
|
||||
t.integer "主贴或回帖ID", :default => 0, :null => false
|
||||
t.integer "回帖对应主贴ID"
|
||||
t.integer "帖子点赞数"
|
||||
t.integer "主贴回复数", :default => 0, :null => false
|
||||
t.text "主贴或回帖内容"
|
||||
t.datetime "发帖时间", :null => false
|
||||
t.integer "发帖或回帖用户ID", :default => 0, :null => false
|
||||
t.string "发帖或回帖用户姓", :default => "", :null => false
|
||||
t.string "发帖或回帖用户名", :limit => 30, :default => "", :null => false
|
||||
end
|
||||
|
||||
create_table "message_alls", :force => true do |t|
|
||||
t.integer "user_id"
|
||||
t.integer "message_id"
|
||||
|
@ -1328,6 +1350,7 @@ ActiveRecord::Schema.define(:version => 20160511055221) do
|
|||
t.boolean "allow_guest_download", :default => true
|
||||
t.integer "visits", :default => 0
|
||||
t.integer "show_mode", :default => 0
|
||||
t.integer "allow_teacher", :default => 0
|
||||
end
|
||||
|
||||
create_table "phone_app_versions", :force => true do |t|
|
||||
|
@ -2043,6 +2066,7 @@ ActiveRecord::Schema.define(:version => 20160511055221) do
|
|||
t.string "salt", :limit => 64
|
||||
t.integer "gid"
|
||||
t.integer "visits", :default => 0
|
||||
t.integer "excellent_teacher", :default => 0
|
||||
end
|
||||
|
||||
add_index "users", ["auth_source_id"], :name => "index_users_on_auth_source_id"
|
||||
|
|
|
@ -17,18 +17,18 @@
|
|||
<div class="post-title hidden">
|
||||
<a herf="javascript:void(0);" class="f12 c-grey2">{{act.course_project_name}}</a></div>
|
||||
<div class="cl"></div>
|
||||
<div class="post-title mt5 hidden"><span class="c-grey3 f15 fb">{{act.subject|safeHtml}}</span></div>
|
||||
<div class="post-title mt5 hidden"><a ng-href="#/homework/{{act.act_id}}" class="c-grey3 f15 fb">{{act.subject|safeHtml}}</a></div>
|
||||
<div class="post-content c-grey2">
|
||||
<div class="post-all-content" ng-bind-html="act.description|safeHtml"></div>
|
||||
<span class="mr15">迟交扣分:{{act.homework_common_detail.late_penalty}}分</span> 匿评开启时间:{{act.homework_common_detail.evaluation_start}}<br />
|
||||
<span class="mr15">缺评扣分:{{act.homework_common_detail.absence_penalty}}分/作品</span> 匿评关闭时间:{{act.homework_common_detail.evaluation_end}}
|
||||
<span class="mr15">迟交扣分:{{act.homework_common_detail.late_penalty}}分</span> <span ng-if="!act.homework_common_detail.anonymous_comment">匿评开启时间:{{act.homework_common_detail.evaluation_start}}</span><br />
|
||||
<span ng-if="!act.homework_common_detail.anonymous_comment" class="mr15">缺评扣分:{{act.homework_common_detail.absence_penalty}}分/作品</span> <span ng-if="!act.homework_common_detail.anonymous_comment">匿评关闭时间:{{act.homework_common_detail.evaluation_end}}</span>
|
||||
</div>
|
||||
<a herf="javascript:void(0);" class="c-grey2 f13 fr mt5 mb10 post-more undis" text-auto-height>点击展开</a>
|
||||
<div class="cl"></div>
|
||||
<span class="c-grey f12 fl mr15">{{act.activity_type_name}}</span>
|
||||
<span class="c-grey f12 fl">{{act.latest_update}}</span>
|
||||
<a href="javascript:void(0);" ng-if="!act.reply_count" ng-href="#/homework/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span></a>
|
||||
<a href="javascript:void(0);" ng-if="act.reply_count" ng-href="#/homework/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span>{{act.reply_count}}</a>
|
||||
<a ng-if="!act.reply_count" ng-href="#/homework/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span></a>
|
||||
<a ng-if="act.reply_count" ng-href="#/homework/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span>{{act.reply_count}}</a>
|
||||
<div class="c-grey fr f12 mr15 w36" ng-if="!act.praise_count" ng-click="addPraise(act);"><span class="praise-icon"></span></div>
|
||||
<div class="c-grey fr f12 mr15 w36" ng-if="act.praise_count && !act.has_praise" ng-click="addPraise(act);"><span class="praise-icon"></span>{{act.praise_count}}</div>
|
||||
<div class="c-grey fr f12 mr15 w36" ng-if="act.has_praise" ng-click="decreasePraise(act);"><span class="praised-icon"></span>{{act.praise_count}}</div>
|
||||
|
@ -46,7 +46,7 @@
|
|||
<div class="post-title hidden mb5"><a herf="javascript:void(0);">{{act.author.realname}}</a></div>
|
||||
<div class="post-title hidden"><a herf="javascript:void(0);" class="f13 c-grey2">{{act.course_project_name}}</a></div>
|
||||
<div class="cl"></div>
|
||||
<div class="post-title hidden mt5"><span class="c-grey3 f15 fb">{{act.subject|safeHtml}}</span></div>
|
||||
<div class="post-title hidden mt5"><a ng-href="#/course_notice/{{act.act_id}}" class="c-grey3 f15 fb">{{act.subject|safeHtml}}</a></div>
|
||||
<div class="post-content c-grey2 mt10">
|
||||
<div class="post-all-content" ng-bind-html="act.description|safeHtml"></div>
|
||||
</div>
|
||||
|
@ -54,8 +54,8 @@
|
|||
<div class="cl"></div>
|
||||
<span class="c-grey f12 fl mr15">{{act.activity_type_name}}</span>
|
||||
<span class="c-grey f13 fl">{{act.latest_update}}</span>
|
||||
<a href="javascript:void(0);" ng-if="!act.reply_count" ng-href="#/course_notice/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span></a>
|
||||
<a href="javascript:void(0);" ng-if="act.reply_count" ng-href="#/course_notice/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span>{{act.reply_count}}</a>
|
||||
<a ng-if="!act.reply_count" ng-href="#/course_notice/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span></a>
|
||||
<a ng-if="act.reply_count" ng-href="#/course_notice/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span>{{act.reply_count}}</a>
|
||||
<div class="c-grey fr f12 mr15 w36" ng-if="!act.praise_count" ng-click="addPraise(act);"><span class="praise-icon"></span></div>
|
||||
<div class="c-grey fr f12 mr15 w36" ng-if="act.praise_count && !act.has_praise" ng-click="addPraise(act);"><span class="praise-icon"></span>{{act.praise_count}}</div>
|
||||
<div class="c-grey fr f12 mr15 w36" ng-if="act.has_praise" ng-click="decreasePraise(act);"><span class="praised-icon"></span>{{act.praise_count}}</div>
|
||||
|
@ -73,7 +73,7 @@
|
|||
<div class="post-title hidden mb5"><a herf="javascript:void(0);" class="mr10">{{act.author.realname}}</a></div>
|
||||
<div class="post-title hidden"><a herf="javascript:void(0);" class="f12 c-grey2">{{act.course_project_name}}</a></div>
|
||||
<div class="cl"></div>
|
||||
<div class="post-title hidden mt5"><span class="c-grey3 f15 fb">{{act.subject|safeHtml}}</span></div>
|
||||
<div class="post-title hidden mt5"><a ng-href="#/course_discussion/{{act.act_id}}" class="c-grey3 f15 fb">{{act.subject|safeHtml}}</a></div>
|
||||
<div class="post-content c-grey2 mt10">
|
||||
<div class="post-all-content" ng-bind-html="act.description|safeHtml"></div>
|
||||
</div>
|
||||
|
@ -81,8 +81,8 @@
|
|||
<div class="cl"></div>
|
||||
<span class="c-grey f12 fl mr15">{{act.activity_type_name}}</span>
|
||||
<span class="c-grey f13 fl">{{act.latest_update}}</span>
|
||||
<a href="javascript:void(0);" ng-if="!act.reply_count" ng-href="#/course_discussion/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span></a>
|
||||
<a href="javascript:void(0);" ng-if="act.reply_count" ng-href="#/course_discussion/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span>{{act.reply_count}}</a>
|
||||
<a ng-if="!act.reply_count" ng-href="#/course_discussion/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span></a>
|
||||
<a ng-if="act.reply_count" ng-href="#/course_discussion/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span>{{act.reply_count}}</a>
|
||||
<div class="c-grey fr f12 mr15 w36" ng-if="!act.praise_count" ng-click="addPraise(act);"><span class="praise-icon"></span></div>
|
||||
<div class="c-grey fr f12 mr15 w36" ng-if="act.praise_count && !act.has_praise" ng-click="addPraise(act);"><span class="praise-icon"></span>{{act.praise_count}}</div>
|
||||
<div class="c-grey fr f12 mr15 w36" ng-if="act.has_praise" ng-click="decreasePraise(act);"><span class="praised-icon"></span>{{act.praise_count}}</div>
|
||||
|
@ -98,8 +98,8 @@
|
|||
<div class="post-wrapper">
|
||||
<div class="post-main">
|
||||
<div class="post-avatar fl"><img ng-src="{{replaceUrl(act.author.img_url)}}" width="40" height="40" class="border-radius" /></div>
|
||||
<div class="post-title hidden mb5"><span class="c-grey3 f13 fb mr10">{{act.author.realname}}</span>创建了<span class="c-grey3 f13 fb ml10">{{act.course_project_name}}</span></div>
|
||||
<div class="post-title hidden"><a herf="javascript:void(0);" class="mr10">{{act.latest_update}}</a></div>
|
||||
<div class="post-title hidden mb5"><span class="c-grey3 f13 fb mr10">{{act.author.realname}}</span>创建了<span class="c-grey3 f13 fb ml10">{{act.course_project_name}} | 课程</span></div>
|
||||
<div class="post-title hidden"><span class="mr10">{{act.latest_update}}</span></div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -116,7 +116,7 @@
|
|||
<div class="post-title hidden mb5"><a herf="javascript:void(0);">{{act.author.realname}}</a></div>
|
||||
<div class="post-title hidden"><a herf="javascript:void(0);" class="f12 c-grey2">{{act.course_project_name}}</a></div>
|
||||
<div class="cl"></div>
|
||||
<div class="post-title hidden mt5"><span class="c-grey3 f15 fb">{{act.subject|safeHtml}}</span></div>
|
||||
<div class="post-title hidden mt5"><a ng-href="#/issues/{{act.act_id}}" class="c-grey3 f15 fb">{{act.subject|safeHtml}}</a></div>
|
||||
<div class="post-content c-grey2">
|
||||
<div class="post-all-content" ng-bind-html="act.description|safeHtml"></div>
|
||||
<span class="mr15">状态:{{act.issue_detail.issue_status}}</span> <span class="mr15">优先级:{{act.issue_detail.issue_priority}}</span> <br />
|
||||
|
@ -126,8 +126,8 @@
|
|||
<div class="cl"></div>
|
||||
<span class="c-grey f12 fl mr15">{{act.activity_type_name}}</span>
|
||||
<span class="c-grey f13 fl">{{act.latest_update}}</span>
|
||||
<a href="javascript:void(0);" ng-if="!act.reply_count" ng-href="#/issues/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span></a>
|
||||
<a href="javascript:void(0);" ng-if="act.reply_count" ng-href="#/issues/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span>{{act.reply_count}}</a>
|
||||
<a ng-if="!act.reply_count" ng-href="#/issues/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span></a>
|
||||
<a ng-if="act.reply_count" ng-href="#/issues/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span>{{act.reply_count}}</a>
|
||||
<div class="c-grey fr f12 mr15 w36" ng-if="!act.praise_count" ng-click="addPraise(act);"><span class="praise-icon"></span></div>
|
||||
<div class="c-grey fr f12 mr15 w36" ng-if="act.praise_count && !act.has_praise" ng-click="addPraise(act);"><span class="praise-icon"></span>{{act.praise_count}}</div>
|
||||
<div class="c-grey fr f12 mr15 w36" ng-if="act.has_praise" ng-click="decreasePraise(act);"><span class="praised-icon"></span>{{act.praise_count}}</div>
|
||||
|
@ -146,7 +146,7 @@
|
|||
<div class="post-title hidden mb5"><a herf="javascript:void(0);">{{act.author.realname}}</a></div>
|
||||
<div class="post-title hidden"><a herf="javascript:void(0);" class="f12 c-grey2">{{act.course_project_name}}</a></div>
|
||||
<div class="cl"></div>
|
||||
<div class="post-title hidden mt5"><span class="c-grey3 f15 fb">{{act.subject|safeHtml}}</span></div>
|
||||
<div class="post-title hidden mt5"><a ng-href="#/project_discussion/{{act.act_id}}" class="c-grey3 f15 fb">{{act.subject|safeHtml}}</a></div>
|
||||
<div class="post-content c-grey2">
|
||||
<div class="post-all-content" ng-bind-html="act.description|safeHtml"></div>
|
||||
</div>
|
||||
|
@ -154,8 +154,8 @@
|
|||
<div class="cl"></div>
|
||||
<span class="c-grey f12 fl mr15">{{act.activity_type_name}}</span>
|
||||
<span class="c-grey f13 fl">{{act.latest_update}}</span>
|
||||
<a href="javascript:void(0);" ng-if="!act.reply_count" ng-href="#/project_discussion/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span></a>
|
||||
<a href="javascript:void(0);" ng-if="act.reply_count" ng-href="#/project_discussion/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span>{{act.reply_count}}</a>
|
||||
<a ng-if="!act.reply_count" ng-href="#/project_discussion/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span></a>
|
||||
<a ng-if="act.reply_count" ng-href="#/project_discussion/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span>{{act.reply_count}}</a>
|
||||
<div class="c-grey fr f12 mr15 w36" ng-if="!act.praise_count" ng-click="addPraise(act);"><span class="praise-icon"></span></div>
|
||||
<div class="c-grey fr f12 mr15 w36" ng-if="act.praise_count && !act.has_praise" ng-click="addPraise(act);"><span class="praise-icon"></span>{{act.praise_count}}</div>
|
||||
<div class="c-grey fr f12 mr15 w36" ng-if="act.has_praise" ng-click="decreasePraise(act);"><span class="praised-icon"></span>{{act.praise_count}}</div>
|
||||
|
@ -170,8 +170,8 @@
|
|||
<div class="post-wrapper">
|
||||
<div class="post-main">
|
||||
<div class="post-avatar fl"><img ng-src="{{replaceUrl(act.author.img_url)}}" width="40" height="40" class="border-radius" /></div>
|
||||
<div class="post-title hidden mb5"><span class="c-grey3 f15 fb">{{act.author.realname}}</span>创建了<span class="c-grey3 f15 fb">{{act.course_project_name}}</span></div>
|
||||
<div class="post-title hidden"><a herf="javascript:void(0);" class="mr10">{{act.latest_update}}</a></div>
|
||||
<div class="post-title hidden mb5"><span class="c-grey3 f13 fb mr10">{{act.author.realname}}</span>创建了<span class="c-grey3 f13 fb ml10">{{act.course_project_name}} | 项目</span></div>
|
||||
<div class="post-title hidden"><span class="mr10">{{act.latest_update}}</span></div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -195,8 +195,8 @@
|
|||
<a herf="javascript:void(0);" class="c-grey2 f13 fr mt5 mb10 post-more undis" text-auto-height>点击展开</a>
|
||||
<div class="cl"></div>
|
||||
<span class="c-grey f13 fl">{{act.latest_update}}</span>
|
||||
<a href="javascript:void(0);" ng-if="!act.reply_count" ng-href="#/journal_for_message/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span></a>
|
||||
<a href="javascript:void(0);" ng-if="act.reply_count" ng-href="#/journal_for_message/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span>{{act.reply_count}}</a>
|
||||
<a ng-if="!act.reply_count" ng-href="#/journal_for_message/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span></a>
|
||||
<a ng-if="act.reply_count" ng-href="#/journal_for_message/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span>{{act.reply_count}}</a>
|
||||
<div class="c-grey fr f12 mr15 w36" ng-if="!act.praise_count" ng-click="addPraise(act);"><span class="praise-icon"></span></div>
|
||||
<div class="c-grey fr f12 mr15 w36" ng-if="act.praise_count && !act.has_praise" ng-click="addPraise(act);"><span class="praise-icon"></span>{{act.praise_count}}</div>
|
||||
<div class="c-grey fr f12 mr15 w36" ng-if="act.has_praise" ng-click="decreasePraise(act);"><span class="praised-icon"></span>{{act.praise_count}}</div>
|
||||
|
@ -215,15 +215,15 @@
|
|||
<div class="post-title hidden mb5"><a herf="javascript:void(0);">{{act.author.realname}}</a></div>
|
||||
<div class="post-title hidden"><span class="f12 c-grey">博客</span></div>
|
||||
<div class="cl"></div>
|
||||
<div class="post-title hidden mt5"><span class="c-grey3 f15 fb">{{act.subject|safeHtml}}</span></div>
|
||||
<div class="post-title hidden mt5"><a ng-href="#/blog_comment/{{act.act_id}}" class="c-grey3 f15 fb">{{act.subject|safeHtml}}</a></div>
|
||||
<div class="post-content c-grey2">
|
||||
<div class="post-all-content" ng-bind-html="act.description|safeHtml"></div>
|
||||
</div>
|
||||
<a herf="javascript:void(0);" class="c-grey2 f13 fr mt5 mb10 post-more undis" text-auto-height>点击展开</a>
|
||||
<div class="cl"></div>
|
||||
<span class="c-grey f13 fl">{{act.latest_update}}</span>
|
||||
<a href="javascript:void(0);" ng-if="!act.reply_count" ng-href="#/blog_comment/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span></a>
|
||||
<a href="javascript:void(0);" ng-if="act.reply_count" ng-href="#/blog_comment/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span>{{act.reply_count}}</a>
|
||||
<a ng-if="!act.reply_count" ng-href="#/blog_comment/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span></a>
|
||||
<a ng-if="act.reply_count" ng-href="#/blog_comment/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span>{{act.reply_count}}</a>
|
||||
<div class="c-grey fr f12 mr15 w36" ng-if="!act.praise_count" ng-click="addPraise(act);"><span class="praise-icon"></span></div>
|
||||
<div class="c-grey fr f12 mr15 w36" ng-if="act.praise_count && !act.has_praise" ng-click="addPraise(act);"><span class="praise-icon"></span>{{act.praise_count}}</div>
|
||||
<div class="c-grey fr f12 mr15 w36" ng-if="act.has_praise" ng-click="decreasePraise(act);"><span class="praised-icon"></span>{{act.praise_count}}</div>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<div class="post-container">
|
||||
<div class="post-wrapper">
|
||||
<div class="post-main">
|
||||
<div class="post-title mb5"><span class="c-grey3 f15 fb">{{blog.title}}</span></div>
|
||||
<div class="post-title mb5"><span class="c-grey3 f15 fb">{{blog.title}}</span><span ng-if="blog.locked" class="locked_btn_cir ml10" title="已锁定"> </span></div>
|
||||
<div class="post-title"><a herf="javascript:void(0);" class="mr10">{{blog.user.realname}}</a>发表博客</div>
|
||||
<div class="cl"></div>
|
||||
<div class="post-content" style="height:auto;">
|
||||
|
@ -32,13 +32,13 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="post-input-wrap">
|
||||
<div ng-if="!blog.locked" class="post-input-wrap">
|
||||
<div class="post-reply-row">
|
||||
<!--<div class="post-reply-avatar fl"><img src="images/post-avatar.jpg" width="30" height="30" /></div>-->
|
||||
<div class="post-input-container">
|
||||
<input type="text" class="post-reply-input" id="postInput" ng-model="formData.comment" />
|
||||
</div>
|
||||
<button ng-click="addBlogReply(formData)" class="post-reply-submit fr mt10">回复</button>
|
||||
<button ng-click="addBlogReply(formData)" ng-disabled="formData.disabled" class="post-reply-submit fr mt10">回复</button>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
<div class="post-input-container">
|
||||
<input type="text" class="post-reply-input" id="postInput" ng-model="formData.comment" />
|
||||
</div>
|
||||
<button ng-click="addDiscussionReply(formData)" class="post-reply-submit fr mt10">回复</button>
|
||||
<button ng-click="addDiscussionReply(formData)" ng-disabled="formData.disabled" class="post-reply-submit fr mt10">回复</button>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
<div class="post-input-container">
|
||||
<input type="text" class="post-reply-input" id="postInput" ng-model="formData.comment" />
|
||||
</div>
|
||||
<button ng-click="addNoticeReply(formData)" class="post-reply-submit fr mt10">回复</button>
|
||||
<button ng-click="addNoticeReply(formData)" ng-disabled="formData.disabled" class="post-reply-submit fr mt10">回复</button>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -16,10 +16,10 @@
|
|||
</tr></table>
|
||||
<div class="post-content c-grey3 mt10" style="height:auto;">
|
||||
<div class="post-all-content mb10" ng-bind-html="homework.description|safeHtml"></div>
|
||||
<span class="c-grey">迟交扣分:{{homework.late_penalty}}分<br/>
|
||||
缺评扣分:{{homework.absence_penalty}}分/作品<br />
|
||||
匿评开启时间:{{homework.evaluation_start}}<br />
|
||||
匿评关闭时间:{{homework.evaluation_end}}</span>
|
||||
<span class="c-grey">迟交扣分:{{homework.late_penalty}}分</span><br/>
|
||||
<span ng-if="!homework.anonymous_comment" class="c-grey">缺评扣分:{{homework.absence_penalty}}分/作品<br /></span>
|
||||
<span ng-if="!homework.anonymous_comment" class="c-grey">匿评开启时间:{{homework.evaluation_start}}<br /></span>
|
||||
<span ng-if="!homework.anonymous_comment" class="c-grey">匿评关闭时间:{{homework.evaluation_end}}</span>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<span class="c-grey f13 mt10 fl">{{homework.publish_time}}</span>
|
||||
|
@ -50,7 +50,7 @@
|
|||
<div class="post-input-container">
|
||||
<input type="text" class="post-reply-input" id="postInput" ng-model="formData.comment" />
|
||||
</div>
|
||||
<button ng-click="addHomeworkReply(formData)" value="回复" class="post-reply-submit fr mt10">回复</button>
|
||||
<button ng-click="addHomeworkReply(formData)" ng-disabled="formData.disabled" value="回复" class="post-reply-submit fr mt10">回复</button>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td class="text-nowrap v-top">来 源:</td>
|
||||
<td>{{issue.project_name}} | 项目缺陷</td>
|
||||
<td>{{issue.project_name}} | 项目问题</td>
|
||||
</tr></table>
|
||||
<div class="post-content" style="height:auto;">
|
||||
<div class="post-all-content c-grey3 mt10 mb10" ng-bind-html="issue.description|safeHtml"></div>
|
||||
|
@ -48,7 +48,7 @@
|
|||
<div class="post-input-container">
|
||||
<input type="text" class="post-reply-input" id="postInput" ng-model="formData.comment" />
|
||||
</div>
|
||||
<button ng-click="addIssueReply(formData)" class="post-reply-submit fr mt10">回复</button>
|
||||
<button ng-click="addIssueReply(formData)" ng-disabled="formData.disabled" class="post-reply-submit fr mt10">回复</button>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue