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 {**************************************************************************}
24 <script type="text/javascript">//<![CDATA[
25 function chgMainWinLoc(strPage)
27 strPage = platal_baseurl + strPage;
30 parent.opener.document.location = strPage;
36 document.location = strPage;
43 <div id="photo" class="part">
44 {assign var=photo value=$profile->getPhoto(false)}
45 {if $photo}<img alt="Photo de {$profile->fullName()}" src="photo/{$profile->hrid()}{if $with_pending_pic}/req{/if}" width="{$photo->width()}"/>{/if}
47 {if $logged && $view eq 'private' && ( $profile->section|smarty:nodefaults || $profile->getBinets()|smarty:nodefaults || ($owner && $owner->groups()|smarty:nodefaults))}
48 <h2>À l'X…</h2>
49 {if $profile->section}<div><em class="intitule">Section : </em><span>{$profile->section}</span></div>{/if}
51 {assign var=binets value=$profile->getBinets()}
52 {if $binets|@count}<div><em class="intitule">Binet{if count($binets) > 1}s{/if} : </em>
53 <span>{', '|implode:$profile->getBinetsNames()}</span></div>{/if}
55 {if $owner && $view eq 'private'}
56 {assign var=groups value=$owner->groupNames(true)}
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>
59 {foreach from=$groups item=group key=gk}{if $gk != 0}, {/if}<span title="{$group.nom}"><a href="{$group.site}">{$group.nom}</a></span>{/foreach}
65 {* 458752 stands for 0x70000 = Profile::NETWORKING_ALL *}
66 {assign var=networking value=$profile->getNetworking(458752)}
67 {if count($networking) > 0}
68 <h2>Sur le web...</h2>
69 {foreach from=$networking item=network}
70 <img style="width: auto; padding: 0" src="profile/networking/{$network.nwid}" alt="{$network.name}" title="{$network.name}"/>
72 <a href="{$network.link|replace:'%s':$network.address}">{$network.address}</a>
80 {if $profile->freetext}
81 <h2>Commentaires :</h2>
82 <span>{$profile->freetext|miniwiki|smarty:nodefaults}</span>
87 <div id="fiche_identite" class="part">
88 <div class="civilite">
89 {if $profile->isFemale()}•{/if}
90 {if $logged}{$profile->private_name}{else}{$profile->public_name}{/if}
93 {if !$profile->isDead()}<a href="vcard/{$owner->login()}.vcf">{*
94 *}{icon name=vcard title="Afficher la carte de visite"}</a>{/if}
96 {if !$smarty.session.user->isContact($profile)}
97 <a href="javascript:chgMainWinLoc('carnet/contacts?action=ajouter&user={$owner->login()}&token={xsrf_token}')">
98 {icon name=add title="Ajouter à mes contacts"}</a>
100 <a href="javascript:chgMainWinLoc('carnet/contacts?action=retirer&user={$owner->login()}&token={xsrf_token}')">
101 {icon name=cross title="Retirer de mes contacts"}</a>
104 {if hasPerm('admin')}
105 <a href="javascript:chgMainWinLoc('admin/user/{$owner->login()}')">
106 {icon name=wrench title="administrer user"}</a>
109 {if $owner->login() eq $smarty.session.hruid}
110 <a href="javascript:chgMainWinLoc('profile/edit')">{icon name="user_edit" title="Modifier ma fiche"}</a>
116 {if $logged && $view eq 'private'}
118 Fiche mise à jour<br />
119 le {$profile->last_change|date_format}
123 {* 121634816 is Profile::PHONE_LINK_PROFILE | Profile::PHONE_TYPE_ANY = 0x7400000 *}
124 {assign var=phones value=$profile->getPhones(121634816)}
125 {if ($logged && $view eq 'private') || count($phones) > 0}
126 <div class="contact">
127 {if $logged && $view eq 'private'}
129 {if $profile->isDead()}
130 Décédé{if $profile->isFemale()}e{/if} le {$profile->deathdate|date_format}
131 {elseif $owner && $owner->lost}
132 Ce{if $profile->isFemale()}tte{/if} camarade n'a plus d'adresse de redirection valide,<br />
133 <a href="marketing/broken/{$owner->login()}" class="popup">clique ici si tu connais son adresse email !</a>
134 {elseif $owner && $owner->state != 'active'}
135 Cette personne n'est pas inscrite à Polytechnique.org,<br />
136 <a href="marketing/public/{$owner->login()}" class="popup">clique ici si tu connais son adresse email !</a>
139 <a href="mailto:{$virtualalias}">{$virtualalias}</a><br />
141 <a href="mailto:{$owner->bestEmail()}">{$owner->bestEmail()}</a>
142 {if $owner->bestEmail() neq $owner->forlifeEmail()}<br />
143 <a href="mailto:{$owner->forlifeEmail()}">{$owner->forlifeEmail()}</a>
148 {if count($phones) > 0}
149 <div style="float: right">
150 {display_phones tels=$phones dcd=$profile->isDead()}
153 <div class='spacer'></div>
157 <div class='formation'>
158 {foreach from=$profile->nationalities() item=country key=code}
159 <img src='images/flags/{$code}.gif' alt='{$code}' height='11' title='{$country}' />
164 {if $logged && $profile->mentor_expertise}
165 [<a href="referent/{$profile->hrid()}" class='popup2'>Ma fiche référent</a>]
168 {assign var=educations value=$profile->getEducations(32)}
169 {if count($educations) > 0}
170 - Formation :
172 {foreach from=$educations item=edu}
173 <li>{display_education edu=$edu profile=$profile}</li>
178 {assign var=corps value=$profile->getCorps()}
179 {if $corps && ($corps->current || $corps->original)}
182 <li>Corps actuel : {$corps->current_name} {$corps->current_rank}</li>
184 {if $corps->original}
185 <li>Corps d'origine : {$corps->original_name}</li>
193 {assign var=addr value=$profile->getAddresses(3)}
194 {if count($addr) > 0}
196 <h2>Contact : </h2>
197 {if $profile->isDead()}
198 {assign var=address_name value="Dernière adresse"}
200 {assign var=address_name value="Adresse"}
202 {foreach from=$addr item="address" name=addresses}
203 {if $smarty.foreach.addresses.iteration is even}
204 {assign var=pos value="right"}
206 {assign var=pos value="left"}
208 {if $address->hasFlag('current')}
209 {include file="geoloc/address.tpl" address=$address titre_div=true titre=$address_name|@cat:" actuelle :"
210 for="`$profile->firstname` `$profile->lastname`" pos=$pos}
211 {elseif $address->hasFlag('secondary')}
212 {include file="geoloc/address.tpl" address=$address titre_div=true titre=$address_name|@cat:" secondaire :"
213 for="`$profile->firstname` `$profile->lastname`" pos=$pos}
215 {include file="geoloc/address.tpl" address=$address titre_div=true titre=$address_name|@cat:" principale :"
216 for="`$profile->firstname` `$profile->lastname`" pos=$pos}
218 {if $smarty.foreach.addresses.iteration is even}<div class="spacer"></div>{/if}
223 {assign var=jobs value=$profile->getJobs(2)}
224 {if count($jobs) > 0}
226 <h2>Informations professionnelles :</h2>
227 {foreach from=$jobs item="job" key="i"}
228 {if $i neq 0}<hr />{/if}
229 {include file="include/emploi.tpl" job=$job}
230 {assign var=phones value=$job->phones()}
232 {include file="geoloc/address.tpl" address=$job->address() titre="Adresse : " for=$job->company->name pos="left" phones=$phones}
234 {display_phones tels=$phones}
236 <div class="spacer"> </div>
241 {assign var=medals value=$profile->getMedals()}
242 {if count($medals) > 0}
244 <h2>Distinctions : </h2>
245 {foreach from=$medals item=m}
246 <div class="medal_frame">
247 <img src="profile/medal/thumb/{$m.mid}" height="50px" alt="{$m.text}" title="{$m.text}" style='float: left;' />
248 <div class="medal_text">
249 {$m.text}<br />{$m.grade}
253 <div class="spacer"> </div>
257 {if $logged && $profile->cv}
259 <h2>Curriculum Vitae :</h2>
260 {$profile->cv|miniwiki:title|smarty:nodefaults}
264 {if $view eq 'public'}
267 Cette fiche est publique et visible par tout internaute,<br />
268 vous pouvez aussi voir <a href="profile/private/{$profile->hrid()}?display=light">celle réservée aux X</a>.
271 {elseif $view eq 'ax'}
274 Cette fiche est privée et ne recense que les informations transmises à l'AX.
279 <div class="spacer"></div>
282 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}