function seven_node_add_list

Displays the list of available node types for node creation.

File

drupal/core/themes/seven/template.php, line 44
Functions to support theming in the Seven theme.

Code

function seven_node_add_list($variables) {
  $content = $variables['content'];
  $output = '';
  if ($content) {
    $output = '<ul class="admin-list">';
    foreach ($content as $type) {
      $output .= '<li class="clearfix">';
      $content = '<span class="label">' . check_plain($type->name) . '</span>';
      $content .= '<div class="description">' . filter_xss_admin($type->description) . '</div>';
      $options['html'] = TRUE;
      $output .= l($content, 'node/add/' . $type->type, $options);
      $output .= '</li>';
    }
    $output .= '</ul>';
  }
  else {
    $output = '<p>' . t('You have not created any content types yet. Go to the <a href="@create-content">content type creation page</a> to add a new content type.', array(
      '@create-content' => url('admin/structure/types/add'),
    )) . '</p>';
  }
  return $output;
}