From 42745092c591685171ee617369f70e27dc0d83bf Mon Sep 17 00:00:00 2001 From: huang Date: Sat, 19 Sep 2015 12:58:45 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E6=9D=83=E9=99=90?= =?UTF-8?q?=EF=BC=8C=E5=85=B6=E4=BB=96=E4=BA=BA=E4=B8=8D=E8=83=BD=E8=AE=BF?= =?UTF-8?q?=E9=97=AE=E6=88=91=E7=9A=84=E6=B6=88=E6=81=AF=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 4 +++- app/views/users/user_messages.html.erb | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) 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 @@ 【系统消息】
  • - <%= link_to usm.subject.nil? ? (usm.content.nil? ? usm.description.html_safe : usm.content.html_safe) : usm.subject, user_system_messages_path(User.current), + <%= link_to usm.subject.blank? ? (usm.content.nil? ? usm.description.html_safe : usm.content.html_safe) : usm.subject, user_system_messages_path(User.current), :id => "content_link_#{usm.id}", :onmouseover =>"message_titile_show($(this),event);", :onmouseout => "message_titile_hide($(this));" %>
  • From ccd19021ae9cb59e6a45c760669d84138279dc59 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Sat, 19 Sep 2015 13:45:32 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E5=9B=9E=E5=A4=8D=E4=B9=8B=E5=90=8E=EF=BC=8C=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E5=99=A8=E5=8F=98=E5=AE=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/messages_controller.rb | 2 +- public/javascripts/init_activity_KindEditor.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) 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/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 From f4d11f884457f5636c86f46248156001cb1b8f32 Mon Sep 17 00:00:00 2001 From: ouyangxuhua Date: Sat, 19 Sep 2015 13:46:35 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E6=B6=88=E6=81=AF=E9=A1=B5=E9=9D=A2=E4=B8=AD=EF=BC=8C=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E5=A4=A7=E5=B0=8F=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/user_system_messages.html.erb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/views/users/user_system_messages.html.erb b/app/views/users/user_system_messages.html.erb index 3b8bd9fb6..899cd7a8f 100644 --- a/app/views/users/user_system_messages.html.erb +++ b/app/views/users/user_system_messages.html.erb @@ -43,9 +43,11 @@ <%= system_message.subject.nil? ? "系统消息" : system_message.subject %>
    -

    - <%= 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) %>

    From 186bf9070ca32dedfad3d3d30662841dc0ec3c3b Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Sat, 19 Sep 2015 15:21:51 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E4=B8=A2=E5=A4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/configuration.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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: From 385f2aa4ac68d640fa92f6775b107cbfce874b89 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Sat, 19 Sep 2015 15:23:01 +0800 Subject: [PATCH 5/5] 111 --- db/schema.rb | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) 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"