1、修改系统消息样式

2、解决新注册用户系统消息红点不显示问题
3、调整消息样式
This commit is contained in:
huang 2015-09-17 12:59:52 +08:00
parent 94f91a85e6
commit 7cdebab5e5
3 changed files with 8 additions and 12 deletions

View File

@ -419,7 +419,8 @@ class ProjectsController < ApplicationController
# 发送邮件邀请新用户页面对应方法 # 发送邮件邀请新用户页面对应方法
def invite_members_by_mail def invite_members_by_mail
if User.current.member_of?(@project) || User.current.admin? if User.current.member_of?(@project) || User.current.admin?
@inviter_lists = InviteList.where(project_id:@project.id) @inviter_lists = InviteList.where(project_id:@project.id).order("created_at desc")
# @inviters = [] # @inviters = []
# @waiters = [] # @waiters = []
# unless @inviter_lists.blank? # unless @inviter_lists.blank?

View File

@ -32,7 +32,7 @@
</div> </div>
<div class="resources mt10" id="users_setting"> <div class="resources mt10" id="users_setting">
<div> <div>
<% if @message_alls.count >0 %> <% if @message_alls.count >0 || @user_system_messages.count >0 %>
<% if params[:type].nil? || params[:type] == "unviewed" %> <% if params[:type].nil? || params[:type] == "unviewed" %>
<div class="newsReadSetting"> <div class="newsReadSetting">
有&nbsp;<span class="c_red"><%= unviewed_message(@user) %></span>&nbsp;条未读 有&nbsp;<span class="c_red"><%= unviewed_message(@user) %></span>&nbsp;条未读
@ -46,17 +46,13 @@
<% @user_system_messages.each do |usm| %> <% @user_system_messages.each do |usm| %>
<ul class="homepageNewsList fl"> <ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"> <li class="homepageNewsPortrait fl">
<a href="javascript:void(0);"> <a href="javascript:void(0);"><div class="navHomepageLogo fl"><%= image_tag("/images/logo.png", width: "30px", height: "30px", class: "mt3") %></div></a>
<div class="navHomepageLogo fl">
<%= image_tag("/images/logo.png", width: "30px", height: "30px", class: "mt3") %>
</div>
</a>
</li> </li>
<li class="homepageNewsPubType fl"> <li class="homepageNewsPubType fl">
<span class="newsBlue homepageNewsPublisher">Trustie平台</span><span class="homepageNewsType fl">发布新消息:</span> <span class="newsBlue homepageNewsPublisher">Trustie平台</span><span class="homepageNewsType fl">发布新消息:</span>
</li> </li>
<li class="homepageNewsContent fl"> <li class="homepageNewsContent fl">
<%= link_to usm.content.nil? ? usm.description.html_safe : usm.content.html_safe, user_message_path(User.current, :type => "system_messages"), <%= link_to usm.content.nil? ? ("【系统消息】"+usm.description).html_safe : ("【系统消息】"+usm.content).html_safe, user_message_path(User.current, :type => "system_messages"),
:class => "newsRed", :class => "newsRed",
:onmouseover => "message_titile_show($(this),event);", :onmouseover => "message_titile_show($(this),event);",
:onmouseout => "message_titile_hide($(this));" :onmouseout => "message_titile_hide($(this));"
@ -381,8 +377,7 @@
</li> </li>
<li class="homepageNewsPubType fl"><span class="newsBlue homepageNewsPublisher" >Trustie平台</span><span class="homepageNewsType fl">发布新消息:</span></li> <li class="homepageNewsPubType fl"><span class="newsBlue homepageNewsPublisher" >Trustie平台</span><span class="homepageNewsType fl">发布新消息:</span></li>
<li class="homepageNewsContent fl" id="content_<%= ma.id %>"> <li class="homepageNewsContent fl" id="content_<%= ma.id %>">
<%= link_to ma.content.nil? ? ma.description.html_safe : ma.content.html_safe, user_message_path(User.current, :type => "system_messages"), <span style="color: red">【系统消息】</span><%= link_to ma.content.nil? ? ma.description.html_safe : ma.content.html_safe, user_message_path(User.current, :type => "system_messages"),
:class => "#{params[:type]=="unviewed" ? "newsBlack" : "newsRed"}",
:id => "content_link_#{ma.id}", :id => "content_link_#{ma.id}",
:onmouseover =>"message_titile_show($(this),event);", :onmouseover =>"message_titile_show($(this),event);",
:onmouseout => "message_titile_hide($(this));" :onmouseout => "message_titile_hide($(this));"

View File

@ -983,8 +983,8 @@ img.ui-datepicker-trigger {
text-overflow: ellipsis; text-overflow: ellipsis;
margin-bottom: 3px; margin-bottom: 3px;
} }
.message_title{border: 1px solid #D4D4D4;padding: 0.6em;margin-left: 1.4em;margin-right: 0.4em;border-radius: 4px;font-family: "Microsoft YaHei";background-size: 100% 100%;margin-bottom: 5px;background-color: #E8E8E8; max-width:400px;word-wrap:break-word; word-break:break-all;} .message_title{border: 1px solid #484848;padding: 0.6em;margin-left: 1.4em;margin-right: 0.4em;border-radius: 4px;font-family: "Microsoft YaHei";background-size: 100% 100%;margin-bottom: 5px;background-color: #fff; max-width:400px;word-wrap:break-word; word-break:break-all;}
.message_title_red{border: 1px solid #D4D4D4;padding: 0.6em;margin-left: 1.4em;margin-right: 0.4em;border-radius: 4px;font-family: "Microsoft YaHei";background-size: 100% 100%;margin-bottom: 5px;background-color: #E8E8E8;color: red} .message_title_red{border: 1px solid #484848;padding: 0.6em;margin-left: 1.4em;margin-right: 0.4em;border-radius: 4px;font-family: "Microsoft YaHei";background-size: 100% 100%;margin-bottom: 5px;background-color: #fff;background-image: -moz-linear-gradient(top, #fff, #E0E0E0);}
.description{display: none !important;} .description{display: none !important;}
.ispublic-label{display: none !important;} .ispublic-label{display: none !important;}