消息列表

This commit is contained in:
cxt 2016-07-11 17:33:11 +08:00
parent 22745edb9b
commit 89819f5ccd
1 changed files with 7 additions and 5 deletions

View File

@ -229,7 +229,7 @@
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% if ma.course_message_type == "HomeworkCommon" && ma.status == 5 && ma.course_message %>
<% if ma.course_message_type == "HomeworkCommon" && ma.status == 5 %>
<ul class="homepageNewsList fl" id="course_message_homework_<%=ma.id %>">
<%= render :partial => 'apply_homework_course_message', :locals => {:ma => ma} %>
</ul>
@ -569,7 +569,9 @@
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% if ma.course_message_type == "JoinCourseRequest" && !ma.nil? && ma.course_message %>
<!--# ma.course_message_id 是用户id-->
<% if ma.course_message_type == "JoinCourseRequest" && !ma.nil? %>
<ul class="homepageNewsList fl" id="course_message_join_<%=ma.id %>">
<%= render :partial => 'join_course_course_message', :locals => {:ma => ma} %>
</ul>
@ -607,7 +609,7 @@
<% end %>
<!--被老师拉入课程-->
<% if ma.course_message_type == "JoinCourse" and ma.status == 0 && ma.course_message %>
<% if ma.course_message_type == "JoinCourse" and ma.status == 0 %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl">
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(User.find(ma.course_message_id)), :width => "30", :height => "30"), user_path(ma.course_message_id), :target => '_blank' %></a>
@ -641,7 +643,7 @@
<% end %>
<!--被老师拉入课程-->
<% if ma.course_message_type == "JoinCourse" and ma.status == 1 && ma.course_message %>
<% if ma.course_message_type == "JoinCourse" and ma.status == 1 %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl">
<a href="javascript:void(0);"><div class="navHomepageLogo fl"><%= image_tag("/images/trustie_logo1.png", width: "30px", height: "30px", class: "mt3") %></div></a>
@ -675,7 +677,7 @@
<% end %>
<!--被老师移出课程-->
<% if ma.course_message_type == "RemoveFromCourse" && ma.course_message %>
<% if ma.course_message_type == "RemoveFromCourse" %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl">
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(User.find(ma.course_message_id)), :width => "30", :height => "30"), user_path(ma.course_message_id), :target => '_blank' %></a>