X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=templates%2Fprofile%2Fprofile.tpl;h=967bf7e04962ca7a5edfcb764b59c20825dbb2b3;hb=5b48ebf46ef939d701852d2117bbcf308036027c;hp=5ac72d0bd5b62bdf1afc707fd2627f6c5e39eddb;hpb=0073747ac81cc9cff9e43847eb008f0e815255f0;p=platal.git diff --git a/templates/profile/profile.tpl b/templates/profile/profile.tpl index 5ac72d0..967bf7e 100644 --- a/templates/profile/profile.tpl +++ b/templates/profile/profile.tpl @@ -1,6 +1,6 @@ {**************************************************************************} {* *} -{* Copyright (C) 2003-2010 Polytechnique.org *} +{* Copyright (C) 2003-2011 Polytechnique.org *} {* http://opensource.polytechnique.org/ *} {* *} {* This program is free software; you can redistribute it and/or modify *} @@ -41,36 +41,35 @@ 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 && $view eq 'private' && ( $profile->section|smarty:nodefaults || $profile->getBinets()|smarty:nodefaults || ($owner && $owner->groups(true,true)|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)} + {if $owner && $view eq 'private'} + {assign var=groups value=$owner->groups(true,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} + {foreach from=$groups item=group name=groups}{if !$smarty.foreach.groups.first}, {/if}{$group.nom}{/foreach}
{/if} {/if} {/if} - {assign var=networking value=$p->getNetworking(0)} + {* 458752 stands for 0x70000 = Profile::NETWORKING_ALL *} + {assign var=networking value=$profile->getNetworking(458752)} {if count($networking) > 0}

Sur le web...

{foreach from=$networking item=network} - {$network.name} - {if $network.filter == 'web'} - {$network.address} - {elseif $network.link != ''} - {$network.address} + {$network.name} + {if $network.link} + {$network.address} {else} {$network.address} {/if} @@ -78,124 +77,132 @@ 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 $logged} - {if $p->nickname} (alias {$p->nickname}){/if} - {/if} + {if $profile->isFemale()}•{/if} + {if $view eq 'private'}{$profile->private_name}{else}{$profile->public_name}{/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)} - + {if !$smarty.session.user->isContact($profile)} + {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 $smarty.session.user->isMyProfile($profile)} {icon name="user_edit" title="Modifier ma fiche"} + {elseif hasPerm('admin') || $smarty.session.user->canEdit($profile)} + + {icon name=user_edit title="modifier la fiche"} + {/if} - {/if}
- {if $logged} + {if $logged && $view eq 'private'}
Fiche mise à jour
- le {$p->last_change|date_format} + le {$profile->last_change|date_format}
{/if} - {assign var=phones value=$p->getPhones(0)} - {if $logged || count($phones) > 0} + {* 121634816 is Profile::PHONE_LINK_PROFILE | Profile::PHONE_TYPE_ANY = 0x7400000 *} + {assign var=phones value=$profile->getPhones(121634816)} + {if ($logged && $view eq 'private') || count($phones) > 0}
- {if $logged} + {if $logged && $view eq 'private'} {/if} {if count($phones) > 0} - {display_phones tels=$phones dcd=$p->isDead()} +
+ {display_phones tels=$phones dcd=$profile->isDead()} +
{/if}
+ {else} +
{/if}
- {foreach from=$p->nationalities() item=nat} - {$nat}  + {foreach from=$profile->nationalities() item=country key=code} + {$code}  {/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(32)} {if count($educations) > 0}  - Formation : {/if} - {assign var=corps value=$p->getCorps()} + {assign var=corps value=$profile->getCorps()} {if $corps && ($corps->current || $corps->original)} - {/if}
- {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,35 +215,38 @@ 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 phones=null} {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 phones=null} {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 phones=null} {/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 :

{foreach from=$jobs item="job" key="i"} {if $i neq 0}
{/if} {include file="include/emploi.tpl" job=$job} + {assign var=jobPhones value=$job->phones()} {if $job->address()} - {include file="geoloc/address.tpl" address=$job->address titre="Adresse : " for=$job->company->name pos="left"} + {include file="geoloc/address.tpl" address=$job->address() titre="Adresse : " for=$job->company->name pos="left" phones=$jobPhones} + {elseif $jobPhones|@count neq 0} + {display_phones tels=$jobPhones} {/if}
 
{/foreach}
{/if} - {assign var=medals value=$p->getMedals()} + {assign var=medals value=$profile->getMedals()} {if count($medals) > 0}

Distinctions :

@@ -252,10 +262,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 +273,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'}