From 574f3cc38f9e059b77972e71fbbd8cc6a6330c15 Mon Sep 17 00:00:00 2001 From: Florent Bruneau Date: Sun, 3 Oct 2010 17:35:03 +0200 Subject: [PATCH] Hide private fields in advanced search if the user does not have the directory_private permission. Signed-off-by: Florent Bruneau --- templates/profile/phone.tpl | 2 +- templates/search/adv.form.tpl | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) 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 -- 2.1.4