Browse Source

Tripal: Working version of tripal bulk loader -now allows any depth of relationships (previous version only allowed 2 levels)

laceysanderson 14 years ago
parent
commit
db4bb07cf5

+ 3 - 2
theme_tripal/tripal_bulk_loader/tripal_bulk_loader_edit_template_base_form.tpl.php

@@ -11,7 +11,7 @@
     
     // generate table
     drupal_add_tabledrag('draggable-table', 'order', 'sibling', 'records-reorder');
-    $header = array('Record Name', 'Chado Table', 'Order');
+    $header = array('Record Name', 'Chado Table', 'Order', '');
     $rows = array();
     foreach (element_children($form['records']['records-data']) as $key) {
       $element = &$form['records']['records-data'][$key];
@@ -21,11 +21,12 @@
       $row[] = drupal_render($element['title']);
       $row[] = drupal_render($element['chado_table']);
       $row[] = drupal_render($element['new_priority']) . drupal_render($element['id']);
+      $row[] = drupal_render($element['submit-add_field']);
       $rows[] = array('data' => $row, 'class' => 'draggable');
     }
     
     print theme('table', $header, $rows, array('id' => 'draggable-table'));
-  
+    
     // Render submit
     print drupal_render($form['records']['submit-reorder']);
     unset($form['records']);

File diff suppressed because it is too large
+ 568 - 505
tripal_bulk_loader/tripal_bulk_loader.admin.inc


+ 12 - 43
tripal_bulk_loader/tripal_bulk_loader.module

@@ -58,6 +58,15 @@ function tripal_bulk_loader_menu() {
       'page callback' => 'drupal_get_form',
       'page arguments' => array('tripal_bulk_loader_add_template_field_form'),
       'access arguments' => array('administer site configuration'),
+      'type' => MENU_CALLBACK,   
+		'file' => 'tripal_bulk_loader.admin.inc',
+	);
+	$items['admin/tripal/tripal_bulk_loader_template/edit/edit_field'] = array(
+      'title' => 'Edit Template Field',
+      'description' => 'Edit an existing field from a tripal bulk loader template.',
+      'page callback' => 'drupal_get_form',
+      'page arguments' => array('tripal_bulk_loader_edit_template_field_form'),
+      'access arguments' => array('administer site configuration'),
       'type' => MENU_CALLBACK,   
 		'file' => 'tripal_bulk_loader.admin.inc',
 	);
@@ -78,51 +87,11 @@ function tripal_bulk_loader_menu() {
       'type' => MENU_CALLBACK,   
 		  'file' => 'tripal_bulk_loader.admin.inc',	
 	);
-	
-	// OLD AHAH-----
-	$items['admin/tripal/tripal_bulk_loader_template/field_extra_options_ahah'] = array(
-      'page callback' => 'tripal_bulk_loader_field_extra_options_ahah',
+	$items['admin/tripal/tripal_bulk_loader_template/edit_field_ahah'] = array(
+      'page callback' => 'tripal_bulk_loader_edit_field_ahah',
       'access arguments' => array('administer site configuration'),
       'type' => MENU_CALLBACK,   
-		  'file' => 'tripal_bulk_loader.admin.inc',
-	);	
-	// Add Field AHAH
-	$items['admin/tripal/tripal_bulk_loader_template/add/chado_column_ahah'] = array(
-      'page callback' => 'tripal_bulk_loader_add_chado_column_ahah',
-      'access arguments' => array('administer site configuration'),
-      'type' => MENU_CALLBACK,   
-		  'file' => 'tripal_bulk_loader.admin.inc',
-	);
-	$items['admin/tripal/tripal_bulk_loader_template/add/field_type_ahah'] = array(
-      'page callback' => 'tripal_bulk_loader_add_field_type_ahah',
-      'access arguments' => array('administer site configuration'),
-      'type' => MENU_CALLBACK,   
-		  'file' => 'tripal_bulk_loader.admin.inc',
-	);
-	$items['admin/tripal/tripal_bulk_loader_template/add/record_group_ahah'] = array(
-      'page callback' => 'tripal_bulk_loader_add_new_record_ahah',
-      'access arguments' => array('administer site configuration'),
-      'type' => MENU_CALLBACK,   
-		  'file' => 'tripal_bulk_loader.admin.inc',
-	);
-
-	$items['admin/tripal/tripal_bulk_loader_template/edit/change_subform_ahah'] = array(
-      'page callback' => 'tripal_bulk_loader_edit_change_subform_ahah',
-      'access arguments' => array('administer site configuration'),
-      'type' => MENU_CALLBACK,   
-		  'file' => 'tripal_bulk_loader.admin.inc',
-	);	
-	$items['admin/tripal/tripal_bulk_loader_template/edit/chado_column_ahah'] = array(
-      'page callback' => 'tripal_bulk_loader_edit_chado_column_ahah',
-      'access arguments' => array('administer site configuration'),
-      'type' => MENU_CALLBACK,   
-		  'file' => 'tripal_bulk_loader.admin.inc',
-	);
-	$items['admin/tripal/tripal_bulk_loader_template/edit/field_type_ahah'] = array(
-      'page callback' => 'tripal_bulk_loader_edit_field_type_ahah',
-      'access arguments' => array('administer site configuration'),
-      'type' => MENU_CALLBACK,   
-		  'file' => 'tripal_bulk_loader.admin.inc',
+		  'file' => 'tripal_bulk_loader.admin.inc',	
 	);
 	
   return $items;

Some files were not shown because too many files changed in this diff