From: Florent Bruneau Date: Sun, 3 Oct 2010 15:35:03 +0000 (+0200) Subject: Hide private fields in advanced search if the user does not have the X-Git-Tag: xorg/1.0.1~110 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=574f3cc38f9e059b77972e71fbbd8cc6a6330c15;p=platal.git Hide private fields in advanced search if the user does not have the directory_private permission. Signed-off-by: Florent Bruneau --- diff --git a/templates/profile/phone.tpl b/templates/profile/phone.tpl index c378102..767e3d1 100644 --- a/templates/profile/phone.tpl +++ b/templates/profile/phone.tpl @@ -22,7 +22,7 @@ {assign var=telpref value="`$prefname`[`$telid`]"} {assign var=id value="`$prefid`_`$telid`"} -{if !hasPerm('directory_private') && ($tel.pub eq 'private') && !empty($tel.display)} +{if !hasPerm('directory_private') && ($tel.pub eq 'private') && !empty($tel.display|smarty:nodefaults)} {assign var=hiddentel value=true} {else} {assign var=hiddentel value=false} diff --git a/templates/search/adv.form.tpl b/templates/search/adv.form.tpl index a71dd30..a9e56a5 100644 --- a/templates/search/adv.form.tpl +++ b/templates/search/adv.form.tpl @@ -373,10 +373,12 @@ function cleanForm(f) { {icon name="table" title="Tous les mots-clefs"} + {if hasPerm('directory_private')} CV contient + {/if} @@ -395,6 +397,7 @@ function cleanForm(f) { {icon name="table" title="Toutes les nationalités"} + {if hasPerm('directory_private')} Binet @@ -404,6 +407,7 @@ function cleanForm(f) { {icon name="table" title="Tous les binets"} + {/if} Groupe X @@ -413,6 +417,7 @@ function cleanForm(f) { {icon name="table" title="Tous les groupes X"} + {if hasPerm('directory_private')} Section @@ -422,6 +427,7 @@ function cleanForm(f) { {icon name="table" title="Toutes les sections"} + {/if} Formation