X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=templates%2Fprofile%2Fprofile.tpl;h=c5a2517b686aed5f8f4e04237d017a5d1283f25d;hb=4ed7a2fdf41ae328c97543316c04c3af7967d4bd;hp=e1e8210a0708d5638bfedddf1b4148bb5acd93e7;hpb=7e019d2434ea31d5d1e1bbfc1c0381a6a19a5eb4;p=platal.git
diff --git a/templates/profile/profile.tpl b/templates/profile/profile.tpl
index e1e8210..c5a2517 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 *}
@@ -24,7 +24,7 @@
{/literal}
@@ -44,7 +47,7 @@ function chgMainWinLoc(strPage)
{assign var=photo value=$profile->getPhoto(false)}
{if $photo}{/if}
- {if $logged && $view eq 'private' && ( $profile->section|smarty:nodefaults || $profile->getBinets()|smarty:nodefaults || ($owner && $owner->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 $profile->section}Section : {$profile->section}
{/if}
@@ -53,16 +56,20 @@ function chgMainWinLoc(strPage)
{', '|implode:$profile->getBinetsNames()}{/if}
{if $owner && $view eq 'private'}
- {assign var=groups value=$owner->groupNames(true)}
+ {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=$profile->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}
@@ -86,10 +93,7 @@ function chgMainWinLoc(strPage)
@@ -154,11 +161,13 @@ function chgMainWinLoc(strPage)
{/if}
+ {else}
+
{/if}
@@ -209,13 +221,13 @@ function chgMainWinLoc(strPage)
{/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}
+ 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}
+ 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="`$profile->firstname` `$profile->lastname`" pos=$pos}
+ for="`$profile->firstname` `$profile->lastname`" pos=$pos phones=null}
{/if}
{if $smarty.foreach.addresses.iteration is even}{/if}
{/foreach}
@@ -229,11 +241,11 @@ function chgMainWinLoc(strPage)
{foreach from=$jobs item="job" key="i"}
{if $i neq 0}
{/if}
{include file="include/emploi.tpl" job=$job}
- {assign var=phones value=$job->phones()}
+ {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=$phones}
- {elseif $phones}
- {display_phones tels=$phones}
+ {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}