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}
46 <div class="contact {if !$registered || $dead }grayed{/if}"
47 {if $registered}title="fiche mise à jour le {$profile->last_change|date_format}"{/if}>
48 <div class="identity">
51 <img src="photo/{$profile->hrid()}" alt="{$profile->directory_name}" />
56 {if $profile->isFemale()}•{/if}
57 {if !$dead && $registered}<a href="profile/{$profile->hrid()}" class="popup2">{/if}
59 {if !$dead && $registered}</a>{/if}
63 {foreach from=$profile->nationalities() item=nat}
64 <img src='images/flags/{$nat}.gif' alt='{$nat}' height='11' title='{$nat}' />
67 *}{foreach from=$profile->getExtraEducations(4) item=edu}, {display_education edu=$edu profile=$profile}{/foreach}{*
68 *}{if $dead}, {"décédé"|sex:"décédée":$profile} le {$profile->deathdate|date_format}{/if}
73 <div class="noprint bits">
74 {if $registered || (!$dead && $hasowner)}
76 {if !$registered && !$dead && $hasowner}
77 {if !$smarty.session.user->isWatchedUser($profile)}
78 <a href="carnet/notifs/add_nonins/{$user->login()}?token={xsrf_token}">{*
79 *}{icon name=add title="Ajouter à la liste de mes surveillances"}</a>
81 <a href="carnet/notifs/del_nonins/{$user->login()}?token={xsrf_token}">{*
82 *}{icon name=cross title="Retirer de la liste de mes surveillances"}</a>
85 <a href="profile/{$profile->hrid()}" class="popup2">{*
86 *}{icon name=user_suit title="Afficher la fiche"}</a>
88 <a href="vcard/{$profile->hrid()}.vcf">{*
89 *}{icon name=vcard title="Afficher la carte de visite"}</a>
90 <a href="mailto:{$user->bestEmail()}">{*
91 *}{icon name=email title="Envoyer un email"}</a>
92 {if !$smarty.session.user->isContact($profile)}
93 <a href="carnet/contacts?action=ajouter&user={$profile->hrid()}&token={xsrf_token}">{*
94 *}{icon name=add title="Ajouter à mes contacts"}</a>
96 <a href="carnet/contacts?action=retirer&user={$profile->hrid()}&token={xsrf_token}">{*
97 *}{icon name=cross title="Retirer de mes contacts"}</a>
104 {if hasPerm('admin') && $hasowner}
106 [{if $registered && !$dead}
107 <a href="marketing/private/{$user->login()}">{*
108 *}{icon name=email title="marketter user"}</a>
110 <a href="admin/user/{$user->login()}">{*
111 *}{icon name=wrench title="administrer user"}</a>
112 <a href="profile/ax/{$user->login()}">{*
113 *}{icon name=user_gray title="fiche AX"}</a>]
121 {assign var=address value=$profile->getMainAddress()}
122 {assign var=web value=$profile->getWebSite()}
123 {assign var=job value=$profile->getMainJob()}
124 {if $web || $profile->mobile || ($address && $address->country) || $job || !$registered}
125 <table cellspacing="0" cellpadding="0">
128 <td class="lt">Page web :</td>
129 <td class="rt"><a href="{$web}">{$web}</a></td>
132 {if $address && $address->country}
134 <td class="lt">Géographie :</td>
135 <td class="rt">{if $address->locality}{$address->locality}, {/if}{$address->country}</td>
138 {if $profile->mobile && !$dead}
140 <td class="lt">Mobile :</td>
141 <td class="rt">{$profile->mobile}</td>
146 <td class="lt">Profession :</td>
148 {if $job->company->url|default:$job->user_site}<a href="{$job->company->url|default:$job->user_site}">{$job->company->name}</a>{else}{$job->company->name}{/if}
149 {if $job->subsubsector} ({$job->subsubsector}){/if}{if $job->description}<br />{$job->description}{/if}
154 {if !$registered && $hasowner}
156 <td class="smaller" colspan="2">
157 {"Ce"|sex:"Cette":$profile} camarade n'est pas {"inscrit"|sex:"inscrite":$profile}.
158 <a href="marketing/public/{$user->login()}" class='popup'>Si tu connais son adresse email,
159 <strong>n'hésite pas à nous la transmettre !</strong></a>
162 {elseif $user->state neq 'disabled' && $user->lost}
164 <td class="smaller" colspan="2">
165 {"Ce"|sex:"Cette":$profile} camarade n'a plus d'adresse de redirection valide.
166 <a href="marketing/broken/{$user->login()}">
167 Si tu en connais une, <strong>n'hésite pas à nous la transmettre</strong>.
179 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}