From fdaa57324970fb5e1ceae7efcb9886601eb24cea Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Sat, 19 Sep 2015 11:37:31 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=8A=A8=E6=80=81=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=A2=9E=E9=AB=98=E5=90=8E=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E6=A1=86=E8=B6=85=E5=87=BA=E9=98=B4=E5=BD=B1=E5=8C=BA=E5=9F=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_course_message.html.erb | 2 +- app/views/users/_course_news.html.erb | 23 +++++++++++---------- app/views/users/_project_issue.html.erb | 23 +++++++++++---------- app/views/users/_project_message.html.erb | 25 ++++++++++++----------- 4 files changed, 38 insertions(+), 35 deletions(-) diff --git a/app/views/users/_course_message.html.erb b/app/views/users/_course_message.html.erb index dcd33e3c1..d8e144a91 100644 --- a/app/views/users/_course_message.html.erb +++ b/app/views/users/_course_message.html.erb @@ -99,7 +99,7 @@
/* id="reply_input_<%= user_activity_id%>" style="display: <%= (first_user_activity==user_activity_id && page==0)? '' : 'none'%>"*/
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %>
-
+
<%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => activity.id, :board_id => activity.board_id, :is_board => 'true'},:method => "post", :remote => true) do |f|%> diff --git a/app/views/users/_course_news.html.erb b/app/views/users/_course_news.html.erb index 4d030737b..ef01022ce 100644 --- a/app/views/users/_course_news.html.erb +++ b/app/views/users/_course_news.html.erb @@ -70,19 +70,20 @@
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %>
-
-
- <%= form_for('new_form',:url => {:controller => 'comments', :action => 'create', :id => activity},:method => "post", :remote => true) do |f|%> - - -
- 发送 -
-

- <% end%> +
+
+ <%= form_for('new_form',:url => {:controller => 'comments', :action => 'create', :id => activity},:method => "post", :remote => true) do |f|%> + + +
+ 发送 +
+

+ <% end%> +
+
-
\ No newline at end of file diff --git a/app/views/users/_project_issue.html.erb b/app/views/users/_project_issue.html.erb index 4922ed882..29bed1499 100644 --- a/app/views/users/_project_issue.html.erb +++ b/app/views/users/_project_issue.html.erb @@ -115,20 +115,21 @@
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %>
-
-
- <%= form_for('new_form',:url => add_journal_issue_path(activity.id),:method => "post", :remote => true) do |f|%> - - -
- 发送 -
-

- <% end%> +
+
+ <%= form_for('new_form',:url => add_journal_issue_path(activity.id),:method => "post", :remote => true) do |f|%> + + +
+ 发送 +
+

+ <% end%> +
+
-
diff --git a/app/views/users/_project_message.html.erb b/app/views/users/_project_message.html.erb index 2edfcbd44..2cce8f83a 100644 --- a/app/views/users/_project_message.html.erb +++ b/app/views/users/_project_message.html.erb @@ -84,21 +84,22 @@
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %>
-
-
- <%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => activity.id, :board_id => activity.board_id, :is_board => 'true'},:method => "post", :remote => true) do |f|%> - - - -
- 发送 -
-

- <% end%> +
+
+ <%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => activity.id, :board_id => activity.board_id, :is_board => 'true'},:method => "post", :remote => true) do |f|%> + + + +
+ 发送 +
+

+ <% end%> +
+
-
From bbc14dbe5c34bd3c170385afa713c62683076829 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Sat, 19 Sep 2015 11:52:02 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E8=AE=BA=E5=9D=9B?= =?UTF-8?q?=E5=9B=9E=E5=A4=8D=E6=A1=86=E4=B8=8A=E4=BF=A1=E6=81=AF=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_course_message.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/users/_course_message.html.erb b/app/views/users/_course_message.html.erb index d8e144a91..703882bd1 100644 --- a/app/views/users/_course_message.html.erb +++ b/app/views/users/_course_message.html.erb @@ -97,7 +97,7 @@
<% end %> -
/* id="reply_input_<%= user_activity_id%>" style="display: <%= (first_user_activity==user_activity_id && page==0)? '' : 'none'%>"*/ +
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %>
From 42745092c591685171ee617369f70e27dc0d83bf Mon Sep 17 00:00:00 2001 From: huang Date: Sat, 19 Sep 2015 12:58:45 +0800 Subject: [PATCH 3/3] =?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));" %>