X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=templates%2Finclude%2Fminifiche.tpl;h=606251b5dea402595eaf136c19569260dbc913cc;hb=ca5367b747459b0984054e2f859ffdf69bbe803c;hp=a45f1f39b8691e1404dd2246b7e660556eff13b4;hpb=05fef626d9f2e95d367e68b739f76d92f9a3e89b;p=platal.git diff --git a/templates/include/minifiche.tpl b/templates/include/minifiche.tpl index a45f1f3..606251b 100644 --- a/templates/include/minifiche.tpl +++ b/templates/include/minifiche.tpl @@ -1,6 +1,6 @@ {**************************************************************************} {* *} -{* Copyright (C) 2003-2009 Polytechnique.org *} +{* Copyright (C) 2003-2013 Polytechnique.org *} {* http://opensource.polytechnique.org/ *} {* *} {* This program is free software; you can redistribute it and/or modify *} @@ -28,6 +28,7 @@ {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} @@ -35,14 +36,15 @@ {/if} {/if} {else} - {* Without auth, all profiles appear as registered *} + {* 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 $profile->last_change}title="fiche mise à jour le {$profile->last_change|date_format}"{/if}>
{if $withAuth}
@@ -52,38 +54,35 @@
{if $profile->isFemale()}•{/if} - {if !$dead && $registered}{/if} - {$profile->full_name} - {if !$dead && $registered}{/if} + {if !$dead && ($withAuth || $registered)}{/if} + {$profile->directory_name} + {if !$dead && ($withAuth || $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}{* + *}{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 hasPerm('directory_private')} + {if !$smarty.session.user->isWatchedUser($profile)} {* *}{icon name=add title="Ajouter à la liste de mes surveillances"} {else} {* *}{icon name=cross title="Retirer de la liste de mes surveillances"} {/if} + {/if} {elseif $registered} {* *}{icon name=user_suit title="Afficher la fiche"} @@ -92,27 +91,44 @@ *}{icon name=vcard title="Afficher la carte de visite"} {* *}{icon name=email title="Envoyer un email"} - {if !$smarty.session.user->isContact($user)} - {* + {if hasPerm('directory_private')} + {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}
+ {elseif hasPerm('directory_private') && $hasowner && $dead} +
+ {if $smarty.session.user->isWatchedUser($profile)} + {* + *}{icon name=cross title="Retirer de la liste de mes surveillances"} + {elseif $smarty.session.user->isContact($profile)} + {* + *}{icon name=cross title="Retirer de mes contacts"} + {/if} +
+ {/if} - {if hasPerm('admin')} + {if hasPerm('admin') || ($smarty.session.user->canEdit($profile) && !$smarty.session.user->isMe($user))}
- [{if $registered && !$dead} + [{if hasPerm('admin') && $hasowner}{if !$registered && !$dead} {* *}{icon name=email title="marketter user"} {/if} {* - *}{icon name=wrench title="administrer user"} - {* - *}{icon name=user_gray title="fiche AX"}] + *}{icon name=wrench title="administrer user"}{/if}{* + *}{if hasPerm('admin') || $smarty.session.user->canEdit($profile)}{* + *}{* + *}{icon name=user_edit title="modifier la fiche"}{/if}{* + *}{if hasPerm('admin,edit_directory')}{* + *}{* + *}{icon name=user_gray title="fiche AX"}{/if}]
{/if}
@@ -122,19 +138,19 @@ {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)} + {assign var=job value=$profile->getMainJob()} + {if $web || $profile->mobile || ($address && $address->country) || $job || !$registered || $user->lost} {if $web} - - + + {/if} - {if $address.country && !$c.dcd} + {if $address && $address->country} - + {/if} {if $profile->mobile && !$dead} @@ -147,18 +163,18 @@ {/if} {if $withAuth} - {if !$registered} + {if !$registered && $hasowner} {elseif $user->state neq 'disabled' && $user->lost}
Page web :{$web}{$web.name} :{$web.address}
Géographie :{if $address.locality}{$address.locality}, {/if}{$address.country}{if $address->locality}{$address->locality}, {/if}{$address->country}
Profession : - {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} + {if $job->company->url|default:$job->user_site}{$job->company->name}{else}{$job->company->name}{/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 ! + n'hésite pas à nous la transmettre !