diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 2937f4fce..c3ab04d50 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -45,13 +45,15 @@ class UsersController < ApplicationController events = Redmine::Activity::Fetcher.new(User.current, :author => @user).events(nil, nil, :limit => 20) @events_by_day = events.group_by(&:event_date) + #add by huang unless User.current.admin? - if !@user.active? || (@user != User.current && @memberships.empty? && events.empty?) + if !@user.active? #|| (@user != User.current && @memberships.empty? && events.empty?) render_404 return end end - + #end + respond_to do |format| format.html format.api diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index 4bfc4b070..f53d489d8 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -33,4 +33,6 @@ <% end %> +<% else %> +<%= l(:label_user_activities) %> <% end %> \ No newline at end of file diff --git a/app/views/users/user_projects.html.erb b/app/views/users/user_projects.html.erb index 8595bfb84..12d5fc943 100644 --- a/app/views/users/user_projects.html.erb +++ b/app/views/users/user_projects.html.erb @@ -31,6 +31,9 @@ <% end %> <% else %> -<%= l(:label_prohect_unadd) %><%= link_to"新建",:controller=>'projects',:action=>'new'%> +<% if @user != User.current %> +<%= l(:label_project_un) %> +<% else %><%= l(:label_project_unadd) %><%= link_to"新建",:controller=>'projects',:action=>'new'%> +<% end %> <% end %> <%= call_hook :view_account_left_bottom, :user => @user %> \ No newline at end of file diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 30534561d..0ade9955a 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -768,13 +768,16 @@ zh: label_user_login: "最后登录:" label_user_mail: "邮件地址:" label_user_joinin: "加入时间:" + label_user_activities: "您当前还没有活动,快来加入我们吧!" label_project_overview: "概述" label_project_tool: "工具" label_project_defect: "缺陷" label_project_newother: "查看其他评论" label_project_newshare: "分享了" label_project_newadd: "添加了" - label_prohect_unadd: "暂无项目,赶快去创建吧!" + label_project_unadd: "暂无项目,赶快去创建吧!" + label_project_un: "该用户暂未参入任何项目!" + #end by huang label_user_mail_option_selected: "收取选中项目的所有通知..."