From 239cba54d9c6dc554632598212f1a52f9092f611 Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 17 Aug 2015 11:34:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8C=BA=E5=88=86=E6=9C=AA=E8=AF=BB=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E5=92=8C=E5=B7=B2=E8=AF=BB=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 6 +++--- app/views/users/user_messages.html.erb | 4 ++-- public/stylesheets/public_new.css | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 969d2d366..3d5f613aa 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -104,9 +104,9 @@ class UsersController < ApplicationController end # 当前用户查看消息,则设置消息为已读 querys = @user.course_messages - if User.current.id == @user.id - querys.update_all(:viewed => true) - end + # if User.current.id == @user.id + # querys.update_all(:viewed => true) + # end if @user.course_messages if params[:type].nil? @user_course_messages = @user.course_messages.reverse diff --git a/app/views/users/user_messages.html.erb b/app/views/users/user_messages.html.erb index cf3e13ff9..89bc45397 100644 --- a/app/views/users/user_messages.html.erb +++ b/app/views/users/user_messages.html.erb @@ -26,8 +26,8 @@
  • <%= image_tag(url_to_avatar(ucm.course_message.author), :width => "30", :height => "30") %>
  • <%= ucm.course_message.author %>
  • 发布通知
  • -
  • - <%= link_to format_activity_title(" #{ucm.course_message.title}"), {:controller => 'news', :action => 'show', :id => ucm.course_message.id} %>
  • +
  • + <%= link_to "#{ucm.course_message.title}", {:controller => 'news', :action => 'show', :id => ucm.course_message.id },:class =>"#{ucm.viewed == 0 ? "newsBlue" : "newsGrey"}" %>
  • <%= time_tag(ucm.course_message.created_on).html_safe %>
  • <% end %> diff --git a/public/stylesheets/public_new.css b/public/stylesheets/public_new.css index 83e8189b3..90521e067 100644 --- a/public/stylesheets/public_new.css +++ b/public/stylesheets/public_new.css @@ -587,9 +587,9 @@ a.homepageMenuText {color:#484848; font-size:16px; margin-left:20px;} .homepageRightBlock {} .homepageNewsList {width:710px; height:39px; line-height:39px; vertical-align:middle; border-bottom:1px dashed #eaeaea; margin:0 auto;} .homepageNewsPortrait {width:40px; display:block; margin-top:7px;} -.homepageNewsPublisher {width:95px; font-size:12px; color:#15bccf; display:block;} +.homepageNewsPublisher {width:80px; max-width:80px; margin-right:10px; font-size:12px; color:#15bccf; display:block; padding-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; } .homepageNewsType {width:95px; font-size:12px; color:#888888; display:block;} -.homepageNewsContent {width:405px; font-size:12px; color:#4b4b4b; 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; } .homepageNewsTime {width:75px; font-size:12px; color:#888888; display:block; text-align:right;} a.homepageWhite {color:#ffffff;} a.homepageWhite:hover {color:#a1ebff}