Skip to content

Commit 557c297

Browse files
committed
Use woltlab-core-pagination instead of deprecated {pages}
1 parent b90e2cf commit 557c297

File tree

1 file changed

+19
-13
lines changed

1 file changed

+19
-13
lines changed

wcfsetup/install/files/acp/templates/mediaList.tpl

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -95,18 +95,20 @@
9595
</section>
9696
</form>
9797

98-
{hascontent}
98+
{assign var='linkParameters' value=''}
99+
{if $username}{capture append=linkParameters}&username={unsafe:$username|rawurlencode}{/capture}{/if}
100+
{if $q}{capture append=linkParameters}&q={unsafe:$q|rawurlencode}{/capture}{/if}
101+
{if $categoryID}{capture append=linkParameters}&categoryID={$categoryID}{/capture}{/if}
102+
103+
{if $pages > 1}
99104
<div class="paginationTop">
100-
{content}
101-
{assign var='linkParameters' value=''}
102-
{if $username}{capture append=linkParameters}&username={@$username|rawurlencode}{/capture}{/if}
103-
{if $q}{capture append=linkParameters}&q={@$q|rawurlencode}{/capture}{/if}
104-
{if $categoryID}{capture append=linkParameters}&categoryID={@$categoryID}{/capture}{/if}
105-
106-
{pages print=true assign=pagesLinks controller="MediaList" link="pageNo=%d&sortField=$sortField&sortOrder=$sortOrder$linkParameters"}
107-
{/content}
105+
<woltlab-core-pagination
106+
page="{$pageNo}"
107+
count="{$pages}"
108+
url="{link controller='MediaList' sortField=$sortField sortOrder=$sortOrder}{unsafe:$linkParameters}{/link}"
109+
></woltlab-core-pagination>
108110
</div>
109-
{/hascontent}
111+
{/if}
110112

111113
<div class="section tabularBox"{if !$objects|count} style="display: none;{/if}">
112114
<table class="table jsClipboardContainer jsObjectActionContainer" data-object-action-class-name="wcf\data\media\MediaAction" data-type="com.woltlab.wcf.media">
@@ -193,11 +195,15 @@
193195

194196
{if $objects|count}
195197
<footer class="contentFooter">
196-
{hascontent}
198+
{if $pages > 1}
197199
<div class="paginationBottom">
198-
{content}{@$pagesLinks}{/content}
200+
<woltlab-core-pagination
201+
page="{$pageNo}"
202+
count="{$pages}"
203+
url="{link controller='MediaList' sortField=$sortField sortOrder=$sortOrder}{unsafe:$linkParameters}{/link}"
204+
></woltlab-core-pagination>
199205
</div>
200-
{/hascontent}
206+
{/if}
201207

202208
<nav class="contentFooterNavigation">
203209
<ul>

0 commit comments

Comments
 (0)