X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=templates%2Fprofile%2Fphone.tpl;h=7fb869a81b8e9afaed6f40d7a0d8f91fe904c12a;hb=5096676e03dcd626d6e64696cb9d6ee5d8e054da;hp=40715be4ab92698e87afe6c007ce1ce50d291c94;hpb=90862af65777b54eb2830b501729236fe50aa110;p=platal.git diff --git a/templates/profile/phone.tpl b/templates/profile/phone.tpl index 40715be..7fb869a 100644 --- a/templates/profile/phone.tpl +++ b/templates/profile/phone.tpl @@ -1,6 +1,6 @@ {**************************************************************************} {* *} -{* Copyright (C) 2003-2008 Polytechnique.org *} +{* Copyright (C) 2003-2014 Polytechnique.org *} {* http://opensource.polytechnique.org/ *} {* *} {* This program is free software; you can redistribute it and/or modify *} @@ -22,30 +22,49 @@ {assign var=telpref value="`$prefname`[`$telid`]"} {assign var=id value="`$prefid`_`$telid`"} +{if $isMe || hasPerm('admin') || empty($tel.display|smarty:nodefaults)} + {assign var=hiddentel value=false} +{elseif hasPerm('directory_hidden') || (($tel.pub neq 'hidden') && ($tel.pub neq 'private'))} + {assign var=hiddentel value=false} +{elseif hasPerm('directory_private') && ($tel.pub neq 'hidden')} + {assign var=hiddentel value=false} +{else} + {assign var=hiddentel value=true} +{/if}