From 8bef9420cfc543fe0adb847d458ca0094a98e81b Mon Sep 17 00:00:00 2001 From: huang Date: Tue, 3 Feb 2015 15:22:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BC=81=E4=B8=9A=E7=89=88?= =?UTF-8?q?=E4=B8=AD=E8=87=AA=E5=B7=B1=E8=83=BD=E7=9C=8B=E5=88=B0=E8=87=AA?= =?UTF-8?q?=E5=B7=B1=E7=9A=84=E7=A7=81=E6=9C=89=E9=A1=B9=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/welcome_controller.rb | 2 +- config/locales/zh.yml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/controllers/welcome_controller.rb b/app/controllers/welcome_controller.rb index 9001546dc..3ae5538e9 100644 --- a/app/controllers/welcome_controller.rb +++ b/app/controllers/welcome_controller.rb @@ -29,7 +29,7 @@ class WelcomeController < ApplicationController unless params[:organization].nil? @cur_projects = Project.find(params[:organization]) @organization = @cur_projects.enterprise_name - @organization_projects = current_user.admin? ? Project.where("enterprise_name =? ", @organization) : Project.all_public.where("enterprise_name =? ", @organization) + @organization_projects = (current_user.admin? || User.current.member_of?(@cur_projects)) ? Project.where("enterprise_name =? ", @organization) : Project.all_public.where("enterprise_name =? ", @organization) @e_count = @organization_projects.count @part_projects = [] # 取十个 diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 7187c70d3..15ab84133 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -2520,9 +2520,9 @@ zh: # 项目企业模块 - label_all_enterprises: 所有企业 + label_all_enterprises: 所有组织 label_my_enterprise: 我的企业 - label_enterprise_tips: 暂时还没有该企业对应的项目,系统的其它项目您可能会感兴趣! - label_part_enterprise_tips: 您可能对系统的其它项目会感兴趣! - label_enterprise_nil: 该模块为最新上线模块,目前还未有项目关联到企业! + label_enterprise_tips: 该组织暂时还没创建公开项目,您可能会对系统的其它项目感兴趣! + label_part_enterprise_tips: 您可能对系统的其它项目感兴趣! + label_enterprise_nil: 该模块为最新上线模块,目前还没有创建企业项目! label_enterprises: 组织