Browse Source

changes for click here to book button

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

12
view/room_reservations_calendar.view.inc

@ -227,22 +227,24 @@ function theme_room_reservations($variables) {
// The time slot can be reserved by the current user.
$viewable_class = '';
$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'))) {
$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,
array('html' => true)
);
$viewable = '';
}
// 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 . "/" .
$time_slot['time'] . "/" . $rid . "'><img src='" . base_path() . drupal_get_path('module', 'room_reservations') .
"/images/clear.png' /></a>";
$time_slot['time'] . "/" . $rid . "'><img style='width:66px;' src='" . base_path() . drupal_get_path('module', 'room_reservations') .
"/images/Click_here_to_book.png' /></a>";
$viewable = '';
}
// END UPEI CHANGES
elseif ($booked_class == 'closed') {
$link = '';
}

Loading…
Cancel
Save