jounal状态

This commit is contained in:
huang 2015-08-20 14:32:46 +08:00
parent b40122c9ee
commit 93f44287aa
2 changed files with 5 additions and 3 deletions

View File

@ -148,7 +148,7 @@ class UsersController < ApplicationController
@user_forge_messages = ForgeMessage.where("forge_message_type =? and user_id =?", "Issue", @user).order("created_at desc")
@user_forge_messages_count = @user_forge_messages.count
when 'issue_update' # 缺陷状态更新、留言
@user_forge_messages = ForgeMessage.where("forge_message_type =? and user_id =?", "Forum", @user).order("created_at desc")
@user_forge_messages = ForgeMessage.where("forge_message_type =? and user_id =?", "Journal", @user).order("created_at desc")
@user_forge_messages_count = @user_forge_messages.count
when 'forum'
@user_memo_messages = MemoMessage.where("memo_type =? and user_id =?", "Memo", @user).order("created_at desc")

View File

@ -47,7 +47,7 @@
<%# 公共贴吧 %>
<% unless @user_memo_messages.nil? %>
<% if @user_memo_messages_count > 0 %>
<li><a href="javascript:void(0);" class="resourcesGrey"><%= link_to "发布了帖子",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user, :type => 'forum'} %></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 => 'forum'} %></a></li>
<% end %>
<% end %>
<%# 用户留言 %>
@ -63,6 +63,7 @@
<div>
<% if @new_message_count >0 %>
<%# 课程消息 %>
<% unless @user_course_messages.nil? %>
<% @user_course_messages.each do |ucm| %>
<% if ucm.course_message_type == "News" %>
@ -203,9 +204,10 @@
<% end %>
<% end %>
<% end %>
<%# 公共贴吧 %>
<% unless @user_memo_messages.nil? %>
<% @user_memo_messages.each do |urm| %>
<% if urm.memo_type == "Memo" %>
<% if urm.memo_type == "forum" %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl">
<a href="javascript:void(0);"><%= image_tag(url_to_avatar(urm.memo.author), :width => "30", :height => "30") %></a>