Integrates new phone table in profile and other pages
[platal.git] / templates / profile / profile.tpl
CommitLineData
0337d704 1{**************************************************************************}
2{* *}
179afa7f 3{* Copyright (C) 2003-2008 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[
555fde86 25function chgMainWinLoc(strPage)
26{
27 strPage = platal_baseurl + strPage;
2c326273 28 if (parent.opener) {
007c44cb 29 try {
30 parent.opener.document.location = strPage;
31 window.close();
32 } catch(e) {
33 window.open(strPage);
34 }
2c326273 35 } else {
36 document.location = strPage;
37 }
0337d704 38}
4d8e2051 39//]]></script>
0337d704 40{/literal}
41
03a6316f 42<div id="fiche">
43 <div id="photo" class="part">
44 {if $photo_url}<img alt="Photo de {$x.forlife}" src="{$photo_url}" width="{$x.x}"/>{/if}
581c3341 45 {if $logged && ( $x.section|smarty:nodefaults || $x.binets_join|smarty:nodefaults || $x.gpxs_join|smarty:nodefaults)}
b11cf21e 46 <h2>À l'X...</h2>
e8439508 47 {if $x.section}<div><em class="intitule">Section&nbsp;: </em><span>{$x.section}</span></div>{/if}
b11cf21e
SJ
48 {if $x.binets_join}<div><em class="intitule">Binet{if count($x.binets) > 1}s{/if}&nbsp;: </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&nbsp;: </em>
51 <span><br/>{$x.gpxs_join|smarty:nodefaults}</span></div>{/if}
03a6316f 52 {/if}
d1a2252a
GB
53 {if $x.networking}
54 <h2>Messageries, networking et sites web&nbsp;:</h2>
55 {foreach from=$x.networking item=network}
56 <img style="width: auto; padding: 0" src="profile/networking/{$network.type}" alt="{$network.name}" title="{$network.name}"/>
57 {if $network.filter == 'web'}
58 <a href="{$network.address}">{$network.address}</a>
59 {else}
60 {$network.address}
61 {/if}
62 <br/>
63 {/foreach}
64 {/if}
581c3341
FB
65 {if $x.freetext}
66 <h2>Commentaires&nbsp;:</h2>
67 <span>{$x.freetext|miniwiki|smarty:nodefaults}</span>
68 {/if}
03a6316f 69 </div>
70 <div id="fiche_identite" class="part">
71 <div class="civilite">
72 {if $x.sexe}&bull;{/if}
73 {$x.prenom} {if $x.nom_usage eq ""}{$x.nom}{else}{$x.nom_usage} ({$x.nom}){/if}
74 {if $logged}
581c3341
FB
75 {if $x.nickname} (alias {$x.nickname}){/if}
76 {/if}
581c3341 77 {if $logged}
5494e94d
FB
78 &nbsp;{if !$x.dcd}<a href="vcard/{$x.forlife}.vcf">{*
79 *}{icon name=vcard title="Afficher la carte de visite"}</a>{/if}
03a6316f 80 {if !$x.is_contact}
e6bf9216 81 <a href="javascript:chgMainWinLoc('carnet/contacts?action=ajouter&amp;user={$x.forlife}&amp;token={xsrf_token}')">
03a6316f 82 {icon name=add title="Ajouter à mes contacts"}</a>
83 {else}
e6bf9216 84 <a href="javascript:chgMainWinLoc('carnet/contacts?action=retirer&amp;user={$x.forlife}&amp;token={xsrf_token}')">
03a6316f 85 {icon name=cross title="Retirer de mes contacts"}</a>
86 {/if}
908db125 87 {if hasPerm('admin')}
03a6316f 88 <a href="javascript:chgMainWinLoc('admin/user/{$x.forlife}')">
89 {icon name=wrench title="administrer user"}</a>
90 {/if}
581c3341
FB
91 {if $x.forlife eq $smarty.session.forlife}
92 <a href="javascript:chgMainWinLoc('profile/edit')">{icon name="user_edit" title="Modifier ma fiche"}</a>
93 {/if}
03a6316f 94 {/if}
95 </div>
96 {if $logged}
97 <div class='maj'>
98 Fiche mise à jour<br />
99 le {$x.date|date_format}
100 </div>
101 {/if}
102 {if $logged || $x.mobile}
103 <div class="contact">
104 {if $logged}
105 <div class='email'>
106 {if $x.dcd}
107 Décédé{if $x.sexe}e{/if} le {$x.deces|date_format}
108 {elseif !$x.actif}
ac3f2812 109 Ce camarade n'a plus d'adresse de redirection valide,<br />
03a6316f 110 <a href="marketing/broken/{$x.forlife}" class="popup">clique ici si tu connais son adresse email !</a>
111 {elseif !$x.inscrit}
112 Cette personne n'est pas inscrite à Polytechnique.org,<br />
113 <a href="marketing/public/{$x.user_id}" class="popup">clique ici si tu connais son adresse email !</a>
0337d704 114 {else}
03a6316f 115 {if $virtualalias}
116 <a href="mailto:{$virtualalias}">{$virtualalias}</a><br />
0337d704 117 {/if}
03a6316f 118 <a href="mailto:{$x.bestalias}@{#globals.mail.domain#}">{$x.bestalias}@{#globals.mail.domain#}</a>
119 {if $x.bestalias neq $x.forlife}<br />
120 <a href="mailto:{$x.forlife}@{#globals.mail.domain#}">{$x.forlife}@{#globals.mail.domain#}</a>
c6db254a 121 {/if}
0337d704 122 {/if}
123 </div>
0337d704 124 {/if}
6261a1b5 125 {if $x.mobile}
03a6316f 126 <div class="mob">
e8439508 127 <em class="intitule">Mobile&nbsp;: </em>{$x.mobile}
0337d704 128 </div>
6261a1b5 129 {/if}
03a6316f 130 <div class='spacer'></div>
131 </div>
132 {/if}
133 <div class='formation'>
134 {if $x.iso3166}
135 <img src='images/flags/{$x.iso3166}.gif' alt='{$x.nationalite}' height='11' title='{$x.nationalite}' />&nbsp;
0337d704 136 {/if}
03a6316f 137 X {$x.promo}
138 {if ($x.promo_sortie-3 > $x.promo)}
139 - X {math equation="a-b" a=$x.promo_sortie b=3}
140 {/if}
141 {if $x.applis_join}
142 &nbsp;-&nbsp;Formation&nbsp;: {$x.applis_join|smarty:nodefaults}
0337d704 143 {/if}
03a6316f 144 {if $logged && $x.is_referent}
145 [<a href="referent/{$x.forlife}" class='popup2'>Ma fiche référent</a>]
146 {/if}
147 </div>
148 </div>
0337d704 149 {if $x.adr}
03a6316f 150 <div class="part">
e8439508 151 <h2>Contact&nbsp;: </h2>
94c4f7a1
FB
152 {foreach from=$x.adr item="address" name=adresses}
153 {if $smarty.foreach.adresses.iteration is even}
6261a1b5 154 {assign var=pos value="right"}
155 {else}
156 {assign var=pos value="left"}
157 {/if}
03a6316f 158 {if $address.active}
e8439508 159 {include file="geoloc/address.tpl" address=$address titre_div=true titre="Mon adresse actuelle&nbsp;:"
6261a1b5 160 for="`$x.prenom` `$x.nom`" pos=$pos}
03a6316f 161 {elseif $address.secondaire}
e8439508 162 {include file="geoloc/address.tpl" address=$address titre_div=true titre="Adresse secondaire&nbsp;:"
6261a1b5 163 for="`$x.prenom` `$x.nom`" pos=$pos}
03a6316f 164 {else}
e8439508 165 {include file="geoloc/address.tpl" address=$address titre_div=true titre="Adresse principale&nbsp;:"
6261a1b5 166 for="`$x.prenom` `$x.nom`" pos=$pos}
03a6316f 167 {/if}
94c4f7a1 168 {if $smarty.foreach.adresses.iteration is even}<div class="spacer"></div>{/if}
03a6316f 169 {/foreach}
170 </div>
0337d704 171 {/if}
172 {if $x.adr_pro}
03a6316f 173 <div class="part">
e8439508 174 <h2>Informations professionnelles&nbsp;:</h2>
03a6316f 175 {foreach from=$x.adr_pro item="address" key="i"}
16f20f22 176 {if $i neq 0}<hr />{/if}
177 {include file="include/emploi.tpl" address=$address}
e8439508 178 {include file="geoloc/address.tpl" address=$address titre="Adresse&nbsp;: " for=$address.entreprise pos="left"}
16f20f22 179 <div class="spacer">&nbsp;</div>
03a6316f 180 {/foreach}
181 </div>
0337d704 182 {/if}
183 {if $x.medals}
03a6316f 184 <div class="part">
e8439508 185 <h2>Distinctions&nbsp;: </h2>
03a6316f 186 {foreach from=$x.medals item=m}
187 <div class="medal_frame">
bd6a5fe3 188 <img src="profile/medal/thumb/{$m.id}" height="50px" alt="{$m.medal}" title="{$m.medal}" style='float: left;' />
03a6316f 189 <div class="medal_text">
190 {$m.medal}<br />{$m.grade}
191 </div>
192 </div>
193 {/foreach}
194 <div class="spacer">&nbsp;</div>
6261a1b5 195 </div>
0337d704 196 {/if}
03a6316f 197 {if $logged && $x.cv}
198 <div class="part">
e8439508 199 <h2>Curriculum Vitae&nbsp;:</h2>
794feea7 200 {$x.cv|miniwiki:title|smarty:nodefaults}
03a6316f 201 </div>
0337d704 202 {/if}
24f4c06a 203 {if $view eq 'public'}
03a6316f 204 <div class="part">
581c3341 205 <small>
03a6316f 206 Cette fiche est publique et visible par tout internaute,<br />
207 vous pouvez aussi voir <a href="profile/private/{$x.forlife}?display=light">celle&nbsp;réservée&nbsp;aux&nbsp;X</a>.
581c3341 208 </small>
03a6316f 209 </div>
24f4c06a
FB
210 {elseif $view eq 'ax'}
211 <div class="part">
212 <small>
213 Cette fiche est privée et ne recense que les informations transmises à l'AX.
214 </small>
215 </div>
0337d704 216 {/if}
03a6316f 217 <div class="spacer"></div>
218</div>
0337d704 219
a7de4ef7 220{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}