Commit | Line | Data |
---|---|---|
0337d704 | 1 | {**************************************************************************} |
2 | {* *} | |
12262f13 | 3 | {* Copyright (C) 2003-2011 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 | ||
23 | {literal} | |
4d8e2051 | 24 | <script type="text/javascript">//<![CDATA[ |
555fde86 | 25 | function chgMainWinLoc(strPage) |
26 | { | |
27 | strPage = platal_baseurl + strPage; | |
2c326273 | 28 | if (parent.opener) { |
007c44cb | 29 | try { |
30 | parent.opener.document.location = strPage; | |
31 | window.close(); | |
32 | } catch(e) { | |
33 | window.open(strPage); | |
34 | } | |
2c326273 | 35 | } else { |
36 | document.location = strPage; | |
37 | } | |
0337d704 | 38 | } |
4d8e2051 | 39 | //]]></script> |
0337d704 | 40 | {/literal} |
41 | ||
03a6316f | 42 | <div id="fiche"> |
43 | <div id="photo" class="part"> | |
68f988a8 | 44 | {assign var=photo value=$profile->getPhoto(false)} |
7e019d24 | 45 | {if $photo}<img alt="Photo de {$profile->fullName()}" src="photo/{$profile->hrid()}{if $with_pending_pic}/req{/if}" width="{$photo->width()}"/>{/if} |
5f8ad70d | 46 | |
56cd7aee | 47 | {if $logged && $view eq 'private' && ( $profile->section|smarty:nodefaults || $profile->getBinets()|smarty:nodefaults || ($owner && $owner->groups(true,true)|smarty:nodefaults))} |
6e828e47 | 48 | <h2>À l'X…</h2> |
68f988a8 | 49 | {if $profile->section}<div><em class="intitule">Section : </em><span>{$profile->section}</span></div>{/if} |
5f8ad70d | 50 | |
68f988a8 | 51 | {assign var=binets value=$profile->getBinets()} |
5f8ad70d | 52 | {if $binets|@count}<div><em class="intitule">Binet{if count($binets) > 1}s{/if} : </em> |
68f988a8 | 53 | <span>{', '|implode:$profile->getBinetsNames()}</span></div>{/if} |
5f8ad70d | 54 | |
aa8a2914 | 55 | {if $owner && $view eq 'private'} |
56cd7aee | 56 | {assign var=groups value=$owner->groups(true,true)} |
5f8ad70d RB |
57 | {if $groups|@count}<div><em class="intitule">Groupe{if count($groups) > 1}s{/if} et institution{if count($groups) > 1}s{/if} X : </em> |
58 | <span><br/> | |
56cd7aee | 59 | {foreach from=$groups item=group name=groups}{if !$smarty.foreach.groups.first}, {/if}<span title="{$group.nom}"><a href="{$group.site}">{$group.nom}</a></span>{/foreach} |
5f8ad70d RB |
60 | </span></div>{/if} |
61 | {/if} | |
62 | ||
03a6316f | 63 | {/if} |
5f8ad70d | 64 | |
28c20b86 RB |
65 | {* 458752 stands for 0x70000 = Profile::NETWORKING_ALL *} |
66 | {assign var=networking value=$profile->getNetworking(458752)} | |
5f8ad70d | 67 | {if count($networking) > 0} |
92c3f9e5 | 68 | <h2>Sur le web...</h2> |
5f8ad70d | 69 | {foreach from=$networking item=network} |
1f5cd004 PC |
70 | <img style="width: auto; padding: 0" src="profile/networking/{$network.nwid}" alt="{$network.name}" title="{$network.name}"/> |
71 | {if $network.link} | |
72 | <a href="{$network.link|replace:'%s':$network.address}">{$network.address}</a> | |
d1a2252a GB |
73 | {else} |
74 | {$network.address} | |
75 | {/if} | |
76 | <br/> | |
77 | {/foreach} | |
78 | {/if} | |
5f8ad70d | 79 | |
68f988a8 | 80 | {if $profile->freetext} |
5f8ad70d | 81 | <h2>Commentaires :</h2> |
68f988a8 | 82 | <span>{$profile->freetext|miniwiki|smarty:nodefaults}</span> |
581c3341 | 83 | {/if} |
5f8ad70d | 84 | |
03a6316f | 85 | </div> |
5f8ad70d | 86 | |
03a6316f | 87 | <div id="fiche_identite" class="part"> |
88 | <div class="civilite"> | |
68f988a8 | 89 | {if $profile->isFemale()}•{/if} |
e4f43af4 | 90 | {if $view eq 'private'}{$profile->private_name}{else}{$profile->public_name}{/if} |
5f8ad70d | 91 | |
581c3341 | 92 | {if $logged} |
68f988a8 | 93 | {if !$profile->isDead()}<a href="vcard/{$owner->login()}.vcf">{* |
5f8ad70d RB |
94 | *}{icon name=vcard title="Afficher la carte de visite"}</a>{/if} |
95 | ||
2ab391bc | 96 | {if !$smarty.session.user->isContact($profile)} |
68f988a8 | 97 | <a href="javascript:chgMainWinLoc('carnet/contacts?action=ajouter&user={$owner->login()}&token={xsrf_token}')"> |
5f8ad70d RB |
98 | {icon name=add title="Ajouter à mes contacts"}</a> |
99 | {else} | |
68f988a8 | 100 | <a href="javascript:chgMainWinLoc('carnet/contacts?action=retirer&user={$owner->login()}&token={xsrf_token}')"> |
5f8ad70d RB |
101 | {icon name=cross title="Retirer de mes contacts"}</a> |
102 | {/if} | |
103 | ||
104 | {if hasPerm('admin')} | |
68f988a8 | 105 | <a href="javascript:chgMainWinLoc('admin/user/{$owner->login()}')"> |
5f8ad70d RB |
106 | {icon name=wrench title="administrer user"}</a> |
107 | {/if} | |
108 | ||
6fbc3476 | 109 | {if $smarty.session.user->isMyProfile($profile)} |
5f8ad70d | 110 | <a href="javascript:chgMainWinLoc('profile/edit')">{icon name="user_edit" title="Modifier ma fiche"}</a> |
6fbc3476 FB |
111 | {elseif hasPerm('admin') || $smarty.session.user->canEdit($profile)} |
112 | <a href="javascript:chgMainWinLoc('profile/edit/{$profile->hrpid}')"> | |
113 | {icon name=user_edit title="modifier la fiche"} | |
114 | </a> | |
5f8ad70d | 115 | {/if} |
03a6316f | 116 | {/if} |
117 | </div> | |
5f8ad70d | 118 | |
aa8a2914 | 119 | {if $logged && $view eq 'private'} |
03a6316f | 120 | <div class='maj'> |
121 | Fiche mise à jour<br /> | |
68f988a8 | 122 | le {$profile->last_change|date_format} |
03a6316f | 123 | </div> |
124 | {/if} | |
5f8ad70d | 125 | |
3c985c08 RB |
126 | {* 121634816 is Profile::PHONE_LINK_PROFILE | Profile::PHONE_TYPE_ANY = 0x7400000 *} |
127 | {assign var=phones value=$profile->getPhones(121634816)} | |
aa8a2914 | 128 | {if ($logged && $view eq 'private') || count($phones) > 0} |
03a6316f | 129 | <div class="contact"> |
aa8a2914 | 130 | {if $logged && $view eq 'private'} |
03a6316f | 131 | <div class='email'> |
68f988a8 RB |
132 | {if $profile->isDead()} |
133 | Décédé{if $profile->isFemale()}e{/if} le {$profile->deathdate|date_format} | |
5f96fea9 | 134 | {elseif $owner && $owner->lost} |
68f988a8 RB |
135 | Ce{if $profile->isFemale()}tte{/if} camarade n'a plus d'adresse de redirection valide,<br /> |
136 | <a href="marketing/broken/{$owner->login()}" class="popup">clique ici si tu connais son adresse email !</a> | |
5f96fea9 | 137 | {elseif $owner && $owner->state != 'active'} |
03a6316f | 138 | Cette personne n'est pas inscrite à Polytechnique.org,<br /> |
68f988a8 | 139 | <a href="marketing/public/{$owner->login()}" class="popup">clique ici si tu connais son adresse email !</a> |
0337d704 | 140 | {else} |
03a6316f | 141 | {if $virtualalias} |
142 | <a href="mailto:{$virtualalias}">{$virtualalias}</a><br /> | |
0337d704 | 143 | {/if} |
68f988a8 RB |
144 | <a href="mailto:{$owner->bestEmail()}">{$owner->bestEmail()}</a> |
145 | {if $owner->bestEmail() neq $owner->forlifeEmail()}<br /> | |
146 | <a href="mailto:{$owner->forlifeEmail()}">{$owner->forlifeEmail()}</a> | |
c6db254a | 147 | {/if} |
0337d704 | 148 | {/if} |
149 | </div> | |
0337d704 | 150 | {/if} |
5f8ad70d | 151 | {if count($phones) > 0} |
9533d793 | 152 | <div style="float: right"> |
68f988a8 | 153 | {display_phones tels=$phones dcd=$profile->isDead()} |
9533d793 | 154 | </div> |
6261a1b5 | 155 | {/if} |
03a6316f | 156 | <div class='spacer'></div> |
157 | </div> | |
eb173bf1 SJ |
158 | {else} |
159 | <div class='spacer'></div> | |
03a6316f | 160 | {/if} |
5f8ad70d | 161 | |
03a6316f | 162 | <div class='formation'> |
6420023b SJ |
163 | {foreach from=$profile->nationalities() item=country key=code} |
164 | <img src='images/flags/{$code}.gif' alt='{$code}' height='11' title='{$country}' /> | |
5f8ad70d RB |
165 | {/foreach} |
166 | ||
68f988a8 | 167 | {$profile->promo()} |
5f8ad70d | 168 | |
68f988a8 RB |
169 | {if $logged && $profile->mentor_expertise} |
170 | [<a href="referent/{$profile->hrid()}" class='popup2'>Ma fiche référent</a>] | |
03a6316f | 171 | {/if} |
5f8ad70d | 172 | |
bdce9ed9 | 173 | {assign var=educations value=$profile->getEducations(32)} |
5f8ad70d | 174 | {if count($educations) > 0} |
c7eac294 SJ |
175 | - Formation : |
176 | <ul> | |
5f8ad70d | 177 | {foreach from=$educations item=edu} |
8f3d549b | 178 | <li>{display_education edu=$edu profile=$profile full=true}</li> |
c7eac294 SJ |
179 | {/foreach} |
180 | </ul> | |
03a6316f | 181 | {/if} |
5f8ad70d | 182 | |
68f988a8 | 183 | {assign var=corps value=$profile->getCorps()} |
5f8ad70d | 184 | {if $corps && ($corps->current || $corps->original)} |
e792fdb8 | 185 | <ul> |
5f8ad70d | 186 | {if $corps->current} |
e792fdb8 RB |
187 | <li> |
188 | Corps actuel : {$corps->current_name} | |
189 | {if $corps->current_rank}({$corps->current_rank}){/if} | |
190 | </li> | |
5f8ad70d | 191 | {/if} |
e792fdb8 | 192 | {if $corps->current != $corps->original && $corps->original} |
fc6e024d | 193 | <li>Corps d'origine : {$corps->original_name}</li> |
5f8ad70d | 194 | {/if} |
e792fdb8 | 195 | </ul> |
078dc884 | 196 | {/if} |
5f8ad70d | 197 | |
03a6316f | 198 | </div> |
199 | </div> | |
5f8ad70d | 200 | |
68f988a8 | 201 | {assign var=addr value=$profile->getAddresses(3)} |
5f8ad70d | 202 | {if count($addr) > 0} |
03a6316f | 203 | <div class="part"> |
e8439508 | 204 | <h2>Contact : </h2> |
68f988a8 | 205 | {if $profile->isDead()} |
44c7ed76 SJ |
206 | {assign var=address_name value="Dernière adresse"} |
207 | {else} | |
208 | {assign var=address_name value="Adresse"} | |
209 | {/if} | |
5f8ad70d RB |
210 | {foreach from=$addr item="address" name=addresses} |
211 | {if $smarty.foreach.addresses.iteration is even} | |
6261a1b5 | 212 | {assign var=pos value="right"} |
213 | {else} | |
214 | {assign var=pos value="left"} | |
215 | {/if} | |
5f8ad70d | 216 | {if $address->hasFlag('current')} |
44c7ed76 | 217 | {include file="geoloc/address.tpl" address=$address titre_div=true titre=$address_name|@cat:" actuelle :" |
efb74b8f | 218 | for="`$profile->firstname` `$profile->lastname`" pos=$pos phones=null} |
5f8ad70d | 219 | {elseif $address->hasFlag('secondary')} |
44c7ed76 | 220 | {include file="geoloc/address.tpl" address=$address titre_div=true titre=$address_name|@cat:" secondaire :" |
efb74b8f | 221 | for="`$profile->firstname` `$profile->lastname`" pos=$pos phones=null} |
03a6316f | 222 | {else} |
44c7ed76 | 223 | {include file="geoloc/address.tpl" address=$address titre_div=true titre=$address_name|@cat:" principale :" |
efb74b8f | 224 | for="`$profile->firstname` `$profile->lastname`" pos=$pos phones=null} |
03a6316f | 225 | {/if} |
5f8ad70d | 226 | {if $smarty.foreach.addresses.iteration is even}<div class="spacer"></div>{/if} |
03a6316f | 227 | {/foreach} |
228 | </div> | |
0337d704 | 229 | {/if} |
5f8ad70d | 230 | |
68f988a8 | 231 | {assign var=jobs value=$profile->getJobs(2)} |
5f8ad70d | 232 | {if count($jobs) > 0} |
03a6316f | 233 | <div class="part"> |
e8439508 | 234 | <h2>Informations professionnelles :</h2> |
5f8ad70d | 235 | {foreach from=$jobs item="job" key="i"} |
16f20f22 | 236 | {if $i neq 0}<hr />{/if} |
5f8ad70d | 237 | {include file="include/emploi.tpl" job=$job} |
efb74b8f | 238 | {assign var=jobPhones value=$job->phones()} |
5f8ad70d | 239 | {if $job->address()} |
efb74b8f SJ |
240 | {include file="geoloc/address.tpl" address=$job->address() titre="Adresse : " for=$job->company->name pos="left" phones=$jobPhones} |
241 | {elseif $jobPhones|@count neq 0} | |
242 | {display_phones tels=$jobPhones} | |
5f8ad70d | 243 | {/if} |
16f20f22 | 244 | <div class="spacer"> </div> |
03a6316f | 245 | {/foreach} |
246 | </div> | |
0337d704 | 247 | {/if} |
5f8ad70d | 248 | |
68f988a8 | 249 | {assign var=medals value=$profile->getMedals()} |
5f8ad70d RB |
250 | {if count($medals) > 0} |
251 | <div class="part"> | |
252 | <h2>Distinctions : </h2> | |
253 | {foreach from=$medals item=m} | |
254 | <div class="medal_frame"> | |
255 | <img src="profile/medal/thumb/{$m.mid}" height="50px" alt="{$m.text}" title="{$m.text}" style='float: left;' /> | |
256 | <div class="medal_text"> | |
257 | {$m.text}<br />{$m.grade} | |
258 | </div> | |
03a6316f | 259 | </div> |
5f8ad70d RB |
260 | {/foreach} |
261 | <div class="spacer"> </div> | |
03a6316f | 262 | </div> |
0337d704 | 263 | {/if} |
5f8ad70d | 264 | |
68f988a8 | 265 | {if $logged && $profile->cv} |
03a6316f | 266 | <div class="part"> |
e8439508 | 267 | <h2>Curriculum Vitae :</h2> |
68f988a8 | 268 | {$profile->cv|miniwiki:title|smarty:nodefaults} |
03a6316f | 269 | </div> |
0337d704 | 270 | {/if} |
5f8ad70d | 271 | |
24f4c06a | 272 | {if $view eq 'public'} |
03a6316f | 273 | <div class="part"> |
581c3341 | 274 | <small> |
03a6316f | 275 | Cette fiche est publique et visible par tout internaute,<br /> |
68f988a8 | 276 | vous pouvez aussi voir <a href="profile/private/{$profile->hrid()}?display=light">celle réservée aux X</a>. |
581c3341 | 277 | </small> |
03a6316f | 278 | </div> |
24f4c06a FB |
279 | {elseif $view eq 'ax'} |
280 | <div class="part"> | |
281 | <small> | |
282 | Cette fiche est privée et ne recense que les informations transmises à l'AX. | |
283 | </small> | |
284 | </div> | |
0337d704 | 285 | {/if} |
5f8ad70d | 286 | |
03a6316f | 287 | <div class="spacer"></div> |
288 | </div> | |
0337d704 | 289 | |
a7de4ef7 | 290 | {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *} |