X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=templates%2Finclude%2Fminifiche.tpl;h=f6cdc6512da1c8a46b85450b419c7ed464f4a3eb;hb=a292484d6d19447f6cc3c10d573338b3275fbc74;hp=fa4535b1971bcc87e062cbf8c354bfcefd04fc25;hpb=af744c2d5f4ddf83b738b9cb390926eaca4cf7c3;p=platal.git diff --git a/templates/include/minifiche.tpl b/templates/include/minifiche.tpl index fa4535b..f6cdc65 100644 --- a/templates/include/minifiche.tpl +++ b/templates/include/minifiche.tpl @@ -1,6 +1,6 @@ {**************************************************************************} {* *} -{* Copyright (C) 2003-2009 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,72 +20,100 @@ {* *} {**************************************************************************} -
+{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 $smarty.session.auth ge AUTH_COOKIE} + {if $withAuth}
- {$c.prenom} {$c.nom} + {$profile->directory_name}
{/if}
- {if $c.sexe}•{/if} - {if !$c.dcd && ($c.inscrit || $smarty.session.auth eq AUTH_PUBLIC)}{/if} - {if $c.nom_usage}{$c.nom_usage} {$c.prenom}
({$c.nom}){else}{$c.nom} {$c.prenom}{/if} - {if !$c.dcd && ($c.inscrit || $smarty.session.auth eq AUTH_PUBLIC)}
{/if} + {if $profile->isFemale()}•{/if} + {if !$dead && $registered}{/if} + {$profile->full_name} + {if !$dead && $registered}{/if}
-
- {if $c.iso3166} - {$c.nat}  +
+ {if $profile->nationality1} + {$profile->nationality1}  {/if} - X {$c.promo}{if $c.app0text}, {applis_fmt type=$c.app0type text=$c.app0text url=$c.app0url}{* - *}{/if}{if $c.app1text}, {applis_fmt type=$c.app1type text=$c.app1text url=$c.app1url}{/if}{* - *}{if $c.dcd}, décédé{if $c.sexe}e{/if} le {$c.deces|date_format}{/if} + {if $profile->nationality2} + {$profile->nationality2}  + {/if} + {if $profile->nationality3} + {$profile->nationality3}  + {/if} + {$profile->promo()}{* + *}{iterate from=$profile->getExtraEducations(4) item=edu}, {education_fmt edu=$edu profile=$profile}{/iterate}{* + *}{if $dead}, {"décédé"|sex:"décédée":$profile} le {$profile->deathdate|date_format}{/if}
- {if $smarty.session.auth ge AUTH_COOKIE} + {if $withAuth}
- {if !$c.wasinscrit && !$c.dcd} - {if $show_action eq ajouter} - {* + {if !$registered && !$dead && $hasowner} + {if $show_action eq 'ajouter'} + {* *}{icon name=add title="Ajouter à la liste de mes surveillances"} {else} - {* + {* *}{icon name=cross title="Retirer de la liste de mes surveillances"} {/if} - {elseif $c.wasinscrit} - {* + {elseif $registered} + {* *}{icon name=user_suit title="Afficher la fiche"} - {if !$c.dcd} - {* + {if !$dead} + {* *}{icon name=vcard title="Afficher la carte de visite"} - {* + {* *}{icon name=email title="Envoyer un email"} - {if $show_action eq ajouter} - {* + {if !$smarty.session.user->isContact($user)} + {* *}{icon name=add title="Ajouter à mes contacts"} {else} - {* + {* *}{icon name=cross title="Retirer de mes contacts"} {/if} {/if} {/if}
- {if hasPerm('admin')} + {if hasPerm('admin') && $hasowner}
- [{if !$c.wasinscrit && !$c.dcd} - {* + [{if $registered && !$dead} + {* *}{icon name=email title="marketter user"} {/if} - {* + {* *}{icon name=wrench title="administrer user"} - {* + {* *}{icon name=user_gray title="fiche AX"}]
{/if} @@ -93,58 +121,59 @@ {/if}
- {if $c.wasinscrit || !$c.dcd} - {if $c.web || $c.mobile || $c.countrytxt || $c.city || $c.region || $c.entreprise || $c.freetext || (!$c.dcd && !$c.actif )} + {if !$dead} + {assign var=address value=$profile->getMainAddress()} + {assign var=web value=$profile->getWebSite()} + {assign var=job value=$profile->getMailJob()} + {if $web || $profile->mobile || $address.country || $job || (!$dead && !$registered)} - {if $c.web} + {if $web} - + {/if} - {if $c.countrytxt || $c.city} + {if $address.country && !$c.dcd} - + {/if} - {if $c.mobile && !$c.dcd} + {if $profile->mobile && !$dead} - + {/if} - {if $c.entreprise} + {if $job} {/if} - {if $c.freetext} + {if $withAuth} + {if !$registered && $hasowner} - - + - {/if} - {if !$c.dcd && (!$c.actif || !$c.wasinscrit) && $smarty.session.auth ge AUTH_COOKIE} + {elseif $user->state neq 'disabled' && $user->lost} {/if} + {/if}
Page web :{$c.web}{$web}
Géographie :{$c.city}{if $c.city && $c.countrytxt}, {/if}{$c.countrytxt}{if $address.locality}{$address.locality}, {/if}{$address.country}
Mobile :{$c.mobile}{$profile->mobile}
Profession : - {if $c.job_web}{$c.entreprise}{else}{$c.entreprise}{/if} - {if $c.secteur} ({$c.secteur}){/if}{if $c.fonction}
{$c.fonction}{/if} + {if $job.url|default:$job.user_site}{$job.name}{else}{$job.name}{/if} + {if $job.subsubsector} ({$job.subsubsector}){/if}{if $job.description}
{$job.description}{/if}
Commentaire :{$c.freetext|nl2br} + {"Ce"|sex:"Cette":$profile} camarade n'est pas {"inscrit"|sex:"inscrite":$profile}. + Si tu connais son adresse email, + n'hésite pas à nous la transmettre ! +
- {if !$c.wasinscrit} - Ce{if $c.sexe}tte{/if} camarade n'est pas inscrit{if $c.sexe}e{/if}. - Si tu connais son adresse email, - n'hésite pas à nous la transmettre ! - {elseif !$c.actif} - Ce{if $c.sexe}tte{/if} camarade n'a plus d'adresse de redirection valide. - + {"Ce"|sex:"Cette":$profile} camarade n'a plus d'adresse de redirection valide. + Si tu en connais une, n'hésite pas à nous la transmettre. - {/if}
{/if} {/if}