summaryrefslogtreecommitdiffstats
path: root/includes/templates
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2023-01-29 13:35:44 +0100
committerHarald Eilertsen <haraldei@anduin.net>2023-01-29 13:35:44 +0100
commit3aa6c640bbdcd0fa7e3a396721d4170e797eb765 (patch)
tree92cd3289233870a816de083552e00dbb3c9cebbb /includes/templates
parentc2354e7397f44998691dfe8241e49c5a65f66dcc (diff)
downloadgigologadmin-3aa6c640bbdcd0fa7e3a396721d4170e797eb765.tar.gz
gigologadmin-3aa6c640bbdcd0fa7e3a396721d4170e797eb765.tar.bz2
gigologadmin-3aa6c640bbdcd0fa7e3a396721d4170e797eb765.zip
Make the shortcode to display concerts nicer.
Does not currently have the filtering options that the old code had, but the presentation is much nicer. Also the code is way simpler. Should be able to reuse this for the concert listing in the backend, but I'm leaving that alone for now.
Diffstat (limited to 'includes/templates')
-rw-r--r--includes/templates/giglogadmin-concerts-table.php70
1 files changed, 70 insertions, 0 deletions
diff --git a/includes/templates/giglogadmin-concerts-table.php b/includes/templates/giglogadmin-concerts-table.php
new file mode 100644
index 0000000..f5ca911
--- /dev/null
+++ b/includes/templates/giglogadmin-concerts-table.php
@@ -0,0 +1,70 @@
+<?php
+/**
+ * Template for public concerts table.
+ *
+ * @package giglogadmin
+ */
+
+?>
+<style>
+.giglogadmin-concert {
+ margin-bottom: 1em;
+}
+.giglogadmin-concert > * {
+ padding: 2px;
+}
+.giglogadmin-concert-meta-row {
+ font-size: small;
+}
+.giglogadmin-concert-title-row {
+ background-color: #c17878;
+ color: white;
+ font-size: larger;
+}
+.giglogadmin-concert-links {
+ font-size: small;
+}
+</style>
+<div class="giglogadmin-concerts-table">
+<?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>