This commit is contained in:
ouyangxuhua 2015-09-19 13:46:54 +08:00
commit 0300cbe319
6 changed files with 45 additions and 40 deletions

View File

@ -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
# 记录当前点击按钮的时间
# 考虑到用户未退出刷新消息页面

View File

@ -97,9 +97,9 @@
</div>
<% end %>
<div class="homepagePostReplyContainer borderBottomNone minHeight48"> /* id="reply_input_<%= user_activity_id%>" style="display: <%= (first_user_activity==user_activity_id && page==0)? '' : 'none'%>"*/
<div class="homepagePostReplyContainer borderBottomNone minHeight48">
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= user_activity_id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %></div>
<div class="homepagePostReplyInputContainer mt3">
<div class="homepagePostReplyInputContainer mt3 mb10">
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
<%= 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|%>
<input type="hidden" name="quote[quote]" value="">

View File

@ -70,7 +70,7 @@
<div class="homepagePostReplyContainer borderBottomNone minHeight48">
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= user_activity_id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %></div>
<div class="homepagePostReplyInputContainer mt3">
<div class="homepagePostReplyInputContainer mt3 mb10">
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
<%= form_for('new_form',:url => {:controller => 'comments', :action => 'create', :id => activity},:method => "post", :remote => true) do |f|%>
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
@ -83,6 +83,7 @@
</div>
<div class="cl"></div>
</div>
<div class="cl"></div>
</div>
</div>
</div>

View File

@ -115,7 +115,7 @@
<div class="homepagePostReplyContainer borderBottomNone minHeight48">
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= user_activity_id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %></div>
<div class="homepagePostReplyInputContainer mt3">
<div class="homepagePostReplyInputContainer mt3 mb10">
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
<%= form_for('new_form',:url => add_journal_issue_path(activity.id),:method => "post", :remote => true) do |f|%>
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
@ -128,6 +128,7 @@
</div>
<div class="cl"></div>
</div>
<div class="cl"></div>
</div>
</div>

View File

@ -84,7 +84,7 @@
<div class="homepagePostReplyContainer borderBottomNone minHeight48">
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= user_activity_id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %></div>
<div class="homepagePostReplyInputContainer mt3">
<div class="homepagePostReplyInputContainer mt3 mb10">
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
<%= 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|%>
<input type="hidden" name="quote[quote]" value="">
@ -98,6 +98,7 @@
</div>
<div class="cl"></div>
</div>
<div class="cl"></div>
</div>

View File

@ -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>