';
+ }
+ $select .= '';
- return $select;
- }
+ return $select;
+ }
- private function adminactions( GiglogAdmin_Concert $concert ) : string
- {
- return
+ private function adminactions( GiglogAdmin_Concert $concert ) : string
+ {
+ return
'';
- }
-
- /**
- * Display a mark on the concert if it is new.
- * I.e. imported/created within the last ten days.
- *
- * @return null|string
- */
- private function mark_new_concert(GiglogAdmin_Concert $concert) : string
- {
- $now = new DateTime();
- $new_entry = $now->diff($concert->created())->days <= 10;
- if ($new_entry) {
- return 'NEW';
+ . ''
+ . ''
+ . '';
}
- else {
- return '';
+
+ /**
+ * Display a mark on the concert if it is new.
+ * I.e. imported/created within the last ten days.
+ *
+ * @return null|string
+ */
+ private function mark_new_concert(GiglogAdmin_Concert $concert) : string
+ {
+ $now = new DateTime();
+ $new_entry = $now->diff($concert->created())->days <= 10;
+ if ($new_entry) {
+ return 'NEW';
+ }
+ else {
+ return '';
+ }
}
- }
- private function assign_role_for_user_form(string $role, GiglogAdmin_Concert $concert) : ?string
- {
- $roles = $concert->roles();
- $assigned_user = array_key_exists($role, $roles) ? $roles[$role] : NULL;
+ private function assign_role_for_user_form(string $role, GiglogAdmin_Concert $concert) : ?string
+ {
+ $roles = $concert->roles();
+ $assigned_user = array_key_exists($role, $roles) ? $roles[$role] : NULL;
- //first check if current slot is taken by current user
- if ( $assigned_user == $this->username ) {
- $f = '';
- }
- elseif ( $assigned_user ) { //check if slot is taken by another user
- $f = 'Taken'
- . '
Taken by ' . $assigned_user . '
';
- }
- elseif ( array_search($this->username, $roles) ) {
- // other slots for this concert are taken by user
- $f = '-';
- }
- else { //not taken by anyone
- $f = '';
- }
+ }
- return $f;
+ return $f;
+ }
}
}
- }
diff --git a/includes/admin/views/_edit_concert_form.php b/includes/admin/views/_edit_concert_form.php
index 7b0164e..6e4f5e5 100644
--- a/includes/admin/views/_edit_concert_form.php
+++ b/includes/admin/views/_edit_concert_form.php
@@ -52,7 +52,8 @@ if (!class_exists("GiglogAdmin_EditConcertForm"))
.''
.' '
.'' . $this->get_venue_selector($c->venue()) . ' '
- .' '
+ //date has to be formatted else it is not red in the date field of html form
+ .' '
.' '
.' '
.'';
--
cgit v1.2.3