You are here

function theme_config_pages_add_list in Config Pages 7

Displays the list of available config_pages types for config_pages creation.

1 theme call to theme_config_pages_add_list()
ConfigPagesUIController::addPage in ./config_pages.admin.inc
Create the markup for the add ConfigPages Entities page within the class so it can easily be extended/overriden.

File

./config_pages.admin.inc, line 517
ConfigPages editing UI.

Code

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