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