X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=templates%2Fprofile%2Fprofile.tpl;h=967bf7e04962ca7a5edfcb764b59c20825dbb2b3;hb=5b48ebf46ef939d701852d2117bbcf308036027c;hp=ed73b0bd4654f3d2f7d9a8d7f15aa07648ef9d40;hpb=e4f43af452fdf9ffef2637ce31ba4170cd2c50a4;p=platal.git diff --git a/templates/profile/profile.tpl b/templates/profile/profile.tpl index ed73b0b..967bf7e 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 *} @@ -44,7 +44,7 @@ function chgMainWinLoc(strPage) {assign var=photo value=$profile->getPhoto(false)} {if $photo}Photo de {$profile->fullName()}{/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,10 +53,10 @@ 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} @@ -106,10 +106,13 @@ function chgMainWinLoc(strPage) {icon name=wrench title="administrer user"} {/if} - {if $owner->login() eq $smarty.session.hruid} + {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} @@ -172,7 +175,7 @@ function chgMainWinLoc(strPage)  - Formation : {/if}