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