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