From: Victor Berger Date: Sun, 2 Feb 2014 16:56:30 +0000 (+0100) Subject: Activating 'hidden' visibility flag. X-Git-Tag: xorg/1.1.12~53 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=07e4a9a091ac34c84129c230cde455de34e1ae91;p=platal.git Activating 'hidden' visibility flag. Signed-off-by: Victor Berger --- diff --git a/htdocs/images/icons/flag_black.gif b/htdocs/images/icons/flag_black.gif new file mode 100644 index 0000000..eb7494c Binary files /dev/null and b/htdocs/images/icons/flag_black.gif differ 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"}