From 07e4a9a091ac34c84129c230cde455de34e1ae91 Mon Sep 17 00:00:00 2001 From: Victor Berger Date: Sun, 2 Feb 2014 17:56:30 +0100 Subject: [PATCH] Activating 'hidden' visibility flag. Signed-off-by: Victor Berger --- htdocs/images/icons/flag_black.gif | Bin 0 -> 366 bytes modules/profile.php | 4 ++-- modules/profile/addresses.inc.php | 2 +- modules/profile/jobs.inc.php | 4 ++-- modules/profile/page.inc.php | 2 +- templates/include/flags.radio.tpl | 16 ++++++++++------ templates/profile/base.tpl | 8 ++++---- 7 files changed, 20 insertions(+), 16 deletions(-) create mode 100644 htdocs/images/icons/flag_black.gif diff --git a/htdocs/images/icons/flag_black.gif b/htdocs/images/icons/flag_black.gif new file mode 100644 index 0000000000000000000000000000000000000000..eb7494ca3a28d6bbe8726c16abaca9fd8d5e5680 GIT binary patch literal 366 zcmZ?wbhEHb6krfwSZc~3AtB-C=NA$Z5*{8N6&2MGArTuJ+YzCVkdTm^oZOLMkd~H~ znVC5u!(c{+Mt*+&f&z_-ii+y$>J=3RD=IAN>gqOBShTdXY-q69(O}Tt-rm*K)!W;< zqr>4qhr@&k6DCidd|-mZv}w~$Oz@aFbLN~mb1uvXm_L91qD6}?EC^V-bm@u}D^{;w zePcz&x^?R|Zrpfa!-5+dDjw`;cyOTO$A=gH2?52QER0+X_6#}_ n#xOIw@M$&%*t1IP+T+ZseBj_-P1)T6tePUnocwk>GFSru!(N`a literal 0 HcmV?d00001 diff --git a/modules/profile.php b/modules/profile.php index 467a99c..b7e70cf 100644 --- a/modules/profile.php +++ b/modules/profile.php @@ -135,10 +135,10 @@ class ProfileModule extends PLModule if (!$user->hasProfile()) { return PL_NOT_FOUND; } else { - $profile = $user->profile(); + $profile = $user->profile(false,0,Visibility::get(Visibility::VIEW_ADMIN)); } } else { - $profile = Profile::get($hrpid); + $profile = Profile::get($hrpid,0,Visibility::get(Visibility::VIEW_ADMIN)); } if (!$profile) { diff --git a/modules/profile/addresses.inc.php b/modules/profile/addresses.inc.php index ca113b6..fa005fb 100644 --- a/modules/profile/addresses.inc.php +++ b/modules/profile/addresses.inc.php @@ -27,7 +27,7 @@ class ProfileSettingAddresses implements ProfileSetting $addresses = array(); if (is_null($value)) { - $it = Address::iterate(array($page->pid()), array(Address::LINK_PROFILE), array(0), Visibility::get(Visibility::VIEW_PRIVATE)); + $it = Address::iterate(array($page->pid()), array(Address::LINK_PROFILE), array(0), Visibility::get(Visibility::VIEW_ADMIN)); while ($address = $it->next()) { $addresses[] = $address->toFormArray(); } diff --git a/modules/profile/jobs.inc.php b/modules/profile/jobs.inc.php index 3c14655..43c70d1 100644 --- a/modules/profile/jobs.inc.php +++ b/modules/profile/jobs.inc.php @@ -86,11 +86,11 @@ class ProfileSettingJob implements ProfileSetting $backtrack[$job['id']] = $key; } - $it = Address::iterate(array($page->pid()), array(Address::LINK_JOB), array(), Visibility::get(Visibility::VIEW_PRIVATE)); + $it = Address::iterate(array($page->pid()), array(Address::LINK_JOB), array(), Visibility::get(Visibility::VIEW_ADMIN)); while ($address = $it->next()) { $jobs[$address->id]['w_address'] = $address->toFormArray(); } - $it = Phone::iterate(array($page->pid()), array(Phone::LINK_JOB), array(), Visibility::get(Visibility::VIEW_PRIVATE)); + $it = Phone::iterate(array($page->pid()), array(Phone::LINK_JOB), array(), Visibility::get(Visibility::VIEW_ADMIN)); while ($phone = $it->next()) { $jobs[$phone->link_id]['w_phone'][$phone->id] = $phone->toFormArray(); } diff --git a/modules/profile/page.inc.php b/modules/profile/page.inc.php index 9b3bbac..4dc9a1f 100644 --- a/modules/profile/page.inc.php +++ b/modules/profile/page.inc.php @@ -108,7 +108,7 @@ class ProfileSettingPhones implements ProfileSetting $phones = array(); if (is_null($value)) { - $it = Phone::iterate(array($page->pid()), array(Phone::LINK_PROFILE), array(0), Visibility::get(Visibility::VIEW_PRIVATE)); + $it = Phone::iterate(array($page->pid()), array(Phone::LINK_PROFILE), array(0), Visibility::get(Visibility::VIEW_ADMIN)); while ($phone = $it->next()) { $success = ($phone->format() && $success); $phones[] = $phone->toFormArray(); diff --git a/templates/include/flags.radio.tpl b/templates/include/flags.radio.tpl index 1f38ce4..729072e 100644 --- a/templates/include/flags.radio.tpl +++ b/templates/include/flags.radio.tpl @@ -20,20 +20,24 @@ {* *} {**************************************************************************} {if t($withtext)} -Quelle couleur ? +Quelle couleur ?
{/if} {if !t($val)}{assign var=val value='ax'}{/if} {if t($disabled)}{/if} +{if t($withtext)}annuaire papier{/if} +{icon name="flag_orange" title="visible dans l'annuaire papier"} +{if t($withtext)}visible dans l'annuaire papier{/if} +{icon name="flag_red" title="authentifié"} +{if t($withtext)}diplômés de l'X{/if} + {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *} diff --git a/templates/profile/base.tpl b/templates/profile/base.tpl index af94064..55c459e 100644 --- a/templates/profile/base.tpl +++ b/templates/profile/base.tpl @@ -24,10 +24,10 @@ {xsrf_token_field}
{icon name=information title="Voir ma fiche"} Tu peux consulter - {if $isMe}ta{else}cette{/if} fiche telle que la - voient n'importe quel internaute, - l'AX{if $viewPrivate}ou - les X{/if}. + {if $isMe}ta{else}cette{/if} fiche telle qu'elle apparaît + pour n'importe quel internaute, + dans l'annuaire papier{if $viewPrivate} ou + pour les X{/if}.
{include file="include/flags.radio.tpl" disabled=true withtext=true val="novalue" name="profile_ex_pub"} -- 2.1.4