X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=templates%2Fprofile%2Fprofile.tpl;h=2362564e9ddd9ed077dd77aa69a017c0ebdfc983;hb=68f988a8b01fe53e7a0a74780757f4bc855b523c;hp=7aa9c0ca8ca2a6eda3dcc76faeb801022cc81e84;hpb=a0ad593aec01fe6387ee83f3ef487bcdc3c3c5bd;p=platal.git diff --git a/templates/profile/profile.tpl b/templates/profile/profile.tpl index 7aa9c0c..2362564 100644 --- a/templates/profile/profile.tpl +++ b/templates/profile/profile.tpl @@ -1,6 +1,6 @@ {**************************************************************************} {* *} -{* Copyright (C) 2003-2009 Polytechnique.org *} +{* Copyright (C) 2003-2010 Polytechnique.org *} {* http://opensource.polytechnique.org/ *} {* *} {* This program is free software; you can redistribute it and/or modify *} @@ -41,19 +41,32 @@ function chgMainWinLoc(strPage)
- {if $photo_url}Photo de {$user->login()}{/if} - {if $logged && ( $x.section|smarty:nodefaults || $x.binets_join|smarty:nodefaults || $x.gpxs_join|smarty:nodefaults)} -

À l'X...

- {if $x.section}
Section : {$x.section}
{/if} - {if $x.binets_join}
Binet{if count($x.binets) > 1}s{/if} : - {$x.binets_join}
{/if} - {if $x.gpxs_join}
Groupe{if count($x.gpxs) > 1}s{/if} et institution{if count($x.gpxs) > 1}s{/if} X : -
{$x.gpxs_join|smarty:nodefaults}
{/if} + {assign var=photo value=$profile->getPhoto(false)} + {if $photo}Photo de {$profile->fullName()}{/if} + + {if $logged && ( $profile->section|smarty:nodefaults || $profile->getBinets()|smarty:nodefaults || ($o && $owner->groups()|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 $o} + {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} +
{/if} + {/if} + {/if} - {if $x.networking} + + {assign var=networking value=$profile->getNetworking(0)} + {if count($networking) > 0}

Sur le web...

- {foreach from=$x.networking item=network} - {$network.name} + {foreach from=$networking item=network} + {$network.name} {if $network.filter == 'web'} {$network.address} {elseif $network.link != ''} @@ -64,158 +77,193 @@ function chgMainWinLoc(strPage)
{/foreach} {/if} - {if $x.freetext} -

Commentaires :

- {$x.freetext|miniwiki|smarty:nodefaults} + + {if $profile->freetext} +

Commentaires :

+ {$profile->freetext|miniwiki|smarty:nodefaults} {/if} +
+
- {if $user->isFemale()}•{/if} - {$x.name_display} + {if $profile->isFemale()}•{/if} + name_tooltip neq ""}class="hinted" title="{$profile->name_tooltip}"{/if}>{$profile->shortName()} {if $logged} - {if $x.nickname} (alias {$x.nickname}){/if} + {if $profile->nickname} (alias {$profile->nickname}){/if} {/if} + {if $logged} -  {if !$x.dcd}{* - *}{icon name=vcard title="Afficher la carte de visite"}{/if} - {if !$x.is_contact} - - {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 $user->login() eq $smarty.session.hruid} - {icon name="user_edit" title="Modifier ma fiche"} - {/if} +  {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 $owner->login() eq $smarty.session.hruid} + {icon name="user_edit" title="Modifier ma fiche"} + {/if} + {/if}
+ {if $logged}
Fiche mise à jour
- le {$x.date|date_format} + le {$profile->last_change|date_format}
{/if} - {if $logged || $x.tels} + + {assign var=phones value=$profile->getPhones(0)} + {if $logged || count($phones) > 0}
{if $logged} {/if} - {if $x.tels} - {display_phones tels=$x.tels} + {if count($phones) > 0} + {display_phones tels=$phones dcd=$profile->isDead()} {/if}
{/if} +
- {if $x.iso3166_1} - {$x.nationalite}  - {/if} - {if $x.iso3166_2} - {$x.nationalite2}  - {/if} - {if $x.iso3166_3} - {$x.nationalite3}  - {/if} - {$user->promo()} - {if $logged && $x.is_referent} - [Ma fiche référent] + {foreach from=$profile->nationalities() item=nat} + {$nat}  + {/foreach} + + {$profile->promo()} + + {if $logged && $profile->mentor_expertise} + [Ma fiche référent] {/if} - {if $x.education} + + {assign var=educations value=$profile->getEducations(64)} + {if count($educations) > 0}  - Formation :
    - {foreach from=$x.education item="edu"} -
  • {$edu|smarty:nodefaults}
  • + {foreach from=$educations item=edu} +
  • {display_education edu=$edu profile=$p}
  • {/foreach}
{/if} - {if $x.corps} - {$x.corps|smarty:nodefaults} + + {assign var=corps value=$profile->getCorps()} + {if $corps && ($corps->current || $corps->original)} +
    + {if $corps->current} +
  • {$corps->current_name} {$corps->current_rank} + {/if} + {if $corps->original} +
  • {$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" name=adresses} - {if $smarty.foreach.adresses.iteration is even} + {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.active} - {include file="geoloc/address.tpl" address=$address titre_div=true titre="Mon adresse actuelle :" - for="`$x.prenom` `$x.nom`" pos=$pos} - {elseif $address.secondaire} - {include file="geoloc/address.tpl" address=$address titre_div=true titre="Adresse secondaire :" - for="`$x.prenom` `$x.nom`" pos=$pos} + {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} + {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} {else} - {include file="geoloc/address.tpl" address=$address titre_div=true titre="Adresse principale :" - for="`$x.prenom` `$x.nom`" pos=$pos} + {include file="geoloc/address.tpl" address=$address titre_div=true titre=$address_name|@cat:" principale :" + for="`$profile->firstname` `$profile->lastname`" pos=$pos} {/if} - {if $smarty.foreach.adresses.iteration is even}
{/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"} + {foreach from=$jobs item="job" key="i"} {if $i neq 0}
{/if} - {include file="include/emploi.tpl" address=$address} - {include file="geoloc/address.tpl" address=$address titre="Adresse : " for=$address.entreprise pos="left"} + {include file="include/emploi.tpl" job=$job} + {if $job->address()} + {include file="geoloc/address.tpl" address=$job->address titre="Adresse : " for=$job->company->name pos="left"} + {/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|miniwiki:title|smarty:nodefaults} + {$profile->cv|miniwiki:title|smarty:nodefaults}
{/if} + {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'} @@ -225,6 +273,7 @@ function chgMainWinLoc(strPage)
{/if} +