From: Raphaël Barrois Date: Mon, 22 Mar 2010 20:18:42 +0000 (+0100) Subject: Fix minor Smarty warnings in minifiche.tpl X-Git-Tag: xorg/1.0.0~332^2~4 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=eff6ac2dab57f45bf0877e90c3ba3d039822e2b7;p=platal.git Fix minor Smarty warnings in minifiche.tpl Signed-off-by: Raphaël Barrois --- diff --git a/templates/include/minifiche.tpl b/templates/include/minifiche.tpl index 799c602..698a549 100644 --- a/templates/include/minifiche.tpl +++ b/templates/include/minifiche.tpl @@ -73,7 +73,7 @@
{if !$registered && !$dead && $hasowner} - {if $show_action eq 'ajouter'} + {if $show_action && ($show_action eq 'ajouter')} {* *}{icon name=add title="Ajouter à la liste de mes surveillances"} {else} @@ -88,11 +88,11 @@ *}{icon name=vcard title="Afficher la carte de visite"} {* *}{icon name=email title="Envoyer un email"} - {if !$smarty.session.user->isContact($user)} - {* + {if !$smarty.session.user->isContact($profile)} + {* *}{icon name=add title="Ajouter à mes contacts"} {else} - {* + {* *}{icon name=cross title="Retirer de mes contacts"} {/if} {/if} @@ -119,7 +119,7 @@ {assign var=address value=$profile->getMainAddress()} {assign var=web value=$profile->getWebSite()} {assign var=job value=$profile->getMainJob()} - {if $web || $profile->mobile || $address->country || $job || (!$dead && !$registered)} + {if $web || $profile->mobile || ($address && $address->country) || $job || !$registered} {if $web} @@ -127,7 +127,7 @@ {/if} - {if $address->country && !$c.dcd} + {if $address && $address->country}
{$web}
Géographie : {if $address->locality}{$address->locality}, {/if}{$address->country}