Merge branch 'xorg/master' into xorg/f/xnet-accounts
[platal.git] / templates / include / plview.trombi.tpl
index 97f44c1..8db07cf 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2011 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
   Aucun des camarades concernĂ©s n'a de photographie sur sa fiche
 </p>
 {else}
-<table cellpadding="8" cellspacing="2" style="width: 100%">
-  {iterate from=$set item=p}
-  {cycle values="1,2,3" assign="loop"}
-  {if $loop eq "1"}
+<table cellpadding="0" cellspacing="2" style="width: 100%">
+  {section name=trombi loop=$set_keys start=0}
+  {if $smarty.section.trombi.index % 3 == 1}
+  {assign var=key_prev value=$set_keys[trombi.index_prev]}
+  {assign var=key_cur  value=$set_keys[trombi]}
+  {assign var=key_next value=$set_keys[trombi.index_next]}
   <tr>
-  {/if}
-    <td class="center">
-      <a href="{$mainsiteurl}profile/{$p.forlife}" class="popup2">
-        <img src="photo/{$p.forlife}" width="110" alt=" [ PHOTO ] " />
-      </a>
-      {if $trombi_with_admin && hasPerm('admin')}
-      <a href="{$mainsiteurl}admin/trombino/{$p.user_id}">{icon name=wrench title="[admin]"}</a>
-      {/if}
-      <br />
-      <a href="{$mainsiteurl}profile/{$p.forlife}" class="popup2">
-        {$p.prenom} {$p.nom}{if $trombi_with_promo} ({$p.promo}){/if}
-      </a>
-    </td>
-  {if $loop eq "3"}
+    {include file="include/plview.trombi.entry.tpl" profile=$set[$key_prev] photo=true}
+    {include file="include/plview.trombi.entry.tpl" profile=$set[$key_cur] photo=true}
+    {include file="include/plview.trombi.entry.tpl" profile=$set[$key_next] photo=true}
+  </tr>
+  <tr>
+    {include file="include/plview.trombi.entry.tpl" profile=$set[$key_prev] photo=false}
+    {include file="include/plview.trombi.entry.tpl" profile=$set[$key_cur] photo=false}
+    {include file="include/plview.trombi.entry.tpl" profile=$set[$key_next] photo=false}
+  </tr>
+  {elseif ($smarty.section.trombi.index % 3 == 0) && ($smarty.section.trombi.last)}
+  {assign var=key_cur  value=$set_keys[trombi]}
+  <tr>
+    {include file="include/plview.trombi.entry.tpl" profile=$set[$key_cur] photo=true}
+    <td></td><td></td>
+  </tr>
+  <tr style="margin-top: 0; padding-top: 0">
+    {include file="include/plview.trombi.entry.tpl" profile=$set[$key_cur] photo=false}
+    <td></td><td></td>
   </tr>
   {/if}
-  {/iterate}
-  {if $loop neq "3"}
-  {if $lopp eq "1"}
-  <td></td>
-  {/if}
-  <td></td></tr>
-  {/if}
+  {/section}
 </table>
 {/if}