Merge branch 'dev_hjq' of http://repository.trustie.net/xianbo/trustie2 into dev_hjq
This commit is contained in:
commit
30efa6c8c7
|
@ -322,6 +322,12 @@ class ProjectsController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def settings
|
def settings
|
||||||
|
# 修改查看消息状态
|
||||||
|
applied_messages = ForgeMessage.where("user_id =? and project_id =? and forge_message_type =? and viewed =?", User.current.id, @project, "AppliedProject", 0)
|
||||||
|
applied_messages.each do |applied_message|
|
||||||
|
applied_message.update_attributes(:viewed => true)
|
||||||
|
end
|
||||||
|
# end
|
||||||
@issue_custom_fields = IssueCustomField.sorted.all
|
@issue_custom_fields = IssueCustomField.sorted.all
|
||||||
@issue_category ||= IssueCategory.new
|
@issue_category ||= IssueCategory.new
|
||||||
@member ||= @project.members.new
|
@member ||= @project.members.new
|
||||||
|
|
|
@ -146,7 +146,7 @@ class UsersController < ApplicationController
|
||||||
@message_alls << message_all.message
|
@message_alls << message_all.message
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
when 'invite_info'
|
when 'apply'
|
||||||
@message_alls = ForgeMessage.where("forge_message_type =? and user_id =?" , "AppliedProject", @user).order("created_at desc")
|
@message_alls = ForgeMessage.where("forge_message_type =? and user_id =?" , "AppliedProject", @user).order("created_at desc")
|
||||||
when 'homework'
|
when 'homework'
|
||||||
@message_alls = CourseMessage.where("course_message_type =? and user_id =?", "HomeworkCommon", @user).order("created_at desc")
|
@message_alls = CourseMessage.where("course_message_type =? and user_id =?", "HomeworkCommon", @user).order("created_at desc")
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
<ul class="newsType">
|
<ul class="newsType">
|
||||||
<li><%= link_to "全部",user_message_path(User.current), :class => "resourcesGrey" %></li>
|
<li><%= link_to "全部",user_message_path(User.current), :class => "resourcesGrey" %></li>
|
||||||
<li><%= link_to "未读消息", user_message_path(User.current, :type => 'unviewed'), :class => "resourcesGrey" %></li>
|
<li><%= link_to "未读消息", user_message_path(User.current, :type => 'unviewed'), :class => "resourcesGrey" %></li>
|
||||||
|
<li><%= link_to "用户申请", user_message_path(User.current, :type => 'apply'), :class => "resourcesGrey" %></li>
|
||||||
<%# 课程相关消息 %>
|
<%# 课程相关消息 %>
|
||||||
<li><%= link_to "作业消息", user_message_path(User.current, :type => 'homework'), :class => "resourcesGrey" %></li>
|
<li><%= link_to "作业消息", user_message_path(User.current, :type => 'homework'), :class => "resourcesGrey" %></li>
|
||||||
<li><%= link_to "课程讨论",user_message_path(User.current, :type => 'course_message'), :class => "resourcesGrey" %></li>
|
<li><%= link_to "课程讨论",user_message_path(User.current, :type => 'course_message'), :class => "resourcesGrey" %></li>
|
||||||
|
|
Loading…
Reference in New Issue