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