From: Florent Bruneau Date: Mon, 2 Mar 2009 21:41:17 +0000 (+0100) Subject: Simplify tests. X-Git-Tag: xorg/1.0.0~332^2~353 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=64a69719539f0f1dc2bdf6290b298c8d301ecc8f;p=platal.git Simplify tests. Signed-off-by: Florent Bruneau --- diff --git a/core b/core index e94c4a1..1c951e8 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit e94c4a1713cc0d63508a5d0ecd2d572f047975fb +Subproject commit 1c951e82aac7fd46a2d7d35c5ba074e761d827e3 diff --git a/templates/include/minifiche.tpl b/templates/include/minifiche.tpl index 3caa8b5..d493cf5 100644 --- a/templates/include/minifiche.tpl +++ b/templates/include/minifiche.tpl @@ -21,21 +21,33 @@ {**************************************************************************} {assign var=profile value=$user->profile()} -
state neq 'pending'}{if $smarty.session.auth ge AUTH_COOKIE}title="fiche mise à jour le {$profile->last_change|date_format}"{/if}{/if}> +{assign var=dead value=$profile->deathdate} +{if $user->state neq 'pending'} +{assign var=registered value=true} +{else} +{assign var=registered value=false} +{/if} +{if $smarty.session.auth ge AUTH_COOKIE} +{assign var=withAuth value=true} +{else} +{assign var=withAuth value=false} +{/if} + + +
- {if $smarty.session.auth ge AUTH_COOKIE} + {if $withAuth}
- {$profile->directory_name} + {$profile->directory_name}
{/if}
{if $profile->isFemale()}•{/if} - {if !$profile->deathdate && ($user->state neq 'pending' || $smarty.session.auth eq AUTH_PUBLIC)}{/if} + {if !$dead && (!$registered || $withAuth)}{/if} {$profile->full_name} - {if !$profile->deathdate && ($user->state neq 'pending' || $smarty.session.auth eq AUTH_PUBLIC)}{/if} + {if !$dead && (!$registered || $withAuth)}{/if}
@@ -49,7 +61,7 @@ {$profile->nationality3}  {/if} {$profile->promo()} - + {if $c.eduname0}, {education_fmt name=$c.eduname0 url=$c.eduurl0 degree=$c.edudegree0 grad_year=$c.edugrad_year0 field=$c.edufield0 program=$c.eduprogram0 sexe=$c.sexe}{* *}{/if}{if $c.eduname1}, {education_fmt name=$c.eduname1 url=$c.eduurl1 degree=$c.edudegree1 @@ -62,10 +74,10 @@
- {if $smarty.session.auth ge AUTH_COOKIE} + {if $withAuth}
- {if $user->state eq 'pending' && !$profile->deathdate} + {if $registered && !$dead} {if $show_action eq ajouter} {* *}{icon name=add title="Ajouter à la liste de mes surveillances"} @@ -76,7 +88,7 @@ {elseif $user->state neq 'pending'} {* *}{icon name=user_suit title="Afficher la fiche"} - {if !$profile->deathdate} + {if !$dead} {* *}{icon name=vcard title="Afficher la carte de visite"} {* @@ -94,7 +106,7 @@ {if hasPerm('admin')}
- [{if $user->state eq 'pending' && !$profile->deathdeate} + [{if $registered && !$dead} {* *}{icon name=email title="marketter user"} {/if} @@ -108,7 +120,7 @@ {/if}
- {if !$profile->deathdeate} + {if !$dead} {if $c.web || $c.mobile || $c.countrytxt || $c.city || $c.region || $c.entreprise || (!$c.dcd && !$c.actif )} {if $c.web} @@ -123,7 +135,7 @@ {/if} - {if $c.mobile && !$c.dcd} + {if $c.mobile && !$dead} @@ -138,11 +150,11 @@ {/if} - {if $smarty.session.auth ge AUTH_COOKIE} - {if $user->state eq 'pending'} + {if $withAuth} + {if !$registered}
{$c.city}{if $c.city && $c.countrytxt}, {/if}{$c.countrytxt}
Mobile : {$c.mobile}
- {"Ce"|sex:"Cette":$user} camarade n'est pas {inscrit|sex:"inscrite":$user}. + {"Ce"|sex:"Cette":$user} camarade n'est pas {"inscrit"|sex:"inscrite":$user}. Si tu connais son adresse email, n'hésite pas à nous la transmettre !