From be7ba6fb7e4de1c37b6135a224735087f7c28796 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Fri, 18 Jul 2008 22:54:54 +0200 Subject: [PATCH] Improves trombi display: the pictures are now centered and the name bottom aligned (Closes #857). --- templates/include/plview.trombi.tpl | 84 ++++++++++++++++++++++++++++--------- 1 file changed, 64 insertions(+), 20 deletions(-) diff --git a/templates/include/plview.trombi.tpl b/templates/include/plview.trombi.tpl index f9bb417..d0db912 100644 --- a/templates/include/plview.trombi.tpl +++ b/templates/include/plview.trombi.tpl @@ -25,34 +25,78 @@ Aucun des camarades concernés n'a de photographie sur sa fiche

{else} - - {foreach from=$set item=p} - {cycle values="1,2,3" assign="loop"} - {if $loop eq "1"} +
+ {section name=trombi loop=$set start=1} + {if $smarty.section.trombi.iteration % 3 == 1} - {/if} - + + - {if $loop eq "3"} + + + + + + + {elseif ($smarty.section.trombi.iteration % 3 == 0) && ($smarty.section.trombi.last)} + + + + + + + {/if} - {/foreach} - {if $loop neq "3"} - {if $lopp eq "1"} - - {/if} - - {/if} + {/section}
- -  [ PHOTO ] + + +  [ PHOTO ] {if $trombi_with_admin && hasPerm('admin')} - {icon name=wrench title="[admin]"} + {icon name=wrench title="[admin]"} {/if} -
- - {$p.prenom} {$p.nom}{if $trombi_with_promo} ({$p.promo}){/if} +
+ +  [ PHOTO ] + {if $trombi_with_admin && hasPerm('admin')} + {icon name=wrench title="[admin]"} + {/if} + + {if $set[trombi.index_next]} + +  [ PHOTO ] + + {if $trombi_with_admin && hasPerm('admin')} + {icon name=wrench title="[admin]"} + {/if} + {/if}
+ + {$set[trombi.index_prev].prenom} {$set[trombi.index_prev].nom}{if $trombi_with_promo} ({$set[trombi.index_prev].promo}){/if} + + + + {$set[trombi].prenom} {$set[trombi].nom}{if $trombi_with_promo} ({$set[trombi].promo}){/if} + + + {if $set[trombi.index_next]} + + {$set[trombi.index_next].prenom} {$set[trombi.index_next].nom}{if $trombi_with_promo} ({$set[trombi.index_next].promo}){/if} + + {/if} +
+ +  [ PHOTO ] + + {if $trombi_with_admin && hasPerm('admin')} + {icon name=wrench title="[admin]"} + {/if} +
+ + {$set[trombi].prenom} {$set[trombi].nom}{if $trombi_with_promo} ({$set[trombi].promo}){/if} + +
{/if} -- 2.1.4