|
@@ -1,16 +1,12 @@
|
|
<?php
|
|
<?php
|
|
|
|
|
|
-function tripal_views_setup_admin(){
|
|
|
|
|
|
+// function tripal_views_setup_admin(){
|
|
// $add_url = url('admin/tripal/tripal_views_setup/new');
|
|
// $add_url = url('admin/tripal/tripal_views_setup/new');
|
|
// $output = "<div id='add-new-search'><a href=\"$add_url\">Add New Search</a><div>";
|
|
// $output = "<div id='add-new-search'><a href=\"$add_url\">Add New Search</a><div>";
|
|
// $output .= drupal_get_form('tripal_views_setup_admin_form');
|
|
// $output .= drupal_get_form('tripal_views_setup_admin_form');
|
|
-//
|
|
|
|
-
|
|
|
|
-//
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- return $rows;
|
|
|
|
-}
|
|
|
|
|
|
+//
|
|
|
|
+ // return $rows;
|
|
|
|
+// }
|
|
|
|
|
|
|
|
|
|
function tripal_views_setup_admin_form(){
|
|
function tripal_views_setup_admin_form(){
|
|
@@ -22,19 +18,24 @@ function tripal_views_setup_admin_form(){
|
|
|
|
|
|
$records = array();
|
|
$records = array();
|
|
while($record = db_fetch_object($query_resulst)){
|
|
while($record = db_fetch_object($query_resulst)){
|
|
- dpm($record, 'record' . (string)$int_i);
|
|
|
|
-
|
|
|
|
- $item_name = 'tripal_views_setup_config_query_record_' . (string)$int_i;
|
|
|
|
-
|
|
|
|
- $form[$item_name] = array(
|
|
|
|
- '#type' => 'checkbox',
|
|
|
|
- '#title' => t($record->name),
|
|
|
|
- '#description' => t('Search of mview ' . $record->mview_id . ' and ' . $record->base_table_name),
|
|
|
|
- '#required' => TRUE,
|
|
|
|
- );
|
|
|
|
-
|
|
|
|
- $int_i++;
|
|
|
|
|
|
+ $records[] = $record;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ dpm($records, 'records');
|
|
|
|
+
|
|
|
|
+ // dpm($record, 'record' . (string)$int_i);
|
|
|
|
+//
|
|
|
|
+ // $item_name = 'tripal_views_setup_config_query_record_' . (string)$int_i;
|
|
|
|
+//
|
|
|
|
+ // $form[$item_name] = array(
|
|
|
|
+ // '#type' => 'checkbox',
|
|
|
|
+ // '#title' => t($record->name),
|
|
|
|
+ // '#description' => t('Search of mview ' . $record->mview_id . ' and ' . $record->base_table_name),
|
|
|
|
+ // '#required' => TRUE,
|
|
|
|
+ // );
|
|
|
|
+//
|
|
|
|
+ // $int_i++;
|
|
|
|
+ // }
|
|
|
|
|
|
$form['featured'] = array(
|
|
$form['featured'] = array(
|
|
'#type' => 'checkboxes',
|
|
'#type' => 'checkboxes',
|
|
@@ -47,35 +48,17 @@ function tripal_views_setup_admin_form(){
|
|
//return system_settings_form($form);
|
|
//return system_settings_form($form);
|
|
}
|
|
}
|
|
|
|
|
|
-function tripal_views_setup_new_search_form(){
|
|
|
|
- $form = array();
|
|
|
|
- $form['tripal_views_setup_config_mview'] = array(
|
|
|
|
- '#type' => 'textfield',
|
|
|
|
- '#title' => t('Materialized View'),
|
|
|
|
- '#description' => t('Select which materialized view needs to be used for this search'),
|
|
|
|
- '#required' => TRUE,
|
|
|
|
- );
|
|
|
|
|
|
+
|
|
|
|
+function tripal_views_setup_form_submit($form_id, $form){
|
|
|
|
+ $form_values = $form['values'];
|
|
|
|
+ $featured = $form_values['featured'];
|
|
|
|
|
|
- /*
|
|
|
|
- $form['tripal_views_setup_config_mview'] = array(
|
|
|
|
- '#type' => 'select',
|
|
|
|
- '#title' => t('Materialized View'),
|
|
|
|
- '#options' => tripal_views_setup_mview_list(),
|
|
|
|
- '#description' => t('Select which materialized view needs to be used for this search'),
|
|
|
|
- '#required' => TRUE,
|
|
|
|
- );
|
|
|
|
|
|
+
|
|
|
|
+}
|
|
|
|
|
|
- $form['tripal_views_setup_config_btable'] = array(
|
|
|
|
- '#type' => 'select',
|
|
|
|
- '#title' => t('Chado base table'),
|
|
|
|
- '#options' => tripal_views_setup_btable_list(),
|
|
|
|
- '#description' => t('Select which chado table needs to be used for this earch'),
|
|
|
|
- '#required' => TRUE,
|
|
|
|
- );
|
|
|
|
|
|
|
|
- dpm($form, 'tripal_views_setup_admin form');
|
|
|
|
- */
|
|
|
|
-
|
|
|
|
|
|
+function tripal_views_setup_new_search_form(){
|
|
|
|
+ $form = array();
|
|
|
|
|
|
return $form;
|
|
return $form;
|
|
}
|
|
}
|