Merge branch 'dev_hjq' of http://repository.trustie.net/xianbo/trustie2 into dev_hjq
This commit is contained in:
commit
001c2f48f6
|
@ -148,6 +148,8 @@ class UsersController < ApplicationController
|
|||
@message_alls << message_all.message
|
||||
end
|
||||
end
|
||||
when 'system_message'
|
||||
@message_alls = SystemMessage.order("created_at desc").all
|
||||
when 'apply'
|
||||
@message_alls = ForgeMessage.where("forge_message_type =? and user_id =?" , "AppliedProject", @user).order("created_at desc")
|
||||
when 'homework'
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
<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 => 'apply'), :class => "resourcesGrey" %></li>
|
||||
<%# 系统消息 %>
|
||||
<li><%= link_to "系统消息", user_message_path(User.current, :type => 'system_message'), :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>
|
||||
|
@ -42,10 +44,16 @@
|
|||
<%# 系统消息 %>
|
||||
<% @user_system_messages.each do |usm| %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);">ddddddddddddddd</a></li>
|
||||
<li class="homepageNewsPubType fl">Trustiep平台<span class="homepageNewsType fl">发布新消息:</span></li>
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<a href="javascript:void(0);">
|
||||
<div class="navHomepageLogo fl">
|
||||
<%=image_tag("/images/logo.png",width:"30px", height: "30px",class: "mt3") %>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl"><span class="newsBlue homepageNewsPublisher" >Trustie平台</span><span class="homepageNewsType fl">发布新消息:</span></li>
|
||||
<li class="homepageNewsContent fl">
|
||||
<%= link_to usm.content, {:controller => 'system_messages', :action => 'index'},
|
||||
<%= link_to usm.content.html_safe, {:controller => 'system_messages', :action => 'index'},
|
||||
:class =>"newsGrey",
|
||||
:title => "#{usm.content.html_safe}" %></li>
|
||||
<li class="homepageNewsTime fl"><%= time_tag(usm.created_at).html_safe %> </li>
|
||||
|
@ -303,6 +311,24 @@
|
|||
</ul>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<%# 系统消息 %>
|
||||
<% if ma.class == SystemMessage %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<a href="javascript:void(0);">
|
||||
<div class="navHomepageLogo fl">
|
||||
<%=image_tag("/images/logo.png",width:"30px", height: "30px",class: "mt3")%>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl"><span class="newsBlue homepageNewsPublisher" >Trustie平台</span><span class="homepageNewsType fl">发布新消息:</span></li>
|
||||
<li class="homepageNewsContent fl">
|
||||
<%= link_to ma.content.html_safe, {:controller => 'system_messages', :action => 'index'},
|
||||
:class =>"newsGrey",
|
||||
:title => "#{ma.content.html_safe}" %></li>
|
||||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<ul class="wlist" style=" border:none; padding-top: 15px;">
|
||||
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
|
||||
|
|
Loading…
Reference in New Issue