diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index d485e0924..555c67d13 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -116,7 +116,7 @@ class UsersController < ApplicationController user_querys.update_all(:viewed => true) forum_querys.update_all(:viewed => true) end - @new_message_count = forge_querys.count + forum_querys.count + course_querys.count + user_querys.count + # @new_message_count = forge_querys.count + forum_querys.count + course_querys.count + user_querys.count case params[:type] when nil @message_alls = [] diff --git a/app/views/users/user_messages.html.erb b/app/views/users/user_messages.html.erb index 73c1d2a72..9b0534482 100644 --- a/app/views/users/user_messages.html.erb +++ b/app/views/users/user_messages.html.erb @@ -1,251 +1,240 @@ -
-
-
消息
- +
+
+
+
+<% if @message_alls.count >0 %> + <%# 课程消息 %> + <% unless @message_alls.nil? %> + <% @message_alls.each do |ma| %> + <% if ma.class == CourseMessage %> + <% if ma.course_message_type == "News" %> + <% end %> - - <% if ma.class == ForgeMessage %> - <% if ma.forge_message_type == "Issue" %> - - <% end %> - <% if ma.forge_message_type == "Journal" %> - - <% end %> - <% if ma.forge_message_type == "Message" %> - <% end %> - - <% if ma.class == MemoMessage %> - <% if ma.memo_type == "Memo" %> -
-
+ + +<% else %> +
您目前还没有相关消息!
+<% end %> +
+ + diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index 93ef2bd54..c0492c85b 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -527,10 +527,10 @@ a.homepageMenuText {color:#484848; font-size:16px; margin-left:20px;} .newsReadSetting {width:700px; background-color:#f6f6f6; border-bottom:1px solid #eeeeee; margin:10px auto; height:39px; line-height:39px; vertical-align:middle; font-size:14px; color:#7a7a7a; padding-left:10px;} .homepageNewsList {width:710px; height:49px; line-height:49px; vertical-align:middle; border-bottom:1px dashed #eaeaea; margin-left:10px;} .homepageNewsPortrait {width:40px; display:block; margin-top:7px;} -.homepageNewsPublisher {width:80px; max-width:80px; font-size:12px; color:#15bccf; display:block; padding-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; } -.homepageNewsType {width:90px; padding-left: 5px; font-size:12px; color:#888888; display:block;} -.homepageNewsPubType {width:175px; font-size:12px; color:#888888; display: block;} -.homepageNewsContent {width:395px; max-width:395px; margin-right:10px; font-size:12px; color:#4b4b4b; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; } +.homepageNewsPublisher { max-width:100px; font-size:12px; color:#15bccf; display:block; padding-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; float:left; } +.homepageNewsType {width:100px; padding-left: 5px; font-size:12px; color:#888888; display:block;} +.homepageNewsPubType {width:215px; font-size:12px; color:#888888; display: block;} +.homepageNewsContent {width:355px; max-width:395px; margin-right:10px; font-size:12px; color:#4b4b4b; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; } .homepageNewsTime {width:75px; font-size:12px; color:#888888; display:block; text-align:right;} a.homepageWhite {color:#ffffff;} a.homepageWhite:hover {color:#a1ebff} @@ -917,7 +917,6 @@ img.ui-datepicker-trigger { margin: 7px; } /*消息*/ -.homepageNewsType {width:95px; font-size:12px; color:#888888; display:block;} .homepageNewsTypeNotRead {width:95px; font-size:12px; color:#888888; display:block;} .calendar_input{border-left:none !important;border-bottom: none!important; border-top: none!important; border-right: 1px solid #d9d9d9;} .calendar_div{border: 1px solid #d9d9d9;}