diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb index f6b083b4d..2935d018a 100644 --- a/app/helpers/users_helper.rb +++ b/app/helpers/users_helper.rb @@ -68,8 +68,14 @@ module UsersHelper '课程讨论' when 'course_news' '课程通知' + when 'poll' + '课程问卷' when 'issue' '项目任务' + when 'forge_message' + '项目讨论' + when 'forge_news' + '项目新闻' when 'forum' '贴吧帖子' when 'user_feedback' diff --git a/app/views/users/_selector_for_messages.html.erb b/app/views/users/_selector_for_messages.html.erb new file mode 100644 index 000000000..0bffdca2b --- /dev/null +++ b/app/views/users/_selector_for_messages.html.erb @@ -0,0 +1,37 @@ +
+
<%= title_for_message(params[:type]) %>
+ +
\ No newline at end of file diff --git a/app/views/users/_user_message_course.html.erb b/app/views/users/_user_message_course.html.erb index fee28f761..07066f6dc 100644 --- a/app/views/users/_user_message_course.html.erb +++ b/app/views/users/_user_message_course.html.erb @@ -99,17 +99,17 @@

课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.term %>)

作业标题:<%= ma.course_message.name %>

-

提交截止:<%= ma.course_message.end_time %>@nbsp; 24点

-

匿评关闭:<%= ma.course_message.homework_detail_manual.evaluation_end %>@nbsp;@nbsp;24点

+

提交截止:<%= ma.course_message.end_time %>  24点

+

匿评关闭:<%= ma.course_message.homework_detail_manual.evaluation_end %> @ 24点

迟交扣分:<%= ma.course_message.late_penalty %>分

请同学们抓紧时间提交自己的作品,谢谢!

<% else %>

<%= User.current.lastname + User.current.firstname %>老师您好!<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师发布的作业截止日期快到了:

课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.term %>)

作业标题:<%= ma.course_message.name %>

-

提交截止:<%= ma.course_message.end_time %>@nbsp;@nbsp;24点

-

匿评开始:<%= ma.course_message.homework_detail_manual.evaluation_start %>@nbsp;@nbsp;24点

-

匿评关闭:<%= ma.course_message.homework_detail_manual.evaluation_end %>@nbsp;@nbsp;24点

+

提交截止:<%= ma.course_message.end_time %>  24点

+

匿评开始:<%= ma.course_message.homework_detail_manual.evaluation_start %>  24点

+

匿评关闭:<%= ma.course_message.homework_detail_manual.evaluation_end %>  24点

迟交扣分:<%= ma.course_message.late_penalty %>分

缺评扣分:<%= ma.course_message.homework_detail_manual.absence_penalty %>分

您可以修改作业内容、评分规则、匿评过程等,谢谢!

diff --git a/app/views/users/_user_message_userfeedaback.html.erb b/app/views/users/_user_message_userfeedaback.html.erb index 672dfda64..23a0774c3 100644 --- a/app/views/users/_user_message_userfeedaback.html.erb +++ b/app/views/users/_user_message_userfeedaback.html.erb @@ -9,7 +9,7 @@ "><%= ma.journals_for_message.reply_id == 0 ? "给你留言了:" : "回复了你的留言:" %>
  • - <%= link_to ma.journals_for_message.notes.html_safe, feedback_path(ma.journals_for_message.jour_id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", + <%= link_to ma.journals_for_message.notes.gsub("

    ","").gsub("

    ","").gsub("
    ","").html_safe, feedback_path(ma.journals_for_message.jour_id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :onmouseover =>"message_titile_show($(this),event)", :onmouseout => "message_titile_hide($(this))" %>
  • diff --git a/app/views/users/user_messages.html.erb b/app/views/users/user_messages.html.erb index d0f7bb9bb..f83e5617c 100644 --- a/app/views/users/user_messages.html.erb +++ b/app/views/users/user_messages.html.erb @@ -1,37 +1,4 @@ -
    -
    <%= title_for_message(params[:type]) %>
    - -
    +<%= render :partial => 'users/selector_for_messages'%>
    <% if (!@message_alls.nil? && @message_alls.count >0) %> diff --git a/app/views/users/user_system_messages.html.erb b/app/views/users/user_system_messages.html.erb index 899cd7a8f..64b0dff0c 100644 --- a/app/views/users/user_system_messages.html.erb +++ b/app/views/users/user_system_messages.html.erb @@ -1,35 +1,4 @@ -
    -
    系统消息
    -
      -
    • -
        -
      • <%= link_to "全部",user_message_path(User.current), :class => "resourcesGrey" %>
      • -
      • <%= link_to "未读消息", user_message_path(User.current, :type => 'unviewed'), :class => "resourcesGrey" %>
      • -
      • <%= link_to "用户申请", user_message_path(User.current, :type => 'apply'), :class => "resourcesGrey" %>
      • - <%# 课程相关消息 %> -
      • <%= link_to "作业消息", user_message_path(User.current, :type => 'homework'), :class => "resourcesGrey" %>
      • -
      • <%= link_to "课程讨论",user_message_path(User.current, :type => 'course_message'), :class => "resourcesGrey" %>
      • -
      • <%= link_to "课程通知",user_message_path(User.current, :type => 'course_news'), :class => "resourcesGrey" %>
      • - - - - - <%# 项目相关消息 %> -
      • <%= link_to "项目任务", user_message_path(User.current, :type => 'issue'), :class => "resourcesGrey" %>
      • - - - - - <%# 项目相关消息 %> -
      • <%= link_to "贴吧帖子", user_message_path(User.current, :type => 'forum'), :class => "resourcesGrey" %>
      • - <%# 系统贴吧 %> -
      • <%= link_to "用户留言",user_message_path(User.current, :type => 'user_feedback'), :class => "resourcesGrey" %>
      • - <%# 系统消息 %> -
      • <%= link_to "系统消息", user_system_messages_path(User.current), :class => "resourcesGrey" %>
      • -
      -
    • -
    -
    +<%= render :partial => 'users/selector_for_messages'%> <% @sytem_messages.each do |system_message| %>