1 {**************************************************************************}
3 {* Copyright (C) 2003-2011 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 = $.plURL(strPage);
30 parent.opener.document.location = strPage;
36 document.location = strPage;
45 <div id="photo" class="part">
46 {assign var=photo value=$profile->getPhoto(false)}
47 {if $photo}<img alt="Photo de {$profile->fullName()}" src="photo/{$profile->hrid()}{if $with_pending_pic}/req{/if}" width="{$photo->width()}"/>{/if}
49 {if $logged && $view->isVisible(#Visibility::EXPORT_AX#) && ( $profile->section|smarty:nodefaults || $profile->getBinets()|smarty:nodefaults || ($owner && $owner->groups(true,true)|smarty:nodefaults))}
50 <h2>À l'X…</h2>
51 {if $profile->section}<div><em class="intitule">Section : </em><span>{$profile->section}</span></div>{/if}
53 {assign var=binets value=$profile->getFullBinets()}
54 {if $binets|@count}<div><em class="intitule">Binet{if count($binets) > 1}s{/if} : </em>
56 {foreach from=$binets item=binet name=binets}
57 {if !$smarty.foreach.binets.first}, {/if}
58 <span title="{$binet.text}">{if $binet.url}<a href="{$binet.url}">{/if}{$binet.text}{if $binet.url}</a>{/if}</span>
62 {if $owner && $view->isVisible(#Visibility::EXPORT_AX#)}
63 {assign var=groups value=$owner->groups(true,true)}
64 {if $groups|@count}<div><em class="intitule">Groupe{if count($groups) > 1}s{/if} et institution{if count($groups) > 1}s{/if} X : </em>
66 {foreach from=$groups item=group name=groups}
67 {if !$smarty.foreach.groups.first}, {/if}
68 <span title="{$group.nom}"><a href="{if $group.site}{$group.site}{else}http://www.polytechnique.net/{$group.nom}{/if}">{$group.nom}</a></span>
75 {assign var=networking value=$profile->getNetworking(#Profile::NETWORKING_ALL#)}
76 {if count($networking) > 0}
77 <h2>Sur le web...</h2>
78 {foreach from=$networking item=network}
79 <img style="width: auto; padding: 0" src="profile/networking/{$network.nwid}" alt="{$network.name}" title="{$network.name}"/>
81 <a href="{$network.link|replace:'%s':$network.address}">{$network.address}</a>
89 {if $profile->freetext}
90 <h2>Commentaires :</h2>
91 <span>{$profile->freetext|miniwiki|smarty:nodefaults}</span>
96 <div id="fiche_identite" class="part">
97 <div class="civilite">
98 {if $profile->isFemale()}•{/if}
99 {if $view->isVisible(#Visibility::EXPORT_PRIVATE#)}{$profile->private_name}{else}{$profile->public_name}{/if}
102 {if !$profile->isDead()}<a href="vcard/{$owner->login()}.vcf">{*
103 *}{icon name=vcard title="Afficher la carte de visite"}</a>{/if}
105 {if !$smarty.session.user->isContact($profile)}
106 <a href="javascript:chgMainWinLoc('carnet/contacts?action=ajouter&user={$owner->login()}&token={xsrf_token}')">
107 {icon name=add title="Ajouter à mes contacts"}</a>
109 <a href="javascript:chgMainWinLoc('carnet/contacts?action=retirer&user={$owner->login()}&token={xsrf_token}')">
110 {icon name=cross title="Retirer de mes contacts"}</a>
113 {if hasPerm('admin')}
114 <a href="javascript:chgMainWinLoc('admin/user/{$owner->login()}')">
115 {icon name=wrench title="administrer user"}</a>
118 {if $smarty.session.user->isMyProfile($profile)}
119 <a href="javascript:chgMainWinLoc('profile/edit')">{icon name="user_edit" title="Modifier ma fiche"}</a>
120 {elseif hasPerm('admin') || $smarty.session.user->canEdit($profile)}
121 <a href="javascript:chgMainWinLoc('profile/edit/{$profile->hrpid}')">
122 {icon name=user_edit title="modifier la fiche"}
128 {if $logged && $view->isVisible(#Visibility::EXPORT_AX#) && $owner && $owner->state eq 'active'}
130 Fiche mise à jour<br />
131 le {$profile->last_change|date_format}
135 {* 121634816 is Profile::PHONE_LINK_PROFILE | Profile::PHONE_TYPE_ANY = 0x7400000 *}
136 {assign var=phones value=$profile->getPhones(121634816)}
137 {if ($logged && $view->isVisible(#Visibility::EXPORT_AX#)) || count($phones) > 0}
138 <div class="contact">
139 {if $logged && $view->isVisible(#Visibility::EXPORT_AX#)}
141 {if $profile->isDead()}
142 Décédé{if $profile->isFemale()}e{/if} le {$profile->deathdate|date_format}
143 {elseif $owner && $owner->lost}
144 Ce{if $profile->isFemale()}tte{/if} camarade n'a plus d'adresse de redirection valide,<br />
145 <a href="marketing/broken/{$owner->login()}" class="popup">clique ici si tu connais son adresse email !</a>
146 {elseif $owner && $owner->state != 'active'}
147 Cette personne n'est pas inscrite à Polytechnique.org,<br />
148 <a href="marketing/public/{$owner->login()}" class="popup">clique ici si tu connais son adresse email !</a>
150 {if $virtualalias && $view->isVisible(#Visibility::EXPORT_PRIVATE#)}
151 <a href="mailto:{$virtualalias}">{$virtualalias}</a><br />
153 <a href="mailto:{$owner->bestEmail()}">{$owner->bestEmail()}</a>
154 {if $owner->bestEmail() neq $owner->forlifeEmail()}<br />
155 <a href="mailto:{$owner->forlifeEmail()}">{$owner->forlifeEmail()}</a>
160 {if count($phones) > 0}
161 <div style="float: right">
162 {display_phones tels=$phones dcd=$profile->isDead()}
165 <div class='spacer'></div>
168 <div class='spacer'></div>
171 <div class='formation'>
172 {foreach from=$profile->nationalities() item=country key=code}
173 <img src='images/flags/{$code}.gif' alt='{$code}' height='11' title='{$country}' />
176 {$profile->promo('details')}
178 {if $logged && $view->isVisible(#Visibility::EXPORT_AX#) && $profile->mentor_expertise}
179 [<a href="referent/{$profile->hrid()}" class='popup2'>Ma fiche référent</a>]
182 {assign var=educations value=$profile->getEducations(32)}
183 {if count($educations) > 0}
185 {foreach from=$educations item=edu}
186 <li>{display_education edu=$edu profile=$profile full=true}</li>
191 {assign var=corps value=$profile->getCorps()}
192 {if $corps && ($corps->current || $corps->original)}
196 Corps actuel : {$corps->current_name}
197 {if $corps->current_rank}({$corps->current_rank}){/if}
200 {if $corps->current != $corps->original && $corps->original}
201 <li>Corps d'origine : {$corps->original_name}</li>
209 {assign var=addr value=$profile->getAddresses(3)}
210 {if count($addr) > 0}
212 <h2>Contact : </h2>
213 {if $profile->isDead()}
214 {assign var=address_name value="Dernière adresse"}
216 {assign var=address_name value="Adresse"}
218 {foreach from=$addr item="address" name=addresses}
219 {if $smarty.foreach.addresses.iteration is even}
220 {assign var=pos value="right"}
222 {assign var=pos value="left"}
224 {if $address->hasFlag('current')}
225 {include file="geoloc/address.tpl" address=$address titre_div=true titre=$address_name|@cat:" actuelle :"
226 for="`$profile->firstname` `$profile->lastname`" pos=$pos phones=null}
227 {elseif $address->hasFlag('secondary')}
228 {include file="geoloc/address.tpl" address=$address titre_div=true titre=$address_name|@cat:" secondaire :"
229 for="`$profile->firstname` `$profile->lastname`" pos=$pos phones=null}
231 {include file="geoloc/address.tpl" address=$address titre_div=true titre=$address_name|@cat:" principale :"
232 for="`$profile->firstname` `$profile->lastname`" pos=$pos phones=null}
234 {if $smarty.foreach.addresses.iteration is even}<div class="spacer"></div>{/if}
239 {assign var=jobs value=$profile->getJobs(2)}
240 {if count($jobs) > 0}
242 <h2>Informations professionnelles :</h2>
243 {foreach from=$jobs item="job" key="i"}
244 {if $i neq 0}<hr />{/if}
245 {include file="include/emploi.tpl" job=$job}
246 {assign var=jobPhones value=$job->phones()}
248 {include file="geoloc/address.tpl" address=$job->address() titre="Adresse : " for=$job->company->name pos="left" phones=$jobPhones}
249 {elseif $jobPhones|@count neq 0}
250 {display_phones tels=$jobPhones}
252 <div class="spacer"> </div>
257 {assign var=medals value=$profile->getMedals()}
258 {if count($medals) > 0}
260 <h2>Distinctions : </h2>
261 {foreach from=$medals item=m}
262 <div class="medal_frame">
263 <img src="profile/medal/thumb/{$m.mid}" height="50px" alt="{$m.text}" title="{$m.text}" style='float: left;' />
264 <div class="medal_text">
265 {$m.text}{if $m.level} ({$m.level}){/if}<br />{$m.grade}
269 <div class="spacer"> </div>
273 {if $logged && $profile->cv}
275 <h2>Curriculum Vitae :</h2>
276 {$profile->cv|miniwiki:title|smarty:nodefaults}
280 {if $view->level() eq #Visibility::VIEW_PUBLIC#}
283 Cette fiche est publique et visible par tout internaute,<br />
284 vous pouvez aussi voir <a href="profile/private/{$profile->hrid()}?display=light">celle réservée aux X</a>.
287 {elseif $view->level() eq #Visibility::VIEW_AX#}
290 Cette fiche est privée et ne recense que les informations transmises à l'AX.
295 <div class="spacer"></div>
298 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}