Commit | Line | Data |
---|---|---|
0337d704 | 1 | {**************************************************************************} |
2 | {* *} | |
8d84c630 | 3 | {* Copyright (C) 2003-2009 Polytechnique.org *} |
0337d704 | 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 | ||
76cbe885 | 23 | {assign var=profile value=$user->profile()} |
64a69719 FB |
24 | {assign var=dead value=$profile->deathdate} |
25 | {if $user->state neq 'pending'} | |
26 | {assign var=registered value=true} | |
27 | {else} | |
28 | {assign var=registered value=false} | |
29 | {/if} | |
30 | {if $smarty.session.auth ge AUTH_COOKIE} | |
31 | {assign var=withAuth value=true} | |
32 | {else} | |
33 | {assign var=withAuth value=false} | |
34 | {/if} | |
35 | ||
36 | ||
37 | <div class="contact {if (!$registered && $withAuth) || $dead }grayed{/if}" | |
38 | {if $registered && $withAuth}title="fiche mise à jour le {$profile->last_change|date_format}"{/if}> | |
ea62a170 | 39 | <div class="identity"> |
64a69719 | 40 | {if $withAuth} |
ea62a170 | 41 | <div class="photo"> |
64a69719 | 42 | <img src="photo/{$profile->hrid()}" alt="{$profile->directory_name}" /> |
ea62a170 | 43 | </div> |
580f4860 | 44 | {/if} |
0337d704 | 45 | |
ea62a170 | 46 | <div class="nom"> |
76cbe885 | 47 | {if $profile->isFemale()}•{/if} |
64a69719 | 48 | {if !$dead && (!$registered || $withAuth)}<a href="profile/{$profile->hrid}" class="popup2">{/if} |
76cbe885 | 49 | {$profile->full_name} |
64a69719 | 50 | {if !$dead && (!$registered || $withAuth)}</a>{/if} |
ea62a170 | 51 | </div> |
0337d704 | 52 | |
f711b03f | 53 | <div class="edu"> |
76cbe885 FB |
54 | {if $profile->nationality1} |
55 | <img src='images/flags/{$profile->nationality1}.gif' alt='{$profile->nationality1}' height='11' title='{$profile->nationality1}' /> | |
eeb2ec0f | 56 | {/if} |
76cbe885 FB |
57 | {if $profile->nationality2} |
58 | <img src='images/flags/{$profile->nationality2}.gif' alt='{$profile->nationality2}' height='11' title='{$profile->nationality2}' /> | |
eeb2ec0f | 59 | {/if} |
76cbe885 FB |
60 | {if $profile->nationality3} |
61 | <img src='images/flags/{$profile->nationality3}.gif' alt='{$profile->nationality3}' height='11' title='{$profile->nationality3}' /> | |
ea62a170 | 62 | {/if} |
4bc5b8f0 FB |
63 | {$profile->promo()}{* |
64 | *}{iterate from=$profile->getExtraEducations(4) item=edu}, {education_fmt edu=$edu profile=$profile}{/iterate}{* | |
65 | *}{if $dead}, {"décédé"|sex:"décédée":$user} le {$orfile->deathdate|date_format}{/if} | |
ea62a170 | 66 | </div> |
0337d704 | 67 | </div> |
68 | ||
64a69719 | 69 | {if $withAuth} |
ea62a170 FB |
70 | <div class="noprint bits"> |
71 | <div> | |
486d15fb FB |
72 | {if !$registered && !$dead} |
73 | {if $show_action eq 'ajouter'} | |
76cbe885 | 74 | <a href="carnet/notifs/add_nonins/{$user->login()}?token={xsrf_token}">{* |
ea62a170 FB |
75 | *}{icon name=add title="Ajouter à la liste de mes surveillances"}</a> |
76 | {else} | |
76cbe885 | 77 | <a href="carnet/notifs/del_nonins/{$user->login()}?token={xsrf_token}">{* |
ea62a170 FB |
78 | *}{icon name=cross title="Retirer de la liste de mes surveillances"}</a> |
79 | {/if} | |
486d15fb | 80 | {elseif $registered} |
76cbe885 | 81 | <a href="profile/{$profile->hrid()}" class="popup2">{* |
ea62a170 | 82 | *}{icon name=user_suit title="Afficher la fiche"}</a> |
64a69719 | 83 | {if !$dead} |
76cbe885 | 84 | <a href="vcard/{$profile->hrid()}.vcf">{* |
ea62a170 | 85 | *}{icon name=vcard title="Afficher la carte de visite"}</a> |
76cbe885 | 86 | <a href="mailto:{$user->bestEmail()}">{* |
fd9a8382 | 87 | *}{icon name=email title="Envoyer un email"}</a> |
76cbe885 FB |
88 | {if !$smarty.session.user->isContact($user)} |
89 | <a href="carnet/contacts?action=ajouter&user={$user->login()}&token={xsrf_token}">{* | |
ea62a170 FB |
90 | *}{icon name=add title="Ajouter à mes contacts"}</a> |
91 | {else} | |
76cbe885 | 92 | <a href="carnet/contacts?action=retirer&user={$user->login()}&token={xsrf_token}">{* |
ea62a170 FB |
93 | *}{icon name=cross title="Retirer de mes contacts"}</a> |
94 | {/if} | |
95 | {/if} | |
f8e7af52 | 96 | {/if} |
ea62a170 | 97 | </div> |
0337d704 | 98 | |
908db125 | 99 | {if hasPerm('admin')} |
ea62a170 | 100 | <div> |
64a69719 | 101 | [{if $registered && !$dead} |
76cbe885 | 102 | <a href="marketing/private/{$user->login()}">{* |
1322ba86 FB |
103 | *}{icon name=email title="marketter user"}</a> |
104 | {/if} | |
76cbe885 | 105 | <a href="admin/user/{$user->login()}">{* |
1322ba86 | 106 | *}{icon name=wrench title="administrer user"}</a> |
76cbe885 | 107 | <a href="http://www.polytechniciens.com/?page=AX_FICHE_ANCIEN&anc_id={$profile->ax_id}">{* |
1322ba86 | 108 | *}{icon name=user_gray title="fiche AX"}</a>] |
ea62a170 | 109 | </div> |
f51dcf10 | 110 | {/if} |
b9384d56 | 111 | </div> |
580f4860 | 112 | {/if} |
0337d704 | 113 | |
114 | <div class="long"> | |
64a69719 | 115 | {if !$dead} |
f5642983 | 116 | {assign var=address value=$profile->getMainAddress()} |
46e9eb99 | 117 | {if $c.web || $profile->mobile || $address.country || $c.entreprise || (!$dead && !$registered)} |
0337d704 | 118 | <table cellspacing="0" cellpadding="0"> |
119 | {if $c.web} | |
120 | <tr> | |
ed260de1 | 121 | <td class="lt">Page web :</td> |
0337d704 | 122 | <td class="rt"><a href="{$c.web}">{$c.web}</a></td> |
123 | </tr> | |
124 | {/if} | |
f5642983 | 125 | {if $address.country} |
0337d704 | 126 | <tr> |
ed260de1 | 127 | <td class="lt">Géographie :</td> |
f5642983 | 128 | <td class="rt">{if $address.locality}{$address.locality}, {/if}{$address.country}</td> |
0337d704 | 129 | </tr> |
130 | {/if} | |
46e9eb99 | 131 | {if $profile->mobile && !$dead} |
0337d704 | 132 | <tr> |
ed260de1 | 133 | <td class="lt">Mobile :</td> |
46e9eb99 | 134 | <td class="rt">{$profile->mobile}</td> |
0337d704 | 135 | </tr> |
136 | {/if} | |
137 | {if $c.entreprise} | |
138 | <tr> | |
ed260de1 | 139 | <td class="lt">Profession :</td> |
0337d704 | 140 | <td class="rt"> |
fd9a8382 | 141 | {if $c.job_web}<a href="{$c.job_web}">{$c.entreprise}</a>{else}{$c.entreprise}{/if} |
984186ae | 142 | {if $c.secteur} ({$c.secteur}){/if}{if $c.fonction}<br />{$c.fonction}{/if} |
0337d704 | 143 | </td> |
144 | </tr> | |
145 | {/if} | |
64a69719 FB |
146 | {if $withAuth} |
147 | {if !$registered} | |
0337d704 | 148 | <tr> |
2c411733 | 149 | <td class="smaller" colspan="2"> |
64a69719 | 150 | {"Ce"|sex:"Cette":$user} camarade n'est pas {"inscrit"|sex:"inscrite":$user}. |
2c411733 FB |
151 | <a href="marketing/public/{$user->login()}" class='popup'>Si tu connais son adresse email, |
152 | <strong>n'hésite pas à nous la transmettre !</a> | |
153 | </td> | |
0337d704 | 154 | </tr> |
2c411733 | 155 | {elseif $user->state neq 'disabled' && $user->lost} |
d216d84a | 156 | <tr> |
157 | <td class="smaller" colspan="2"> | |
2c411733 FB |
158 | {"Ce"|sex:"Cette":$user} camarade n'a plus d'adresse de redirection valide. |
159 | <a href="marketing/broken/{$user->login()}"> | |
ed260de1 | 160 | Si tu en connais une, <strong>n'hésite pas à nous la transmettre</strong>. |
d216d84a | 161 | </a> |
162 | </td> | |
163 | </tr> | |
164 | {/if} | |
2c411733 | 165 | {/if} |
0337d704 | 166 | </table> |
167 | {/if} | |
168 | {/if} | |
169 | </div> | |
0337d704 | 170 | </div> |
0337d704 | 171 | |
a7de4ef7 | 172 | {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *} |