上次回退内容(修改无项目和活动时显示问题)补充

This commit is contained in:
huangjingquan 2013-08-08 09:38:54 +08:00
parent fb44fb5815
commit dc12301e4f
4 changed files with 14 additions and 4 deletions

View File

@ -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

View File

@ -33,4 +33,6 @@
</table>
<% end %>
</div>
<% else %>
<%= l(:label_user_activities) %>
<% end %>

View File

@ -31,6 +31,9 @@
<% end %>
</ul>
<% 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 %></div>

View File

@ -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: "收取选中项目的所有通知..."