Fix PHP warnings (return by ref, protected/private)
[platal.git] / templates / include / minifiche.tpl
CommitLineData
0337d704 1{**************************************************************************}
2{* *}
8d84c630 3{* Copyright (C) 2003-2009 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
64a69719 23{assign var=dead value=$profile->deathdate}
64a69719 24{if $smarty.session.auth ge AUTH_COOKIE}
05fef626
RB
25 {assign var=withAuth value=true}
26 {assign var=user value=$profile->owner()}
27 {if $user == null}
28 {assign var=hasowner value=false}
29 {assign var=registered value=false}
30 {else}
31 {if $user->state neq 'pending'}
32 {assign var=registered value=true}
33 {else}
34 {assign var=registered value=false}
35 {/if}
36 {/if}
64a69719 37{else}
05fef626
RB
38 {* Without auth, all profiles appear as registered *}
39 {assign var=registered value=true}
40 {assign var=withAuth value=false}
64a69719
FB
41{/if}
42
43
05fef626
RB
44<div class="contact {if !$registered || $dead }grayed{/if}"
45 {if $registered}title="fiche mise à jour le {$profile->last_change|date_format}"{/if}>
ea62a170 46 <div class="identity">
64a69719 47 {if $withAuth}
ea62a170 48 <div class="photo">
64a69719 49 <img src="photo/{$profile->hrid()}" alt="{$profile->directory_name}" />
ea62a170 50 </div>
580f4860 51 {/if}
0337d704 52
ea62a170 53 <div class="nom">
76cbe885 54 {if $profile->isFemale()}&bull;{/if}
05fef626 55 {if !$dead && $registered}<a href="profile/{$profile->hrid()}" class="popup2">{/if}
76cbe885 56 {$profile->full_name}
05fef626 57 {if !$dead && $registered}</a>{/if}
ea62a170 58 </div>
0337d704 59
f711b03f 60 <div class="edu">
76cbe885
FB
61 {if $profile->nationality1}
62 <img src='images/flags/{$profile->nationality1}.gif' alt='{$profile->nationality1}' height='11' title='{$profile->nationality1}' />&nbsp;
eeb2ec0f 63 {/if}
76cbe885
FB
64 {if $profile->nationality2}
65 <img src='images/flags/{$profile->nationality2}.gif' alt='{$profile->nationality2}' height='11' title='{$profile->nationality2}' />&nbsp;
eeb2ec0f 66 {/if}
76cbe885
FB
67 {if $profile->nationality3}
68 <img src='images/flags/{$profile->nationality3}.gif' alt='{$profile->nationality3}' height='11' title='{$profile->nationality3}' />&nbsp;
ea62a170 69 {/if}
4bc5b8f0
FB
70 {$profile->promo()}{*
71 *}{iterate from=$profile->getExtraEducations(4) item=edu}, {education_fmt edu=$edu profile=$profile}{/iterate}{*
05fef626 72 *}{if $dead}, {"décédé"|sex:"décédée":$profile} le {$profile->deathdate|date_format}{/if}
ea62a170 73 </div>
0337d704 74 </div>
75
64a69719 76 {if $withAuth}
ea62a170
FB
77 <div class="noprint bits">
78 <div>
486d15fb
FB
79 {if !$registered && !$dead}
80 {if $show_action eq 'ajouter'}
76cbe885 81 <a href="carnet/notifs/add_nonins/{$user->login()}?token={xsrf_token}">{*
ea62a170
FB
82 *}{icon name=add title="Ajouter à la liste de mes surveillances"}</a>
83 {else}
76cbe885 84 <a href="carnet/notifs/del_nonins/{$user->login()}?token={xsrf_token}">{*
ea62a170
FB
85 *}{icon name=cross title="Retirer de la liste de mes surveillances"}</a>
86 {/if}
486d15fb 87 {elseif $registered}
76cbe885 88 <a href="profile/{$profile->hrid()}" class="popup2">{*
ea62a170 89 *}{icon name=user_suit title="Afficher la fiche"}</a>
64a69719 90 {if !$dead}
76cbe885 91 <a href="vcard/{$profile->hrid()}.vcf">{*
ea62a170 92 *}{icon name=vcard title="Afficher la carte de visite"}</a>
76cbe885 93 <a href="mailto:{$user->bestEmail()}">{*
fd9a8382 94 *}{icon name=email title="Envoyer un email"}</a>
76cbe885
FB
95 {if !$smarty.session.user->isContact($user)}
96 <a href="carnet/contacts?action=ajouter&amp;user={$user->login()}&amp;token={xsrf_token}">{*
ea62a170
FB
97 *}{icon name=add title="Ajouter à mes contacts"}</a>
98 {else}
76cbe885 99 <a href="carnet/contacts?action=retirer&amp;user={$user->login()}&amp;token={xsrf_token}">{*
ea62a170
FB
100 *}{icon name=cross title="Retirer de mes contacts"}</a>
101 {/if}
102 {/if}
f8e7af52 103 {/if}
ea62a170 104 </div>
0337d704 105
908db125 106 {if hasPerm('admin')}
ea62a170 107 <div>
64a69719 108 [{if $registered && !$dead}
76cbe885 109 <a href="marketing/private/{$user->login()}">{*
1322ba86
FB
110 *}{icon name=email title="marketter user"}</a>
111 {/if}
76cbe885 112 <a href="admin/user/{$user->login()}">{*
1322ba86 113 *}{icon name=wrench title="administrer user"}</a>
e46cf8c4 114 <a href="profile/ax/{$user->login()}">{*
1322ba86 115 *}{icon name=user_gray title="fiche AX"}</a>]
ea62a170 116 </div>
f51dcf10 117 {/if}
b9384d56 118 </div>
580f4860 119 {/if}
0337d704 120
121 <div class="long">
64a69719 122 {if !$dead}
f5642983 123 {assign var=address value=$profile->getMainAddress()}
04a94b1d 124 {assign var=web value=$profile->getWebSite()}
e718bd18
FB
125 {assign var=job value=$profile->getMailJob()}
126 {if $web || $profile->mobile || $address.country || $job || (!$dead && !$registered)}
0337d704 127 <table cellspacing="0" cellpadding="0">
04a94b1d 128 {if $web}
0337d704 129 <tr>
ed260de1 130 <td class="lt">Page web&nbsp;:</td>
04a94b1d 131 <td class="rt"><a href="{$web}">{$web}</a></td>
0337d704 132 </tr>
133 {/if}
d1e61677 134 {if $address.country && !$c.dcd}
0337d704 135 <tr>
ed260de1 136 <td class="lt">Géographie&nbsp;:</td>
f5642983 137 <td class="rt">{if $address.locality}{$address.locality}, {/if}{$address.country}</td>
0337d704 138 </tr>
139 {/if}
46e9eb99 140 {if $profile->mobile && !$dead}
0337d704 141 <tr>
ed260de1 142 <td class="lt">Mobile&nbsp;:</td>
46e9eb99 143 <td class="rt">{$profile->mobile}</td>
0337d704 144 </tr>
145 {/if}
e718bd18 146 {if $job}
0337d704 147 <tr>
ed260de1 148 <td class="lt">Profession&nbsp;:</td>
0337d704 149 <td class="rt">
e718bd18
FB
150 {if $job.url|default:$job.user_site}<a href="{$job.url|default:$job.user_site}">{$job.name}</a>{else}{$job.name}{/if}
151 {if $job.subsubsector}&nbsp;({$job.subsubsector}){/if}{if $job.description}<br />{$job.description}{/if}
0337d704 152 </td>
153 </tr>
154 {/if}
64a69719
FB
155 {if $withAuth}
156 {if !$registered}
0337d704 157 <tr>
2c411733 158 <td class="smaller" colspan="2">
05fef626 159 {"Ce"|sex:"Cette":$profile} camarade n'est pas {"inscrit"|sex:"inscrite":$profile}.
2c411733
FB
160 <a href="marketing/public/{$user->login()}" class='popup'>Si tu connais son adresse email,
161 <strong>n'hésite pas à nous la transmettre !</a>
162 </td>
0337d704 163 </tr>
2c411733 164 {elseif $user->state neq 'disabled' && $user->lost}
d216d84a 165 <tr>
166 <td class="smaller" colspan="2">
05fef626 167 {"Ce"|sex:"Cette":$profile} camarade n'a plus d'adresse de redirection valide.
2c411733 168 <a href="marketing/broken/{$user->login()}">
ed260de1 169 Si tu en connais une, <strong>n'hésite pas à nous la transmettre</strong>.
d216d84a 170 </a>
171 </td>
172 </tr>
173 {/if}
2c411733 174 {/if}
0337d704 175 </table>
176 {/if}
177 {/if}
178 </div>
0337d704 179</div>
0337d704 180
a7de4ef7 181{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}