X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=templates%2Finclude%2Fminifiche.tpl;h=0daa537eaf6fd055a6f7934d4c555868c373cd01;hb=c76545c351fae4e2298624ff9ee5bf854dc5a5b6;hp=4fa451bbb2cb843ebc509c0dfc2230117eb1f85f;hpb=ebd515f95f03f8a87f9b846d65e179b39a535222;p=platal.git diff --git a/templates/include/minifiche.tpl b/templates/include/minifiche.tpl index 4fa451b..0daa537 100644 --- a/templates/include/minifiche.tpl +++ b/templates/include/minifiche.tpl @@ -1,6 +1,6 @@ {**************************************************************************} {* *} -{* Copyright (C) 2003-2008 Polytechnique.org *} +{* Copyright (C) 2003-2010 Polytechnique.org *} {* http://opensource.polytechnique.org/ *} {* *} {* This program is free software; you can redistribute it and/or modify *} @@ -20,125 +20,160 @@ {* *} {**************************************************************************} +{assign var=dead value=$profile->deathdate} +{if $smarty.session.auth ge AUTH_COOKIE} + {assign var=withAuth value=true} + {assign var=user value=$profile->owner()} + {if $user == null} + {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} + {assign var=registered value=false} + {/if} + {/if} +{else} + {* 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} -{if !$c.inscrit || $c.dcd}