添加项目缺陷消息显示

This commit is contained in:
huang 2015-08-17 16:15:40 +08:00
parent 9c8679eda8
commit dd1dd143f6
2 changed files with 8 additions and 1 deletions

View File

@ -123,7 +123,7 @@ class UsersController < ApplicationController
@user_course_messages = CourseMessage.where("course_message_type =? and user_id =?", "Poll", @user).order("created_at desc")
when ""
when 'issue'
@user_course_messages = CourseMessage.where("course_message_type =? and user_id =?", "Issue", @user).order("created_at desc")
@user_course_messages = ForgeMessage.where("course_message_type =? and user_id =?", "Issue", @user).order("created_at desc")
end
respond_to do |format|
format.html{render :layout=>'base_users_new'}

View File

@ -13,6 +13,7 @@
<li><a href="javascript:void(0);" class="resourcesGrey"><%= link_to "课程通知",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user, :type => 'news'} %></a></li>
<!--<li><a href="javascript:void(0);" class="resourcesGrey">指派给我</a></li>-->
<li><a href="javascript:void(0);" class="resourcesGrey"><%= link_to "问卷调查",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user, :type => 'poll'} %></a></li>
<li><a href="javascript:void(0);" class="resourcesGrey"><%= link_to "指派给我",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user, :type => 'issue'} %></a></li>
</ul>
</li>
</ul>
@ -70,6 +71,12 @@
<% end %>
<div class="cl"></div>
<% end %>
<!--项目消息-->
<% @user_forge_messages.each do |ufm| %>
<% if ufm.forge_message_type == "Issue" %>
<% end %>
<% end %>
<% else %>
<div class="flash notice">暂无消息!</div>
<% end %>