1 {**************************************************************************}
3 {* Copyright (C) 2003-2009 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 {if $user->state neq 'pending'}
32 {assign var=registered value=true}
34 {assign var=registered value=false}
38 {* Without auth, all profiles appear as registered *}
39 {assign var=registered value=true}
40 {assign var=withAuth value=false}
44 <div class="contact {if !$registered || $dead }grayed{/if}"
45 {if $registered}title="fiche mise à jour le {$profile->last_change|date_format}"{/if}>
46 <div class="identity">
49 <img src="photo/{$profile->hrid()}" alt="{$profile->directory_name}" />
54 {if $profile->isFemale()}•{/if}
55 {if !$dead && $registered}<a href="profile/{$profile->hrid()}" class="popup2">{/if}
57 {if !$dead && $registered}</a>{/if}
61 {if $profile->nationality1}
62 <img src='images/flags/{$profile->nationality1}.gif' alt='{$profile->nationality1}' height='11' title='{$profile->nationality1}' />
64 {if $profile->nationality2}
65 <img src='images/flags/{$profile->nationality2}.gif' alt='{$profile->nationality2}' height='11' title='{$profile->nationality2}' />
67 {if $profile->nationality3}
68 <img src='images/flags/{$profile->nationality3}.gif' alt='{$profile->nationality3}' height='11' title='{$profile->nationality3}' />
71 *}{iterate from=$profile->getExtraEducations(4) item=edu}, {education_fmt edu=$edu profile=$profile}{/iterate}{*
72 *}{if $dead}, {"décédé"|sex:"décédée":$profile} le {$profile->deathdate|date_format}{/if}
77 <div class="noprint bits">
79 {if !$registered && !$dead}
80 {if $show_action eq 'ajouter'}
81 <a href="carnet/notifs/add_nonins/{$user->login()}?token={xsrf_token}">{*
82 *}{icon name=add title="Ajouter à la liste de mes surveillances"}</a>
84 <a href="carnet/notifs/del_nonins/{$user->login()}?token={xsrf_token}">{*
85 *}{icon name=cross title="Retirer de la liste de mes surveillances"}</a>
88 <a href="profile/{$profile->hrid()}" class="popup2">{*
89 *}{icon name=user_suit title="Afficher la fiche"}</a>
91 <a href="vcard/{$profile->hrid()}.vcf">{*
92 *}{icon name=vcard title="Afficher la carte de visite"}</a>
93 <a href="mailto:{$user->bestEmail()}">{*
94 *}{icon name=email title="Envoyer un email"}</a>
95 {if !$smarty.session.user->isContact($user)}
96 <a href="carnet/contacts?action=ajouter&user={$user->login()}&token={xsrf_token}">{*
97 *}{icon name=add title="Ajouter à mes contacts"}</a>
99 <a href="carnet/contacts?action=retirer&user={$user->login()}&token={xsrf_token}">{*
100 *}{icon name=cross title="Retirer de mes contacts"}</a>
106 {if hasPerm('admin')}
108 [{if $registered && !$dead}
109 <a href="marketing/private/{$user->login()}">{*
110 *}{icon name=email title="marketter user"}</a>
112 <a href="admin/user/{$user->login()}">{*
113 *}{icon name=wrench title="administrer user"}</a>
114 <a href="profile/ax/{$user->login()}">{*
115 *}{icon name=user_gray title="fiche AX"}</a>]
123 {assign var=address value=$profile->getMainAddress()}
124 {assign var=web value=$profile->getWebSite()}
125 {assign var=job value=$profile->getMailJob()}
126 {if $web || $profile->mobile || $address.country || $job || (!$dead && !$registered)}
127 <table cellspacing="0" cellpadding="0">
130 <td class="lt">Page web :</td>
131 <td class="rt"><a href="{$web}">{$web}</a></td>
134 {if $address.country && !$c.dcd}
136 <td class="lt">Géographie :</td>
137 <td class="rt">{if $address.locality}{$address.locality}, {/if}{$address.country}</td>
140 {if $profile->mobile && !$dead}
142 <td class="lt">Mobile :</td>
143 <td class="rt">{$profile->mobile}</td>
148 <td class="lt">Profession :</td>
150 {if $job.url|default:$job.user_site}<a href="{$job.url|default:$job.user_site}">{$job.name}</a>{else}{$job.name}{/if}
151 {if $job.subsubsector} ({$job.subsubsector}){/if}{if $job.description}<br />{$job.description}{/if}
158 <td class="smaller" colspan="2">
159 {"Ce"|sex:"Cette":$profile} camarade n'est pas {"inscrit"|sex:"inscrite":$profile}.
160 <a href="marketing/public/{$user->login()}" class='popup'>Si tu connais son adresse email,
161 <strong>n'hésite pas à nous la transmettre !</a>
164 {elseif $user->state neq 'disabled' && $user->lost}
166 <td class="smaller" colspan="2">
167 {"Ce"|sex:"Cette":$profile} camarade n'a plus d'adresse de redirection valide.
168 <a href="marketing/broken/{$user->login()}">
169 Si tu en connais une, <strong>n'hésite pas à nous la transmettre</strong>.
181 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}