1 {**************************************************************************}
3 {* Copyright (C) 2003-2010 Polytechnique.org *}
4 {* http://opensource.polytechnique.org/ *}
6 {* This program is free software; you can redistribute it and/or modify *}
7 {* it under the terms of the GNU General Public License as published by *}
8 {* the Free Software Foundation; either version 2 of the License, or *}
9 {* (at your option) any later version. *}
11 {* This program is distributed in the hope that it will be useful, *}
12 {* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
13 {* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
14 {* GNU General Public License for more details. *}
16 {* You should have received a copy of the GNU General Public License *}
17 {* along with this program; if not, write to the Free Software *}
18 {* Foundation, Inc., *}
19 {* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
21 {**************************************************************************}
23 {assign var=dead value=$profile->deathdate}
24 {if $smarty.session.auth ge AUTH_COOKIE}
25 {assign var=withAuth value=true}
26 {assign var=user value=$profile->owner()}
28 {assign var=hasowner value=false}
29 {assign var=registered value=false}
31 {assign var=hasowner value=true}
32 {if $user->state neq 'pending'}
33 {assign var=registered value=true}
35 {assign var=registered value=false}
39 {* Without auth, all profiles appear as registered and with owner *}
40 {assign var=hasowner value=true}
41 {assign var=registered value=true}
42 {assign var=withAuth value=false}
45 <div class="contact {if !$registered || $dead }grayed{/if}"
46 {if $registered}title="fiche mise à jour le {$profile->last_change|date_format}"{/if}>
48 {if $profile->isFemale()}•{/if}
49 {if !$dead && $registered}<a href="profile/{$profile->hrid()}" class="popup2">{/if}
51 {if !$dead && $registered}</a>{/if}
54 {foreach from=$profile->nationalities() item=nat}
55 <img src='images/flags/{$nat}.gif' alt='{$nat}' height='11' title='{$nat}' />
58 *}{if $dead}, {"décédé"|sex:"décédée":$profile} le {$profile->deathdate|date_format}{/if}
60 {if $registered || (!$dead && $hasowner)}
61 {if !$registered && !$dead && $hasowner}
62 {if !$smarty.session.user->isWatchedUser($profile)}
63 <a href="carnet/notifs/add_nonins/{$user->login()}?token={xsrf_token}">{*
64 *}{icon name=add title="Ajouter à la liste de mes surveillances"}</a>
66 <a href="carnet/notifs/del_nonins/{$user->login()}?token={xsrf_token}">{*
67 *}{icon name=cross title="Retirer de la liste de mes surveillances"}</a>
71 <a href="vcard/{$profile->hrid()}.vcf">{*
72 *}{icon name=vcard title="Afficher la carte de visite"}</a>
73 {if !$smarty.session.user->isContact($profile)}
74 <a href="carnet/contacts?action=ajouter&user={$profile->hrid()}&token={xsrf_token}">{*
75 *}{icon name=add title="Ajouter à mes contacts"}</a>
77 <a href="carnet/contacts?action=retirer&user={$profile->hrid()}&token={xsrf_token}">{*
78 *}{icon name=cross title="Retirer de mes contacts"}</a>
87 {assign var=address value=$profile->getMainAddress()}
88 {if $profile->mobile || ($address && $address->country)}
89 <table cellspacing="0" cellpadding="0">
90 {if $address && $address->country}
92 <td class="lt">Géographie :</td>
93 <td class="rt">{if $address->locality}{$address->locality}, {/if}{$address->country}</td>
96 {if $profile->mobile && !$dead}
98 <td class="lt">Mobile :</td>
99 <td class="rt">{$profile->mobile}</td>
108 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}