tripal_views_setup.module 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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 search->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/ajax/mview_cols'] = array(
  23. 'title' => 'Get MView Columns',
  24. 'page callback' => 'tripal_view_search_ajax_mview_cols',
  25. 'access arguments' => array('access administration pages'),
  26. 'type' => MENU_CALLBACK,
  27. );
  28. // $items['admin/tripal/tripal_views_setup_new/ajax/mview_column'] = array(
  29. // 'title' => 'Get Mview Columns',
  30. // 'page callback' => 'tripal_views_setup_ajax_db_mview_columns',
  31. // 'access arguments' => array('access administration pages'),
  32. // 'type' => MENU_CALLBACK,
  33. // );
  34. // $items['admin/tripal/tripal_views_setup_new/ajax/base_table_name'] = array(
  35. // 'title' => 'Get Chado Tables',
  36. // 'page callback' => 'tripal_views_setup_ajax_db_chado_tables',
  37. // 'access arguments' => array('access administration pages'),
  38. // 'type' => MENU_CALLBACK,
  39. // );
  40. return $items;
  41. }
  42. function tripal_views_setup_theme(){
  43. $theme = array();
  44. $theme['tripal_views_setup_fields_form'] = array(
  45. 'arguments' => array('form' => NULL),
  46. 'template' => 'tripal_views_setup_fields_form',
  47. );
  48. return $theme;
  49. }