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 2442f8e4f..bd547c37e 100644 --- a/config/locales/projects/zh.yml +++ b/config/locales/projects/zh.yml @@ -195,6 +195,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 d3d89104c..f3879421a 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;}