X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=templates%2Fprofile%2Fprofile.tpl;h=13004b4585bc8d85d2f26147df711189701c1485;hb=79270914e952308fb164792b4c1b0879a23ce5d1;hp=94874656d3956cd2d1d931d53018458b7db59f5d;hpb=429e4a4b8eb428e9631513fc6bb053b4635c7729;p=platal.git diff --git a/templates/profile/profile.tpl b/templates/profile/profile.tpl index 9487465..13004b4 100644 --- a/templates/profile/profile.tpl +++ b/templates/profile/profile.tpl @@ -1,6 +1,6 @@ {**************************************************************************} {* *} -{* Copyright (C) 2003-2009 Polytechnique.org *} +{* Copyright (C) 2003-2011 Polytechnique.org *} {* http://opensource.polytechnique.org/ *} {* *} {* This program is free software; you can redistribute it and/or modify *} @@ -24,7 +24,7 @@ {/literal}
- {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->isVisible(#ProfileVisibility::VIS_AX#) && ( $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 && $profile->isVisible(#ProfileVisibility::VIS_AX#)} + {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.networking} + + {assign var=networking value=$profile->getNetworking(#Profile::NETWORKING_ALL#)} + {if count($networking) > 0}

Sur le web...

- {foreach from=$x.networking item=network} - {$network.name} - {if $network.filter == 'web'} - {$network.address} - {elseif $network.link != ''} - {$network.address} + {foreach from=$networking item=network} + {$network.name} + {if $network.link} + {$network.address} {else} {$network.address} {/if}
{/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 $logged} - {if $x.nickname} (alias {$x.nickname}){/if} - {/if} + {if $profile->isFemale()}•{/if} + {if $profile->isVisible(#ProfileVisibility::VIS_PRIVATE#)}{$profile->private_name}{else}{$profile->public_name}{/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($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 && $profile->isVisible(#ProfileVisibility::VIS_AX#) && $owner && $owner->state eq 'active'}
Fiche mise à jour
- le {$x.date|date_format} + le {$profile->last_change|date_format}
{/if} - {if $logged || $x.tels} + + {* 121634816 is Profile::PHONE_LINK_PROFILE | Profile::PHONE_TYPE_ANY = 0x7400000 *} + {assign var=phones value=$profile->getPhones(121634816)} + {if ($logged && $profile->isVisible(#ProfileVisibility::VIS_AX#)) || count($phones) > 0}
- {if $logged} + {if $logged && $profile->isVisible(#ProfileVisibility::VIS_AX#)} {/if} - {if $x.tels} - {display_phones tels=$x.tels dcd=$x.dcd} + {if count($phones) > 0} +
+ {display_phones tels=$phones dcd=$profile->isDead()} +
{/if}
+ {else} +
{/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=country key=code} + {$code}  + {/foreach} + + {$profile->promo('details')} + + {if $logged && $profile->isVisible(#ProfileVisibility::VIS_AX#) && $profile->mentor_expertise} + [Ma fiche référent] {/if} - {if $x.education} -  - Formation : + + {assign var=educations value=$profile->getEducations(32)} + {if count($educations) > 0}
    - {foreach from=$x.education item="edu"} -
  • {$edu|smarty:nodefaults}
  • + {foreach from=$educations item=edu} +
  • {display_education edu=$edu profile=$profile full=true}
  • {/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 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 :

- {if $x.dcd} + {if $profile->isDead()} {assign var=address_name value="Dernière adresse"} {else} {assign var=address_name value="Adresse"} {/if} - {foreach from=$x.adr item="address" name=adresses} - {if $smarty.foreach.adresses.iteration is even} + {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} + {if $address->hasFlag('current')} {include file="geoloc/address.tpl" address=$address titre_div=true titre=$address_name|@cat:" actuelle :" - for="`$x.prenom` `$x.nom`" pos=$pos} - {elseif $address.secondaire} + 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="`$x.prenom` `$x.nom`" 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="`$x.prenom` `$x.nom`" pos=$pos} + for="`$profile->firstname` `$profile->lastname`" pos=$pos phones=null} {/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} + {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|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'} @@ -230,6 +287,7 @@ function chgMainWinLoc(strPage)
{/if} +