From bfc7668eb0e614e7085768636423d37b8d87773e Mon Sep 17 00:00:00 2001 From: AndreaChirulescu Date: Sun, 5 Sep 2021 19:52:01 +0200 Subject: CHanges in the concerts table for logged/non logged user. Fixed row header with city --- includes/admin/views/_concerts_table.php | 49 +++++++++++++++++++------------- 1 file changed, 30 insertions(+), 19 deletions(-) (limited to 'includes/admin/views/_concerts_table.php') diff --git a/includes/admin/views/_concerts_table.php b/includes/admin/views/_concerts_table.php index a9e254e..53e62b4 100644 --- a/includes/admin/views/_concerts_table.php +++ b/includes/admin/views/_concerts_table.php @@ -34,11 +34,13 @@ if (!class_exists("GiglogAdmin_ConcertsTable")) $content = ''; // $content .= ''; - $content .= ' - - - '; - if (current_user_can('administrator')) + $content .= ''; + if(!is_user_logged_in()) + $content .= ''; + + else + $content .= ''; + if (current_user_can('administrator')) $content .= ''; $content .= ''; @@ -62,36 +64,44 @@ if (!class_exists("GiglogAdmin_ConcertsTable")) $content .= ''; if ($lastType != '' && $lastType != $concert->venue()->city()) { - $content .= ''; + $content .= '">'; } if ($lastType == '' ) { - $content .= ''; + $content .= ''; } // Modify these to match the database structure // $content .= ''; - $content .= ''; - $content .= ''; + // $content .= ''; + if ($lastType != '' && $lastType == $concert->venue()->city()) $content .= ''; + $content .= ''; $content .= ''; $fdate = strtotime($concert->cdate()); $newformat = date('d.M.Y',$fdate); //$content .= DATE_FORMAT($fdate,'%d.%b.%Y'); - $content .= ''; - $content .= ''; + $content .= ''; + if(!is_user_logged_in()){ + $content .= ''; + $content .= ''; + + } + else { + $content .= ''; - $content .= ''; - $content .= ''; - $content .= ''; - $content .= ''; + $content .= ''; + $content .= ''; + $content .= ''; + $content .= ''; - $content .= ''; + $content .= ''; - if (current_user_can('administrator')) { - $content .= + if (current_user_can('administrator')) { + $content .= ''; + } } $content .= ''; $lastType = $concert->venue()->city(); @@ -125,11 +135,12 @@ if (!class_exists("GiglogAdmin_ConcertsTable")) filter_input(INPUT_POST, 'selectvenue', FILTER_SANITIZE_SPECIAL_CHARS), "Select venue..."); } + if(is_user_logged_in()) { //option to select own concerts only $select .= ''; - + } $select .= ''; return $select; -- cgit v1.2.3
CITYIDBANDVENUEDATE
CITYNAMEVENUEDATE PHOTO1PHOTO2TEXT1TEXT2STATUS
CITYNAMEVENUEDATEEVENTTICKETS PHOTO1PHOTO2TEXT1TEXT2STATUSAdminOptions
' . $concert->venue()->city() . '
' . $concert->venue()->city() . '' . $concert->venue()->city() . '
' . $concert->venue()->city() . '' . $row->id. '' . $concert->cname() . '' . $row->id. ''. $concert->cname() . '' . $concert->venue()->name() . '' . $newformat . '' . $this->mark_new_concert($concert) . '' . $newformat . 'LinkTickets' . $this->mark_new_concert($concert) . '' . $this->assign_role_for_user_form('photo1', $concert) . '' . $this->assign_role_for_user_form('photo2', $concert) . '' . $this->assign_role_for_user_form('rev1', $concert) . '' . $this->assign_role_for_user_form('rev2', $concert) . '' . $this->assign_role_for_user_form('photo1', $concert) . '' . $this->assign_role_for_user_form('photo2', $concert) . '' . $this->assign_role_for_user_form('rev1', $concert) . '' . $this->assign_role_for_user_form('rev2', $concert) . '' . self::STATUS_LABELS[$concert->status()] . '' . self::STATUS_LABELS[$concert->status()] . '' . $this->adminactions($concert) . '