Off-by-one in trombi view.
[platal.git] / templates / include / plview.trombi.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 {if $plset_count eq 0}
24 <p class="erreur">
25   Aucun des camarades concernĂ©s n'a de photographie sur sa fiche
26 </p>
27 {else}
28 <table cellpadding="0" cellspacing="2" style="width: 100%">
29   {section name=trombi loop=$set start=0}
30   {if $smarty.section.trombi.index % 3 == 1}
31   <tr>
32     <td class="center" style="vertical-align: middle">
33       <a href="{$mainsiteurl}profile/{$set[trombi.index_prev].forlife}" class="popup2">
34         <img src="photo/{$set[trombi.index_prev].forlife}" width="110" alt=" [ PHOTO ] " />
35       </a>
36       {if $trombi_with_admin && hasPerm('admin')}
37       <a href="{$mainsiteurl}admin/trombino/{$set[trombi.index_prev].user_id}">{icon name=wrench title="[admin]"}</a>
38       {/if}
39     </td>
40     <td class="center" style="vertical-align: middle">
41       <a href="{$mainsiteurl}profile/{$set[trombi].forlife}" class="popup2">
42         <img src="photo/{$set[trombi].forlife}" width="110" alt=" [ PHOTO ] " />
43       </a>
44       {if $trombi_with_admin && hasPerm('admin')}
45       <a href="{$mainsiteurl}admin/trombino/{$set[trombi].user_id}">{icon name=wrench title="[admin]"}</a>
46       {/if}
47     </td>
48     <td class="center" style="vertical-align: middle">
49     {if $set[trombi.index_next]}
50       <a href="{$mainsiteurl}profile/{$set[trombi.index_next].forlife}" class="popup2">
51         <img src="photo/{$set[trombi.index_next].forlife}" width="110" alt=" [ PHOTO ] " />
52       </a>
53       {if $trombi_with_admin && hasPerm('admin')}
54       <a href="{$mainsiteurl}admin/trombino/{$set[trombi.index_next].user_id}">{icon name=wrench title="[admin]"}</a>
55       {/if}
56     {/if}
57     </td>
58   </tr>
59   <tr>
60     <td class="center" style="vertical-align: bottom; padding-bottom: 15px">
61       <a href="{$mainsiteurl}profile/{$set[trombi.index_prev].forlife}" class="popup2">
62         {$set[trombi.index_prev].prenom} {$set[trombi.index_prev].nom}{if $trombi_with_promo} ({$set[trombi.index_prev].promo}){/if}
63       </a>
64     </td>
65     <td class="center" style="vertical-align: bottom; padding-bottom: 15px">
66       <a href="{$mainsiteurl}profile/{$set[trombi].forlife}" class="popup2">
67         {$set[trombi].prenom} {$set[trombi].nom}{if $trombi_with_promo} ({$set[trombi].promo}){/if}
68       </a>
69     </td>
70     <td class="center" style="vertical-align: bottom; padding-bottom: 15px">
71     {if $set[trombi.index_next]}
72       <a href="{$mainsiteurl}profile/{$set[trombi.index_next].forlife}" class="popup2">
73         {$set[trombi.index_next].prenom} {$set[trombi.index_next].nom}{if $trombi_with_promo} ({$set[trombi.index_next].promo}){/if}
74       </a>
75     {/if}
76     </td>
77   </tr>
78   {elseif ($smarty.section.trombi.index % 3 == 0) && ($smarty.section.trombi.last)}
79   <tr>
80     <td class="center" style="vertical-align: middle; padding-bottom: 15px">
81       <a href="{$mainsiteurl}profile/{$set[trombi].forlife}" class="popup2">
82         <img src="photo/{$set[trombi].forlife}" width="110" alt=" [ PHOTO ] " />
83       </a>
84       {if $trombi_with_admin && hasPerm('admin')}
85       <a href="{$mainsiteurl}admin/trombino/{$set[trombi].user_id}">{icon name=wrench title="[admin]"}</a>
86       {/if}
87     </td>
88     <td></td><td></td>
89   </tr>
90   <tr style="margin-top: 0; padding-top: 0">
91     <td class="center" style="vertical-align: bottom">
92       <a href="{$mainsiteurl}profile/{$set[trombi].forlife}" class="popup2">
93         {$set[trombi].prenom} {$set[trombi].nom}{if $trombi_with_promo} ({$set[trombi].promo}){/if}
94       </a>
95     </td>
96     <td></td><td></td>
97   </tr>
98   {/if}
99   {/section}
100 </table>
101 {/if}
102
103 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}