Skip to content

Commit

Permalink
Repeat pagination on bottom of events admin. pages
Browse files Browse the repository at this point in the history
  • Loading branch information
joedolson committed Dec 16, 2024
1 parent 3f7bf0f commit acf781f
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/my-calendar-event-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -803,6 +803,11 @@ function mc_list_events() {
<input type='checkbox' class='selectall' id='mass_edit_footer' data-action="mass_edit" /> <label for='mass_edit_footer'><?php esc_html_e( 'Check all', 'my-calendar' ); ?></label>
</div>
</form>
<?php
if ( $num_pages > 1 ) {
printf( "<nav class='tablenav' aria-label='$nav_label'><div class='tablenav-pages'>%s</div></nav>", $page_links );
}
?>
<div class='mc-admin-footer'>
<?php
$status_links = mc_status_links( $allow_filters );
Expand Down
18 changes: 18 additions & 0 deletions src/my-calendar-group-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -962,6 +962,24 @@ function mc_list_groups() {
</div>
</form>
<?php
if ( $num_pages > 1 ) {
printf( "<nav class='tablenav' aria-label='$nav_label'><div class='tablenav-pages'>%s</div></nav>", $page_links );
}
?>
<nav class="mc-admin-footer" aria-label="<?php esc_attr_e( 'Filter Events', 'my-calendar' ); ?>">
<ul class="links">
<li>
<a <?php echo ( isset( $_GET['limit'] ) && 'grouped' === $_GET['limit'] ) ? ' class="active-link"' : ''; ?> href="<?php echo admin_url( 'admin.php?page=my-calendar-manage&groups=true&amp;limit=grouped#my-calendar-admin-table' ); ?>"><?php esc_html_e( 'Grouped Events', 'my-calendar' ); ?></a>
</li>
<li>
<a <?php echo ( isset( $_GET['limit'] ) && 'ungrouped' === $_GET['limit'] ) ? ' class="active-link"' : ''; ?> href="<?php echo admin_url( 'admin.php?page=my-calendar-manage&groups=true&amp;limit=ungrouped#my-calendar-admin-table' ); ?>"><?php esc_html_e( 'Ungrouped Events', 'my-calendar' ); ?></a>
</li>
<li>
<a <?php echo ( isset( $_GET['limit'] ) && 'all' === $_GET['limit'] || ! isset( $_GET['limit'] ) ) ? ' class="active-link"' : ''; ?> href="<?php echo admin_url( 'admin.php?page=my-calendar-manage&groups=true#my-calendar-admin-table' ); ?>"><?php esc_html_e( 'All', 'my-calendar' ); ?></a>
</li>
</ul>
</nav>
<?php
} else {
?>
<p class="mc-none"><?php esc_html_e( 'No events found.', 'my-calendar' ); ?></p>
Expand Down

0 comments on commit acf781f

Please sign in to comment.