123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228 |
- <?php
- require_once 'api/tripal_contact.DEPRECATED.inc';
- require_once 'theme/tripal_contact.theme.inc';
- require_once 'includes/tripal_contact.admin.inc';
- require_once 'includes/tripal_contact.chado_node.inc';
- function tripal_contact_views_api() {
- return array(
- 'api' => 3.0,
- );
- }
- function tripal_contact_menu() {
- $items = array();
- $items['admin/tripal/legacy/tripal_contact']= array(
- 'title' => 'Contacts',
- 'description' => ('Model persons, institutes, groups, organizations, etc.'),
- 'page callback' => 'tripal_contact_admin_contact_view',
- 'access arguments' => array('administer tripal contact'),
- 'type' => MENU_NORMAL_ITEM
- );
- $items['admin/tripal/legacy/tripal_contact/configuration'] = array(
- 'title' => 'Settings',
- 'description' => 'Integration of Chado contacts.',
- 'page callback' => 'drupal_get_form',
- 'page arguments' => array('tripal_contact_admin'),
- 'access arguments' => array('administer tripal contact'),
- 'type' => MENU_LOCAL_TASK,
- 'weight' => 5
- );
- $items['admin/tripal/legacy/tripal_contact/help']= array(
- 'title' => 'Help',
- 'description' => ('Help with the contact module.'),
- 'page callback' => 'theme',
- 'page arguments' => array('tripal_contact_help'),
- 'access arguments' => array('administer tripal contact'),
- 'type' => MENU_LOCAL_TASK,
- 'weight' => 10
- );
- $items['admin/tripal/legacy/tripal_contact/sync'] = array(
- 'title' => ' Sync',
- 'description' => 'Sync contacts in Chado with Drupal',
- 'page callback' => 'drupal_get_form',
-
- 'page arguments' => array('chado_node_sync_form', 'tripal_contact', 'chado_contact'),
- 'access arguments' => array('administer tripal contact'),
- 'type' => MENU_LOCAL_TASK,
- 'weight' => 0
- );
- $items['admin/tripal/legacy/tripal_contact/chado_contact_toc'] = array(
- 'title' => ' TOC',
- 'description' => 'Manage the table of contents for contact nodes.',
- 'page callback' => 'drupal_get_form',
- 'page arguments' => array('tripal_core_content_type_toc_form', 'chado_contact'),
- 'access arguments' => array('administer tripal contact'),
- 'type' => MENU_LOCAL_TASK,
- 'file' => 'includes/tripal_core.toc.inc',
- 'file path' => drupal_get_path('module', 'tripal_core'),
- 'weight' => 3
- );
- $items['admin/tripal/legacy/tripal_contact/contact/auto_name/%'] = array(
- 'page callback' => 'tripal_autocomplete_contact',
- 'page arguments' => array(6),
- 'access arguments' => array('administer tripal contact'),
- 'type' => MENU_CALLBACK,
- );
- return $items;
- }
- function tripal_contact_search_biological_data_views() {
- return array(
- 'tripal_contact_user_contacts' => array(
- 'machine_name' => 'tripal_contact_user_contacts',
- 'human_name' => 'Contacts',
- 'description' => 'Information about persons, institutes, groups, organizations, etc.',
- 'link' => 'chado/contact'
- ),
- );
- }
- function tripal_contact_theme($existing, $type, $theme, $path) {
- $core_path = drupal_get_path('module', 'tripal_core');
- $items = array(
- 'node__chado_contact' => array(
- 'template' => 'node--chado-generic',
- 'render element' => 'node',
- 'base hook' => 'node',
- 'path' => "$core_path/theme/templates",
- ),
- 'tripal_contact_base' => array(
- 'variables' => array('node' => NULL),
- 'template' => 'tripal_contact_base',
- 'path' => "$path/theme/templates",
- ),
- 'tripal_contact_properties' => array(
- 'variables' => array('node' => NULL),
- 'template' => 'tripal_contact_properties',
- 'path' => "$path/theme/templates",
- ),
- 'tripal_contact_relationships' => array(
- 'variables' => array('node' => NULL),
- 'template' => 'tripal_contact_relationships',
- 'path' => "$path/theme/templates",
- ),
- 'tripal_contact_publications' => array(
- 'variables' => array('node' => NULL),
- 'template' => 'tripal_contact_publications',
- 'path' => "$path/theme/templates",
- ),
- 'tripal_contact_help' => array(
- 'template' => 'tripal_contact_help',
- 'variables' => array(NULL),
- 'path' => "$path/theme/templates",
- ),
- 'tripal_contact_teaser' => array(
- 'variables' => array('node' => NULL),
- 'template' => 'tripal_contact_teaser',
- 'path' => "$path/theme/templates",
- ),
- );
- return $items;
- }
- function tripal_contact_permission() {
- return array(
-
- );
- }
- function tripal_contact_form_alter(&$form, &$form_state, $form_id) {
- if ($form_id == "chado_contact_node_form") {
-
- $form['actions']['preview']['#access'] = FALSE;
-
- unset($form['body']);
- }
- }
|