X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=templates%2Finclude%2Fminifiche.tpl;h=0daa537eaf6fd055a6f7934d4c555868c373cd01;hb=c76545c351fae4e2298624ff9ee5bf854dc5a5b6;hp=b4d1bcbab5699a974100186ce4b77b8873b494b7;hpb=486d15fb147bfd5e2b2ff71b22ad5b2ca0e43878;p=platal.git diff --git a/templates/include/minifiche.tpl b/templates/include/minifiche.tpl index b4d1bcb..0daa537 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,22 +20,31 @@ {* *} {**************************************************************************} -{assign var=profile value=$user->profile()} {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} + {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} -{assign var=withAuth value=false} + {* 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 $withAuth}
@@ -45,32 +54,27 @@
{if $profile->isFemale()}•{/if} - {if !$dead && (!$registered || $withAuth)}{/if} - {$profile->full_name} - {if !$dead && (!$registered || $withAuth)}{/if} + {if !$dead && $registered}{/if} + {$profile->directory_name} + {if !$dead && $registered}{/if}
- {if $profile->nationality1} - {$profile->nationality1}  - {/if} - {if $profile->nationality2} - {$profile->nationality2}  - {/if} - {if $profile->nationality3} - {$profile->nationality3}  - {/if} + {foreach from=$profile->nationalities() item=country key=code} + {$code}  + {/foreach} {$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":$user} le {$orfile->deathdate|date_format}{/if} + *}{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 $withAuth}
+ {if $registered || (!$dead && $hasowner)}
- {if !$registered && !$dead} - {if $show_action eq 'ajouter'} + {if !$registered && !$dead && $hasowner} + {if !$smarty.session.user->isWatchedUser($profile)} {* *}{icon name=add title="Ajouter à la liste de mes surveillances"} {else} @@ -85,18 +89,19 @@ *}{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} {/if}
+ {/if} - {if hasPerm('admin')} + {if hasPerm('admin') && $hasowner}
[{if $registered && !$dead} {* @@ -104,7 +109,7 @@ {/if} {* *}{icon name=wrench title="administrer user"} - {* + {* *}{icon name=user_gray title="fiche AX"}]
{/if} @@ -114,48 +119,50 @@
{if !$dead} {assign var=address value=$profile->getMainAddress()} - {if $c.web || $c.mobile || $address.country || $c.entreprise || (!$dead && !$registered)} + {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 $address.country} + {if $address && $address->country} - + {/if} - {if $c.mobile && !$dead} + {if $profile->mobile && !$dead} - + {/if} - {if $c.entreprise} + {if $job} {/if} {if $withAuth} - {if !$registered} + {if !$registered && $hasowner} {elseif $user->state neq 'disabled' && $user->lost}
Page web :{$c.web}{$web.name} :{$web.address}
Géographie :{if $address.locality}{$address.locality}, {/if}{$address.country}{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->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":$user} camarade n'est pas {"inscrit"|sex:"inscrite":$user}. + {"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 ! + n'hésite pas à nous la transmettre !
- {"Ce"|sex:"Cette":$user} 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.