X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=templates%2Fprofile%2Fprofile.tpl;h=95667c1f3340041f5718d15f1f7183171146506b;hb=245923e335d0da5bec9495991a7846be9f0563ab;hp=863cbdc855c30f69ba4edaefb8efb1e40d39353e;hpb=b9d254dfbec04814a5301ee1f49a3793cf763716;p=platal.git diff --git a/templates/profile/profile.tpl b/templates/profile/profile.tpl index 863cbdc..95667c1 100644 --- a/templates/profile/profile.tpl +++ b/templates/profile/profile.tpl @@ -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,12 @@ 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('edit_directory')} - {icon name="user_edit" title="Modifier cette fiche"} + {elseif hasPerm('admin') || $smarty.session.user->canEdit($profile)} + + {icon name=user_edit title="modifier la fiche"} + {/if} {/if}