From 073cb07f70d3d9c35a8ac5dbd61939d32a31f80c Mon Sep 17 00:00:00 2001 From: dingxu Date: Thu, 19 Mar 2015 17:23:53 +0800 Subject: [PATCH] =?UTF-8?q?=E9=82=80=E8=AF=B7=E5=B9=B3=E5=8F=B0=E7=94=A8?= =?UTF-8?q?=E6=88=B7=EF=BC=9A=E8=A7=92=E8=89=B2=E3=80=81=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E9=83=BD=E4=B8=BA=E7=A9=BA=E6=B7=BB=E5=8A=A0=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E3=80=81=E5=8D=95=E4=B8=80=E8=A7=92=E8=89=B2=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E4=BF=AE=E6=94=B9=E3=80=81=20=E5=B1=95?= =?UTF-8?q?=E5=BC=80=E6=9D=A1=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/members_controller.rb | 2 +- config/locales/projects/zh.yml | 1 + config/locales/zh.yml | 2 +- public/stylesheets/application.css | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/controllers/members_controller.rb b/app/controllers/members_controller.rb index ba312c74a..aaaa4484d 100644 --- a/app/controllers/members_controller.rb +++ b/app/controllers/members_controller.rb @@ -109,7 +109,7 @@ class MembersController < ApplicationController end if params[:flag] unless members.present? && members.all? {|m| m.valid? } - flash[:error] = members.collect {|m| m.errors.full_messages}.flatten.uniq.join(', ') + flash[:error] = members.empty? ? l(:label_user_role_null) :members.collect {|m| m.errors.full_messages}.flatten.uniq.join(', ') else flash[:notice] = l(:label_invite_success) end diff --git a/config/locales/projects/zh.yml b/config/locales/projects/zh.yml index a58536e10..1bc62a000 100644 --- a/config/locales/projects/zh.yml +++ b/config/locales/projects/zh.yml @@ -179,6 +179,7 @@ zh: label_invite_email_tips: 输入好友邮箱地址,Trustie会自动为该邮箱注册用户! notice_registed_success: 您输入的邮箱为空或者该邮箱已被注册! label_email_format_error: 您所填写的电子邮件格式不正确 + label_user_role_null: 用户和角色不能留空! label_send_email: 免费发送 label_input_email: 请输入邮箱地址 diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 5628598cc..486a5611a 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -129,7 +129,7 @@ zh: field_priority: 优先级 field_fixed_version: 目标版本 field_user: 用户 - field_principal: 用户/用户组 + field_principal: 用户 field_role: 角色 field_homepage: 主页 field_time: 课时 diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 742202bea..ca8f0c3b6 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -70,7 +70,7 @@ a:hover.subnav_green{ background:#14ad5a;} /*简介*/ .project_intro{ width:220px; padding:5px 0px 10px 10px; background:#fff; color:#6d6d6d;} -.course_description{max-height: 105px;overflow:hidden;} +.course_description{max-height: 103px;overflow:hidden;} .course_description_none{max-height: none;} .lg-foot{ border:1px solid #e8eef2; color: #929598; text-align:center; width:220px; height:23px; cursor:pointer;} .lg-foot:hover{ color:#787b7e;}