Skip to content

Commit 9a5b608

Browse files
committed
Use woltlab-core-pagination instead of deprecated {pages}
1 parent 9dff1cd commit 9a5b608

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

templates/conversationList.tpl

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -130,12 +130,18 @@
130130
{event name='boxes'}
131131
{/capture}
132132

133+
{assign var='linkParameters' value=''}
134+
{if $participants}{capture append='linkParameters'}&participants={implode from=$participants item=participant}{unsafe:$participant|rawurlencode}{/implode}{/capture}{/if}
135+
{if $labelID}{capture append='linkParameters'}&labelID={$labelID}{/capture}{/if}
136+
133137
{capture assign='contentInteractionPagination'}
134-
{assign var='participantsParameter' value=''}
135-
{if $participants}{capture assign='participantsParameter'}&participants={implode from=$participants item=participant}{$participant|rawurlencode}{/implode}{/capture}{/if}
136-
{assign var='labelIDParameter' value=''}
137-
{if $labelID}{assign var='labelIDParameter' value="&labelID=$labelID"}{/if}
138-
{pages print=true assign=pagesLinks controller='ConversationList' link="filter=$filter$participantsParameter&pageNo=%d&sortField=$sortField&sortOrder=$sortOrder$labelIDParameter"}
138+
{if $pages > 1}
139+
<woltlab-core-pagination
140+
page="{$pageNo}"
141+
count="{$pages}"
142+
url="{link controller='ConversationList' filter=$filter sortField=$sortField sortOrder=$sortOrder}{unsafe:$linkParameters}{/link}"
143+
></woltlab-core-pagination>
144+
{/if}
139145
{/capture}
140146

141147
{capture assign='contentInteractionButtons'}
@@ -312,11 +318,15 @@
312318
{/if}
313319

314320
<footer class="contentFooter">
315-
{hascontent}
321+
{if $pages > 1}
316322
<div class="paginationBottom">
317-
{content}{@$pagesLinks}{/content}
323+
<woltlab-core-pagination
324+
page="{$pageNo}"
325+
count="{$pages}"
326+
url="{link controller='ConversationList' filter=$filter sortField=$sortField sortOrder=$sortOrder}{unsafe:$linkParameters}{/link}"
327+
></woltlab-core-pagination>
318328
</div>
319-
{/hascontent}
329+
{/if}
320330

321331
{hascontent}
322332
<nav class="contentFooterNavigation">

0 commit comments

Comments
 (0)