X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=templates%2Fprofile%2Fprofile.tpl;h=95667c1f3340041f5718d15f1f7183171146506b;hb=245923e335d0da5bec9495991a7846be9f0563ab;hp=dc3250409f7b005f36f5a7bb692433fccb1e0b44;hpb=03a6316fbe62380ff82a601222339f9f016f62ea;p=platal.git diff --git a/templates/profile/profile.tpl b/templates/profile/profile.tpl index dc32504..95667c1 100644 --- a/templates/profile/profile.tpl +++ b/templates/profile/profile.tpl @@ -1,6 +1,6 @@ {**************************************************************************} {* *} -{* Copyright (C) 2003-2007 Polytechnique.org *} +{* Copyright (C) 2003-2010 Polytechnique.org *} {* http://opensource.polytechnique.org/ *} {* *} {* This program is free software; you can redistribute it and/or modify *} @@ -39,147 +39,251 @@ function chgMainWinLoc(strPage) //]]> {/literal} -{if $logged and $x.forlife eq $smarty.session.forlife} -[Modifier ma fiche] -{/if} -
- {if $photo_url}Photo de {$x.forlife}{/if} - {if $logged} - {if $x.section}
Section : {$x.section}
{/if} - {if $x.binets_join}
Binet(s) : {$x.binets_join}
{/if} - {if $x.gpxs_join}
Groupe(s) X : {$x.gpxs_join|smarty:nodefaults}
{/if} + {assign var=photo value=$profile->getPhoto(false)} + {if $photo}Photo de {$profile->fullName()}{/if} + + {if $logged && $view eq 'private' && ( $profile->section|smarty:nodefaults || $profile->getBinets()|smarty:nodefaults || ($owner && $owner->groups(true,true)|smarty:nodefaults))} +

À l'X…

+ {if $profile->section}
Section : {$profile->section}
{/if} + + {assign var=binets value=$profile->getBinets()} + {if $binets|@count}
Binet{if count($binets) > 1}s{/if} : + {', '|implode:$profile->getBinetsNames()}
{/if} + + {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 name=groups}{if !$smarty.foreach.groups.first}, {/if}{$group.nom}{/foreach} +
{/if} + {/if} + {/if} - {if $x.web}
Site Web : {$x.web}
{/if} - {if $x.freetext}
Commentaires :
{$x.freetext|smarty:nodefaults}
{/if} + + {* 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.link} + {$network.address} + {else} + {$network.address} + {/if} +
+ {/foreach} + {/if} + + {if $profile->freetext} +

Commentaires :

+ {$profile->freetext|miniwiki|smarty:nodefaults} + {/if} +
+
- {if $x.sexe}•{/if} - {$x.prenom} {if $x.nom_usage eq ""}{$x.nom}{else}{$x.nom_usage} ({$x.nom}){/if} + {if $profile->isFemale()}•{/if} + {if $view eq 'private'}{$profile->private_name}{else}{$profile->public_name}{/if} + {if $logged} - {if $x.nickname} (alias {$x.nickname}){/if}  - {* - *}{icon name=vcard title="Afficher la carte de visite"} - {if !$x.is_contact} - - {icon name=add title="Ajouter à mes contacts"} - {else} - - {icon name=cross title="Retirer de mes contacts"} - {/if} - {if $smarty.session.perms->hasFlag('admin')} - - {icon name=wrench title="administrer user"} - {/if} +  {if !$profile->isDead()}{* + *}{icon name=vcard title="Afficher la carte de visite"}{/if} + + {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 $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 {$x.date|date_format} + le {$profile->last_change|date_format}
{/if} - {if $logged || $x.mobile} + + {* 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 $x.mobile}Mobile : {$x.mobile}
{/if} + {if count($phones) > 0} +
+ {display_phones tels=$phones dcd=$profile->isDead()}
+ {/if}
+ {else} +
{/if} +
- {if $x.iso3166} - {$x.nationalite}  - {/if} - X {$x.promo} - {if ($x.promo_sortie-3 > $x.promo)} - - X {math equation="a-b" a=$x.promo_sortie b=3} + {foreach from=$profile->nationalities() item=country key=code} + {$code}  + {/foreach} + + {$profile->promo()} + + {if $logged && $profile->mentor_expertise} + [Ma fiche référent] {/if} - {if $x.applis_join} -  - Formation : {$x.applis_join|smarty:nodefaults} + + {assign var=educations value=$profile->getEducations(32)} + {if count($educations) > 0} +  - Formation : +
    + {foreach from=$educations item=edu} +
  • {display_education edu=$edu profile=$profile full=true}
  • + {/foreach} +
{/if} - {if $logged && $x.is_referent} - [Ma fiche référent] + + {assign var=corps value=$profile->getCorps()} + {if $corps && ($corps->current || $corps->original)} +
    + {if $corps->current} +
  • + Corps actuel : {$corps->current_name} + {if $corps->current_rank}({$corps->current_rank}){/if} +
  • + {/if} + {if $corps->current != $corps->original && $corps->original} +
  • Corps d'origine : {$corps->original_name}
  • + {/if} +
{/if} +
- {if $x.adr} + + {assign var=addr value=$profile->getAddresses(3)} + {if count($addr) > 0}
-

Contact :

- {foreach from=$x.adr item="address" key="i" name=adresses} - {if $address.active} - {include file="geoloc/address.tpl" address=$address titre_div=true titre="Mon adresse actuelle :" - for="`$x.prenom` `$x.nom`"} - {elseif $address.secondaire} - {include file="geoloc/address.tpl" address=$address titre_div=true titre="Adresse secondaire :" - for="`$x.prenom` `$x.nom`"} +

Contact :

+ {if $profile->isDead()} + {assign var=address_name value="Dernière adresse"} + {else} + {assign var=address_name value="Adresse"} + {/if} + {foreach from=$addr item="address" name=addresses} + {if $smarty.foreach.addresses.iteration is even} + {assign var=pos value="right"} + {else} + {assign var=pos value="left"} + {/if} + {if $address->hasFlag('current')} + {include file="geoloc/address.tpl" address=$address titre_div=true titre=$address_name|@cat:" actuelle :" + 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="`$profile->firstname` `$profile->lastname`" pos=$pos phones=null} {else} - {include file="geoloc/address.tpl" address=$address titre_div=true titre="Adresse principale :" - for="`$x.prenom` `$x.nom`"} + {include file="geoloc/address.tpl" address=$address titre_div=true titre=$address_name|@cat:" principale :" + for="`$profile->firstname` `$profile->lastname`" pos=$pos phones=null} {/if} - {if $i is odd}
{/if} + {if $smarty.foreach.addresses.iteration is even}
{/if} {/foreach}
{/if} - {if $x.adr_pro} + + {assign var=jobs value=$profile->getJobs(2)} + {if count($jobs) > 0}
-

Informations professionnelles :

- {foreach from=$x.adr_pro item="address" key="i"} - {include file="include/emploi.tpl" address=$address} - {include file="geoloc/address.tpl" address=$address titre="Adresse : " for=$address.entreprise} -
 
+

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" phones=$jobPhones} + {elseif $jobPhones|@count neq 0} + {display_phones tels=$jobPhones} + {/if} +
 
{/foreach}
{/if} - {if $x.medals} -
-

Distinctions :

- {foreach from=$x.medals item=m} -
- {$m.medal} -
- {$m.medal}
{$m.grade} + + {assign var=medals value=$profile->getMedals()} + {if count($medals) > 0} +
+

Distinctions :

+ {foreach from=$medals item=m} +
+ {$m.text} +
+ {$m.text}
{$m.grade} +
+ {/foreach} +
 
- {/foreach} -
 
-
{/if} - {if $logged && $x.cv} + + {if $logged && $profile->cv}
-

Curriculum Vitae :

- {$x.cv|smarty:nodefaults} +

Curriculum Vitae :

+ {$profile->cv|miniwiki:title|smarty:nodefaults}
{/if} - {if !$logged} + + {if $view eq 'public'}
+ 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'} +
+ + Cette fiche est privée et ne recense que les informations transmises à l'AX. +
{/if} +