Do not show X.org login form when the user doesn't have javascript activated
[platal.git] / templates / profile / profile.tpl
CommitLineData
0337d704 1{**************************************************************************}
2{* *}
5ddeb07c 3{* Copyright (C) 2003-2007 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[
25function chgMainWinLoc( strPage , iePage) {
38d1f2d4 26 if (is_IE) {
4d8e2051 27 strPage = iePage;
28 }
2c326273 29 if (parent.opener) {
30 parent.opener.document.location = strPage;
4d8e2051 31 window.close();
2c326273 32 } else {
33 document.location = strPage;
34 }
0337d704 35}
4d8e2051 36//]]></script>
0337d704 37{/literal}
38
8b10988d 39{if $logged and $x.forlife eq $smarty.session.forlife}
4d8e2051 40[<a href="javascript:chgMainWinLoc('profile/edit', 'edit')">Modifier ma fiche</a>]
a11e04a6 41{/if}
42
0337d704 43<table id="fiche" cellpadding="0" cellspacing="0">
44 <tr>
45 <td id="fiche_identite">
46 <div class="civilite">
47 {if $x.sexe}&bull;{/if}
48 {$x.prenom} {if $x.nom_usage eq ""}{$x.nom}{else}{$x.nom_usage} ({$x.nom}){/if}
49 {if $logged}
0fb07071 50 {if $x.nickname} (alias {$x.nickname}){/if}&nbsp;
7ac1ef77 51 <a href="vcard/{$x.forlife}.vcf">{*
52 *}{icon name=vcard title="Afficher la carte de visite"}</a>
0337d704 53 {if !$x.is_contact}
7b2413f6 54 <a href="javascript:x()" onclick="chgMainWinLoc('carnet/contacts?action=ajouter&amp;user={$x.forlife}')">
7c0881fd 55 {icon name=add title="Ajouter à mes contacts"}</a>
0337d704 56 {else}
7b2413f6 57 <a href="javascript:x()" onclick="chgMainWinLoc('carnet/contacts?action=retirer&amp;user={$x.forlife}')">
2faf884e 58 {icon name=cross title="Retirer de mes contacts"}</a>
0337d704 59 {/if}
c6db254a 60 {if $smarty.session.perms eq admin}
f81d9dad 61 <a href="javascript:x()" onclick="chgMainWinLoc('admin/user/{$x.forlife}')">
2faf884e 62 {icon name=wrench title="administrer user"}</a>
c6db254a 63 {/if}
0337d704 64 {/if}
65 </div>
66 {if $logged}
67 <div class='maj'>
68 Fiche mise à jour<br />
69 le {$x.date|date_format}
70 </div>
71 {/if}
72 {if $logged || $x.mobile}
73 <div class="contact">
74 {if $logged}
75 <div class='email'>
76 {if $x.dcd}
77 Décédé{if $x.sexe}e{/if} le {$x.deces|date_format}
d9caac6f 78 {elseif !$x.actif}
79 Ce camarade n'a plus d'adresse redirection valide,<br />
80 <a href="marketing/broken/{$x.user_id}" class="popup">clique ici si tu connais son adresse email !</a>
0337d704 81 {elseif !$x.inscrit}
d9caac6f 82 Cette personne n'est pas inscrite à Polytechnique.org,<br />
83 <a href="marketing/public/{$x.user_id}" class="popup">clique ici si tu connais son adresse email !</a>
0337d704 84 {else}
85 {if $virtualalias}
86 <a href="mailto:{$virtualalias}">{$virtualalias}</a><br />
87 {/if}
7d73bb7b 88 <a href="mailto:{$x.bestalias}@{#globals.mail.domain#}">{$x.bestalias}@{#globals.mail.domain#}</a>
2c326273 89 {if $x.bestalias neq $x.forlife}<br />
7d73bb7b 90 <a href="mailto:{$x.forlife}@{#globals.mail.domain#}">{$x.forlife}@{#globals.mail.domain#}</a>
0337d704 91 {/if}
92 {/if}
93 </div>
94 {/if}
95 <div class="mob">
96 {if $x.mobile}<em class="intitule">Mobile : </em>{$x.mobile}<br />{/if}
97 </div>
98 <div class='spacer'></div>
99 </div>
100 {/if}
101 <div class='formation'>
102 {if $x.iso3166}
7b2413f6 103 <img src='images/flags/{$x.iso3166}.gif' alt='{$x.nationalite}' height='11' title='{$x.nationalite}' />&nbsp;
0337d704 104 {/if}
105 X {$x.promo}
106 {if ($x.promo_sortie-3 > $x.promo)}
107 - X {math equation="a-b" a=$x.promo_sortie b=3}
108 {/if}
109 {if $x.applis_join}
110 &nbsp;-&nbsp;Formation&nbsp;: {$x.applis_join|smarty:nodefaults}
111 {/if}
112 {if $logged}
113 {if $x.is_referent}
7b2413f6 114 [<a href="referent/{$x.forlife}" class='popup2'>Ma fiche référent</a>]
0337d704 115 {/if}
116 {/if}
117 </div>
118 </td>
119 <td rowspan="4" id='photo'>
120 {if $photo_url}<img alt="Photo de {$x.forlife}" src="{$photo_url}" width="{$x.x}" height="{$x.y}" />{/if}
121 {if $logged}
122 {if $x.section}<div><em class="intitule">Section : </em><span>{$x.section}</span></div>{/if}
123 {if $x.binets_join}<div><em class="intitule">Binet(s) : </em><span>{$x.binets_join}</span></div>{/if}
124 {if $x.gpxs_join}<div><em class="intitule">Groupe(s) X : </em><span>{$x.gpxs_join|smarty:nodefaults}</span></div>{/if}
125 {/if}
126 {if $x.web}<div><em class="intitule">Site Web : </em><a href="{$x.web}" class='popup'>{$x.web}</a></div>{/if}
f78bc355 127 {if $x.freetext}<div><em class="intitule">Commentaires : </em><br /><span>{$x.freetext|nl2br|smarty:nodefaults}</span></div>{/if}
0337d704 128 </td>
129 </tr>
130 {if $x.adr}
131 <tr>
132 <td>
133 <h2>Contact : </h2>
134 {foreach from=$x.adr item="address" key="i"}
135 {if $address.active}
136 {include file="geoloc/address.tpl" address=$address titre_div=true titre="Mon adresse actuelle :"}
137 {elseif $address.secondaire}
138 {include file="geoloc/address.tpl" address=$address titre_div=true titre="Adresse secondaire :"}
139 {else}
140 {include file="geoloc/address.tpl" address=$address titre_div=true titre="Adresse principale :"}
141 {/if}
142 {/foreach}
143 <div class="spacer">&nbsp;</div>
144 </td>
145 </tr>
146 {/if}
147 {if $x.adr_pro}
148 <tr>
149 <td>
150 <h2>Informations professionnelles :</h2>
151 {foreach from=$x.adr_pro item="address" key="i"}
152 {include file="include/emploi.tpl" address=$address}
153 {include file="geoloc/address.tpl" address=$address titre="Adresse : "}
154 <div class="spacer">&nbsp;</div>
155 {/foreach}
156 </td>
157 </tr>
158 {/if}
159 {if $x.medals}
160 <tr>
161 <td>
162 <h2>Distinctions : </h2>
163 {foreach from=$x.medals item=m}
164 <table style="float: left; width: 33%;">
165 <tr>
166 <td>
7b2413f6 167 <img src="images/medals/{$m.img}" width="24" alt="{$m.medal}" title="{$m.medal}" style='float: left;' />
0337d704 168 </td>
169 <td>
170 <strong>{$m.medal}</strong>
171 <br />{$m.grade}
172 </td>
173 </tr>
174 </table>
175 {/foreach}
176 <div class="spacer">&nbsp;</div>
177 </td>
178 </tr>
179 {/if}
180 {if $logged}
181 {if $x.cv}
182 <tr>
183 <td>
184 <h2>Curriculum Vitae :</h2>
185 {$x.cv|nl2br}
186 </td>
187 </tr>
188 {/if}
189 {/if}
2862cfa7 190{if !$logged}
191<tr><td colspan="2">Cette fiche est publique et visible par tout internaute,
192vous pouvez aussi voir <a href="profile/private/{$x.forlife}">celle&nbsp;réservée&nbsp;aux&nbsp;X</a>.
193</td></tr>
194{/if}
0337d704 195
2862cfa7 196</table>
0337d704 197
198{* vim:set et sw=2 sts=2 sws=2: *}