Răsfoiți Sursa

Bug Fix: Bulk Loader Help page WSOD; also added more information to the help page including a link to the user manual

Lacey Sanderson 9 ani în urmă
părinte
comite
abec2e5a78

+ 0 - 11
tripal_bulk_loader/theme/templates/tripal_bulk_loader_admin.tpl.php

@@ -1,11 +0,0 @@
-<h3>Module Description:</h3>
-<p>This module allows you to create loading templates for any tab-delimited
-   data file which can be used repetitively for loading data into chado. The Loading Templates are a direct mapping
-   between the columns in your file and the columns in chado tables. To use this tool
-   you need to be very familar with the chado schema -See
-   <?php  l(t('Chado -Getting Started'), 'http://gmod.org/wiki/Chado_-_Getting_Started') ?>.
-   The ability to add constants and specify values via foreign key contraints is also provided
-   in order for the loader to fill chado columns which may be required but are not specified
-   in your input file.
-</p>
-<br />

+ 35 - 0
tripal_bulk_loader/theme/templates/tripal_bulk_loader_help.tpl.php

@@ -0,0 +1,35 @@
+<p>The bulk loader is a tool that Tripal provides for loading of data contained in tab 
+delimited files. Tripal supports loading of files in standard formats (e.g. FASTA, GFF, OBO), 
+but Chado can support a variety of different biological data types and there are often no 
+community standard file formats for loading these data. For example, there is no file 
+format for importing genotype and phenotype data. Those data can be stored in the feature, 
+stock and natural diversity tables of Chado. The Bulk Loader was introduced in Tripal v1.1 
+and provides a web interface for building custom data loader. In short, the site developer 
+creates the bulk loader "template". This template can then be used and re-used for any tab 
+delimited file that follows the format described by the template. Additionally, bulk loading 
+templates can be exported allowing Tripal sites to share loaders with one another.  Loading 
+templates that have been shared are available on the Tripal website here: 
+<?php print l('http://tripal.info/extensions/bulk-loader-templates', 'http://tripal.info/extensions/bulk-loader-templates');?>.</p>
+<br />
+<h3>General Usage</h3>
+<ol>
+<li><strong>Plan how to store your data.</strong>
+  <br />This is the most important and often the most difficult step. This
+  is because it requires familiarity with the Chado database schema and due to the
+  flexibility of the schema, you may be able to store your data multiple ways. It is
+  considered best practice to consult the GMOD website and the Chado community (via the 
+  <?php print l('gmod-schema mailing list', 'https://lists.sourceforge.net/lists/listinfo/gmod-schema');?>) when deciding how to store data.</li>
+<li><strong>Create a new Bulk Loading Template to map the columns from your data file to chado.</strong>
+  <br />Creating a new template can be done by clicking on the "Templates" tab above
+  and then the "Add Template" link. Note that the template is designed with a single line
+  from your file in mind. Furthermore, the term "record" refers to a single entry in chado
+  and the term "field" refers to a column in a specific chado table.</li>
+<li><strong>Create a Bulk Loader Job with file-specific details that uses your template to load a 
+specific file.</strong>
+  <br />Create a Bulk Loading Job by clicking on the "Jobs" tab above and then "Add Bulk 
+  Loading Job". Remember to select the template you just created and to ensure that you
+  provide the absolute path to the file. Note: The file must already be uploaded to the
+  same server as your Drupal installation and must be readable by the command-line
+  user who executes the tripal job.</li>
+</ol>
+<p>For the full tutorial, see the <?php print l('Tripal User Manual: The Bulk Loader', 'http://tripal.info/node/109');?>.</p>

+ 5 - 4
tripal_bulk_loader/tripal_bulk_loader.module

@@ -84,7 +84,8 @@ function tripal_bulk_loader_menu() {
   $items['admin/tripal/loaders/bulk/help'] = array(
     'title' => 'Help',
     'description' => "A description of the Tripal Bulk Loader module including a short description of it's usage.",
-    'page callback' => 'tripal_bulk_loader_admin_manage_templates',
+    'page callback' => 'theme',
+    'page arguments' => array('tripal_bulk_loader_help'),
     'access arguments' => array('administer tripal_bulk_loader'),
     'weight' => 10,
     'type' => MENU_LOCAL_TASK,
@@ -325,9 +326,9 @@ function tripal_bulk_loader_theme($existing, $type, $theme, $path) {
       ),
     ),
 
-    // admin theme
-    'tripal_bulk_loader_admin' => array(
-      'template' => 'tripal_bulk_loader_admin',
+    // help page
+    'tripal_bulk_loader_help' => array(
+      'template' => 'tripal_bulk_loader_help',
       'path' => "$path/theme/templates",
     ),