Merge branch 'szzh' into develop
This commit is contained in:
commit
38c542dff5
|
@ -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?
|
||||
|
|
|
@ -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
|
||||
# 记录当前点击按钮的时间
|
||||
# 考虑到用户未退出刷新消息页面
|
||||
|
|
|
@ -54,17 +54,17 @@
|
|||
<span style="color: red;float: left">【系统消息】</span><li class="homepageSystenMessageContent fl" id="content_<%= usm.id %>">
|
||||
<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}",
|
||||
:onmouseover =>"message_titile_show($(this),event);",
|
||||
:onmouseout => "message_titile_hide($(this));"
|
||||
%>
|
||||
</li>
|
||||
<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>
|
||||
<% 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>
|
||||
<% end %>
|
||||
</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>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<p class="homepagePostIntro break_word upload_img">
|
||||
<%= system_message.content.nil? ? system_message.description.html_safe : system_message.content.html_safe %>
|
||||
</p>
|
||||
<div class="homepagePostIntro break_word upload_img">
|
||||
<p>
|
||||
<%= system_message.content.nil? ? system_message.description.html_safe : system_message.content.html_safe %>
|
||||
</p>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<p class="homepagePostDeadline">截止时间:<%= format_time(system_message.created_at) %></p>
|
||||
</div>
|
||||
|
|
|
@ -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:
|
||||
|
|
17
db/schema.rb
17
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"
|
||||
|
|
|
@ -151,4 +151,6 @@ function init_activity_KindEditor_data(id){
|
|||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(".ke-edit").css("height","25px");
|
||||
}
|
Loading…
Reference in New Issue