Fixed pagination (#800)

This commit is contained in:
Roman Kelesidis 2023-06-10 13:30:54 +07:00 committed by GitHub
commit 23544f4acf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 18 additions and 0 deletions

View file

@ -1206,6 +1206,10 @@ function generate_pagination($base_url, $num_items, $per_page, $start_item, $add
$total_pages = ceil($num_items / $per_page); $total_pages = ceil($num_items / $per_page);
if ($total_pages == 1 || $num_items == 0) { if ($total_pages == 1 || $num_items == 0) {
$template->assign_vars(array(
'PAGINATION' => false,
));
return ''; return '';
} }

View file

@ -217,6 +217,7 @@
<!-- END switch_mod_option --> <!-- END switch_mod_option -->
</table> </table>
<!-- IF PAGINATION -->
<div class="bottom_info"> <div class="bottom_info">
<div class="nav"> <div class="nav">
<p style="float: left">{PAGE_NUMBER}</p> <p style="float: left">{PAGE_NUMBER}</p>
@ -224,6 +225,7 @@
<div class="clear"></div> <div class="clear"></div>
</div> </div>
</div><!--/bottom_info--> </div><!--/bottom_info-->
<!-- ENDIF -->
<!-- IF PENDING_USERS --> <!-- IF PENDING_USERS -->
<table class="forumline"> <table class="forumline">
@ -304,6 +306,7 @@
</tfoot> </tfoot>
</table> </table>
<!-- IF PAGINATION -->
<div class="bottom_info"> <div class="bottom_info">
<div class="nav"> <div class="nav">
<p style="float: left">{PAGE_NUMBER}</p> <p style="float: left">{PAGE_NUMBER}</p>
@ -311,6 +314,7 @@
<div class="clear"></div> <div class="clear"></div>
</div> </div>
</div> </div>
<!-- ENDIF -->
<!-- ENDIF / RELEASES --> <!-- ENDIF / RELEASES -->
<!--========================================================================--> <!--========================================================================-->

View file

@ -60,11 +60,13 @@
<div class="bottom_info"> <div class="bottom_info">
<!-- IF PAGINATION -->
<div class="nav"> <div class="nav">
<p style="float: left">{PAGE_NUMBER}</p> <p style="float: left">{PAGE_NUMBER}</p>
<p style="float: right">{PAGINATION}</p> <p style="float: right">{PAGINATION}</p>
<div class="clear"></div> <div class="clear"></div>
</div> </div>
<!-- ENDIF -->
<div class="spacer_4"></div> <div class="spacer_4"></div>

View file

@ -106,11 +106,13 @@
<div class="spacer_6"></div> <div class="spacer_6"></div>
<!-- IF PAGINATION -->
<div class="nav"> <div class="nav">
<p style="float: left">{PAGE_NUMBER}</p> <p style="float: left">{PAGE_NUMBER}</p>
<p style="float: right">{PAGINATION}</p> <p style="float: right">{PAGINATION}</p>
<div class="clear"></div> <div class="clear"></div>
</div> </div>
<!-- ENDIF -->
<div class="spacer_4"></div> <div class="spacer_4"></div>

View file

@ -218,11 +218,13 @@ function show_edit_options ()
<div class="bottom_info"> <div class="bottom_info">
<!-- IF PAGINATION -->
<div class="nav"> <div class="nav">
<p style="float: left">{PAGE_NUMBER}</p> <p style="float: left">{PAGE_NUMBER}</p>
<p style="float: right">{PAGINATION}</p> <p style="float: right">{PAGINATION}</p>
<div class="clear"></div> <div class="clear"></div>
</div> </div>
<!-- ENDIF -->
<div class="spacer_4"></div> <div class="spacer_4"></div>

View file

@ -447,11 +447,13 @@ $(function(){
<div class="bottom_info"> <div class="bottom_info">
<!-- IF PAGINATION -->
<div class="nav"> <div class="nav">
<p style="float: left">{PAGE_NUMBER}</p> <p style="float: left">{PAGE_NUMBER}</p>
<p style="float: right">{PAGINATION}</p> <p style="float: right">{PAGINATION}</p>
<div class="clear"></div> <div class="clear"></div>
</div> </div>
<!-- ENDIF -->
<div class="spacer_4"></div> <div class="spacer_4"></div>

View file

@ -547,6 +547,7 @@ function build_poll_add_form (src_el)
</tr> </tr>
</table> </table>
<!-- IF PAGINATION -->
<table id="pagination" class="topic" cellpadding="0" cellspacing="0"> <table id="pagination" class="topic" cellpadding="0" cellspacing="0">
<tr> <tr>
<td class="nav pad_6 {PG_ROW_CLASS}"> <td class="nav pad_6 {PG_ROW_CLASS}">
@ -555,6 +556,7 @@ function build_poll_add_form (src_el)
</td> </td>
</tr> </tr>
</table><!--/pagination--> </table><!--/pagination-->
<!-- ENDIF -->
<!-- IF QUICK_REPLY --> <!-- IF QUICK_REPLY -->
<br> <br>