function theme_rooms_booking_add_list in Rooms - Drupal Booking for Hotels, B&Bs and Vacation Rentals 7
Displays the list of available room types for room creation.
1 theme call to theme_rooms_booking_add_list()
- RoomsBookingUIController::addPage in modules/
rooms_booking/ rooms_booking.admin.inc - Create the markup for the add Booking Entities page within the class so it can easily be extended/overriden.
File
- modules/
rooms_booking/ rooms_booking.admin.inc, line 1422 - Rooms editing UI.
Code
function theme_rooms_booking_add_list($variables) {
$content = $variables['content'];
if ($content) {
$output = '<dl class="booking-type-list">';
foreach ($content as $item) {
$output .= '<dt>' . l($item['title'], $item['href']) . '</dt>';
$output .= '<dd>' . filter_xss_admin($item['description']) . '</dd>';
}
$output .= '</dl>';
}
else {
if (user_access('administer booking types')) {
$output = '<p>' . t('Bookings cannot be added because you have not created any booking types yet. Go to the <a href="@create-booking-type">booking type creation page</a> to add a new booking type.', array(
'@create-booking-type' => url('admin/rooms/bookings/booking-types/add'),
)) . '</p>';
}
else {
$output = '<p>' . t('No booking types have been created yet for you to use.') . '</p>';
}
}
return $output;
}