function theme_tripal_add_list

3.x TripalEntityUIController.inc theme_tripal_add_list($variables)

Returns HTML for a list of available node types for node creation.

Parameters

$variables: An associative array containing:

  • content: An array of content types.
1 theme call to theme_tripal_add_list()
tripal_add_page in tripal/includes/TripalEntityUIController.inc
Provides a list of TripalEntity types (bundles) for the user to add.

File

tripal/includes/TripalEntityUIController.inc, line 713

Code

function theme_tripal_add_list($variables) {
  $content = $variables['content'];
  $output = '';

  if ($content) {
    $output = '<dl class="node-type-list">';
    foreach ($content as $item) {
      $output .= '<dt>' . l($item['title'], $item['href'], $item['localized_options']) . '</dt>';
      $output .= '<dd>' . filter_xss_admin($item['description']) . '</dd>';
    }
    $output .= '</dl>';
  }
  else {
    $output = tripal_set_message(
    t('This page is for adding Tripal content to your site. However, before you can add data you have to specify what types of data your site will support. For example, if you want to add genes to be displayed to users, you must first create a data type "gene".'), 
    TRIPAL_INFO, 
    array('return_html' => TRUE)
    );
    $output .= '<p>' . t('You have not created any biological data types yet. ' .
      'Go to the <a href="@create-content">data type creation page</a> to ' .
      'add a new data type.', 
    array('@create-content' => url('admin/structure/bio_data/add'))) . '</p>';
  }
  return $output;
}