Browse Source

added logic so Button shows up correctly on weekends and changed weekday mornings to 830 timeslot

master
ppound 4 years ago
parent
commit
e57d5b019f
  1. 4
      view/room_reservations_calendar.view.inc

4
view/room_reservations_calendar.view.inc

@ -228,7 +228,7 @@ function theme_room_reservations($variables) {
$viewable_class = '';
$widthclass = '';
// BEGIN UPEI CHANGES
if ($booked_class == 'reservable' && ($time_slot['time'] == '0900' || $time_slot['time'] == '1330' || $time_slot['time'] == '1230') &&
if ($booked_class == 'reservable' && (($day_of_week != 'Saturday' && $day_of_week!= 'Sunday' && ($time_slot['time'] == '0830' || $time_slot['time'] == '1330')) || (($day_of_week == 'Saturday' || $day_of_week == 'Sunday') && $time_slot['time'] == '1230')) &&
(user_access('create room reservations standard') || user_access('create room reservations extended') || user_access('administer room reservations system'))) {
$link = l(
'<img style="width:66px;" src="' . base_path() . drupal_get_path('module', 'room_reservations') . '/images/Click_here_to_book.png" />',
@ -238,7 +238,7 @@ function theme_room_reservations($variables) {
$viewable = '';
}
// The time slot can be reserved by the current user, but the user must login first.
elseif ($booked_class == 'open' && ($time_slot['time'] == '0900' || $time_slot['time'] == '1330' || $time_slot['time'] == '1230')) {
elseif ($booked_class == 'open' && (($day_of_week != 'Saturday' && $day_of_week!= 'Sunday' && ($time_slot['time'] == '0830' || $time_slot['time'] == '1330')) || (($day_of_week == 'Saturday' || $day_of_week == 'Sunday') && $time_slot['time'] == '1230'))) {
$link = "<a href='" . $base_url . "/user/login?destination=node/add/room-reservations-reservation/" . $month_number . "/" . $xday . "/" .
$time_slot['time'] . "/" . $rid . "'><img style='width:66px;' src='" . base_path() . drupal_get_path('module', 'room_reservations') .
"/images/Click_here_to_book.png' /></a>";

Loading…
Cancel
Save