tripal_views_setup.module 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. require_once 'includes/tripal_views_setup.admin.inc';
  3. function tripal_views_setup_menu(){
  4. $items = array();
  5. //parents admin page TODO: figure out what to do here: add / remove searches
  6. $items['admin/tripal/tripal_views_setup'] = array(
  7. 'title' => t('Tripal Views Setups'),
  8. 'description' => t('Tripal Views Setups settings page, allows you to select and create materialized views and chado tables to use for searches.'),
  9. 'page callback' => 'drupal_get_form',
  10. 'page arguments' => array('tripal_views_setup_admin_form'),
  11. // 'page callback' => 'tripal_views_setup_admin_form_page',
  12. 'access arguments' => array('access administration pages'),
  13. 'type' => MENU_NORMAL_ITEM,
  14. );
  15. //page to actually create searche->mview->chado table relationships
  16. $items['admin/tripal/tripal_views_setup_new'] = array(
  17. 'title' => 'Create New Views Setup',
  18. 'page callback' => 'drupal_get_form',
  19. 'page arguments' => array('tripal_views_setup_new_search_form'),
  20. 'access arguments' => array('access administration pages'), //TODO: figure out the proper permissions arguments
  21. 'type' => MENU_NORMAL_ITEM,
  22. );
  23. return $items;
  24. }
  25. function tripal_views_setup_theme(){
  26. $theme = array();
  27. $theme['tripal_views_setup_form'] = array(
  28. 'arguments' => array('form' => NULL,),
  29. );
  30. return $theme;
  31. }