function tripal_pub_menu

2.x tripal_pub.module tripal_pub_menu()
3.x tripal_pub.module tripal_pub_menu()
1.x tripal_pub.module tripal_pub_menu()

Implements hook_menu().

Adds menu items for the tripal_pub module menu. This section gives the outline for the main menu of the Tripal-Publication module

Return value

An array of menu items that is visible within the Drupal Menu, returned as soon as the program is ran

Related topics

File

tripal_pub/tripal_pub.module, line 47
Basic functionality of the pub module

Code

function tripal_pub_menu() {
  $items = array();

  // because the publication search is not views we need to manually add
  // it to the Search Data list in the navigation menu
  $items['chado/publication'] = array(
    'title' => 'Publications',
    'description' => ('Publications such as journal articles, conference proceedings, or other media.'),
    'page callback' => 'tripal_pub_search_page',
    'access arguments' => array('access chado_pub content'),
    'type' => MENU_NORMAL_ITEM
  );

  // for backwards compatibility the same chado/publications is also found
  // at find/publications
  $items['find/publications'] = array(
    'title' => 'Publication Search',
    'description' => ('Search for publications'),
    'page callback' => 'tripal_pub_search_page',
    'access arguments' => array('access chado_pub content'),
    'type' => MENU_CALLBACK
  );

  $items['find/publications/criteria/%/%'] = array(
    'page callback' => 'tripal_pub_search_page_update_criteria',
    'page arguments' => array(5, 6),
    'access arguments' => array('access chado_pub content'),
    'type ' => MENU_CALLBACK,
  );

  $items['admin/tripal/chado/tripal_pub'] = array(
    'title' => 'Publications',
    'description' => ('A documented provenance artefact - publications, documents, personal communication.'),
    'page callback' => 'tripal_pub_admin_pub_view',
    'access arguments' => array('administer tripal pub'),
    'type' => MENU_NORMAL_ITEM
  );

  $items['admin/tripal/chado/tripal_pub/help'] = array(
    'title' => 'Help',
    'description' => ('A module for interfacing the GMOD chado database with Drupal, providing viewing of publications'),
    'page callback' => 'theme',
    'page arguments' => array('tripal_pub_help'),
    'access arguments' => array('administer tripal pub'),
    'type' => MENU_LOCAL_TASK,
    'weight' => 10
  );

  $items['admin/tripal/chado/tripal_pub/configuration'] = array(
    'title' => 'Settings',
    'description' => 'Configure the Tripal publication module.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('tripal_pub_admin'),
    'access arguments' => array('administer tripal pub'),
    'type' => MENU_LOCAL_TASK,
    'weight' => 5
  );

  $items['admin/tripal/chado/tripal_pub/sync'] = array(
    'title' => ' Sync',
    'description' => 'Create pages on this site for libraries stored in Chado',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('chado_node_sync_form', 'tripal_pub', 'chado_pub'),
    'access arguments' => array('administer tripal pub'),
    'type' => MENU_LOCAL_TASK,
    'weight' => 2
  );

  $items['admin/tripal/chado/tripal_pub/chado_pub_toc'] = array(
    'title' => ' TOC',
    'description' => 'Manage the table of contents for pub nodes.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('tripal_core_content_type_toc_form', 'chado_pub'),
    'access arguments' => array('administer tripal pub'),
    'type' => MENU_LOCAL_TASK,
    'file' => 'includes/tripal_core.toc.inc',
    'file path' => drupal_get_path('module', 'tripal_core'),
    'weight' => 3
  );

  $items['admin/tripal/chado/tripal_pub/citation'] = array(
    'title' => 'Citations',
    'description' => 'Update publication citations',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('tripal_pub_citation_form'),
    'access arguments' => array('administer tripal pub'),
    'type' => MENU_LOCAL_TASK,
    'weight' => 1
  );

  $items['admin/tripal/chado/tripal_pub/import_list'] = array(
    'title' => t('Publication Importers'),
    'description' => t('Create and modify importers that can connect to and retreive publications from remote databases.'),
    'page callback' => 'tripal_pub_importers_list',
    'access arguments' => array('administer tripal pub'),
    'type' => MENU_LOCAL_TASK,
    'weight' => 0
  );

  // add a second link for the importer on the data loaders page
  $items['admin/tripal/loaders/pub_import'] = array(
    'title' => t('Publication Importers'),
    'description' => t('Create and modify importers that can connect to and retreive publications from remote databases.'),
    'page callback' => 'tripal_pub_importers_list',
    'access arguments' => array('administer tripal pub'),
    'type' => MENU_NORMAL_ITEM,
  );

  $items['admin/tripal/chado/tripal_pub/import/new'] = array(
    'title' => t('Add an Importer'),
    'description' => t('Add a new publication importer.'),
    'page callback' => 'tripal_pub_importer_setup_page',
    'access arguments' => array('administer tripal pub'),
    'type ' => MENU_CALLBACK,
  );

  $items['admin/tripal/chado/tripal_pub/import/raw/%'] = array(
    'title' => t('Raw Data From Publication Import'),
    'page callback' => 'tripal_get_remote_pub_raw_page',
    'page arguments' => array(6),
    'access arguments' => array('administer tripal pub'),
    'type ' => MENU_CALLBACK,
  );

  $items['admin/tripal/chado/tripal_pub/import/edit/%'] = array(
    'page callback' => 'tripal_pub_importer_setup_page',
    'page arguments' => array(5, 6),
    'access arguments' => array('administer tripal pub'),
    'type ' => MENU_CALLBACK,
  );

  $items['admin/tripal/chado/tripal_pub/import/submit/%'] = array(
    'page callback' => 'tripal_pub_importer_submit_job',
    'page arguments' => array(6),
    'access arguments' => array('administer tripal pub'),
    'type ' => MENU_CALLBACK,
  );

  $items['admin/tripal/chado/tripal_pub/import/delete/%'] = array(
    'page callback' => 'tripal_pub_importer_delete',
    'page arguments' => array(6),
    'access arguments' => array('administer tripal pub'),
    'type ' => MENU_CALLBACK,
  );
  $items['admin/tripal/chado/tripal_pub/import/changedb'] = array(
    'page callback' => 'tripal_pub_importer_setup_page_update_remotedb',
    'page arguments' => array(),
    'access arguments' => array('administer tripal pub'),
    'type ' => MENU_CALLBACK,
  );

  $items['admin/tripal/chado/tripal_pub/import/criteria/%/%'] = array(
    'page callback' => 'tripal_pub_importer_setup_page_update_criteria',
    'page arguments' => array(5, 6),
    'access arguments' => array('administer tripal pub'),
    'type ' => MENU_CALLBACK,
  );

  return $items;
}