X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=templates%2Finclude%2Fminifiche.tpl;h=0daa537eaf6fd055a6f7934d4c555868c373cd01;hb=c76545c351fae4e2298624ff9ee5bf854dc5a5b6;hp=19f4b3a65837ecefac07e2f30f780bbbe543d29c;hpb=ff874621dbb2c403dbdd7b5bc5e8040db6ede96a;p=platal.git diff --git a/templates/include/minifiche.tpl b/templates/include/minifiche.tpl index 19f4b3a..0daa537 100644 --- a/templates/include/minifiche.tpl +++ b/templates/include/minifiche.tpl @@ -1,6 +1,6 @@ {**************************************************************************} {* *} -{* Copyright (C) 2003-2006 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,110 +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}
{/if} -
- - -
- {if $c.iso3166} - {$c.nat}  - {/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 $smarty.session.auth ge AUTH_COOKIE} - {if !$c.dcd && !$c.wasinscrit} - clique ici si tu connais son adresse email ! - {/if} +
+
+ {if $withAuth} +
+ {$profile->directory_name} +
{/if} + +
+ {if $profile->isFemale()}•{/if} + {if !$dead && $registered}{/if} + {$profile->directory_name} + {if !$dead && $registered}{/if} +
+ +
+ {foreach from=$profile->nationalities() item=country key=code} + {$code}  + {/foreach} + {$profile->promo()}{* + *}{foreach from=$profile->getExtraEducations(4) item=edu}, {display_education edu=$edu profile=$profile full=false}{/foreach}{* + *}{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 !$c.wasinscrit && !$c.dcd} - {if $show_action eq ajouter} - {* - *}Ajouter à la liste de mes surveillances - {else} - {* - *}{icon name=cross title="Retirer de la liste de mes surveillances"} - {/if} - {elseif $c.wasinscrit} - {* - *}Afficher la fiche - {if !$c.dcd} - {* - *}Afficher la carte de visite - {* - *}{if $show_action eq + {if $withAuth} +
+ {if $registered || (!$dead && $hasowner)} + {/if} - {if $smarty.session.perms eq admin} - {if !$c.wasinscrit && !$c.dcd} - {* - *}admin - {elseif $c.wasinscrit} - {* - *}admin + {if hasPerm('admin') && $hasowner} + {/if}
+ {/if}
- {if $c.wasinscrit} - {if $c.web || $c.mobile || $c.countrytxt || $c.city || $c.region || $c.entreprise || $c.freetext} + {if !$dead} + {assign var=address value=$profile->getMainAddress()} + {assign var=web value=$profile->getWebSite()} + {assign var=job value=$profile->getMainJob()} + {if $web || $profile->mobile || ($address && $address->country) || $job || !$registered || $user->lost} - {if $c.web} + {if $web} - - + + {/if} - {if $c.countrytxt || $c.city} + {if $address && $address->country} - - + + {/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} + + + + {elseif $user->state neq 'disabled' && $user->lost} - - + {/if} + {/if}
Page web:{$c.web}{$web.name} :{$web.address}
Géographie:{$c.city}{if $c.city && $c.countrytxt}, {/if}{$c.countrytxt}Géographie :{if $address->locality}{$address->locality}, {/if}{$address->country}
Mobile:{$c.mobile}Mobile :{$profile->mobile}
Profession:Profession : - {$c.entreprise} {if $c.secteur}({$c.secteur}){/if} - {if $c.fonction}
{$c.fonction}{/if} + {if $job->company->url|default:$job->user_site}{$job->company->name}{else}{$job->company->name}{/if} + {if $job->subsubsector} ({$job->subsubsector}){/if}{if $job->description}
{$job->description}{/if}
+ {"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 ! +
Commentaire:{$c.freetext|nl2br} + {"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 !$c.inscrit || $c.dcd}
{/if} -{* vim:set et sw=2 sts=2 sws=2: *} +{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}