1.将作品评论、回复作品评论等加入至作业消息列表
This commit is contained in:
parent
c906c7ee1d
commit
31c5cf2163
|
@ -130,7 +130,7 @@ class UsersController < ApplicationController
|
||||||
when 'apply'
|
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 in ('HomeworkCommon','StudentWorksScore','JournalsForMessage') and user_id =?", @user).order("created_at desc")
|
||||||
when 'course_message'
|
when 'course_message'
|
||||||
@message_alls = CourseMessage.where("course_message_type =? and user_id =?", "Message", @user).order("created_at desc")
|
@message_alls = CourseMessage.where("course_message_type =? and user_id =?", "Message", @user).order("created_at desc")
|
||||||
# when 'forge_message'
|
# when 'forge_message'
|
||||||
|
|
|
@ -397,25 +397,26 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if ma.course_message_type == "JournalsForMessage" %>
|
<% if ma.course_message_type == "JournalsForMessage" %>
|
||||||
<% if ma.course_message.jour_type == 'Course' %>
|
<% if ma.course_message.jour_type == 'Course' %>
|
||||||
<ul class="homepageNewsList fl">
|
<% if params[:type] != 'homework' %>
|
||||||
<li class="homepageNewsPortrait fl">
|
<ul class="homepageNewsList fl">
|
||||||
<a href="javascript:void(0);"><%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a>
|
<li class="homepageNewsPortrait fl">
|
||||||
</li>
|
<a href="javascript:void(0);"><%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a>
|
||||||
<li class="homepageNewsPubType fl"><%= link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
|
</li>
|
||||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">在课程中留言了:</span>
|
<li class="homepageNewsPubType fl"><%= link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
|
||||||
</li>
|
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">在课程中留言了:</span>
|
||||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
</li>
|
||||||
<%= link_to ma.course_message.notes.html_safe, course_feedback_path(:id => ma.course_id),
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||||
:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
<%= link_to ma.course_message.notes.html_safe, course_feedback_path(:id => ma.course_id),
|
||||||
:onmouseover => "message_titile_show($(this),event)",
|
:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
||||||
:onmouseout => "message_titile_hide($(this))" %></a>
|
:onmouseover => "message_titile_show($(this),event)",
|
||||||
</li>
|
:onmouseout => "message_titile_hide($(this))" %></a>
|
||||||
<div style="display: none" class="message_title_red system_message_style">
|
</li>
|
||||||
<%= ma.course_message.notes.html_safe %>
|
<div style="display: none" class="message_title_red system_message_style">
|
||||||
</div>
|
<%= ma.course_message.notes.html_safe %>
|
||||||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
</div>
|
||||||
</ul>
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||||
|
</ul>
|
||||||
|
<% end %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<ul class="homepageNewsList fl">
|
<ul class="homepageNewsList fl">
|
||||||
<li class="homepageNewsPortrait fl">
|
<li class="homepageNewsPortrait fl">
|
||||||
|
|
Loading…
Reference in New Issue