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