增加请求加入课程消息

This commit is contained in:
ouyangxuhua 2015-10-20 17:31:58 +08:00
parent a5c220eac9
commit ab97ba4aa0
1 changed files with 25 additions and 0 deletions

View File

@ -428,4 +428,29 @@
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% if ma.course_message_type == "JoinCourseRequest" %>
<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) %>
</a></li>
<li class="homepageNewsPubType fl">
<%= link_to User.find(ma.course_message_id), user_path(ma.course_message_id), :class => "newsBlue homepageNewsPublisher" %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">申请成为您课程的<%= ma.content %>
</span>
</li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to "课程名称:" + ma.course, course_path(ma.course),
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}",
:onmouseover => "message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %></a></li>
<div style="display: none" class="message_title_red system_message_style">
<p>申请人资料:</p>
<p>姓名:<%= User.find(ma.course_message_id).show_name %></p>
<p>职称:<%= User.find(ma.course_message_id).show_name %></p>
</div>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% end %>