parent
9b98bdcf5c
commit
64e1d88285
|
@ -98,6 +98,10 @@ class UsersController < ApplicationController
|
||||||
|
|
||||||
# 用户消息
|
# 用户消息
|
||||||
def user_messages
|
def user_messages
|
||||||
|
unless User.current.logged?
|
||||||
|
render_403
|
||||||
|
return
|
||||||
|
end
|
||||||
# 当前用户查看消息,则设置消息为已读
|
# 当前用户查看消息,则设置消息为已读
|
||||||
querys = @user.course_messages
|
querys = @user.course_messages
|
||||||
if User.current.id == @user.id
|
if User.current.id == @user.id
|
||||||
|
|
|
@ -54,48 +54,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<!--消息提醒-->
|
|
||||||
<li id="current_message_li">
|
|
||||||
<%= link_to "#{l(:label_forge_message)}<span class='pic_triangle'></span>".html_safe %>
|
|
||||||
<ul id="message_sub_menu" style="right: 0px;display: none;left: 10px;">
|
|
||||||
<% if @show_course == 1 %>
|
|
||||||
<% user_course = get_user_course User.current%>
|
|
||||||
<% unless user_course.empty? %>
|
|
||||||
<li id="my_courses_message_li">
|
|
||||||
<%=link_to l(:label_course_message), {:controller => 'users', :action => 'user_courses', id: User.current.id},target:"_blank", :class => "parent" %>
|
|
||||||
<ul id="my_courses_message_ul">
|
|
||||||
<% user_course.reverse.each do |course| %>
|
|
||||||
<li title="<%=course.name%>">
|
|
||||||
<%= link_to course.name, {:controller => 'courses',:action => 'show',:id => course.id},target:"_blank" %>
|
|
||||||
</li>
|
|
||||||
<% end %>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<% unless User.current.projects.empty? %>
|
|
||||||
<li id="my_projects_message_li">
|
|
||||||
<%= "#{l(:label_project_message)}"+"("+User.current.count_new_issue_assign_to.count.to_s+")" %>
|
|
||||||
<ul id="my_projects_message_ul" >
|
|
||||||
<% User.current.count_new_issue_assign_to.reverse.each do |issue_assign| %>
|
|
||||||
<li title="<%= issue_assign.forge_message %>">
|
|
||||||
<%= link_to issue_assign.forge_message, {:controller => 'issues', :action => 'show',id: issue_assign.forge_message_id, host: Setting.host_name }, target:"_blank" %>
|
|
||||||
</li>
|
|
||||||
<% end %>
|
|
||||||
<% User.current.issue_status_update.reverse.each do |issue_update| %>
|
|
||||||
<li title="<%= issue_update.forge_message %>">
|
|
||||||
<%= link_to issue_update.forge_message.issue, {:controller => 'issues', :action => 'show',id: issue_update.forge_message_id, host: Setting.host_name }, target:"_blank" %>
|
|
||||||
</li>
|
|
||||||
<% end %>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<% end %>
|
|
||||||
<li>
|
|
||||||
<%=link_to "...", {:controller => 'my', :action=> 'account', host: Setting.host_user}%>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<%= header_render_menu :account_menu -%>
|
<%= header_render_menu :account_menu -%>
|
||||||
|
|
Loading…
Reference in New Issue