summaryrefslogtreecommitdiffstats
path: root/includes/admin/views/_concerts_table.php
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2022-03-09 21:41:54 +0100
committerHarald Eilertsen <haraldei@anduin.net>2022-03-09 21:41:54 +0100
commit4ceb50835b38f74b68a4d1d1e0d3a32baeeb8b89 (patch)
tree1cf0a87c65b9b3970a775e51848dae1affb90f34 /includes/admin/views/_concerts_table.php
parent82a3901a6d68f088aff335a1bc88b9878e17e990 (diff)
parente1ac66aade5c2d5d2d9f6c6db501fccd9db9be0a (diff)
downloadgigologadmin-4ceb50835b38f74b68a4d1d1e0d3a32baeeb8b89.tar.gz
gigologadmin-4ceb50835b38f74b68a4d1d1e0d3a32baeeb8b89.tar.bz2
gigologadmin-4ceb50835b38f74b68a4d1d1e0d3a32baeeb8b89.zip
Merge remote-tracking branch 'andrea/andreaschanges' into dev
And fixup most whitespace issues while at it.
Diffstat (limited to 'includes/admin/views/_concerts_table.php')
-rw-r--r--includes/admin/views/_concerts_table.php28
1 files changed, 17 insertions, 11 deletions
diff --git a/includes/admin/views/_concerts_table.php b/includes/admin/views/_concerts_table.php
index 7b4338c..091bf83 100644
--- a/includes/admin/views/_concerts_table.php
+++ b/includes/admin/views/_concerts_table.php
@@ -41,13 +41,14 @@ if (!class_exists("GiglogAdmin_ConcertsTable"))
private function render_concert_table_header() : string
{
- $content =
- '<div style="overflow-x:auto;"><table class="assignit">'
- . '<tr class="assignithrow">'
- . ' <th>CITY</th><th>DATE</th><th>NAME</th><th>VENUE</th>';
+ $content = '<div style="overflow-x:auto;"><table class="assignit">';
+ $content.= '<span style="font-size:0.8em;font-style: italic;"> Note: the iCal link will download a file with extension .ical which can be used to add the event to your calendar. For convenience, we set all events with start time at 19:00 but please check the actual event for the correct time.</span>';
+
+ $content.= '<tr class="assignithrow">';
+ $content.= '<th>CITY</th><th>DATE</th><th>NAME</th><th>VENUE</th>';
if (!is_admin()) {
- $content .= '<th>EVENT</th><th>TICKETS</th>';
+ $content .= '<th>EVENT</th><th>TICKETS</th><th>Calendar</th>';
}
else {
$content .= '<th></th><th>PHOTO1</th><th>PHOTO2</th><th>TEXT1</th><th>TEXT2</th><th>STATUS</th>';
@@ -85,7 +86,7 @@ if (!class_exists("GiglogAdmin_ConcertsTable"))
$this->filter['currentuser'] = $this->username;
}
- if (isset($_GET['page_no']) && $_GET['page_no'] != "" && is_numeric($_GET['page_no'])) {
+ if (isset($_GET['page_no']) && $_GET['page_no'] != "" && is_numeric($_GET['page_no']) && isset($_GET['page_no']) == $this->page_no ) {
$this->page_no = intval($_GET['page_no']);
} else {
$this->page_no = 1;
@@ -104,6 +105,11 @@ if (!class_exists("GiglogAdmin_ConcertsTable"))
$this->previous_page = $this->page_no - 1;
$this->next_page = $this->page_no + 1;
+
+ if ($this->page_no > $this->total_no_of_pages ) {
+ $this->page_no = 1;
+ }
+
$this->filter['offset'] = $offset;
$this->filter['recperpage'] = $total_records_per_page;
@@ -200,6 +206,7 @@ if (!class_exists("GiglogAdmin_ConcertsTable"))
$content .= "<td><a target=\"_blank\" href=\"{$concert->tickets()}\">Tickets</a></td>";
}
+ $content .= '<td> <a href="'.get_admin_url().'admin-ajax.php?action=giglog_export_ical&evid='.$concert->id().'">iCal</td>';
$content .= '</tr>';
$last_city = $concert->venue()->city();
}
@@ -233,11 +240,10 @@ if (!class_exists("GiglogAdmin_ConcertsTable"))
$cty = $this->get_filter('city');
$select .= \EternalTerror\ViewHelpers\select_field(
- "city",
- array_map(fn($city) => [$city, $city], GiglogAdmin_Venue::all_cities()),
- $cty,
- "Select city...");
-
+ "city",
+ array_map(fn($city) => [$city, $city], GiglogAdmin_Venue::all_cities()),
+ $cty,
+ "Select city...");
if ( !empty($cty) ) {
//second drop down for venue