| 1 | {**************************************************************************} |
| 2 | {* *} |
| 3 | {* Copyright (C) 2003-2009 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 = platal_baseurl + 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 | //]]></script> |
| 40 | {/literal} |
| 41 | |
| 42 | <div id="fiche"> |
| 43 | <div id="photo" class="part"> |
| 44 | {if $photo_url}<img alt="Photo de {$user->login()}" src="{$photo_url}" width="{$x.x}"/>{/if} |
| 45 | {if $logged && ( $x.section|smarty:nodefaults || $x.binets_join|smarty:nodefaults || $x.gpxs_join|smarty:nodefaults)} |
| 46 | <h2>À l'X…</h2> |
| 47 | {if $x.section}<div><em class="intitule">Section : </em><span>{$x.section}</span></div>{/if} |
| 48 | {if $x.binets_join}<div><em class="intitule">Binet{if count($x.binets) > 1}s{/if} : </em> |
| 49 | <span>{$x.binets_join}</span></div>{/if} |
| 50 | {if $x.gpxs_join}<div><em class="intitule">Groupe{if count($x.gpxs) > 1}s{/if} et institution{if count($x.gpxs) > 1}s{/if} X : </em> |
| 51 | <span><br/>{$x.gpxs_join|smarty:nodefaults}</span></div>{/if} |
| 52 | {/if} |
| 53 | {if $x.freetext} |
| 54 | <h2>Commentaires :</h2> |
| 55 | <span>{$x.freetext|miniwiki|smarty:nodefaults}</span> |
| 56 | {/if} |
| 57 | </div> |
| 58 | <div id="fiche_identite" class="part"> |
| 59 | <div class="civilite"> |
| 60 | {if $user->isFemale()}•{/if} |
| 61 | {$user->fullName()}{if $x.nom_usage neq ""} ({$x.nom}){/if} |
| 62 | {if $logged} |
| 63 | {if $x.nickname} (alias {$x.nickname}){/if} |
| 64 | {/if} |
| 65 | {if $x.web} <a href="{$x.web}">{icon name="world_go" title="Site Web"}</a>{/if} |
| 66 | {if $logged} |
| 67 | {if !$x.dcd}<a href="vcard/{$user->login()}.vcf">{* |
| 68 | *}{icon name=vcard title="Afficher la carte de visite"}</a>{/if} |
| 69 | {if !$x.is_contact} |
| 70 | <a href="javascript:chgMainWinLoc('carnet/contacts?action=ajouter&user={$user->login()}&token={xsrf_token}')"> |
| 71 | {icon name=add title="Ajouter à mes contacts"}</a> |
| 72 | {else} |
| 73 | <a href="javascript:chgMainWinLoc('carnet/contacts?action=retirer&user={$user->login()}&token={xsrf_token}')"> |
| 74 | {icon name=cross title="Retirer de mes contacts"}</a> |
| 75 | {/if} |
| 76 | {if hasPerm('admin')} |
| 77 | <a href="javascript:chgMainWinLoc('admin/user/{$user->login()}')"> |
| 78 | {icon name=wrench title="administrer user"}</a> |
| 79 | {/if} |
| 80 | {if $user->login() eq $smarty.session.hruid} |
| 81 | <a href="javascript:chgMainWinLoc('profile/edit')">{icon name="user_edit" title="Modifier ma fiche"}</a> |
| 82 | {/if} |
| 83 | {/if} |
| 84 | </div> |
| 85 | {if $logged} |
| 86 | <div class='maj'> |
| 87 | Fiche mise à jour<br /> |
| 88 | le {$x.date|date_format} |
| 89 | </div> |
| 90 | {/if} |
| 91 | {if $logged || $x.mobile} |
| 92 | <div class="contact"> |
| 93 | {if $logged} |
| 94 | <div class='email'> |
| 95 | {if $x.dcd} |
| 96 | Décédé{if $user->isFemale()}e{/if} le {$x.deces|date_format} |
| 97 | {elseif !$x.actif} |
| 98 | Ce{if $c.sexe}tte{/if} camarade n'a plus d'adresse de redirection valide,<br /> |
| 99 | <a href="marketing/broken/{$user->login()}" class="popup">clique ici si tu connais son adresse email !</a> |
| 100 | {elseif !$x.inscrit} |
| 101 | Cette personne n'est pas inscrite à Polytechnique.org,<br /> |
| 102 | <a href="marketing/public/{$user->login()}" class="popup">clique ici si tu connais son adresse email !</a> |
| 103 | {else} |
| 104 | {if $virtualalias} |
| 105 | <a href="mailto:{$virtualalias}">{$virtualalias}</a><br /> |
| 106 | {/if} |
| 107 | <a href="mailto:{$user->bestEmail()}">{$user->bestEmail()}</a> |
| 108 | {if $user->bestEmail() neq $user->forlifeEmail()}<br /> |
| 109 | <a href="mailto:{$user->forlifeEmail()}">{$user->forlifeEmail()}</a> |
| 110 | {/if} |
| 111 | {/if} |
| 112 | </div> |
| 113 | {/if} |
| 114 | {if $x.mobile} |
| 115 | <div class="mob"> |
| 116 | <em class="intitule">{if $x.dcd}Dernier m{else}M{/if}obile : </em>{$x.mobile} |
| 117 | </div> |
| 118 | {/if} |
| 119 | <div class='spacer'></div> |
| 120 | </div> |
| 121 | {/if} |
| 122 | <div class='formation'> |
| 123 | {if $x.iso3166} |
| 124 | <img src='images/flags/{$x.iso3166}.gif' alt='{$x.nationalite}' height='11' title='{$x.nationalite}' /> |
| 125 | {/if} |
| 126 | X {$user->promo()} |
| 127 | {if $x.promo_sortie && ($x.promo_sortie-3 > $x.promo)} |
| 128 | - X {math equation="a-b" a=$x.promo_sortie b=3} |
| 129 | {/if} |
| 130 | {if $x.applis_join} |
| 131 | - Formation : {$x.applis_join|smarty:nodefaults} |
| 132 | {/if} |
| 133 | {if $logged && $x.is_referent} |
| 134 | [<a href="referent/{$user->login()}" class='popup2'>Ma fiche référent</a>] |
| 135 | {/if} |
| 136 | </div> |
| 137 | </div> |
| 138 | {if $x.adr} |
| 139 | <div class="part"> |
| 140 | <h2>Contact : </h2> |
| 141 | {if $x.dcd} |
| 142 | {assign var=address_name value="Dernière adresse"} |
| 143 | {else} |
| 144 | {assign var=address_name value="Adresse"} |
| 145 | {/if} |
| 146 | {foreach from=$x.adr item="address" name=adresses} |
| 147 | {if $smarty.foreach.adresses.iteration is even} |
| 148 | {assign var=pos value="right"} |
| 149 | {else} |
| 150 | {assign var=pos value="left"} |
| 151 | {/if} |
| 152 | {if $address.active} |
| 153 | {include file="geoloc/address.tpl" address=$address titre_div=true titre=$address_name|@cat:" actuelle :" |
| 154 | for="`$x.prenom` `$x.nom`" pos=$pos} |
| 155 | {elseif $address.secondaire} |
| 156 | {include file="geoloc/address.tpl" address=$address titre_div=true titre=$address_name|@cat:" secondaire :" |
| 157 | for="`$x.prenom` `$x.nom`" pos=$pos} |
| 158 | {else} |
| 159 | {include file="geoloc/address.tpl" address=$address titre_div=true titre=$address_name|@cat:" principale :" |
| 160 | for="`$x.prenom` `$x.nom`" pos=$pos} |
| 161 | {/if} |
| 162 | {if $smarty.foreach.adresses.iteration is even}<div class="spacer"></div>{/if} |
| 163 | {/foreach} |
| 164 | </div> |
| 165 | {/if} |
| 166 | {if $x.adr_pro} |
| 167 | <div class="part"> |
| 168 | <h2>Informations professionnelles :</h2> |
| 169 | {foreach from=$x.adr_pro item="address" key="i"} |
| 170 | {if $i neq 0}<hr />{/if} |
| 171 | {include file="include/emploi.tpl" address=$address} |
| 172 | {include file="geoloc/address.tpl" address=$address titre="Adresse : " for=$address.entreprise pos="left"} |
| 173 | <div class="spacer"> </div> |
| 174 | {/foreach} |
| 175 | </div> |
| 176 | {/if} |
| 177 | {if $x.medals} |
| 178 | <div class="part"> |
| 179 | <h2>Distinctions : </h2> |
| 180 | {foreach from=$x.medals item=m} |
| 181 | <div class="medal_frame"> |
| 182 | <img src="profile/medal/thumb/{$m.id}" height="50px" alt="{$m.medal}" title="{$m.medal}" style='float: left;' /> |
| 183 | <div class="medal_text"> |
| 184 | {$m.medal}<br />{$m.grade} |
| 185 | </div> |
| 186 | </div> |
| 187 | {/foreach} |
| 188 | <div class="spacer"> </div> |
| 189 | </div> |
| 190 | {/if} |
| 191 | {if $logged && $x.cv} |
| 192 | <div class="part"> |
| 193 | <h2>Curriculum Vitae :</h2> |
| 194 | {$x.cv|miniwiki:title|smarty:nodefaults} |
| 195 | </div> |
| 196 | {/if} |
| 197 | {if $view eq 'public'} |
| 198 | <div class="part"> |
| 199 | <small> |
| 200 | Cette fiche est publique et visible par tout internaute,<br /> |
| 201 | vous pouvez aussi voir <a href="profile/private/{$user->login()}?display=light">celle réservée aux X</a>. |
| 202 | </small> |
| 203 | </div> |
| 204 | {elseif $view eq 'ax'} |
| 205 | <div class="part"> |
| 206 | <small> |
| 207 | Cette fiche est privée et ne recense que les informations transmises à l'AX. |
| 208 | </small> |
| 209 | </div> |
| 210 | {/if} |
| 211 | <div class="spacer"></div> |
| 212 | </div> |
| 213 | |
| 214 | {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *} |