diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2023-03-07 22:36:21 +0100 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2023-03-07 22:36:21 +0100 |
commit | a12086e6813f4a526ccbafbb32713c963258479c (patch) | |
tree | e680add56ee4b9335c45cddded1025c8fcc0099a /includes/templates | |
parent | 1c6be6b8a5724f5a4162168241062abded4635e7 (diff) | |
download | gigologadmin-a12086e6813f4a526ccbafbb32713c963258479c.tar.gz gigologadmin-a12086e6813f4a526ccbafbb32713c963258479c.tar.bz2 gigologadmin-a12086e6813f4a526ccbafbb32713c963258479c.zip |
Add links + pagination to concerts table shortcode.
Diffstat (limited to 'includes/templates')
-rw-r--r-- | includes/templates/giglogadmin-concerts-table.php | 95 |
1 files changed, 56 insertions, 39 deletions
diff --git a/includes/templates/giglogadmin-concerts-table.php b/includes/templates/giglogadmin-concerts-table.php index f38db3d..3f394c9 100644 --- a/includes/templates/giglogadmin-concerts-table.php +++ b/includes/templates/giglogadmin-concerts-table.php @@ -7,6 +7,9 @@ ?> <style> +.giglogadmin-concerts-filter { + margin-bottom: 0.5em; +} .giglogadmin-concert { margin-bottom: 1em; } @@ -43,45 +46,59 @@ <a href="<?php echo esc_url( site_url( get_page_uri() ) ); ?>">Clear filters</a> </form> </div> -<?php foreach ( $concerts as $concert ) { ?> - <div class="giglogadmin-concert"> - <div class="giglogadmin-concert-title-row"> - <time datetime="<?php echo esc_attr( $concert->cdate()->format( 'c' ) ); ?>"> - <?php echo esc_html( $concert->cdate()->format( 'd.m.Y' ) ); ?> - </time> - — - <span class="giglogadmin-concert-title"> - <?php echo esc_html( $concert->cname() ); ?> - </span> - — - <span class="giglogadmin-concert-city"> - <?php echo esc_html( $concert->venue()->city() ); ?> - </span> - </div> - <div class="giglogadmin-concert-meta-row"> - <span class="giglogadmin-concert-venue"> - <?php echo esc_html( $concert->venue()->name() ); ?> - </span> - </div> - <div class="giglogadmin-concert-links"> - <span class="giglogadmin-event-link"> - <a href="<?php echo esc_url( $concert->eventlink() ); ?>"> - Event - </a> - </span> - | - <span class="giglogadmin-concert-ticket-link"> - <a href="<?php echo esc_url( $concert->tickets() ); ?>"> - Tickets - </a> - </span> - | - <span class="giglogadmin-concert-ical-link"> - <a href=""> - Add to calendar - </a> - </span> + <div class="giglogadmin-concerts-table-list"> + <?php foreach ( $concerts as $concert ) { ?> + <div class="giglogadmin-concert"> + <div class="giglogadmin-concert-title-row"> + <time datetime="<?php echo esc_attr( $concert->cdate()->format( 'c' ) ); ?>"> + <?php echo esc_html( $concert->cdate()->format( 'd.m.Y' ) ); ?> + </time> + — + <span class="giglogadmin-concert-title"> + <?php echo esc_html( $concert->cname() ); ?> + </span> + — + <span class="giglogadmin-concert-city"> + <?php echo esc_html( $concert->venue()->city() ); ?> + </span> + </div> + <div class="giglogadmin-concert-meta-row"> + <span class="giglogadmin-concert-venue"> + <?php echo esc_html( $concert->venue()->name() ); ?> + </span> + </div> + <div class="giglogadmin-concert-links"> + <span class="giglogadmin-event-link"> + <a href="<?php echo esc_url( $concert->eventlink() ); ?>"> + Event + </a> + </span> + | + <span class="giglogadmin-concert-ticket-link"> + <a href="<?php echo esc_url( $concert->tickets() ); ?>"> + Tickets + </a> + </span> + | + <span class="giglogadmin-concert-ical-link"> + <a href=""> + Add to calendar + </a> + </span> + </div> </div> + <?php } ?> + </div> + <div class="giglogadmin-concerts-table-pagination"> + <?php + echo paginate_links( + array( + 'base' => site_url( get_page_uri() ) . '%_%', + 'total' => $pages, + 'current' => $page, + 'format' => '?pg=%#%', + ) + ); + ?> </div> -<?php } ?> </div> |