diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rb index aae33e52a..f9b5b7d32 100644 --- a/app/controllers/messages_controller.rb +++ b/app/controllers/messages_controller.rb @@ -162,7 +162,7 @@ class MessagesController < ApplicationController @reply.subject = "RE: #{@topic.subject}" unless params[:reply][:subject] @topic.children << @reply user_activity = UserActivity.where("act_type='Message' and act_id =#{@topic.id}").first - user_activity.updated_at = @reply.created_on + user_activity.updated_at = Time.now user_activity.save #@topic.update_attribute(:updated_on, Time.now) if !@reply.new_record? diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index d3921d44a..0783d1805 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -95,9 +95,11 @@ class UsersController < ApplicationController # 说明: homework 发布作业;message:讨论区; news:新闻; poll:问卷;works_reviewers:作品评阅;works_reply:作品回复 # issue:问题;journal:缺陷状态更新; forum:公共贴吧: user_feedback: 用户留言; new_reply:新闻回复(comment) def user_messages - unless User.current.logged? + if !User.current.logged? redirect_to signin_url return + elsif @user != User.current && !User.current.admin? + return render_403 end # 记录当前点击按钮的时间 # 考虑到用户未退出刷新消息页面 diff --git a/app/views/users/user_messages.html.erb b/app/views/users/user_messages.html.erb index b9e626f2d..46964b14d 100644 --- a/app/views/users/user_messages.html.erb +++ b/app/views/users/user_messages.html.erb @@ -54,17 +54,17 @@ 【系统消息】
- <%= system_message.content.nil? ? system_message.description.html_safe : system_message.content.html_safe %> -
++ <%= system_message.content.nil? ? system_message.description.html_safe : system_message.content.html_safe %> +
+截止时间:<%= format_time(system_message.created_at) %>
diff --git a/config/configuration.yml b/config/configuration.yml index 87a54a976..ef39f6493 100644 --- a/config/configuration.yml +++ b/config/configuration.yml @@ -103,7 +103,7 @@ default: # autologin_cookie_name: the name of the cookie (default: autologin) # autologin_cookie_path: the cookie path (default: /) # autologin_cookie_secure: true sets the cookie secure flag (default: false) - autologin_cookie_name: + autologin_cookie_name: "autologin_trustie" autologin_cookie_path: autologin_cookie_secure: @@ -197,11 +197,17 @@ default: #max_concurrent_ajax_uploads: 2 #pic_types: "bmp,jpeg,jpg,png,gif" + repository_root_path: '/tmp/htdocs' + judge_server: 'http://judge.trustie.net/' + # specific configuration options for production environment # that overrides the default ones production: # CJK support rmagick_font_path: /usr/share/fonts/ipa-mincho/ipam.ttf + judge_server: 'http://192.168.80.21:8080/' + repository_root_path: '/home/pdl/redmine-2.3.2-0/apache2/htdocs' + cookie_domain: ".trustie.net" email_delivery: delivery_method: :smtp smtp_settings: diff --git a/db/schema.rb b/db/schema.rb index 43357f44f..1c6760345 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20150918005722) do +ActiveRecord::Schema.define(:version => 20150918134804) do create_table "activities", :force => true do |t| t.integer "act_id", :null => false @@ -572,6 +572,7 @@ ActiveRecord::Schema.define(:version => 20150918005722) do t.integer "viewed" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false + t.string "secret_key" end create_table "forums", :force => true do |t| @@ -683,6 +684,7 @@ ActiveRecord::Schema.define(:version => 20150918005722) do t.integer "user_id" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false + t.string "mail" end create_table "issue_categories", :force => true do |t| @@ -1304,9 +1306,9 @@ ActiveRecord::Schema.define(:version => 20150918005722) do create_table "student_work_tests", :force => true do |t| t.integer "student_work_id" - t.integer "status" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "status", :default => 9 t.text "results" t.text "src" end @@ -1359,8 +1361,10 @@ ActiveRecord::Schema.define(:version => 20150918005722) do create_table "system_messages", :force => true do |t| t.integer "user_id" t.string "content" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.text "description" + t.string "subject" end create_table "taggings", :force => true do |t| @@ -1552,7 +1556,6 @@ ActiveRecord::Schema.define(:version => 20150918005722) do t.string "identity_url" t.string "mail_notification", :default => "", :null => false t.string "salt", :limit => 64 - t.integer "gid" end add_index "users", ["auth_source_id"], :name => "index_users_on_auth_source_id" diff --git a/public/javascripts/init_activity_KindEditor.js b/public/javascripts/init_activity_KindEditor.js index 866d0ea41..1e51067ef 100644 --- a/public/javascripts/init_activity_KindEditor.js +++ b/public/javascripts/init_activity_KindEditor.js @@ -151,4 +151,6 @@ function init_activity_KindEditor_data(id){ } }); }); + + $(".ke-edit").css("height","25px"); } \ No newline at end of file