From 68f988a8b01fe53e7a0a74780757f4bc855b523c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Barrois?= Date: Wed, 24 Mar 2010 11:14:37 +0100 Subject: [PATCH] Rename $p/$o to $profile/$owner in profile template MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Raphaël Barrois --- modules/profile.php | 4 +- templates/profile/profile.tpl | 94 +++++++++++++++++++++---------------------- 2 files changed, 49 insertions(+), 49 deletions(-) diff --git a/modules/profile.php b/modules/profile.php index 8423d29..5eb9220 100644 --- a/modules/profile.php +++ b/modules/profile.php @@ -252,8 +252,8 @@ class ProfileModule extends PLModule $page->assign('virtualalias', $owner->emailAlias()); } - $page->assign_by_ref('p', $profile); - $page->assign_by_ref('o', $owner); + $page->assign_by_ref('profile', $profile); + $page->assign_by_ref('owner', $owner); $page->assign('view', $view); $page->assign('logged', S::logged()); diff --git a/templates/profile/profile.tpl b/templates/profile/profile.tpl index 5ac72d0..2362564 100644 --- a/templates/profile/profile.tpl +++ b/templates/profile/profile.tpl @@ -41,19 +41,19 @@ function chgMainWinLoc(strPage)
- {assign var=photo value=$p->getPhoto(false)} - {if $photo}Photo de {$p->fullName()}{/if} + {assign var=photo value=$profile->getPhoto(false)} + {if $photo}Photo de {$profile->fullName()}{/if} - {if $logged && ( $p->section|smarty:nodefaults || $p->getBinets()|smarty:nodefaults || ($o && $o->groups()|smarty:nodefaults))} + {if $logged && ( $profile->section|smarty:nodefaults || $profile->getBinets()|smarty:nodefaults || ($o && $owner->groups()|smarty:nodefaults))}

À l'X…

- {if $p->section}
Section : {$p->section}
{/if} + {if $profile->section}
Section : {$profile->section}
{/if} - {assign var=binets value=$p->getBinets()} + {assign var=binets value=$profile->getBinets()} {if $binets|@count}
Binet{if count($binets) > 1}s{/if} : - {', '|implode:$p->getBinetsNames()}
{/if} + {', '|implode:$profile->getBinetsNames()}
{/if} {if $o} - {assign var=groups value=$o->groupNames(true)} + {assign var=groups value=$owner->groupNames(true)} {if $groups|@count}
Groupe{if count($groups) > 1}s{/if} et institution{if count($groups) > 1}s{/if} X :
{foreach from=$groups item=group key=gk}{if $gk != 0}, {/if}{$group.nom}{/foreach} @@ -62,7 +62,7 @@ function chgMainWinLoc(strPage) {/if} - {assign var=networking value=$p->getNetworking(0)} + {assign var=networking value=$profile->getNetworking(0)} {if count($networking) > 0}

Sur le web...

{foreach from=$networking item=network} @@ -78,39 +78,39 @@ function chgMainWinLoc(strPage) {/foreach} {/if} - {if $p->freetext} + {if $profile->freetext}

Commentaires :

- {$p->freetext|miniwiki|smarty:nodefaults} + {$profile->freetext|miniwiki|smarty:nodefaults} {/if}
- {if $p->isFemale()}•{/if} - name_tooltip neq ""}class="hinted" title="{$p->name_tooltip}"{/if}>{$p->shortName()} + {if $profile->isFemale()}•{/if} + name_tooltip neq ""}class="hinted" title="{$profile->name_tooltip}"{/if}>{$profile->shortName()} {if $logged} - {if $p->nickname} (alias {$p->nickname}){/if} + {if $profile->nickname} (alias {$profile->nickname}){/if} {/if} {if $logged} -  {if !$p->isDead()}{* +  {if !$profile->isDead()}{* *}{icon name=vcard title="Afficher la carte de visite"}{/if} {if !$smarty.session.user->isContact($p)} - + {icon name=add title="Ajouter à mes contacts"} {else} - + {icon name=cross title="Retirer de mes contacts"} {/if} {if hasPerm('admin')} - + {icon name=wrench title="administrer user"} {/if} - {if $o->login() eq $smarty.session.hruid} + {if $owner->login() eq $smarty.session.hruid} {icon name="user_edit" title="Modifier ma fiche"} {/if} @@ -120,53 +120,53 @@ function chgMainWinLoc(strPage) {if $logged}
Fiche mise à jour
- le {$p->last_change|date_format} + le {$profile->last_change|date_format}
{/if} - {assign var=phones value=$p->getPhones(0)} + {assign var=phones value=$profile->getPhones(0)} {if $logged || count($phones) > 0}
{if $logged} {/if} {if count($phones) > 0} - {display_phones tels=$phones dcd=$p->isDead()} + {display_phones tels=$phones dcd=$profile->isDead()} {/if}
{/if}
- {foreach from=$p->nationalities() item=nat} + {foreach from=$profile->nationalities() item=nat} {$nat}  {/foreach} - {$p->promo()} + {$profile->promo()} - {if $logged && $p->mentor_expertise} - [Ma fiche référent] + {if $logged && $profile->mentor_expertise} + [Ma fiche référent] {/if} - {assign var=educations value=$p->getEducations(64)} + {assign var=educations value=$profile->getEducations(64)} {if count($educations) > 0}  - Formation :
    @@ -176,7 +176,7 @@ function chgMainWinLoc(strPage)
{/if} - {assign var=corps value=$p->getCorps()} + {assign var=corps value=$profile->getCorps()} {if $corps && ($corps->current || $corps->original)}
    {if $corps->current} @@ -191,11 +191,11 @@ function chgMainWinLoc(strPage)
- {assign var=addr value=$p->getAddresses(3)} + {assign var=addr value=$profile->getAddresses(3)} {if count($addr) > 0}

Contact :

- {if $p->isDead()} + {if $profile->isDead()} {assign var=address_name value="Dernière adresse"} {else} {assign var=address_name value="Adresse"} @@ -208,20 +208,20 @@ function chgMainWinLoc(strPage) {/if} {if $address->hasFlag('current')} {include file="geoloc/address.tpl" address=$address titre_div=true titre=$address_name|@cat:" actuelle :" - for="`$p->firstname` `$p->lastname`" pos=$pos} + for="`$profile->firstname` `$profile->lastname`" pos=$pos} {elseif $address->hasFlag('secondary')} {include file="geoloc/address.tpl" address=$address titre_div=true titre=$address_name|@cat:" secondaire :" - for="`$p->firstname` `$p->lastname`" pos=$pos} + for="`$profile->firstname` `$profile->lastname`" pos=$pos} {else} {include file="geoloc/address.tpl" address=$address titre_div=true titre=$address_name|@cat:" principale :" - for="`$p->firstname` `$p->lastname`" pos=$pos} + for="`$profile->firstname` `$profile->lastname`" pos=$pos} {/if} {if $smarty.foreach.addresses.iteration is even}
{/if} {/foreach}
{/if} - {assign var=jobs value=$p->getJobs(2)} + {assign var=jobs value=$profile->getJobs(2)} {if count($jobs) > 0}

Informations professionnelles :

@@ -236,7 +236,7 @@ function chgMainWinLoc(strPage)
{/if} - {assign var=medals value=$p->getMedals()} + {assign var=medals value=$profile->getMedals()} {if count($medals) > 0}

Distinctions :

@@ -252,10 +252,10 @@ function chgMainWinLoc(strPage)
{/if} - {if $logged && $p->cv} + {if $logged && $profile->cv}

Curriculum Vitae :

- {$p->cv|miniwiki:title|smarty:nodefaults} + {$profile->cv|miniwiki:title|smarty:nodefaults}
{/if} @@ -263,7 +263,7 @@ function chgMainWinLoc(strPage)
Cette fiche est publique et visible par tout internaute,
- vous pouvez aussi voir celle réservée aux X. + vous pouvez aussi voir celle réservée aux X.
{elseif $view eq 'ax'} -- 2.1.4