X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=templates%2Fprofile%2Fgeneral.hobby.tpl;h=c7d68d0ca412784e3a343f58a0fa1825c65ba8db;hb=4555d49036d51e04d2a55e1ed11c5c1b3de3feb9;hp=e57340408113f28d722cc261080348dab384ef8d;hpb=9b42c0b551d0ce7286e5b719ab49959829e99031;p=platal.git diff --git a/templates/profile/general.hobby.tpl b/templates/profile/general.hobby.tpl index e573404..c7d68d0 100644 --- a/templates/profile/general.hobby.tpl +++ b/templates/profile/general.hobby.tpl @@ -20,10 +20,14 @@ {* *} {**************************************************************************} -{if !hasPerm('directory_private') && ($hobby.pub eq 'private') && !empty($hobby.text|smarty:nodefaults)} -{assign var=hiddenhobby value=true} +{if $isMe || hasPerm('admin') || empty($hobby.text|smarty:nodefaults)} + {assign var=hiddenhobby value=false} +{elseif hasPerm('directory_hidden') || (($hobby.pub neq 'hidden') && ($hobby.pub neq 'private'))} + {assign var=hiddenhobby value=false} +{elseif hasPerm('directory_private') && ($hobby.pub neq 'hidden')} + {assign var=hiddenhobby value=false} {else} -{assign var=hiddenhobby value=false} + {assign var=hiddenhobby value=true} {/if}