added pagination to vanilla topic template

v1.18.x
Baris Soner Usakli
parent 0580d0c8a3
commit aa73a10fc4

@ -19,8 +19,9 @@ define(['composer'], function(composer) {
}, },
topic_name = templates.get('topic_name'), topic_name = templates.get('topic_name'),
currentPage = parseInt(templates.get('currentPage'), 10), currentPage = parseInt(templates.get('currentPage'), 10),
pageCount = parseInt(templates.get('pageCount'), 10), pageCount = parseInt(templates.get('pageCount'), 10);
Topic.postCount = templates.get('postcount');
Topic.postCount = templates.get('postcount');
function fixDeleteStateForPosts() { function fixDeleteStateForPosts() {

@ -1,5 +1,7 @@
<input type="hidden" template-variable="expose_tools" value="{expose_tools}" /> <input type="hidden" template-variable="expose_tools" value="{expose_tools}" />
<input type="hidden" template-variable="topic_id" value="{topic_id}" /> <input type="hidden" template-variable="topic_id" value="{topic_id}" />
<input type="hidden" template-variable="currentPage" value="{currentPage}" />
<input type="hidden" template-variable="pageCount" value="{pageCount}" />
<input type="hidden" template-variable="locked" value="{locked}" /> <input type="hidden" template-variable="locked" value="{locked}" />
<input type="hidden" template-variable="deleted" value="{deleted}" /> <input type="hidden" template-variable="deleted" value="{deleted}" />
<input type="hidden" template-variable="pinned" value="{pinned}" /> <input type="hidden" template-variable="pinned" value="{pinned}" />
@ -201,12 +203,17 @@
<div style="clear:both;"></div> <div style="clear:both;"></div>
</div> </div>
<!-- {usePagination} --> <!-- IF usePagination -->
<ul class="pager"> <div class="text-center">
<li class="previous"><a href="#">&larr; Older</a></li> <ul class="pagination">
<li class="next"><a href="#">Newer &rarr;</a></li> <li class="previous pull-left"><a href="#">&larr; Older</a></li>
</ul> <!-- BEGIN pages -->
<!-- {usePagination} --> <li class="page" data-page="{pages.pageNumber}"><a href="#">{pages.pageNumber}</a></li>
<!-- END pages -->
<li class="next pull-right"><a href="#">Newer &rarr;</a></li>
</ul>
</div>
<!-- ENDIF usePagination -->
<div id="move_thread_modal" class="modal" tabindex="-1" role="dialog" aria-labelledby="Move Topic" aria-hidden="true"> <div id="move_thread_modal" class="modal" tabindex="-1" role="dialog" aria-labelledby="Move Topic" aria-hidden="true">
<div class="modal-dialog"> <div class="modal-dialog">

Loading…
Cancel
Save