You are here

function theme_bat_event_add_list in Booking and Availability Management Tools for Drupal 7

Displays the list of available unit bundles for unit creation.

1 theme call to theme_bat_event_add_list()
BatEventUIController::addPage in modules/bat_event/bat_event.admin.inc
Create the markup for the add Event Entities page within the class so it can easily be extended/overriden.

File

modules/bat_event/bat_event.admin.inc, line 602
Unit event editing UI.

Code

function theme_bat_event_add_list($variables) {
  $content = $variables['content'];
  if ($content) {
    $output = '<dl class="event-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 event types')) {
      $output = '<p>' . t('Events cannot be added because you have not created any event types yet. Go to the <a href="@create-event-type">event type creation page</a> to add a new event type.', array(
        '@create-event-type' => url('admin/bat/events/event-types/add'),
      )) . '</p>';
    }
    else {
      $output = '<p>' . t('No event types have been created yet for you to use.') . '</p>';
    }
  }
  return $output;
}