From 34e2f4987558a887ab3bc66b47306ec70cdfbd17 Mon Sep 17 00:00:00 2001 From: Philip Häusler Date: Thu, 25 Dec 2014 22:23:18 +0100 Subject: shift signup improvements for shift view --- includes/pages/user_shifts.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'includes/pages/user_shifts.php') diff --git a/includes/pages/user_shifts.php b/includes/pages/user_shifts.php index a727bbcb..603ca993 100644 --- a/includes/pages/user_shifts.php +++ b/includes/pages/user_shifts.php @@ -9,8 +9,8 @@ function user_shifts() { if (User_is_freeloader($user)) redirect(page_link_to('user_myshifts')); - - // Locations laden + + // Locations laden $rooms = sql_select("SELECT * FROM `Room` WHERE `show`='Y' ORDER BY `Name`"); $room_array = array(); foreach ($rooms as $room) @@ -62,8 +62,8 @@ function user_shifts() { if (count($shift) == 0) redirect(page_link_to('user_shifts')); $shift = $shift[0]; - - // Engeltypen laden + + // Engeltypen laden $types = sql_select("SELECT * FROM `AngelTypes` ORDER BY `name`"); $angel_types = array(); $needed_angel_types = array(); @@ -543,14 +543,16 @@ function view_user_shifts() { // qqqqqq $is_free = false; - $shifts_row = date('d.m. H:i', $shift['start']); + $shifts_row = '' . date('d.m. H:i', $shift['start']); $shifts_row .= " – "; $shifts_row .= date('H:i', $shift['end']); $shifts_row .= "
"; - $shifts_row .= '
' . ShiftType($shift['shifttype_id'])['name'] . ''; + $shifts_row .= ShiftType($shift['shifttype_id'])['name']; $shifts_row .= "
"; - $shifts_row .= '' . $shift['title'] . ''; - $shifts_row .= "
"; + if ($shift['title'] != '') { + $shifts_row .= $shift['title']; + $shifts_row .= "
"; + } if (in_array('admin_shifts', $privileges)) $shifts_row .= ' ' . table_buttons(array( button(page_link_to('user_shifts') . '&edit_shift=' . $shift['SID'], glyph('edit'), 'btn-xs'), -- cgit v1.2.3-54-g00ecf