mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-19 15:01:33 +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:
@@ -56,7 +56,20 @@
|
||||
<!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a>
|
||||
<!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED --><a href="{topicrow.U_MCP_QUEUE}">{topicrow.UNAPPROVED_IMG}</a> <!-- ENDIF -->
|
||||
<!-- IF topicrow.S_TOPIC_REPORTED --><a href="{topicrow.U_MCP_REPORT}">{REPORTED_IMG}</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} » {topicrow.FIRST_POST_TIME}
|
||||
</dt>
|
||||
<dd class="lastpost"><span><dfn>{L_LAST_POST} </dfn>{L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL}
|
||||
@@ -69,8 +82,25 @@
|
||||
</ul>
|
||||
<ul class="linklist">
|
||||
<li class="rightside pagination">
|
||||
<!-- IF TOTAL_TOPICS --> {TOTAL_TOPICS} <!-- ENDIF -->
|
||||
<!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> • <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> • <span>{PAGINATION}</span><!-- ELSE --> • {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
|
||||
<!-- IF TOTAL_TOPICS --> {TOTAL_TOPICS} • <!-- ENDIF -->
|
||||
<!-- IF .pagination -->
|
||||
<a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> •
|
||||
<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>
|
||||
<!-- ELSEIF S_TOPIC_NOTIFY -->
|
||||
|
Reference in New Issue
Block a user