X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=templates%2Fprofile%2Fprofile.tpl;h=91af9a1f20a14992c37ed69c56885a59e4fe9936;hb=5096676e03dcd626d6e64696cb9d6ee5d8e054da;hp=967bf7e04962ca7a5edfcb764b59c20825dbb2b3;hpb=12262f1306059765d8625a6752364679c8625d31;p=platal.git
diff --git a/templates/profile/profile.tpl b/templates/profile/profile.tpl
index 967bf7e..91af9a1 100644
--- a/templates/profile/profile.tpl
+++ b/templates/profile/profile.tpl
@@ -1,6 +1,6 @@
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2011 Polytechnique.org *}
+{* Copyright (C) 2003-2014 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
@@ -24,7 +24,7 @@
{/literal}
-
{assign var=photo value=$profile->getPhoto(false)}
{if $photo}
![Photo de {$profile->fullName()}](photo/{$profile->hrid()}{if $with_pending_pic}/req{/if})
{/if}
- {if $logged && $view eq 'private' && ( $profile->section|smarty:nodefaults || $profile->getBinets()|smarty:nodefaults || ($owner && $owner->groups(true,true)|smarty:nodefaults))}
+ {if $logged && $view->isVisible(#Visibility::EXPORT_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()}
+ {assign var=binets value=$profile->getFullBinets()}
{if $binets|@count}
Binet{if count($binets) > 1}s{/if} :
- {', '|implode:$profile->getBinetsNames()}
{/if}
+
+ {foreach from=$binets item=binet name=binets}
+ {if !$smarty.foreach.binets.first}, {/if}
+ {if $binet.url}{/if}{$binet.text}{if $binet.url}{/if}
+ {/foreach}
+ {/if}
- {if $owner && $view eq 'private'}
+ {if $owner && $view->isVisible(#Visibility::EXPORT_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}
+ {foreach from=$groups item=group name=groups}
+ {if !$smarty.foreach.groups.first}, {/if}
+ {$group.nom}
+ {/foreach}
{/if}
{/if}
{/if}
- {* 458752 stands for 0x70000 = Profile::NETWORKING_ALL *}
- {assign var=networking value=$profile->getNetworking(458752)}
+ {assign var=networking value=$profile->getNetworking(#Profile::NETWORKING_ALL#)}
{if count($networking) > 0}
Sur le web...
{foreach from=$networking item=network}
@@ -77,6 +86,14 @@ function chgMainWinLoc(strPage)
{/foreach}
{/if}
+ {assign var=hobbies value=$profile->getHobbies()}
+ {if count($hobbies) > 0}
+
Hobbies...
+ {foreach from=$hobbies key=type item=text}
+
{$type} : {$text}
+ {/foreach}
+ {/if}
+
{if $profile->freetext}
Commentaires :
{$profile->freetext|miniwiki|smarty:nodefaults}
@@ -87,7 +104,10 @@ function chgMainWinLoc(strPage)
{if $profile->isFemale()}•{/if}
- {if $view eq 'private'}{$profile->private_name}{else}{$profile->public_name}{/if}
+ {if $view->isVisible(#Visibility::EXPORT_PRIVATE#)}{$profile->private_name}{else}{$profile->public_name}{/if}
+ {if $logged && ( hasPerm('admin') || $smarty.session.user->canEdit($profile)) && $view->isVisible(#Visibility::EXPORT_PRIVATE#)}
+
({$profile->ax_id})
+ {/if}
{if $logged}
{if !$profile->isDead()}
{*
@@ -116,7 +136,7 @@ function chgMainWinLoc(strPage)
{/if}
- {if $logged && $view eq 'private'}
+ {if $logged && $view->isVisible(#Visibility::EXPORT_AX#) && $owner && $owner->state eq 'active'}
Fiche mise à jour
le {$profile->last_change|date_format}
@@ -125,9 +145,9 @@ function chgMainWinLoc(strPage)
{* 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 && $view->isVisible(#Visibility::EXPORT_AX#)) || count($phones) > 0}