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