Merge branch 'szzh' into develop

tmp v20150919_2
sw 10 years ago
commit 38c542dff5

@ -162,7 +162,7 @@ class MessagesController < ApplicationController
@reply.subject = "RE: #{@topic.subject}" unless params[:reply][:subject] @reply.subject = "RE: #{@topic.subject}" unless params[:reply][:subject]
@topic.children << @reply @topic.children << @reply
user_activity = UserActivity.where("act_type='Message' and act_id =#{@topic.id}").first 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 user_activity.save
#@topic.update_attribute(:updated_on, Time.now) #@topic.update_attribute(:updated_on, Time.now)
if !@reply.new_record? if !@reply.new_record?

@ -95,9 +95,11 @@ class UsersController < ApplicationController
# 说明: homework 发布作业message讨论区 news新闻 poll问卷works_reviewers作品评阅works_reply:作品回复 # 说明: homework 发布作业message讨论区 news新闻 poll问卷works_reviewers作品评阅works_reply:作品回复
# issue问题journal缺陷状态更新 forum公共贴吧: user_feedback: 用户留言; new_reply:新闻回复comment # issue问题journal缺陷状态更新 forum公共贴吧: user_feedback: 用户留言; new_reply:新闻回复comment
def user_messages def user_messages
unless User.current.logged? if !User.current.logged?
redirect_to signin_url redirect_to signin_url
return return
elsif @user != User.current && !User.current.admin?
return render_403
end end
# 记录当前点击按钮的时间 # 记录当前点击按钮的时间
# 考虑到用户未退出刷新消息页面 # 考虑到用户未退出刷新消息页面

@ -54,17 +54,17 @@
<span style="color: red;float: left">【系统消息】</span><li class="homepageSystenMessageContent fl" id="content_<%= usm.id %>"> <span style="color: red;float: left">【系统消息】</span><li class="homepageSystenMessageContent fl" id="content_<%= usm.id %>">
<li class="homepageSystenMessageContent fl"> <li class="homepageSystenMessageContent fl">
<%= 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}", :id => "content_link_#{usm.id}",
:onmouseover =>"message_titile_show($(this),event);", :onmouseover =>"message_titile_show($(this),event);",
:onmouseout => "message_titile_hide($(this));" :onmouseout => "message_titile_hide($(this));"
%> %>
</li> </li>
<div style="display:none;" class="message_title_red system_message_style"> <div style="display:none;" class="message_title_red system_message_style">
<% unless usm.subject.nil? %> <% unless usm.subject.blank? %>
<p><strong>标题:</strong><%= usm.subject %></p> <p><strong>标题:</strong><%= usm.subject %></p>
<% end %> <% end %>
<% if (!usm.description.nil? && usm.description != "") || (!usm.content.nil? && usm.content != "") %> <% if (!usm.description.blank?) || (!usm.content.blank?) %>
<div class="fl"><strong>内容:</strong></div><div class="ml36"><%= usm.description.nil? ? usm.content.html_safe : usm.description.html_safe %></div> <div class="fl"><strong>内容:</strong></div><div class="ml36"><%= usm.description.nil? ? usm.content.html_safe : usm.description.html_safe %></div>
<% end %> <% end %>
</div> </div>

@ -43,9 +43,11 @@
<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> <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> </div>
<div class="cl"></div> <div class="cl"></div>
<p class="homepagePostIntro break_word upload_img"> <div class="homepagePostIntro break_word upload_img">
<%= system_message.content.nil? ? system_message.description.html_safe : system_message.content.html_safe %> <p>
</p> <%= system_message.content.nil? ? system_message.description.html_safe : system_message.content.html_safe %>
</p>
</div>
<div class="cl"></div> <div class="cl"></div>
<p class="homepagePostDeadline">截止时间:<%= format_time(system_message.created_at) %></p> <p class="homepagePostDeadline">截止时间:<%= format_time(system_message.created_at) %></p>
</div> </div>

@ -103,7 +103,7 @@ default:
# autologin_cookie_name: the name of the cookie (default: autologin) # autologin_cookie_name: the name of the cookie (default: autologin)
# autologin_cookie_path: the cookie path (default: /) # autologin_cookie_path: the cookie path (default: /)
# autologin_cookie_secure: true sets the cookie secure flag (default: false) # autologin_cookie_secure: true sets the cookie secure flag (default: false)
autologin_cookie_name: autologin_cookie_name: "autologin_trustie"
autologin_cookie_path: autologin_cookie_path:
autologin_cookie_secure: autologin_cookie_secure:
@ -197,11 +197,17 @@ default:
#max_concurrent_ajax_uploads: 2 #max_concurrent_ajax_uploads: 2
#pic_types: "bmp,jpeg,jpg,png,gif" #pic_types: "bmp,jpeg,jpg,png,gif"
repository_root_path: '/tmp/htdocs'
judge_server: 'http://judge.trustie.net/'
# specific configuration options for production environment # specific configuration options for production environment
# that overrides the default ones # that overrides the default ones
production: production:
# CJK support # CJK support
rmagick_font_path: /usr/share/fonts/ipa-mincho/ipam.ttf 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: email_delivery:
delivery_method: :smtp delivery_method: :smtp
smtp_settings: smtp_settings:

@ -11,7 +11,7 @@
# #
# It's strongly recommended to check this file into your version control system. # 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| create_table "activities", :force => true do |t|
t.integer "act_id", :null => false t.integer "act_id", :null => false
@ -572,6 +572,7 @@ ActiveRecord::Schema.define(:version => 20150918005722) do
t.integer "viewed" t.integer "viewed"
t.datetime "created_at", :null => false t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false t.datetime "updated_at", :null => false
t.string "secret_key"
end end
create_table "forums", :force => true do |t| create_table "forums", :force => true do |t|
@ -683,6 +684,7 @@ ActiveRecord::Schema.define(:version => 20150918005722) do
t.integer "user_id" t.integer "user_id"
t.datetime "created_at", :null => false t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false t.datetime "updated_at", :null => false
t.string "mail"
end end
create_table "issue_categories", :force => true do |t| 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| create_table "student_work_tests", :force => true do |t|
t.integer "student_work_id" t.integer "student_work_id"
t.integer "status" t.datetime "created_at", :null => false
t.datetime "created_at", :null => false t.datetime "updated_at", :null => false
t.datetime "updated_at", :null => false t.integer "status", :default => 9
t.text "results" t.text "results"
t.text "src" t.text "src"
end end
@ -1359,8 +1361,10 @@ ActiveRecord::Schema.define(:version => 20150918005722) do
create_table "system_messages", :force => true do |t| create_table "system_messages", :force => true do |t|
t.integer "user_id" t.integer "user_id"
t.string "content" t.string "content"
t.datetime "created_at", :null => false t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false t.datetime "updated_at", :null => false
t.text "description"
t.string "subject"
end end
create_table "taggings", :force => true do |t| create_table "taggings", :force => true do |t|
@ -1552,7 +1556,6 @@ ActiveRecord::Schema.define(:version => 20150918005722) do
t.string "identity_url" t.string "identity_url"
t.string "mail_notification", :default => "", :null => false t.string "mail_notification", :default => "", :null => false
t.string "salt", :limit => 64 t.string "salt", :limit => 64
t.integer "gid"
end end
add_index "users", ["auth_source_id"], :name => "index_users_on_auth_source_id" add_index "users", ["auth_source_id"], :name => "index_users_on_auth_source_id"

@ -151,4 +151,6 @@ function init_activity_KindEditor_data(id){
} }
}); });
}); });
$(".ke-edit").css("height","25px");
} }
Loading…
Cancel
Save