tripal_views_setup.module 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. require_once 'includes/tripal_views_setup.admin.inc';
  3. function tripal_views_setup_menu(){
  4. $items = array();
  5. $items['admin/tripal/tripal_views_setup'] = array(
  6. 'title' => t('Tripal Views Setups'),
  7. 'description' => t('Tripal Views Setups settings page, allows you to select and create materialized views and chado tables to use for searches.'),
  8. 'page callback' => 'drupal_get_form',
  9. 'page arguments' => array('tripal_views_setup_admin_form'),
  10. // 'page callback' => 'tripal_views_setup_admin_form_page',
  11. 'access arguments' => array('access administration pages'),
  12. 'type' => MENU_NORMAL_ITEM,
  13. );
  14. //page to actually create searche->mview->chado table relationships
  15. $items['admin/tripal/tripal_views_setup_new'] = array(
  16. 'title' => 'Create New Views Setup',
  17. 'page callback' => 'drupal_get_form',
  18. 'page arguments' => array('tripal_views_setup_new_search_form'),
  19. 'access arguments' => array('access administration pages'), //TODO: figure out the proper permissions arguments
  20. 'type' => MENU_NORMAL_ITEM,
  21. );
  22. // $items['admin/tripal/tripal_views_setup_new/ajax/mview_column'] = array(
  23. // 'title' => 'Get Mview Columns',
  24. // 'page callback' => 'tripal_views_setup_ajax_db_mview_columns',
  25. // 'access arguments' => array('access administration pages'),
  26. // 'type' => MENU_CALLBACK,
  27. // );
  28. // $items['admin/tripal/tripal_views_setup_new/ajax/base_table_name'] = array(
  29. // 'title' => 'Get Chado Tables',
  30. // 'page callback' => 'tripal_views_setup_ajax_db_chado_tables',
  31. // 'access arguments' => array('access administration pages'),
  32. // 'type' => MENU_CALLBACK,
  33. // );
  34. return $items;
  35. }
  36. function tripal_views_setup_theme(){
  37. $theme = array();
  38. $theme['tripal_views_setup_form'] = array(
  39. 'arguments' => array('form' => NULL,),
  40. );
  41. return $theme;
  42. }