From: Raphaël Barrois Date: Fri, 12 Feb 2010 23:20:32 +0000 (+0100) Subject: Fix display bug in minifiche for profiles without owner X-Git-Tag: xorg/1.0.0~332^2~237 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=1e8658aba108fc90cc2d60a018615769bc829344;p=platal.git Fix display bug in minifiche for profiles without owner Signed-off-by: Raphaël Barrois --- diff --git a/templates/include/minifiche.tpl b/templates/include/minifiche.tpl index a45f1f3..680af1c 100644 --- a/templates/include/minifiche.tpl +++ b/templates/include/minifiche.tpl @@ -28,6 +28,7 @@ {assign var=hasowner value=false} {assign var=registered value=false} {else} + {assign var=hasowner value=true} {if $user->state neq 'pending'} {assign var=registered value=true} {else} @@ -35,7 +36,8 @@ {/if} {/if} {else} - {* Without auth, all profiles appear as registered *} + {* Without auth, all profiles appear as registered and with owner *} + {assign var=hasowner value=true} {assign var=registered value=true} {assign var=withAuth value=false} {/if} @@ -76,7 +78,7 @@ {if $withAuth}
- {if !$registered && !$dead} + {if !$registered && !$dead && $hasowner} {if $show_action eq 'ajouter'} {* *}{icon name=add title="Ajouter à la liste de mes surveillances"} @@ -103,7 +105,7 @@ {/if}
- {if hasPerm('admin')} + {if hasPerm('admin') && $hasowner}
[{if $registered && !$dead} {* @@ -153,7 +155,7 @@ {/if} {if $withAuth} - {if !$registered} + {if !$registered && $hasowner} {"Ce"|sex:"Cette":$profile} camarade n'est pas {"inscrit"|sex:"inscrite":$profile}.