summaryrefslogtreecommitdiffstats
path: root/includes/templates/giglogadmin-concerts-table.php
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2023-03-07 22:36:21 +0100
committerHarald Eilertsen <haraldei@anduin.net>2023-03-07 22:36:21 +0100
commita12086e6813f4a526ccbafbb32713c963258479c (patch)
treee680add56ee4b9335c45cddded1025c8fcc0099a /includes/templates/giglogadmin-concerts-table.php
parent1c6be6b8a5724f5a4162168241062abded4635e7 (diff)
downloadgigologadmin-a12086e6813f4a526ccbafbb32713c963258479c.tar.gz
gigologadmin-a12086e6813f4a526ccbafbb32713c963258479c.tar.bz2
gigologadmin-a12086e6813f4a526ccbafbb32713c963258479c.zip
Add links + pagination to concerts table shortcode.
Diffstat (limited to 'includes/templates/giglogadmin-concerts-table.php')
-rw-r--r--includes/templates/giglogadmin-concerts-table.php95
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>
- &nbsp;—&nbsp;
- <span class="giglogadmin-concert-title">
- <?php echo esc_html( $concert->cname() ); ?>
- </span>
- &nbsp;—&nbsp;
- <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>
- &nbsp;|&nbsp;
- <span class="giglogadmin-concert-ticket-link">
- <a href="<?php echo esc_url( $concert->tickets() ); ?>">
- Tickets
- </a>
- </span>
- &nbsp;|&nbsp;
- <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>
+ &nbsp;—&nbsp;
+ <span class="giglogadmin-concert-title">
+ <?php echo esc_html( $concert->cname() ); ?>
+ </span>
+ &nbsp;—&nbsp;
+ <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>
+ &nbsp;|&nbsp;
+ <span class="giglogadmin-concert-ticket-link">
+ <a href="<?php echo esc_url( $concert->tickets() ); ?>">
+ Tickets
+ </a>
+ </span>
+ &nbsp;|&nbsp;
+ <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>