403 lines
30 KiB
Plaintext
403 lines
30 KiB
Plaintext
<% if ma.class == CourseMessage %>
|
||
<% if ma.course_message_type == "News" %>
|
||
<ul class="homepageNewsList fl">
|
||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.author), :width => "30", :height => "30"),user_path(ma.course_message.author) %></a></li>
|
||
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了通知:</span></li>
|
||
<li class="homepageNewsContent fl">
|
||
<%= link_to ma.course_message.title, {:controller => 'news', :action => 'show', :id => ma.course_message.id },
|
||
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
|
||
<!--:onmouseover =>"message_titile_show($(this),event)",-->
|
||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||
</li>
|
||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||
</ul>
|
||
<% end %>
|
||
<% if ma.course_message_type == "Comment" %>
|
||
<ul class="homepageNewsList fl">
|
||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.author), :width => "30", :height => "30"), user_path(ma.course_message.author) %></a></li>
|
||
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">评论了通知:</span></li>
|
||
<li class="homepageNewsContent fl">
|
||
<%= link_to ma.course_message.commented.title, {:controller => 'news', :action => 'show', :id => ma.course_message.commented.id },
|
||
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
|
||
<!--:onmouseover =>"message_titile_show($(this),event)",-->
|
||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||
</li>
|
||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||
</ul>
|
||
<% end %>
|
||
<% if ma.course_message_type == "HomeworkCommon" && ma.status.nil?%>
|
||
<ul class="homepageNewsList fl">
|
||
<li class="homepageNewsPortrait 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>
|
||
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师", user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
|
||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了课程作业:</span>
|
||
</li>
|
||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||
<% if !User.current.allowed_to?(:as_teacher, ma.course_message.course) && cur_user_works_for_homework(ma.course_message).nil? %>
|
||
<%= link_to "作业标题:" + ma.course_message.name, new_student_work_path(:homework => ma.course_message.id),
|
||
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
|
||
<!--:onmouseover =>"message_titile_show($(this),event)",-->
|
||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||
<% else %>
|
||
<%= link_to "作业标题:" + ma.course_message.name, student_work_index_path(:homework => ma.course_message.id),
|
||
:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
|
||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||
<% end %>
|
||
</a></li>
|
||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||
</ul>
|
||
<% end %>
|
||
<% if ma.course_message_type == "HomeworkCommon" && ma.status == 1 %>
|
||
<ul class="homepageNewsList fl">
|
||
<li class="homepageNewsPortrait 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>
|
||
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.user.lastname + ma.course_message.user.firstname + '老师',
|
||
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :title => "#{ma.course_message.user.lastname + ma.course_message.user.firstname}老师" %>
|
||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布的作业:</span></li>
|
||
<li class="homepageHomeworkContent fl">
|
||
<%= link_to "作业标题:" + ma.course_message.name, student_work_index_path(:homework => ma.course_message.id),
|
||
:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
|
||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||
</li>
|
||
<li class="homepageHomeworkContentWarn fl"> 截止时间快到啦</li>
|
||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||
</ul>
|
||
<% end %>
|
||
<!--作品开启匿评 待整合:时间紧-->
|
||
<% if ma.course_message_type == "HomeworkCommon" && ma.status == 2 %>
|
||
<ul class="homepageNewsList fl">
|
||
<li class="homepageNewsPortrait 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>
|
||
<li class="homepageNewsPubType fl">
|
||
<%= link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师",
|
||
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
|
||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">启动了作业匿评:</span>
|
||
</li>
|
||
<li class="homepageNewsContent fl">
|
||
<%= link_to "作业标题:" + ma.course_message.name, student_work_index_path(:homework => ma.course_message.id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
||
:onmouseover => "message_titile_show($(this),event)",
|
||
:onmouseout => "message_titile_hide($(this))" %>
|
||
</li>
|
||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||
</ul>
|
||
<% end %>
|
||
<!--作品关闭匿评-->
|
||
<% if ma.course_message_type == "HomeworkCommon" && ma.status == 3 %>
|
||
<ul class="homepageNewsList fl">
|
||
<li class="homepageNewsPortrait 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>
|
||
<li class="homepageNewsPubType fl">
|
||
<%=link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师",
|
||
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">关闭了作业匿评:</span></li>
|
||
<li class="homepageNewsContent fl">
|
||
<%= link_to "作业标题:" + ma.course_message.name, student_work_index_path(:homework => ma.course_message.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
|
||
<!--:onmouseover =>"message_titile_show($(this),event)",-->
|
||
<!--:onmouseout => "message_titile_hide($(this))"%>-->
|
||
</li>
|
||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||
</ul>
|
||
<% end %>
|
||
|
||
<% if ma.course_message_type == "HomeworkCommon" && ma.status == 4 %>
|
||
<ul class="homepageNewsList fl">
|
||
<li class="homepageNewsPortrait 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>
|
||
<li class="homepageNewsPubType fl">
|
||
<%= link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师",
|
||
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
|
||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">启动作业匿评失败</span>
|
||
</li>
|
||
<li class="homepageNewsContent fl">
|
||
<%= link_to truncate(ma.course_message.name,:length=>25)+'(失败原因:提交作品的人数低于2人)', student_work_index_path(:homework => ma.course_message.id), :class => "#{ma.viewed == 0 ? "c_red" : "newsGrey "}" %>
|
||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||
</li>
|
||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||
</ul>
|
||
<% end %>
|
||
|
||
<% if ma.course_message_type == "Poll" %>
|
||
<ul class="homepageNewsList fl">
|
||
<li class="homepageNewsPortrait 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>
|
||
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了问卷:</span></li>
|
||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||
<%= link_to format_activity_title(" #{ma.course_message.polls_name.nil? ? "未命名问卷" : ma.course_message.polls_name}"), poll_path(ma.course_message.id),
|
||
:class=>"#{ma.viewed==0?"newsBlack":"newsGrey"}" %>
|
||
<!--:onmouseover =>"message_titile_show($(this),event)",-->
|
||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||
</a></li>
|
||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||
</ul>
|
||
<% end %>
|
||
<% if ma.course_message_type == "Message" %>
|
||
<ul class="homepageNewsList fl">
|
||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.author), :width => "30", :height => "30"), user_path(ma.course_message.author) %></a></li>
|
||
<li class="homepageNewsPubType fl">
|
||
<%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">
|
||
<%= ma.course_message.parent_id.nil? ? "发布了课程帖子:" : "评论了课程帖子:" %></span></li>
|
||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||
<%= link_to ma.course_message.subject, course_boards_path(ma.course_message.course, :parent_id => ma.course_message.parent_id ? ma.course_message.parent_id : ma.course_message.id, :topic_id => ma.course_message.id),
|
||
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}" %>
|
||
<!--:onmouseover =>"message_titile_show($(this),event)",-->
|
||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||
</a></li>
|
||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||
</ul>
|
||
<% end %>
|
||
<% if ma.course_message_type == "StudentWorksScore" %>
|
||
<ul class="homepageNewsList fl">
|
||
<li class="homepageNewsPortrait fl">
|
||
<% if ma.course_message.reviewer_role == 3 %>
|
||
<%=link_to image_tag(url_to_avatar(""), :width => "30", :height => "30") %>
|
||
<% else %>
|
||
<%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %>
|
||
<% end %>
|
||
</li>
|
||
<li class="homepageNewsPubType fl">
|
||
<% if ma.course_message.reviewer_role == 3 %>
|
||
<span class="newsBlue homepageNewsPublisher">匿名用户</span>
|
||
<% else %>
|
||
<%= link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师",
|
||
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
|
||
<% end %>
|
||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">
|
||
<%= ma.status == 0 ? "评阅了您的作品:" : "重新评阅了您的作品:" %>
|
||
</span>
|
||
</li>
|
||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||
<% unless ma.content.nil? %>
|
||
<%= link_to ma.content.html_safe, student_work_index_path(:homework => ma.course_message.student_work.homework_common_id, :student_work_id => ma.course_message.student_work),
|
||
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
|
||
<!--:onmouseover =>"message_titile_show($(this),event)",-->
|
||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||
</a></li>
|
||
<% end %>
|
||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||
</ul>
|
||
<% end %>
|
||
<% if ma.course_message_type == "JournalsForMessage" %>
|
||
<% if ma.course_message.jour_type == 'Course' %>
|
||
<% if params[:type] != 'homework' %>
|
||
<ul class="homepageNewsList fl">
|
||
<li class="homepageNewsPortrait 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>
|
||
<li class="homepageNewsPubType fl"><%= link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
|
||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">在课程中留言了:</span>
|
||
</li>
|
||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||
<%= link_to ma.course_message.notes.html_safe, course_feedback_path(:id => ma.course_id),
|
||
:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
|
||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||
</a>
|
||
</li>
|
||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||
</ul>
|
||
<% end %>
|
||
<% else %>
|
||
<ul class="homepageNewsList fl">
|
||
<li class="homepageNewsPortrait 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>
|
||
<li class="homepageNewsPubType fl">
|
||
<%= link_to ma.course_message.user.lastname + ma.course_message.user.firstname +
|
||
"#{ma.course_message.user.allowed_to?(:as_teacher, ma.course)?"老师":"同学"}",
|
||
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
|
||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">回复了作品评论:</span>
|
||
</li>
|
||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||
<%= link_to ma.course_message.notes, student_work_index_path(:homework => ma.course_message.jour.student_work.homework_common_id, :student_work_id => ma.course_message.jour.student_work), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
|
||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||
</a>
|
||
</li>
|
||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||
</ul>
|
||
<% end %>
|
||
<% end %>
|
||
<!-- 作业迟交,不能参与匿评提醒消息 -->
|
||
<% if ma.course_message_type == "StudentWork" && !ma.course_message.homework_common.nil? && !User.current.allowed_to?(:as_teacher, ma.course_message.homework_common.course) %>
|
||
<ul class="homepageNewsList fl">
|
||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%= link_to image_tag(url_to_avatar(ma.course_message.homework_common.user), :width => "30", :height => "30"), user_path(ma.course_message.homework_common.user) %></a></li>
|
||
<li class="homepageNewsPubType fl">
|
||
<%=link_to ma.course_message.homework_common.user.show_name+"老师", user_path(ma.course_message.homework_common.user), :class => "newsBlue homepageNewsPublisher" %>
|
||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布的作业:</span>
|
||
</li>
|
||
<li class="homepageHomeworkContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||
<%= link_to "作业标题:" + ma.course_message.homework_common.name, student_work_index_path(:homework => ma.course_message.homework_common_id),
|
||
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}" %>
|
||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||
</a>
|
||
</li>
|
||
<li class="homepageHomeworkContentWarn fl"> 您成功提交了作品(但被标记为迟交啦)</li>
|
||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||
</ul>
|
||
<% end %>
|
||
<!-- 创建课程消息 -->
|
||
<% if ma.course_message_type == "Course" %>
|
||
<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>
|
||
</li>
|
||
<li class="homepageNewsPubType fl">
|
||
<span class="newsBlue homepageNewsPublisher">系统提示</span>
|
||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">您成功创建了课程:</span>
|
||
</li>
|
||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||
<%= link_to "课程名称:" + ma.course_message.name, course_path(ma.course_message),
|
||
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}" %>
|
||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||
</a></li>
|
||
<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);"><div class="navHomepageLogo fl"><%= image_tag("/images/trustie_logo1.png", width: "30px", height: "30px", class: "mt3") %></div></a></li>
|
||
<li class="homepageNewsPubType fl">
|
||
<span class="newsBlue homepageNewsPublisher">系统提示</span>
|
||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">您有了新的课程成员申请:</span>
|
||
</li>
|
||
<li class="homepageHomeworkContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||
<%= link_to User.find(ma.course_message_id).name+"申请成为课程\""+"#{Course.find(ma.course_id).name}"+"\"的"+"#{ma.content == '9' ? "教师" : "教辅"}", user_path(User.find(ma.course_message_id), :course_id => ma.course_id),
|
||
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}" %>
|
||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||
</a>
|
||
</li>
|
||
<li class="homepageHomeworkContentWarn fl">
|
||
<span id="deal_info_<%=ma.id%>">
|
||
<% if ma.status == 0 || ma.status.nil?%>
|
||
<%= link_to '同意',dealwith_apply_request_user_path(User.current,:agree=>'Y',:msg_id=>ma.id),:remote=>'true'%>
|
||
|
|
||
<%= link_to '拒绝',dealwith_apply_request_user_path(User.current,:agree=>'N',:msg_id=>ma.id),:remote=>'true'%>
|
||
<% elsif ma.status == 1%> <!-- 同意 -->
|
||
您已经同意了该申请
|
||
<% elsif ma.status == 2%> <!-- 拒绝 -->
|
||
您已经拒绝了该申请
|
||
<%end %>
|
||
</span>
|
||
</li>
|
||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||
</ul>
|
||
<% end %>
|
||
<% if ma.course_message_type == "CourseRequestDealResult" %>
|
||
<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></li>
|
||
<li class="homepageNewsPubType fl">
|
||
<span class="newsBlue homepageNewsPublisher">系统提示</span>
|
||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">
|
||
课程申请进度反馈:</span>
|
||
</li>
|
||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||
<%= link_to ma.status == 1 ?
|
||
'您申请成为课程"'+Course.find(ma.course_id).name+'"的'+(ma.content == '9' ? '老师' : '教辅')+'申请已通过'
|
||
:
|
||
'您申请成为课程"'+Course.find(ma.course_id).name+'"的'+(ma.content == '9' ? '老师' : '教辅')+'的申请被拒绝', course_path(Course.find(ma.course_id)),
|
||
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}" %>
|
||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||
</a>
|
||
</span>
|
||
</li>
|
||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||
</ul>
|
||
<% end %>
|
||
|
||
<!--被老师拉入课程-->
|
||
<% 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) %></a>
|
||
</li>
|
||
<li class="homepageNewsPubType fl">
|
||
<%=link_to User.find(ma.course_message_id), user_path(User.find(ma.course_message_id)), :class => "newsBlue homepageNewsPublisher" %>
|
||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">将您加入了课程:</span>
|
||
</li>
|
||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||
<%= link_to ma.course.name, course_member_path(ma.course), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
|
||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||
</a>
|
||
</li>
|
||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||
</ul>
|
||
<% end %>
|
||
|
||
<!--被老师拉入课程-->
|
||
<% 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>
|
||
</li>
|
||
<li class="homepageNewsPubType fl">
|
||
<span class="newsBlue homepageNewsPublisher">系统提示</span>
|
||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">您增加了新的课程成员:</span>
|
||
</li>
|
||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||
<%= link_to User.find(ma.course_message_id).login+"("+(User.find(ma.course_message_id).realname ? User.find(ma.course_message_id).realname : User.find(ma.course_message_id).login) +")", user_path(ma.course_message_id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
|
||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||
</a>
|
||
</li>
|
||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||
</ul>
|
||
<% end %>
|
||
|
||
<!--被老师移出课程-->
|
||
<% 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) %></a>
|
||
</li>
|
||
<li class="homepageNewsPubType fl">
|
||
<%=link_to User.find(ma.course_message_id), user_path(User.find(ma.course_message_id)), :class => "newsBlue homepageNewsPublisher" %>
|
||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">将您移出了课程:</span>
|
||
</li>
|
||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||
<%= link_to ma.course.name, member_course_path(ma.course), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
|
||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||
</a>
|
||
</li>
|
||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||
</ul>
|
||
<% end %>
|
||
|
||
<!--老师发布测验 发给学生看-->
|
||
<% if ma.course_message_type == "Exercise" && ma.status == 2 %>
|
||
<ul class="homepageNewsList fl">
|
||
<li class="homepageNewsPortrait 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>
|
||
<li class="homepageNewsPubType fl">
|
||
<span><%=link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师",
|
||
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %></span><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了课程测验 :</span></li>
|
||
<li class="homepageNewsContent fl">
|
||
<%= link_to "测验题目:" + ma.course_message.exercise_name, exercise_path(:id => ma.course_message.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
|
||
<!--:onmouseover =>"message_titile_show($(this),event)",-->
|
||
<!--:onmouseout => "message_titile_hide($(this))"%>-->
|
||
</li>
|
||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||
</ul>
|
||
<% end %>
|
||
|
||
|
||
<% if ma.course_message_type == "Exercise" && ma.status == 3 %>
|
||
<ul class="homepageNewsList fl">
|
||
<li class="homepageNewsPortrait 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>
|
||
<li class="homepageNewsPubType fl">
|
||
<span> <%=link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师",
|
||
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %></span><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布的测验:</span></li>
|
||
<li class="homepageHomeworkContent fl">
|
||
<%= link_to "测验题目:" + ma.course_message.exercise_name, exercise_path(:id => ma.course_message.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
|
||
<!--:onmouseover =>"message_titile_show($(this),event)",-->
|
||
<!--:onmouseout => "message_titile_hide($(this))"%>-->
|
||
</li>
|
||
<li class="homepageHomeworkContentWarn fl">截止时间快到啦 </li>
|
||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||
</ul>
|
||
<% end %>
|
||
<% end %> |