X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=banana%2Ftemplates%2Fbanana-thread.inc.tpl;h=5660c700cac45918bbb1a8e35d0ecb9171f799f0;hb=8ba04fa3864bf9a31567d92969fd88cf2ff2161e;hp=9bf65fd128ec67a782509436b2e784ad7ade002f;hpb=8bfa4595f72d796e19c1e7e8829c02f4b67e9cde;p=banana.git diff --git a/banana/templates/banana-thread.inc.tpl b/banana/templates/banana-thread.inc.tpl index 9bf65fd..5660c70 100644 --- a/banana/templates/banana-thread.inc.tpl +++ b/banana/templates/banana-thread.inc.tpl @@ -1,8 +1,9 @@ +{capture name=pages} {if $withtitle}
-{if $spool->overview|@count > $msgbypage} -{section name=pages loop=$spool->overview step=$msgbypage} - {if $first >= $smarty.section.pages.index && $first < $smarty.section.pages.index_next} +{if $spool->roots|@count gt $msgbypage} +{section name=pages loop=$spool->roots step=$msgbypage} + {if $first ge $smarty.section.pages.index && $first lt $smarty.section.pages.index_next} {$smarty.section.pages.iteration} {else} {link group=$group first=$smarty.section.pages.index text=$smarty.section.pages.iteration} @@ -11,13 +12,17 @@ {/if}
{/if} +{/capture} + +{$smarty.capture.pages|smarty:nodefaults} {if $withtitle} {else} - + {/if} - {if $spool->overview|@count} - {if $artid}{$spool->toHtml($artid, true)}{else}{$spool->toHtml($first)}{/if} + {if $spool->roots|@count} + {section name=threads loop=$spool->roots step=1 start=$spool->start() max=$spool->context()} + {assign var=overview value=$spool->roots[$smarty.section.threads.index]} + {assign var=id value=$overview->id} + {cycle assign=class values="impair,pair"} + + + + + + {if !$artid && $spool->nextPost($id)} + + + + {/if} + {/section} {else} {/if}
- {if $spool->nextUnread()} + {assign var=nextUnread value=$spool->nextUnread()} + {if $nextUnread} {/if} {"Date"|b} @@ -27,18 +32,31 @@ {if $protocole->canSend()}
{imglink group=$group action=new img=post alt="Nouveau message"|b accesskey=p} + {if $feed_active}{imglink group=$group action=$feed_format img=feed alt="Flux"|b accesskey=f}{/if}
{/if} {"Auteur"|b}
- {"Aperçu de "|b}{link group=$group text=$group} - {"En discussion sur "|b}{link group=$group text=$group}...
{$spool->formatDate($overview)}{$spool->formatSubject($overview)|smarty:nodefaults}{$spool->formatFrom($overview)|smarty:nodefaults}
{$spool->getTree($id)|smarty:nodefaults}
@@ -47,21 +65,10 @@
+{$smarty.capture.pages|smarty:nodefaults} {if $showboxlist} +
{include file="banana-boxlist.inc.tpl" grouplist=$groups withstats=true} {/if} -{if $withtitle} -
-{if $spool->overview|@count > $msgbypage} -{section name=pages loop=$spool->overview step=$msgbypage} - {if $first >= $smarty.section.pages.index && $first < $smarty.section.pages.index_next} - {$smarty.section.pages.iteration} - {else} - {link group=$group first=$smarty.section.pages.index text=$smarty.section.pages.iteration} - {/if} -{/section} -{/if} -
-{/if} {* vim:set et sw=2 sts=2 ts=2 enc=utf-8: *}