From 0a45e0848816d8d8b8aec37949429c56ebd4eb8f Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 7 Sep 2015 16:14:34 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E6=B6=88=E6=81=AF=E4=B8=BA0=E7=9A=84?= =?UTF-8?q?=E6=97=B6=E5=80=99=E4=B8=8D=E6=98=BE=E7=A4=BA=20=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E6=95=B0=E5=92=8C=E2=80=9C=E5=85=A8=E9=83=A8=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E5=B7=B2=E8=AF=BB=E2=80=9D=E3=80=82=202=E3=80=81?= =?UTF-8?q?=E6=B6=88=E6=81=AF=E4=B8=8D=E4=B8=BA=E7=A9=BA=EF=BC=8C=E6=9C=AA?= =?UTF-8?q?=E8=AF=BB=E6=B6=88=E6=81=AF=E4=B8=BA=E7=A9=BA=E7=9A=84=E6=97=B6?= =?UTF-8?q?=E5=80=99=E4=B8=8D=E6=98=BE=E7=A4=BA=E2=80=9C=E5=85=A8=E9=83=A8?= =?UTF-8?q?=E8=AE=BE=E4=B8=BA=E5=B7=B2=E8=AF=BB=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/user_messages.html.erb | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/app/views/users/user_messages.html.erb b/app/views/users/user_messages.html.erb index 6a6597af9..cd64fb227 100644 --- a/app/views/users/user_messages.html.erb +++ b/app/views/users/user_messages.html.erb @@ -29,12 +29,15 @@
-<% if params[:type].nil? || params[:type] == "unviewed" %> - -<% end %> <% if @message_alls.count >0 %> + <% if params[:type].nil? || params[:type] == "unviewed" %> +
+ 有 <%= unviewed_message(@user) %> 条未读 + <% unless unviewed_message(@user) == 0 %> + <%= link_to "全部设为已读", user_message_path(User.current, :viewed => 'all') %> + <% end %> +
+ <% end %> <%# 课程消息 %> <% unless @message_alls.nil? %> <% @message_alls.each do |ma| %>