1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- <?php
- require_once 'includes/tripal_views_setup.admin.inc';
- function tripal_views_setup_menu(){
- $items = array();
-
- //parents admin page TODO: figure out what to do here: add / remove searches
- $items['admin/tripal/tripal_views_setup'] = array(
- 'title' => t('Tripal Views Setups'),
- 'description' => t('Tripal Views Setups settings page, allows you to select and create materialized views and chado tables to use for searches.'),
- 'page callback' => 'drupal_get_form',
- 'page arguments' => array('tripal_views_setup_admin_form'),
- 'access arguments' => array('access administration pages'),
- 'type' => MENU_NORMAL_ITEM,
- );
-
- //page to actually create searche->mview->chado table relationships
- $items['admin/tripal/tripal_views_setup/new'] = array(
- 'title' => 'Create New Views Setup',
- 'page callback' => 'drupal_get_form',
- 'page arguments' => array('tripal_views_setup_new_search_form'),
- 'access arguments' => array('access administration pages'), //TODO: figure out the proper permissions arguments
- 'type' => MENU_NORMAL_ITEM,
- );
-
- return $items;
- }
- /* this needs to go into the function tripal_views_setup_block()
- $limitnum = variable_get("onthisdate_maxdisp", 3);
- $query = "SELECT nid, title, created FROM " .
- "{node} WHERE created >= %d " .
- "AND created <= %d";
- $query_result = db_query_range($query, $start_time, $end_time, 0, $limitnum);
- */
- //TODO: validation for the admin pages
- function tripal_views_setup_theme(){
- $theme = array();
-
- $theme['tripal_views_setup_form'] = array(
- 'arguments' => array('form' => NULL,),
- );
-
- return $theme;
- }
- function theme_tripal_views_setup_form($form){
- // return tripal_helper_form_themeform($form, array('name', 'setup_id', 'mview_id', 'base_table_name', 'description'));
- }
|