X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=templates%2Fprofile%2Fprofile.tpl;h=95667c1f3340041f5718d15f1f7183171146506b;hb=81120a6fae8573d4d333ab9009f57efa81b55c7e;hp=5ac72d0bd5b62bdf1afc707fd2627f6c5e39eddb;hpb=5f8ad70d9a87881c893e1976002d1bae5d82f38b;p=platal.git
diff --git a/templates/profile/profile.tpl b/templates/profile/profile.tpl
index 5ac72d0..95667c1 100644
--- a/templates/profile/profile.tpl
+++ b/templates/profile/profile.tpl
@@ -41,36 +41,35 @@ function chgMainWinLoc(strPage)
- {assign var=photo value=$p->getPhoto(false)}
- {if $photo}
{/if}
+ {assign var=photo value=$profile->getPhoto(false)}
+ {if $photo}
{/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}
-
- {if $network.filter == 'web'}
-
{$network.address}
- {elseif $network.link != ''}
-
{$network.address}
+
+ {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 $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}
+ {else}
+
{/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)
{elseif $view eq 'ax'}