You are here

function theme_wikitools_create_notice in Wikitools 6

Same name and namespace in other branches
  1. 5 wikitools.module \theme_wikitools_create_notice()
  2. 7 wikitools.pages.inc \theme_wikitools_create_notice()
3 theme calls to theme_wikitools_create_notice()
theme_wikitools_page_does_not_exist in ./wikitools.pages.inc
theme_wikitools_page_found in ./wikitools.pages.inc
Theme functions
theme_wikitools_page_moved in ./wikitools.pages.inc

File

./wikitools.pages.inc, line 167
Page callbacks for wikitools pages.

Code

function theme_wikitools_create_notice($page_name) {
  $output = '';
  $node_types = wikitools_node_types();
  if (wikitools_node_creation() && count($node_types)) {
    $create = '';
    $count = 0;
    foreach ($node_types as $type) {
      $type = node_get_types('type', $type);
      if (node_access('create', $type->type)) {
        $create .= '<dt><a href="' . wikitools_create_url($type, $page_name) . '">' . $type->name . '</a></dt>';
        $create .= '<dd>' . filter_xss_admin($type->description) . '</dd>';
      }
    }
    if ($create) {
      $output .= '<p>' . t('You can create the page as:') . '</p>';
      $output .= '<dl>' . $create . '</dl>';
    }
  }
  return $output;
}