summaryrefslogtreecommitdiff
path: root/app/views/users/show.html.haml
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-03-07 11:37:03 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-03-07 11:37:03 +0100
commit11f186a118285fbc87a536af26730780a9ad01f5 (patch)
treefe6363b036f60f238916d070b3d0cb0625dd53c8 /app/views/users/show.html.haml
parent2b94b16ee1201d15b3b9d66e142df311141a47db (diff)
parent3e19646f46c772e10ed3d7a45e8c974ab23f625b (diff)
Merge branch 'develop'5.1.1
Diffstat (limited to 'app/views/users/show.html.haml')
-rw-r--r--app/views/users/show.html.haml5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml
index 8148005..ea90ab4 100644
--- a/app/views/users/show.html.haml
+++ b/app/views/users/show.html.haml
@@ -75,10 +75,11 @@
- cache(['user_show_phones_overview', I18n.locale, @user, @user.phones]) do
= render :partial => 'phones', :locals => {:user => @user}
- - if GsParameter.get('SIM_CARDS') == true
+ - if GsParameter.get('SIM_CARDS') == true && (@user.sim_cards.count > 0 || can?( :create, SimCard ))
- cache(['user_show_sim_cards_overview', I18n.locale, @user, @user.sim_cards]) do
%h2=t('sim_cards.index.page_title')
- = render :partial => 'sim_cards/index_core', :locals => {:parent => SimCardProvider.first, :sim_cards => @user.sim_cards}
+ - if @user.sim_cards.count > 0
+ = render :partial => 'sim_cards/index_core', :locals => {:parent => SimCardProvider.first, :sim_cards => @user.sim_cards}
= render :partial => 'shared/create_link', :locals => {:parent => SimCardProvider.first, :child_class => SimCard}
- cache(['user_show_fax_accounts_overview', I18n.locale, @user, @user.fax_accounts]) do