Browse Source

adding new fields + more misc progress

alexgl 13 years ago
parent
commit
0cef1cd494

+ 33 - 11
base/tripal_views_search/includes/tripal_views_search.admin.inc

@@ -11,8 +11,38 @@ function tripal_views_search_admin(){
 
 
 function tripal_views_search_admin_form(){
+	
+	$query_resulst = db_query('SELECT * FROM public.tripal_views_search;');
+	
 	$form = array();
+	$int_i = 0; 
+	while($record = db_fetch_object($query_resulst)){
+		dpm($record, 'record' . (string)$int_i);
+		
+		$item_name = 'query-record-' . (string)$int_i; 
+		$form[$item_name] = array(
+			'#type' => '#checkbox',
+			'#title' => t('Search '),
+			'#description' => t('')
+		);
+		
+	 	$int_i++;	
+	}
+	
 
+	return system_settings_form($form);
+}
+
+function tripal_views_search_new_search_form(){
+	$form = array();
+		$form['tripal_views_search_config_mview'] = array(
+		'#type' => 'textfield',
+		'#title' => t('Materialized View'),
+		'#description' => t('Select which materialized view needs to be used for this search'),
+		'#required' => TRUE,
+	);
+	
+	/*
 	$form['tripal_views_search_config_mview'] = array(
 		'#type' => 'select',
 		'#title' => t('Materialized View'),
@@ -30,17 +60,9 @@ function tripal_views_search_admin_form(){
 	);
 
 	dpm($form, 'tripal_views_search_admin form');
-	return system_settings_form($form);
-}
-
-function tripal_views_search_new_search_form(){
-	$form = array();
-		$form['tripal_views_search_config_mview'] = array(
-		'#type' => 'textfield',
-		'#title' => t('Materialized View'),
-		'#description' => t('Select which materialized view needs to be used for this search'),
-		'#required' => TRUE,
-	);
+	 */
+	
+	
 	return $form;
 }
 

+ 7 - 0
base/tripal_views_search/tripal_views_search.install

@@ -29,6 +29,13 @@ function tripal_views_search_schema(){
 				'not null' => TRUE,
 				'default' => '0',
 			),
+			'name' => array(
+				'description' => 'Human readable name of this search',
+				'type' => 'varchar',
+				'length' => 255,
+				'not null' => TRUE,
+				'default' => '',
+			),
 		),
 		'unique_keys' => array(
 			'tripal_search_id' => array('tripal_search_id'),

+ 0 - 14
base/tripal_views_search/tripal_views_search.module

@@ -15,20 +15,6 @@ function tripal_views_search_menu(){
 	  'type' => MENU_NORMAL_ITEM,
 	);
 	
-	/////////////////////////////////
-	
-	 // managing relationship aggregates
-   // $items['admin/tripal/tripal_feature/aggregate'] = array(
-     // 'title' => 'Feature Relationship Aggegators',
-     // 'description' => t('Features have relationships with other features and it may be desirable to aggregate the content from one ore more child or parent feature.'),
-     // 'page callback' => 'tripal_feature_aggregator_page',
-     // 'access arguments' => array('manage chado_feature aggregator'),
-     // 'type' => MENU_NORMAL_ITEM,
-   // );
-	
-	
-	//////////////////////////
-	
 	//page to actually create searche->mview->chado table relationships
  	$items['admin/tripal/tripal_views_search/new'] = array(
 		 'title' => 'Create New Search',