1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[ticket/10968] Render pagination within the template

Since phpBB 2 pagination has been rendered mostly within the source. This
limits just what designers can do with pagination. The current form is also
questionable in terms of "best practice". The aim is to move rendering
completely to the template via the use of a block element. Enabling S_
template vars also allows for control over specific aspects of the
pagination output such as next, previous, active and ellipsis.

Related to this - merging the capabilities of the topic_generate_pagination
with generate_pagination removes an element of duplication.

PHPBB3-10968
This commit is contained in:
Drae
2012-07-04 23:19:59 +01:00
parent b176b86f11
commit 922147f05a
63 changed files with 1039 additions and 268 deletions

View File

@@ -10,11 +10,28 @@
<div class="panel">
<div class="inner">
<!-- IF PAGINATION or TOTAL_TOPICS -->
<!-- IF .pagination or TOTAL_TOPICS -->
<ul class="linklist">
<li class="rightside pagination">
<!-- IF TOTAL_TOPICS --> {TOTAL_TOPICS}<!-- ENDIF -->
<!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
<!-- IF TOTAL_TOPICS --> {TOTAL_TOPICS} &bull; <!-- ENDIF -->
<!-- IF .pagination -->
<a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull;
<ul>
<!-- BEGIN pagination -->
<!-- IF pagination.S_IS_PREV -->
<!-- ELSEIF pagination.S_IS_CURRENT -->
<li class="active"><span>{pagination.PAGE_NUMBER}</span></li>
<!-- ELSEIF pagination.S_IS_ELLIPSIS -->
<li class="ellipsis"><span>{L_ELLIPSIS}</span></li>
<!-- ELSEIF pagination.S_IS_NEXT -->
<!-- ELSE -->
<li><a href="{pagination.PAGE_URL}">{pagination.PAGE_NUMBER}</a></li>
<!-- ENDIF -->
<!-- END pagination -->
</ul>
<!-- ELSE -->
{PAGE_NUMBER}
<!-- ENDIF -->
</li>
</ul>
<!-- ENDIF -->
@@ -42,7 +59,20 @@
<!-- IF topicrow.S_TOPIC_REPORTED --><a href="{topicrow.U_MCP_REPORT}">{REPORTED_IMG}</a><!-- ENDIF -->
<!-- IF topicrow.S_MOVED_TOPIC and S_CAN_DELETE -->&nbsp;<a href="{topicrow.U_DELETE_TOPIC}" class="topictitle">[ {L_DELETE_SHADOW_TOPIC} ]</a><!-- ENDIF -->
<br />
<!-- IF topicrow.PAGINATION --><strong class="pagination"><span>{topicrow.PAGINATION}</span></strong><!-- ENDIF -->
<!-- IF .topicrow.pagination -->
<div class="pagination">
<ul>
<!-- BEGIN pagination -->
<!-- IF topicrow.pagination.S_IS_PREV -->
<!-- ELSEIF topicrow.pagination.S_IS_CURRENT --><li class="active"><span>{topicrow.pagination.PAGE_NUMBER}</span></li>
<!-- ELSEIF topicrow.pagination.S_IS_ELLIPSIS --><li class="ellipsis"><span>{L_ELLIPSIS}</span></li>
<!-- ELSEIF topicrow.pagination.S_IS_NEXT -->
<!-- ELSE --><li><a href="{topicrow.pagination.PAGE_URL}">{topicrow.pagination.PAGE_NUMBER}</a></li>
<!-- ENDIF -->
<!-- END pagination -->
</ul>
</div>
<!-- ENDIF -->
<!-- IF topicrow.ATTACH_ICON_IMG -->{topicrow.ATTACH_ICON_IMG} <!-- ENDIF -->{L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} &raquo; {topicrow.FIRST_POST_TIME} </dt>
<dd class="posts">{topicrow.REPLIES} <dfn>{L_REPLIES}</dfn></dd>
<dd class="lastpost"><span><dfn>{L_LAST_POST} </dfn>{L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL}<br />{topicrow.LAST_POST_TIME}</span>
@@ -72,11 +102,28 @@
<hr />
<!-- IF PAGINATION or TOTAL_TOPICS -->
<!-- IF .pagination or TOTAL_TOPICS -->
<ul class="linklist">
<li class="rightside pagination">
<!-- IF TOTAL_TOPICS --> {TOTAL_TOPICS}<!-- ENDIF -->
<!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
<!-- IF TOTAL_TOPICS --> {TOTAL_TOPICS} &bull; <!-- ENDIF -->
<!-- IF .pagination -->
<a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull;
<ul>
<!-- BEGIN pagination -->
<!-- IF pagination.S_IS_PREV -->
<!-- ELSEIF pagination.S_IS_CURRENT -->
<li class="active"><span>{pagination.PAGE_NUMBER}</span></li>
<!-- ELSEIF pagination.S_IS_ELLIPSIS -->
<li class="ellipsis"><span>{L_ELLIPSIS}</span></li>
<!-- ELSEIF pagination.S_IS_NEXT -->
<!-- ELSE -->
<li><a href="{pagination.PAGE_URL}">{pagination.PAGE_NUMBER}</a></li>
<!-- ENDIF -->
<!-- END pagination -->
</ul>
<!-- ELSE -->
{PAGE_NUMBER}
<!-- ENDIF -->
</li>
</ul>
<!-- ENDIF -->