Happy New Year !
[platal.git] / templates / gadgets / ig-minifiche.tpl
CommitLineData
92e80560
VZ
1{**************************************************************************}
2{* *}
ba6ae046 3{* Copyright (C) 2003-2013 Polytechnique.org *}
92e80560
VZ
4{* http://opensource.polytechnique.org/ *}
5{* *}
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. *}
10{* *}
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. *}
15{* *}
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 *}
20{* *}
21{**************************************************************************}
22
d667c548
SJ
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()}
27 {if $user == null}
28 {assign var=hasowner value=false}
29 {assign var=registered value=false}
30 {else}
31 {assign var=hasowner value=true}
32 {if $user->state neq 'pending'}
33 {assign var=registered value=true}
34 {else}
35 {assign var=registered value=false}
36 {/if}
37 {/if}
38{else}
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}
43{/if}
44
45<div class="contact {if !$registered || $dead }grayed{/if}"
46 {if $registered}title="fiche mise à jour le {$profile->last_change|date_format}"{/if}>
92e80560 47 <div class="nom">
d667c548
SJ
48 {if $profile->isFemale()}&bull;{/if}
49 {if !$dead && $registered}<a href="profile/{$profile->hrid()}" class="popup2">{/if}
50 {$profile->full_name}
51 {if !$dead && $registered}</a>{/if}
92e80560
VZ
52 </div>
53 <div class="autre">
6420023b
SJ
54 {foreach from=$profile->nationalities() item=country key=code}
55 <img src='images/flags/{$code}.gif' alt='{$code}' height='11' title='{$country}' />&nbsp;
d667c548
SJ
56 {/foreach}
57 {$profile->promo()}{*
58 *}{if $dead}, {"décédé"|sex:"décédée":$profile} le {$profile->deathdate|date_format}{/if}
59 {if $withAuth}
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>
65 {else}
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>
68 {/if}
69 {elseif $registered}
70 {if !$dead}
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&amp;user={$profile->hrid()}&amp;token={xsrf_token}">{*
75 *}{icon name=add title="Ajouter à mes contacts"}</a>
76 {else}
77 <a href="carnet/contacts?action=retirer&amp;user={$profile->hrid()}&amp;token={xsrf_token}">{*
78 *}{icon name=cross title="Retirer de mes contacts"}</a>
79 {/if}
80 {/if}
81 {/if}
92e80560 82 {/if}
92e80560
VZ
83 {/if}
84 </div>
85 <div class="long">
d667c548
SJ
86 {if !$dead}
87 {assign var=address value=$profile->getMainAddress()}
88 {if $profile->mobile || ($address && $address->country)}
92e80560 89 <table cellspacing="0" cellpadding="0">
d667c548 90 {if $address && $address->country}
92e80560 91 <tr>
841ff7e7 92 <td class="lt">Géographie&nbsp;:</td>
d667c548 93 <td class="rt">{if $address->locality}{$address->locality}, {/if}{$address->country}</td>
92e80560
VZ
94 </tr>
95 {/if}
d667c548 96 {if $profile->mobile && !$dead}
92e80560 97 <tr>
841ff7e7 98 <td class="lt">Mobile&nbsp;:</td>
d667c548 99 <td class="rt">{$profile->mobile}</td>
92e80560
VZ
100 </tr>
101 {/if}
102 </table>
103 {/if}
104 {/if}
105 </div>
106</div>
92e80560
VZ
107
108{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}