Add user photo to the "minifiche".
[platal.git] / templates / include / minifiche.tpl
1 {**************************************************************************}
2 {*                                                                        *}
3 {*  Copyright (C) 2003-2008 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 <div class="contact {if (!$c.inscrit && $smarty.session.auth ge AUTH_COOKIE) || $c.dcd}grayed{/if}"
24      {if $c.inscrit}{if $smarty.session.auth ge AUTH_COOKIE}title="fiche mise à jour le {$c.date|date_format}"{/if}{/if}>
25   <div class="identity">
26     <div class="photo">
27       <img src="photo/{if $c.inscrit}{$c.forlife}{else}{make_forlife nom=$c.nom prenom=$c.prenom promo=$c.promo}{/if}"
28            alt="{$c.prenom} {$c.nom}" />
29     </div>
30
31     <div class="nom">
32       {if $c.sexe}&bull;{/if}
33       {if !$c.dcd && ($c.inscrit || $smarty.session.auth eq AUTH_PUBLIC)}<a href="profile/{if $c.inscrit}{$c.forlife}{else}{make_forlife nom=$c.nom prenom=$c.prenom promo=$c.promo}{/if}" class="popup2">{/if}
34       {if $c.nom_usage}{$c.nom_usage} {$c.prenom}<br />({$c.nom}){else}{$c.nom} {$c.prenom}{/if}
35       {if !$c.dcd && ($c.inscrit || $smarty.session.auth eq AUTH_PUBLIC)}</a>{/if}
36     </div>
37
38     <div class="appli">
39       {if $c.iso3166}
40       <img src='images/flags/{$c.iso3166}.gif' alt='{$c.nat}' height='11' title='{$c.nat}' />&nbsp;
41       {/if}
42       (X {$c.promo}{if $c.app0text}, {applis_fmt type=$c.app0type text=$c.app0text url=$c.app0url}{*
43       *}{/if}{if $c.app1text}, {applis_fmt type=$c.app1type text=$c.app1text url=$c.app1url}{/if})
44       {if $c.dcd}décédé{if $c.sexe}e{/if} le {$c.deces|date_format}{/if}
45       {if $smarty.session.auth ge AUTH_COOKIE}
46       {if !$c.dcd && !$c.wasinscrit}
47       <a href="marketing/public/{$c.user_id}" class='popup'>clique ici si tu connais son adresse email !</a>
48       {/if}
49       {/if}
50     </div>
51   </div>
52
53   <div class="noprint bits">
54     <div>
55     {if $smarty.session.auth ge AUTH_COOKIE}
56       {if !$c.wasinscrit && !$c.dcd}
57         {if $show_action eq ajouter}
58     <a href="carnet/notifs/add_nonins/{$c.user_id}">{*
59     *}{icon name=add title="Ajouter à la liste de mes surveillances"}</a>
60         {else}
61     <a href="carnet/notifs/del_nonins/{$c.user_id}">{*
62     *}{icon name=cross title="Retirer de la liste de mes surveillances"}</a>
63         {/if}
64       {elseif $c.wasinscrit}
65     <a href="profile/{$c.forlife}" class="popup2">{*
66     *}{icon name=user_suit title="Afficher la fiche"}</a>
67         {if !$c.dcd}
68     <a href="vcard/{$c.forlife}.vcf">{*
69     *}{icon name=vcard title="Afficher la carte de visite"}</a>
70           {if $show_action eq ajouter}
71     <a href="carnet/contacts?action={$show_action}&amp;user={$c.forlife}">{*
72     *}{icon name=add title="Ajouter à mes contacts"}</a>
73           {else}
74     <a href="carnet/contacts?action={$show_action}&amp;user={$c.forlife}">{*
75     *}{icon name=cross title="Retirer de mes contacts"}</a>
76           {/if}
77         {/if}
78       {/if}
79     {/if}
80     </div>
81
82     {if hasPerm('admin')}
83     <div>
84     {if !$c.wasinscrit && !$c.dcd}
85     <a href="marketing/private/{$c.user_id}">{*
86       *}{icon name=email title="marketter user"}</a>
87     {/if}
88     <a href="admin/user/{if $c.wasinscrit}{$c.forlife}{else}{$c.user_id}{/if}">{*
89     *}{icon name=wrench title="administrer user"}</a>
90     <a href="http://www.polytechniciens.com/?page=AX_FICHE_ANCIEN&amp;anc_id={$c.matricule_ax}">{*
91     *}{icon name=user_gray title="fiche AX"}</a>
92     {/if}
93     </div>
94   </div>
95
96   <div class="long">
97   {if $c.wasinscrit}
98     {if $c.web || $c.mobile || $c.countrytxt || $c.city || $c.region || $c.entreprise || $c.freetext || (!$c.dcd && !$c.actif )}
99     <table cellspacing="0" cellpadding="0">
100       {if $c.web}
101       <tr>
102         <td class="lt">Page web:</td>
103         <td class="rt"><a href="{$c.web}">{$c.web}</a></td>
104       </tr>
105       {/if}
106       {if $c.countrytxt || $c.city}
107       <tr>
108         <td class="lt">Géographie:</td>
109         <td class="rt">{$c.city}{if $c.city && $c.countrytxt}, {/if}{$c.countrytxt}</td>
110       </tr>
111       {/if}
112       {if $c.mobile && !$c.dcd}
113       <tr>
114         <td class="lt">Mobile:</td>
115         <td class="rt">{$c.mobile}</td>
116       </tr>
117       {/if}
118       {if $c.entreprise}
119       <tr>
120         <td class="lt">Profession:</td>
121         <td class="rt">
122           {$c.entreprise} {if $c.secteur}({$c.secteur}){/if}
123           {if $c.fonction}<br />{$c.fonction}{/if}
124         </td>
125       </tr>
126       {/if}
127       {if $c.freetext}
128       <tr>
129         <td class="lt">Commentaire:</td>
130         <td class="rt">{$c.freetext|nl2br}</td>
131       </tr>
132       {/if}
133       {if !$c.dcd && !$c.actif && $c.wasinscrit && $smarty.session.auth ge AUTH_COOKIE}
134       <tr>
135         <td class="smaller" colspan="2">
136           Ce camarade n'a plus d'adresse de redirection valide.
137           <a href="marketing/broken/{$c.forlife}">
138             Si tu en connais une, <strong>n'hésite pas à nous la transmettre</strong>
139           </a>
140         </td>
141       </tr>
142       {/if}
143     </table>
144     {/if}
145   {/if}
146   </div>
147 </div>
148
149 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}