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