Browse Source

Tweaked Tripal Menus and added help/configure links for Core, CV, DB, Organism, Analysis and Views

Lacey Sanderson 11 years ago
parent
commit
0b75ae0055

+ 5 - 12
tripal_analysis/theme/tripal_analysis_admin.tpl.php

@@ -1,10 +1,3 @@
-
-<h3>Tripal Analysis Administrative Tools Quick Links:</h3>
-<ul>
- <li><?php print l('Analysis Configuration', "admin/tripal/tripal_analysis/configuration") ?></li>
-</ul>
-
-
 <h3>Module Description:</h3>
 <p>The Tripal Analysis module provides a new analysis content type that is intended to be
   used when a more specialized analysis module does not exist.  Because it is generic, it does not
@@ -18,13 +11,13 @@
 <ol>
   <li><p><b>Set Permissions</b>: By default only the site administrator account has access to create, edit, delete
    or administer analyses. Navigate to the <?php print l('permissions page', 'admin/user/permissions')?> and set the
-   permissions under the 'tripal_analysis' section as appropriate for your site. For a simple setup, allow anonymous 
+   permissions under the 'tripal_analysis' section as appropriate for your site. For a simple setup, allow anonymous
    users access to view content and create a special role for creating, editing and other administrative tasks.</p></li>
 
 
-  <li><p><b>Create an Analysis</b>:  An analysis should be <?php print l('created', 'node/add/chado-analysis')?> before 
+  <li><p><b>Create an Analysis</b>:  An analysis should be <?php print l('created', 'node/add/chado-analysis')?> before
   data is imported into chado.  The generic analysis type should only be used when a more specialized analysis module
-  (e.g. Tripal Analysis Blast module) does not already exists.  All data imported into Chado should be associated with 
+  (e.g. Tripal Analysis Blast module) does not already exists.  All data imported into Chado should be associated with
   an analysis to help keep track of the source for data.</p></li>
 
   <li><p><b>Sync Analyses</b>:  If you have analyses already stored in Chado and would like to create pages for them, then
@@ -37,9 +30,9 @@
 
 <h3>Additional Features of this Module:</h3>
   <ul>
-    <li><p><b>Simple Search Tool</b>: A <?php print l('simple search tool','chado/analyses') ?> is provided for 
+    <li><p><b>Simple Search Tool</b>: A <?php print l('simple search tool','chado/analyses') ?> is provided for
     finding analyses. This tool relies on Drupal Views.  <a href="http://drupal.org/project/views">Drupal Views</a>
-    which must be installed to see the search tool.  Look for it in the navigation menu under the item 
+    which must be installed to see the search tool.  Look for it in the navigation menu under the item
     "Search Biological Data". </p></li>
 </ul>
 

+ 2 - 0
tripal_analysis/tripal_analysis.info

@@ -4,6 +4,8 @@ core = 7.x
 project = tripal_analysis
 package = Tripal
 version = 7.x-2.0
+configure = admin/tripal/chado/tripal_analysis/configuration
+
 dependencies[] = tripal_core
 dependencies[] = tripal_db
 dependencies[] = tripal_cv

+ 71 - 78
tripal_analysis/tripal_analysis.module

@@ -8,10 +8,10 @@
  * @ingroup tripal_modules
  * @{
  * Provides functions for managing chado analysis' including creating details pages for each one
- * 
+ *
  * @}
- * 
- * 
+ *
+ *
  */
 
 require('api/tripal_analysis.api.inc');
@@ -27,7 +27,7 @@ require('includes/tripal_analysis.form.inc');
  */
 function tripal_analysis_init() {
   drupal_add_js(drupal_get_path('theme', 'tripal') . '/js/tripal_analysis.js');
-  drupal_add_css(drupal_get_path('theme', 'tripal') . '/css/tripal_analysis.css');    
+  drupal_add_css(drupal_get_path('theme', 'tripal') . '/css/tripal_analysis.css');
 }
 
 /**
@@ -63,17 +63,25 @@ function tripal_analysis_menu() {
      'type' => MENU_CALLBACK
   );
   // Tripal Analysis administrative settings
-  $items['admin/tripal/tripal_analysis'] = array(
+  $items['admin/tripal/chado/tripal_analysis'] = array(
       'title' => 'Analyses',
-      'description' => 'Basic Description of Tripal Analysis Module Functionality.',
+      'description' => 'A bioinformatics analysis producing features.',
+      'access arguments' => array('administer tripal analyses'),
+      'type' => MENU_NORMAL_ITEM,
+  );
+
+  $items['admin/tripal/chado/tripal_analysis/help'] = array(
+      'title' => 'Help',
+      'description' => "A description of the Tripal Analysis module including a short description of it's usage.",
       'page callback' => 'theme',
       'page arguments' => array('tripal_analysis_admin'),
       'access arguments' => array('administer tripal analyses'),
       'type' => MENU_NORMAL_ITEM,
       'file' => 'includes/tripal_analysis.admin.inc',
+      'weight' => 10
   );
 
-  $items['admin/tripal/tripal_analysis/configuration'] = array(
+  $items['admin/tripal/chado/tripal_analysis/configuration'] = array(
       'title' => 'Configuration',
       'description' => 'Settings for the displays of analysis results.',
       'page callback' => 'drupal_get_form',
@@ -82,7 +90,7 @@ function tripal_analysis_menu() {
       'type' => MENU_NORMAL_ITEM,
       'file' => 'includes/tripal_analysis.admin.inc',
   );
-     
+
 
   $items['tripal_analysis/properties/minus/%/%'] = array(
     'page callback' => 'tripal_analysis_property_delete',
@@ -90,11 +98,21 @@ function tripal_analysis_menu() {
     'access arguments' => array('edit chado_analysis content'),
     'type ' => MENU_CALLBACK,
   );
-  
-  
+
+
   return $items;
 }
 
+/**
+ * Implements hook_help()
+ * Purpose: Adds a help page to the module list
+ */
+function tripal_analysis_help ($path, $arg) {
+  if ($path == 'admin/help#tripal_analysis') {
+    return theme('tripal_analysis_admin', array());
+  }
+}
+
 /**
  *  When a new chado_analysis node is created we also need to add information
  *  to our chado_analysis table.  This function is called on insert of a new
@@ -121,7 +139,7 @@ function chado_analysis_insert($node) {
       $analysis = $result[0];
     }
   }
-  
+
   // If the analysis doesn't exist then let's create it in chado.
   if (!$analysis) {
     // insert and then get the newly inserted analysis record
@@ -173,10 +191,10 @@ function chado_analysis_insert($node) {
   // use by other analysis modules that may be using this function
   $node->analysis = $analysis;
   $node->analysis_id = $analysis_id; // we need to set this for children
-    
+
   // now add the properties
-  $properties = array(); // stores all of the properties we need to add   
-   
+  $properties = array(); // stores all of the properties we need to add
+
   // get the list of properties for easy lookup (without doing lots of database queries
   $properties_list = array();
   $sql = "
@@ -192,7 +210,7 @@ function chado_analysis_insert($node) {
   while ($prop = $prop_types->fetchObject()) {
     $properties_list[$prop->cvterm_id] = $prop->name;
   }
-    
+
   // get the properties that should be added. Properties are in one of two forms:
   //  1) prop_value-[type id]-[index]
   //  2) new_value-[type id]-[index]
@@ -235,7 +253,7 @@ function chado_analysis_insert($node) {
  */
 function chado_analysis_delete($node) {
   $analysis_id = chado_get_id_for_node('analysis', $node->nid);
-  
+
   // if we don't have an analysis id for this node then this isn't a node of
   // type chado_analysis or the entry in the chado_analysis table was lost.
   if (!$analysis_id) {
@@ -282,38 +300,38 @@ function chado_analysis_update($node) {
 
   // get the analysis_id for this node:
   $sql = "
-    SELECT analysis_id 
-    FROM {chado_analysis} 
+    SELECT analysis_id
+    FROM {chado_analysis}
     WHERE nid = :nid
   ";
   $analysis = db_query($sql, array(':nid' => $node->nid))->fetchObject();
   $analysis_id = $analysis->analysis_id;
 
-  $sql = " 
-    UPDATE {analysis} 
-    SET name = :name, 
-        description = :description, 
-        program = :program, 
-        programversion = :programversion, 
-        algorithm = :algorithm, 
-        sourcename = :sourcename, 
-        sourceversion = :sourceversion, 
-        sourceuri = :sourceuri, 
-        timeexecuted = :timeexecuted 
-    WHERE analysis_id = :analysis_id 
+  $sql = "
+    UPDATE {analysis}
+    SET name = :name,
+        description = :description,
+        program = :program,
+        programversion = :programversion,
+        algorithm = :algorithm,
+        sourcename = :sourcename,
+        sourceversion = :sourceversion,
+        sourceuri = :sourceuri,
+        timeexecuted = :timeexecuted
+    WHERE analysis_id = :analysis_id
   ";
 
   $args = array(
-    ':name' => $node->analysisname, 
-    ':description' => $node->description, 
-    ':program' => $node->program, 
-    ':programversion' => $node->programversion, 
-    ':algorithm' => $node->algorithm, 
-    ':sourcename' => $node->sourcename, 
-    ':sourceversion' => $node->sourceversion, 
-    ':sourceuri' => $node->sourceuri, 
+    ':name' => $node->analysisname,
+    ':description' => $node->description,
+    ':program' => $node->program,
+    ':programversion' => $node->programversion,
+    ':algorithm' => $node->algorithm,
+    ':sourcename' => $node->sourcename,
+    ':sourceversion' => $node->sourceversion,
+    ':sourceuri' => $node->sourceuri,
     ':timeexecuted' => $timestamp,
-    ':analysis_id' => $anslysis_id 
+    ':analysis_id' => $anslysis_id
   );
   chado_query($sql, $args);
 
@@ -448,31 +466,6 @@ function chado_analysis_view($node, $teaser = FALSE, $page = FALSE) {
   return $node;
 }
 
-
-
-
-
-/**
- * Display help and module information
- * @param path which path of the site we're displaying help
- * @param arg array that holds the current path as would be returned from arg()
- * function
- * @return help text for the path
- *
- * @ingroup tripal_analysis
- */
-function tripal_analysis_help($path, $arg) {
-  $output = '';
-  switch ($path) {
-    case "admin/help#tripal_analysis":
-      $output = '<p>' .
-      t("Displays links to nodes created on this date") .
-                '</p>';
-      break;
-  }
-  return $output;
-}
-
 /**
  * Implement hook_access().
  *
@@ -481,7 +474,7 @@ function tripal_analysis_help($path, $arg) {
  *  @param $node
  *  The node on which the operation is to be performed, or, if it does not yet exist, the
  *  type of node to be created
- *  
+ *
  *  @param $op
  *  The operation to be performed
  *
@@ -491,7 +484,7 @@ function tripal_analysis_help($path, $arg) {
  *  @return
  *  If the permission for the specified operation is not set then return FALSE. If the
  *  permission is set then return NULL as this allows other modules to disable
- *  access.  The only exception is when the $op == 'create'.  We will always 
+ *  access.  The only exception is when the $op == 'create'.  We will always
  *  return TRUE if the permission is set.
  *
  * @ingroup tripal_analysis
@@ -568,13 +561,13 @@ function tripal_analysis_theme() {
        'template' => 'tripal_analysis_base',
     ),
     'tripal_feature_analyses' => array(
-      'template' => 'tripal_feature_analyses',  
-      'arguments' =>  array('node' => NULL),  
+      'template' => 'tripal_feature_analyses',
+      'arguments' =>  array('node' => NULL),
     ),
     'tripal_analysis_admin' => array(
-      'template' => 'tripal_analysis_admin',  
-      'arguments' =>  array(NULL),  
-      'path' => drupal_get_path('module', 'tripal_analysis') . '/theme', 
+      'template' => 'tripal_analysis_admin',
+      'arguments' =>  array(NULL),
+      'path' => drupal_get_path('module', 'tripal_analysis') . '/theme',
     ),
      'tripal_analysis_properties' => array(
      'arguments' => array('node' => NULL)
@@ -584,7 +577,7 @@ function tripal_analysis_theme() {
       'arguments' => array('form'),
     ),
   );
-  
+
   return $items;
 }
 /**
@@ -595,10 +588,10 @@ function tripal_analysis_theme() {
 function tripal_analysis_block_info() {
   $blocks['base']['info'] = t('Tripal Analysis Details');
   $blocks['base']['cache'] = BLOCK_NO_CACHE;
-  
+
   $blocks['featureblast']['info'] = t('Tripal Feature Analyses');
   $blocks['featureblast']['cache'] = BLOCK_NO_CACHE;
-  
+
   return $blocks;
 }
 
@@ -614,7 +607,7 @@ function tripal_analysis_block_view($delta = '') {
     $node = node_load($nid);
 
     $block = array();
-    switch ($delta) {       
+    switch ($delta) {
       case 'base':
         $block['subject'] = t('Analysis Details');
         $block['content'] = theme('tripal_analysis_base', $node);
@@ -630,14 +623,14 @@ function tripal_analysis_block_view($delta = '') {
 }
 
 /**
- * 
+ *
  * Implements hook_node_view()
  */
 function tripal_analysis_node_view($node, $view_mode, $langcode) {
   if ($node->type == 'chado_feature') {
     if ($view_mode == 'search_index') {
        // return results for searching
-    } 
+    }
     if ($view_mode == 'full') {
        // return normal results
        $node->content['tripal_feature_analyses'] = array(
@@ -665,7 +658,7 @@ function tripal_analysis_views_api() {
 
 
 /*
- * 
+ *
  */
 function tripal_analysis_form_alter(&$form, &$form_state, $form_id) {
   if ($form_id == "chado_analysis_node_form") {

+ 2 - 1
tripal_core/tripal_core.info

@@ -3,4 +3,5 @@ description = The core module for the Tripal package that integrates Drupal and
 core = 7.x
 project = tripal_core
 package = Tripal
-version = 7.x-2.0
+version = 7.x-2.0
+configure = admin/tripal

+ 63 - 35
tripal_core/tripal_core.module

@@ -7,7 +7,7 @@
  /**
  * @defgroup tripal_modules Tripal Modules
  * @{
- * All documented functions for the various Tripal Modules excluding API functions and Views Integration functions. 
+ * All documented functions for the various Tripal Modules excluding API functions and Views Integration functions.
  * @}
  */
 
@@ -16,12 +16,12 @@
  * @{
  * Provides an application programming interface (API) for Tripal
  *
- * The Tripal API currently provides generic insert/update/select functions for all chado content as 
- * well as some module specific functions that insert/update/delete/select specific chado content. 
+ * The Tripal API currently provides generic insert/update/select functions for all chado content as
+ * well as some module specific functions that insert/update/delete/select specific chado content.
  *
  * This API is currently in its infancy and some necessary functions might be missing. If you find
- * a missing function that you think should be included go to the sourceforge feature request 
- * page and request it's inclusion in the API. Such feature requests with a working function 
+ * a missing function that you think should be included go to the sourceforge feature request
+ * page and request it's inclusion in the API. Such feature requests with a working function
  * definition will be given priority.
  * @}
  */
@@ -58,28 +58,28 @@ require_once "includes/form_elements.inc";
  * @ingroup tripal_core
  */
 function tripal_core_init() {
-  global $base_url;     
-    
-  // add javascript files 
+  global $base_url;
+
+  // add javascript files
   drupal_add_js(drupal_get_path('theme', 'tripal') . '/js/tripal.ahah.js');
-  
+
   // create the 'tripal' controlled volcabulary in chado but only if it doesn't already exist, and
   // only if the chado database is present.
   if (tripal_core_is_chado_installed()) {
-  
+
     // make sure the current version of chado is set
-    tripal_core_set_chado_version();  
-  
+    tripal_core_set_chado_version();
+
     // if the Tripal cv is missing then add
     $results = chado_query("SELECT * FROM {cv} WHERE name = 'tripal'");
-    $tripal_cv = $results->fetchObject();    
+    $tripal_cv = $results->fetchObject();
     if (!$tripal_cv) {
       $results = chado_query(
         "INSERT INTO {cv} (name,definition) " .
         "VALUES ('tripal', 'Terms used by Tripal for modules to manage data such as that stored in property tables like featureprop, analysisprop, etc')"
       );
     }
-    
+
     // if the Tripal db is missing then add it
     $results = chado_query("SELECT * FROM {db} WHERE name = 'tripal'");
     $tripal_db = $results->fetchObject();
@@ -104,16 +104,16 @@ function tripal_core_init() {
   // make sure the date time settings are the way Tripal will insert them
   // otherwise PostgreSQL version that may have a different datestyle setting
   // will fail when inserting or updating a date column in a table.
-  db_query("SET DATESTYLE TO :style", array(':style' => 'MDY')); 
-   
+  db_query("SET DATESTYLE TO :style", array(':style' => 'MDY'));
+
   // If we want AHAH elements on the node forms (e.g. chado_pub form) then we need to include
   // the node.pages file. Otherwise this error message is given:
   //
-  // warning: call_user_func_array() expects parameter 1 to be a valid callback, 
-  // function 'node_form' not found or invalid function name 
+  // warning: call_user_func_array() expects parameter 1 to be a valid callback,
+  // function 'node_form' not found or invalid function name
   // in /var/www/includes/form.inc on line 382.
-  module_load_include('inc', 'node', 'node.pages');    
-  
+  module_load_include('inc', 'node', 'node.pages');
+
 }
 
 /**
@@ -127,10 +127,9 @@ function tripal_core_menu() {
 
   // Triapl setting groups
   $items['admin/tripal'] = array(
-    'title' => 'Tripal Management',
+    'title' => 'Tripal',
     'description' => "Manage the behavior or Tripal and its various modules.",
-    'position' => 'right',
-    'weight' => -5,
+    'weight' => -8,
     'page callback' => 'system_admin_menu_block_page',
     'access arguments' => array('administer site configuration'),
     'file' => 'system.admin.inc',
@@ -138,10 +137,12 @@ function tripal_core_menu() {
   );
   $items['admin/tripal/customize'] = array(
     'title' => 'Customize Tripal',
+    'description' => 'Information on how to customize tripal',
     'position' => 'right',
     'page callback' => 'theme',
     'page arguments' => array('tripal_core_customize'),
     'access arguments' => array('administer site configuration'),
+    'weight' => 10
   );
   $items['admin/tripal/chado_install'] = array(
     'title' => 'Install Chado Schema',
@@ -150,6 +151,7 @@ function tripal_core_menu() {
     'page arguments' => array('tripal_core_chado_load_form'),
     'access arguments' => array('install chado'),
     'type' => MENU_NORMAL_ITEM,
+    'weight' => 10
   );
 
   // Jobs Management
@@ -159,6 +161,7 @@ function tripal_core_menu() {
     'page callback' => 'tripal_jobs_report',
     'access arguments' => array('access administration pages'),
     'type' => MENU_NORMAL_ITEM,
+    'weight' => -10
   );
   $items['admin/tripal/tripal_jobs/cancel/%'] = array(
     'title' => 'Jobs',
@@ -187,51 +190,67 @@ function tripal_core_menu() {
 
   // Materialized Views
   $items['admin/tripal/mviews'] = array(
-    'title' => 'MViews',
+    'title' => 'Materialized Views',
     'description' => 'Materialized views are used to improve speed of large or complex queries.',
+    'access arguments' => array('access administration pages'),
+    'type' => MENU_NORMAL_ITEM,
+    'weight' => -10
+  );
+  $items['admin/tripal/mviews/list'] = array(
+    'title' => 'List Materialized Views',
+    'description' => 'A list of existing materialized views with the ability to edit & delete existing materialized views.',
     'page callback' => 'tripal_mviews_report',
     'access arguments' => array('access administration pages'),
     'type' => MENU_NORMAL_ITEM,
+    'weight' => -10
   );
   $items['admin/tripal/mviews/report/%'] = array(
     'title' => 'Materialized View',
-    'description' => 'Materialized views are used to improve speed of large or complex queries.',
+    'description' => 'Materialized views are used to improve speed of large or complex queries. These are database views as compared to Drupal views.',
     'page callback' => 'tripal_mview_report',
     'page arguments' => array(4),
     'access arguments' => array('access administration pages'),
     'type' => MENU_NORMAL_ITEM,
   );
   $items['admin/tripal/mviews/new'] = array(
-    'title' => 'Create MView',
-    'description' => 'Materialized views are used to improve speed of large or complex queries.',
+    'title' => 'Create Materialized View',
+    'description' => 'Create a new materialized view.',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('tripal_mviews_form'),
     'access arguments' => array('access administration pages'),
-    'type' => MENU_CALLBACK,
+    'type' => MENU_NORMAL_ITEM,
   );
   $items['admin/tripal/mviews/edit/%'] = array(
-    'title' => 'Edit MView',
+    'title' => 'Edit Materialized View',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('tripal_mviews_form', 4),
     'access arguments' => array('access administration pages'),
     'type' => MENU_NORMAL_ITEM,
   );
   $items['admin/tripal/mviews/action/%/%'] = array(
-    'title' => 'Create MView',
+    'title' => 'Create Materialized View',
     'description' => 'Materialized views are used to improve speed of large or complex queries.',
     'page callback' => 'tripal_mviews_action',
     'page arguments' => array(4, 5, "1"),
     'access arguments' => array('access administration pages'),
     'type' => MENU_CALLBACK,
   );
-  
+
   // Custom Tables
   $items['admin/tripal/custom_tables'] = array(
     'title' => 'Custom Tables',
-    'description' => 'Custom tables are added to Chado.',
+    'description' => 'Creation of custom tables that are added to Chado database.',
+    'access arguments' => array('access administration pages'),
+    'type' => MENU_NORMAL_ITEM,
+    'weight' => -10
+  );
+  $items['admin/tripal/custom_tables/list'] = array(
+    'title' => 'List of Custom Tables',
+    'description' => 'Provides a list of all custom tables created by Tripal and allows for editing or removing existing custom tables.',
     'page callback' => 'tripal_custom_tables_list',
     'access arguments' => array('access administration pages'),
     'type' => MENU_NORMAL_ITEM,
+    'weight' => -10
   );
   $items['admin/tripal/custom_tables/view/%'] = array(
     'title' => 'Custom Tables',
@@ -243,10 +262,10 @@ function tripal_core_menu() {
   );
   $items['admin/tripal/custom_tables/new'] = array(
     'title' => 'Create Custom Table',
-    'description' => 'Custom tables are added to Chado.',
+    'description' => 'An interface for creating your own custom tables.',
     'page callback' => 'tripal_custom_table_new_page',
     'access arguments' => array('access administration pages'),
-    'type' => MENU_CALLBACK,
+    'type' => MENU_NORMAL_ITEM,
   );
   $items['admin/tripal/custom_tables/edit/%'] = array(
     'title' => 'Edit Custom Table',
@@ -256,7 +275,7 @@ function tripal_core_menu() {
     'type' => MENU_NORMAL_ITEM,
   );
   $items['admin/tripal/custom_tables/action/%/%'] = array(
-    'title' => 'Create Custom TAble',
+    'title' => 'Create Custom Table',
     'description' => 'Custom tables are added to Chado.',
     'page callback' => 'tripal_custom_tables_action',
     'page arguments' => array(4, 5, "1"),
@@ -264,6 +283,15 @@ function tripal_core_menu() {
     'type' => MENU_CALLBACK,
   );
 
+  // Create menu item for chado-specific module config
+  $items['admin/tripal/chado'] = array(
+    'title' => 'Chado Module-Specific Configuration',
+    'description' => 'Configuration for specific chado data types such as Vocabularies, Features, etc.',
+    'access arguments' => array('access administration pages'),
+    'type' => MENU_NORMAL_ITEM,
+    'weight' => -10
+  );
+
   return $items;
 }
 

+ 11 - 22
tripal_cv/theme/tripal_cv_admin.tpl.php

@@ -1,14 +1,3 @@
-<br><h3>Tripal Controlled Vocabulary Administrative Tools Quick Links</h3>
-    <ul>
-      <li><?php print l('Add a vocabulary', 'admin/tripal/tripal_cv/add_cv') ?></li>
-      <li><?php print l('Edit a vocabulary', 'admin/tripal/tripal_cv/edit_cv') ?></li>
-      <li><?php print l('Load ontology with OBO file', 'admin/tripal/tripal_cv/obo_loader') ?></li>
-      <li><?php print l('Add a term to a vocabulary', 'admin/tripal/tripal_cv/cvterm/add') ?></li>
-      <li><?php print l('Edit a term in a vocabulary', 'admin/tripal/tripal_cv/cvterm/edit') ?></li>      
-      <li><?php print l('Update cvtermpath', 'admin/tripal/tripal_cv/cvtermpath') ?></li>
-    </ul>
-
-
   <h3>Module Description:</h3>
   <p>The Tripal CV (Controlled Vocabularies) Module provides
     functionality for managing controlled vocabularies and the terms they are
@@ -22,14 +11,14 @@
     <ol>
         <li><p><b>Set Permissions</b>: By default only the site administrator account has access to create, edit, delete
    or administer vocabularies and terms. Navigate to the <?php print l('permissions page', 'admin/user/permissions')?> and set the
-   permissions under the 'tripal_cv' section as appropriate for your site. For a simple setup, allow anonymous 
+   permissions under the 'tripal_cv' section as appropriate for your site. For a simple setup, allow anonymous
    users access to view content and create a special role for creating, editing and other administrative tasks.</p></li>
 
-      <li><p><b>Loading of Ontologies/Controlled Vocabularies</b>: You can access this loader at <?php 
+      <li><p><b>Loading of Ontologies/Controlled Vocabularies</b>: You can access this loader at <?php
         print l('Admin->Tripal Management->Tripal CV->Load Ontology With OBO File', 'admin/tripal/tripal_cv/obo_loader')
         ?>. This loader allows you to choose from a list of common ontologies or
         enter the URL or location to an OBO file. Even the list of common
-        ontologies is using a URL ensuring you get the most up to date ontology.</p>      
+        ontologies is using a URL ensuring you get the most up to date ontology.</p>
       <p>NOTE: in some cases, community developed ontologies for your
         data may not yet be developed. In this case, it is suggested that you begin
         developement of an ontology using one of the online tools. You might find
@@ -40,17 +29,17 @@
   <h3>Features of this Module:</h3>
   <p>Aside from the data loading described above, the Tripal Controlled Vocabulary (CV) module also provides the following functionality:</p>
     <ul>
-      <li><p><b>Create/Update/Delete A Controlled Vocaulbulary</b>: to create your own controlled vocabulary go to 
-        <?php l('the page for adding a vocbulary', 'admin/tripal/tripal_cv/cv/add') ?> and 
-        fill out the form provided. To Update/Delete a controlled vocabulary go to 
-        <?php print l('the page for editing a vocuabulary', 'admin/tripal/tripal_cv/cv/edit') ?>, 
+      <li><p><b>Create/Update/Delete A Controlled Vocaulbulary</b>: to create your own controlled vocabulary go to
+        <?php l('the page for adding a vocbulary', 'admin/tripal/tripal_cv/cv/add') ?> and
+        fill out the form provided. To Update/Delete a controlled vocabulary go to
+        <?php print l('the page for editing a vocuabulary', 'admin/tripal/tripal_cv/cv/edit') ?>,
         select the existing vocabulary you want to modify and then
         edit it as desired. This only modifies the vocabulary itself. See the next section for adding, removing, editing
         the terms of a vocabulary.</p></li>
 
-      <li><p><b>Create a Controlled Vocaulbulary Term</b>: Use 
-        <?php print l('the page for adding a new CV term', 'admin/tripal/tripal_cv/cvterm/add') ?>, 
+      <li><p><b>Create a Controlled Vocaulbulary Term</b>: Use
+        <?php print l('the page for adding a new CV term', 'admin/tripal/tripal_cv/cvterm/add') ?>,
         select the controlled vocabulary you want to add terms to and then fill
-        out the form.</p></li>      
-      
+        out the form.</p></li>
+
     </ul>

+ 2 - 0
tripal_cv/tripal_cv.info

@@ -4,5 +4,7 @@ core = 7.x
 project = tripal_cv
 package = Tripal
 version = 7.x-2.0
+configure = admin/tripal/chado/tripal_cv
+
 dependencies[] = tripal_core
 dependencies[] = tripal_db

+ 54 - 34
tripal_cv/tripal_cv.module

@@ -26,7 +26,7 @@ function tripal_cv_init() {
   // add the tripal_cv JS and CSS
   drupal_add_css(drupal_get_path('theme', 'tripal') . '/css/tripal_cv.css');
   drupal_add_js(drupal_get_path('theme', 'tripal') . '/js/tripal_cv.js');
-  
+
   // add the jgCharts.js
   drupal_add_js(drupal_get_path('theme', 'tripal') . '/js/jgcharts/jgcharts.js');
 
@@ -45,28 +45,37 @@ function tripal_cv_init() {
 function tripal_cv_menu() {
   $items = array();
 
-  $items['admin/tripal/tripal_cv'] = array(
-    'title' => 'Vocabularies',
-    'description' => 'Basic Description of Tripal CV Module Functionality',
+  $items['admin/tripal/chado/tripal_cv'] = array(
+    'title' => 'Controlled Vocabularies',
+    'description' => 'Controlled Vocabularies control the terms available for various chado fields.',
+    'access arguments' => array('administer controlled vocabularies'),
+    'type' => MENU_NORMAL_ITEM,
+  );
+
+  $items['admin/tripal/chado/tripal_cv/help'] = array(
+    'title' => 'Help',
+    'description' => "A description of the Tripal Controlled Vocabulary module including a short description of it's usage.",
     'page callback' => 'theme',
     'page arguments' => array('tripal_cv_admin'),
     'access arguments' => array('administer controlled vocabularies'),
     'type' => MENU_NORMAL_ITEM,
+    'weight' => 10
   );
-  
-  $items['admin/tripal/tripal_cv/obo_loader'] = array(
+
+  $items['admin/tripal/chado/tripal_cv/obo_loader'] = array(
     'title' => 'Load Ontology',
+    'description' => 'Load an Ontology into chado as a controlled vocabulary.',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('tripal_cv_obo_form'),
     'access arguments' => array('administer controlled vocabularies'),
     'type' => MENU_NORMAL_ITEM,
   );
-  
+
   /*
    * Menu for updating the cvtermpath
    */
-  
-  $items['admin/tripal/tripal_cv/cvtermpath'] = array(
+
+  $items['admin/tripal/chado/tripal_cv/cvtermpath'] = array(
     'title' => 'Update Chado cvtermpath table',
     'description' => 'The Chado cvtermpath table provides lineage for terms and is useful for quickly finding any ancestor parent of a term.  However, this table must be populated.  This page allows for populating of this table one vocabulary at a time',
     'page callback' => 'drupal_get_form',
@@ -78,9 +87,9 @@ function tripal_cv_menu() {
   /*
    * Menu items for adding and editing CVs
    */
-  $items['admin/tripal/tripal_cv/edit_cv'] = array(
-    'title' => 'Edit a Database',
-    'description' => 'Manage Databases ',
+  $items['admin/tripal/chado/tripal_cv/edit_cv'] = array(
+    'title' => 'Edit a Controlled Vocabulary',
+    'description' => 'Edit the details such as name and description for an existing controlled vocabulary.',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('tripal_cv_cv_edit_form'),
     'access callback' => 'user_access',
@@ -88,8 +97,9 @@ function tripal_cv_menu() {
     'type' => MENU_NORMAL_ITEM,
   );
 
-  $items['admin/tripal/tripal_cv/add_cv'] = array(
-    'title' => 'Add a Database',
+  $items['admin/tripal/chado/tripal_cv/add_cv'] = array(
+    'title' => 'Add a Controlled Vocabulary',
+    'description' => 'Manually a new controlled vocabulary.',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('tripal_cv_cv_add_form'),
     'access callback' => 'user_access',
@@ -100,32 +110,32 @@ function tripal_cv_menu() {
   /*
    * Menu items for adding and editing CVterms
    */
-  $items['admin/tripal/tripal_cv/cvterm/add'] = array(
-    'title' => 'Add a Term',
-    'description' => 'Manage controlled vocabulary/ontology terms in Chado ',
+  $items['admin/tripal/chado/tripal_cv/cvterm/add'] = array(
+    'title' => 'Add a Controlled Vocabulary Term',
+    'description' => 'Add a new controlled vocabulary term.',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('tripal_cv_cvterm_add_form'),
     'access arguments' => array('administer controlled vocabularies'),
     'type' => MENU_NORMAL_ITEM,
-  );  
-  $items['admin/tripal/tripal_cv/cvterm/edit'] = array(
-    'title' => 'Edit a Term',
-    'description' => 'Edit an existing controlled vocabulary/ontology terms in Chado ',
+  );
+  $items['admin/tripal/chado/tripal_cv/cvterm/edit'] = array(
+    'title' => 'Edit a Controlled Vocabulary Term',
+    'description' => 'Edit an existing controlled vocabulary term.',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('tripal_cv_cvterm_edit_form'),
     'access arguments' => array('administer controlled vocabularies'),
     'type' => MENU_NORMAL_ITEM,
   );
-  $items['admin/tripal/tripal_cv/cvterm/auto_name/%/%'] = array(
+  $items['admin/tripal/chado/tripal_cv/cvterm/auto_name/%/%'] = array(
     'page callback' => 'tripal_cv_cvterm_name_autocomplete',
     'page arguments' => array(5, 6),
     'access arguments' => array('administer controlled vocabularies'),
     'type' => MENU_CALLBACK,
   );
-  
+
   /*
    * Charts
-   */  
+   */
   $items['tripal_cv_chart'] = array(
     'path' => 'tripal_cv_chart',
     'page callback' => 'tripal_cv_chart',
@@ -135,15 +145,15 @@ function tripal_cv_menu() {
   );
 
 
-  /* 
+  /*
    * Menu items for working with CV Trees
-   */  
+   */
   $items['cv_browser'] = array(
     'page callback' => 'tripal_cv_show_browser',
     'access arguments' => array('access content'),
     'type' => MENU_CALLBACK
   );
-    
+
   $items['tripal_cv_tree'] = array(
     'path' => 'tripal_cv_tree',
     'page callback' => 'tripal_cv_tree',
@@ -151,7 +161,7 @@ function tripal_cv_menu() {
     'access arguments' => array('access content'),
     'type' => MENU_CALLBACK
   );
-  
+
   $items['tripal_cv_init_browser'] = array(
     'path' => 'tripal_cv_init_browser',
     'page callback' => 'tripal_cv_init_browser',
@@ -182,6 +192,16 @@ function tripal_cv_menu() {
   return $items;
 }
 
+/**
+ * Implements hook_help()
+ * Purpose: Adds a help page to the module list
+ */
+function tripal_cv_help ($path, $arg) {
+  if ($path == 'admin/help#tripal_cv') {
+    return theme('tripal_cv_admin', array());
+  }
+}
+
 /**
  *  Set the permission types that the chado module uses.  Essentially we
  *  want permissionis that protect creation, editing and deleting of chado
@@ -222,10 +242,10 @@ function tripal_cv_coder_ignore() {
 }
 
 /*
- * 
+ *
  */
 function tripal_cv_form_alter(&$form, &$form_state, $form_id) {
-  if ($form_id == "tripal_cv_cvterm_form") {    
+  if ($form_id == "tripal_cv_cvterm_form") {
     // updating the form through the ahah callback sets the action of
     // the form to the ahah callback URL. We need to set it back
     // to the normal form URL
@@ -246,11 +266,11 @@ function tripal_cv_form_alter(&$form, &$form_state, $form_id) {
  * @ingroup tripal_db
  */
 function tripal_cv_theme() {
-  return array(    
+  return array(
     'tripal_cv_admin' => array(
-      'template' => 'tripal_cv_admin',  
-      'arguments' =>  array(NULL),  
-      'path' => drupal_get_path('module', 'tripal_cv') . '/theme', 
+      'template' => 'tripal_cv_admin',
+      'arguments' =>  array(NULL),
+      'path' => drupal_get_path('module', 'tripal_cv') . '/theme',
     ),
   );
 }

+ 9 - 15
tripal_db/theme/tripal_db_admin.tpl.php

@@ -1,34 +1,28 @@
-<h3>Tripal External Database Administrative Tools Quick Links</h3>
-<ul>
-<li><?php print l('Add an external database for cross-refernces.', 'admin/tripal/tripal_db/add_db') ?></li>
-<li><?php print l('Update or delete an external database.', 'admin/tripal/tripal_db/edit_db') ?></li>
-</ul><br>
-
 <h3>Module Description:</h3>
-<p>The Tripal DB Module provides the ability to add database cross reference to the 
+<p>The Tripal DB Module provides the ability to add database cross reference to the
   data in your Tripal Website.  Typically an external database (such as NCBI Genbank, Gene Ontology (GO),
-  stocks database) contains a collection of objects (genomic sequences, vocabulary terms, stocks) that are 
+  stocks database) contains a collection of objects (genomic sequences, vocabulary terms, stocks) that are
   uniquely identified using an accession number (or identifier).  Data loaded into Tripal can be a
   associated with these objects in remote databases, and links can appear on pages allowing site visitors
   to view the associated objects on the remote database\'s website </p>
 
 <h3>Setup Instructions:</h3>
 <ol>
-    <li><p><b>Set Permissions</b>: By default only the site administrator account has access to 
+    <li><p><b>Set Permissions</b>: By default only the site administrator account has access to
    or administer databases. Navigate to the <?php print l('permissions page', 'admin/user/permissions')?> and set the
-   permissions under the 'tripal_db' section as appropriate for your site. For a simple setup, allow anonymous 
+   permissions under the 'tripal_db' section as appropriate for your site. For a simple setup, allow anonymous
    users access to view content and create a special role for creating, editing and other administrative tasks.</p></li>
-   
-<li><p><b>Adding or Editing an External Databases</b>. Many resources such as NCBI nr or ExPASy SwissProt (to name a few) 
-          come pre-loaded with Chado.  However, you can add new entries or edit existing entries. Also, when loading 
-          ontologies (controlled vocabularies) using the Tripal CV module new databases are added automaticaly for 
+
+<li><p><b>Adding or Editing an External Databases</b>. Many resources such as NCBI nr or ExPASy SwissProt (to name a few)
+          come pre-loaded with Chado.  However, you can add new entries or edit existing entries. Also, when loading
+          ontologies (controlled vocabularies) using the Tripal CV module new databases are added automaticaly for
           each ontology.  To enable linking of accession on a page to the page for that accession on the external
           database, simply add the URL and the URL prefix when adding or editing a database.</p></li>
 
 <li><p><b>Associate Data with Accessions</b>.  The Tripal loaders (e.g. GFF, OBO) can associate accessions from
           remote data to genomic features and controlled vocabularies automatically.  Use the loaders to load genomic
           features and controlled vocabularies respectively.  Additionally, the bulk loader can be used to create
-          loading templates for associating external database accessions.  
+          loading templates for associating external database accessions.
          </p></li>
 </ol>
 

+ 2 - 0
tripal_db/tripal_db.info

@@ -4,4 +4,6 @@ core = 7.x
 project = tripal_db
 package = Tripal
 version = 7.x-2.0
+configure = admin/tripal/chado/tripal_db
+
 dependencies[] = tripal_core

+ 31 - 12
tripal_db/tripal_db.module

@@ -25,19 +25,26 @@ function tripal_db_init() {
 function tripal_db_menu() {
   $items = array();
 
-  $items['admin/tripal/tripal_db'] = array(
+  $items['admin/tripal/chado/tripal_db'] = array(
     'title' => 'Databases',
-    'description' => 'Basic Description of Tripal DB Module Functionality',
+    'description' => 'References to External Database sites such as NCBI',
+    'access arguments' => array('administer db cross-references'),
+    'type' => MENU_NORMAL_ITEM,
+  );
+
+  $items['admin/tripal/chado/tripal_db/help'] = array(
+    'title' => 'Help',
+    'description' => "A description of the Tripal Database module including a short description of it's usage.",
     'page callback' => 'theme',
     'page arguments' => array('tripal_db_admin'),
-    'access callback' => 'user_access',
     'access arguments' => array('administer db cross-references'),
     'type' => MENU_NORMAL_ITEM,
+    'weight' => 10
   );
 
-  $items['admin/tripal/tripal_db/edit_db'] = array(
-    'title' => 'Edit a Database',
-    'description' => 'Manage Databases ',
+  $items['admin/tripal/chado/tripal_db/edit'] = array(
+    'title' => 'Edit a Database Reference',
+    'description' => 'Edit existing Database References.',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('tripal_db_db_edit_form'),
     'access callback' => 'user_access',
@@ -45,8 +52,9 @@ function tripal_db_menu() {
     'type' => MENU_NORMAL_ITEM,
   );
 
-  $items['admin/tripal/tripal_db/add_db'] = array(
-    'title' => 'Add a Database',
+  $items['admin/tripal/chado/tripal_db/add'] = array(
+    'title' => 'Create a Database Reference',
+    'description' => 'Create a new reference to an External Database.',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('tripal_db_db_add_form'),
     'access callback' => 'user_access',
@@ -58,6 +66,17 @@ function tripal_db_menu() {
   return $items;
 }
 
+/**
+ * Implements hook_help()
+ * Purpose: Adds a help page to the module list
+ */
+function tripal_db_help ($path, $arg) {
+  if ($path == 'admin/help#tripal_db') {
+    return theme('tripal_db_admin', array());
+  }
+}
+
+
 /**
  *  Set the permission types that the chado module uses.  Essentially we
  *  want permissionis that protect creation, editing and deleting of chado
@@ -95,11 +114,11 @@ function tripal_db_views_api() {
  * @ingroup tripal_db
  */
 function tripal_db_theme() {
-  return array(    
+  return array(
     'tripal_db_admin' => array(
-      'template' => 'tripal_db_admin',  
-      'arguments' =>  array(NULL),  
-      'path' => drupal_get_path('module', 'tripal_db') . '/theme', 
+      'template' => 'tripal_db_admin',
+      'arguments' =>  array(NULL),
+      'path' => drupal_get_path('module', 'tripal_db') . '/theme',
     ),
   );
 }

+ 3 - 10
tripal_organism/theme/tripal_organism_admin.tpl.php

@@ -1,10 +1,3 @@
-  
-
-  <h3>Tripal Organism Quick Links:</h3>
-  <ul>
-    <li><a href="<?php print url("admin/tripal/tripal_organism/configuration") ?>">Organism Configuration</a></li>
-  </ul>
-<br>
   <h3>Module Description:</h3>
   <p>The Tripal Organism module allows you to add, edit and/or delete chado organisms.
     Furthermore, it also provides listing of organisms and details page for each organism.
@@ -17,7 +10,7 @@
   <ul>
       <li><p><b>Set Permissions</b>: By default only the site administrator account has access to create, edit, delete
        or administer features. Navigate to the <?php print l('permissions page', 'admin/user/permissions')?> and set the
-       permissions under the 'tripal_organism' section as appropriate for your site. For a simple setup, allow anonymous 
+       permissions under the 'tripal_organism' section as appropriate for your site. For a simple setup, allow anonymous
        users access to view content and create a special role for creating, editing and other administrative tasks.</p></li>
 
       <li><p><b>Create an Organism</b>: Organism pages can be created in two ways:</p>
@@ -39,8 +32,8 @@
             The Tripal organism module also provides the following functionality</p>
             <ul>
 
-    <li><p><b>Simple Search Tool</b>: A <?php print l('simple search tool','chado/organisms') ?> is provided for 
+    <li><p><b>Simple Search Tool</b>: A <?php print l('simple search tool','chado/organisms') ?> is provided for
     finding organisms. This tool relies on Drupal Views.  <a href="http://drupal.org/project/views">Drupal Views</a>
-    which must be installed to see the search tool.  Look for it in the navigation menu under the item 
+    which must be installed to see the search tool.  Look for it in the navigation menu under the item
     "Search Biological Data". </p></li>
             </ul>

+ 3 - 2
tripal_organism/tripal_organism.info

@@ -4,7 +4,8 @@ core = 7.x
 project = tripal_organism
 package = Tripal
 version = 7.x-2.0
+configure = admin/tripal/chado/tripal_organism
+
 dependencies[] = tripal_core
 dependencies[] = search
-dependencies[] = path
-
+dependencies[] = path

+ 39 - 20
tripal_organism/tripal_organism.module

@@ -19,6 +19,7 @@ function tripal_organism_init() {
   drupal_add_js(drupal_get_path('theme', 'tripal') . '/js/tripal_organism.js');
   drupal_add_css(drupal_get_path('theme', 'tripal') . '/css/tripal_organism.css');
 }
+
 /**
  *  Provide information to drupal about the node types that we're creating
  *  in this module
@@ -54,7 +55,7 @@ function tripal_organism_block_info() {
   $blocks['image']['cache'] = BLOCK_NO_CACHE;
 
   return $blocks;
-   
+
 }
 /**
  *
@@ -65,7 +66,7 @@ function tripal_organism_block_view($delta = '') {
   if (user_access('access chado_feature content') and arg(0) == 'node' and is_numeric(arg(1))) {
     $nid = arg(1);
     $node = node_load($nid);
-  
+
     $block = array();
     switch ($delta) {
       case 'base':
@@ -96,16 +97,23 @@ function tripal_organism_menu() {
   $items = array();
 
   // the administative settings menu
-  $items['admin/tripal/tripal_organism'] = array(
+  $items['admin/tripal/chado/tripal_organism'] = array(
    'title' => 'Organisms',
    'description' => 'Basic Description of Tripal Organism Module Functionality',
+   'access arguments' => array('adminster tripal organism'),
+   'type' => MENU_NORMAL_ITEM,
+  );
+
+  $items['admin/tripal/chado/tripal_organism/help'] = array(
+   'title' => 'Help',
+   'description' => "A description of the Tripal Organism module including a short description of it's usage.",
    'page callback' => 'theme',
    'page arguments' => array('tripal_organism_admin'),
    'access arguments' => array('adminster tripal organism'),
    'type' => MENU_NORMAL_ITEM,
   );
 
-  $items['admin/tripal/tripal_organism/configuration'] = array(
+  $items['admin/tripal/chado/tripal_organism/configuration'] = array(
    'title' => 'Configuration',
    'description' => 'Manage integration of Chado organisms including associated features',
    'page callback' => 'drupal_get_form',
@@ -117,6 +125,17 @@ function tripal_organism_menu() {
 
   return $items;
 }
+
+/**
+ * Implements hook_help()
+ * Purpose: Adds a help page to the module list
+ */
+function tripal_organism_help ($path, $arg) {
+  if ($path == 'admin/help#tripal_organism') {
+    return theme('tripal_organism_admin', array());
+  }
+}
+
 /**
  *  We need to let drupal know about our theme functions and their arguments.
  *  We create theme functions to allow users of the module to customize the
@@ -153,11 +172,11 @@ function tripal_organism_theme() {
  * Implement hook_access().
  *
  * This hook allows node modules to limit access to the node types they define.
- * 
+ *
  *  @param $node
  *  The node on which the operation is to be performed, or, if it does not yet exist, the
  *  type of node to be created
- *  
+ *
  *  @param $op
  *  The operation to be performed
  *
@@ -168,7 +187,7 @@ function tripal_organism_theme() {
  *  @return
  *  If the permission for the specified operation is not set then return FALSE. If the
  *  permission is set then return NULL as this allows other modules to disable
- *  access.  The only exception is when the $op == 'create'.  We will always 
+ *  access.  The only exception is when the $op == 'create'.  We will always
  *  return TRUE if the permission is set.
  *
  * @ingroup tripal_organism
@@ -231,12 +250,12 @@ function tripal_organism_permission() {
 }
 
 /**
- * Implementation of hook_validate 
- * 
+ * Implementation of hook_validate
+ *
  * @param $node
  * @param $form
  * @param $form_state
- * 
+ *
  *  @ingroup tripal_organism
  */
 function chado_organism_validate($node, $form, &$form_state) {
@@ -246,9 +265,9 @@ function chado_organism_validate($node, $form, &$form_state) {
     $sql = "
       SELECT *
       FROM {organism} O
-      WHERE 
-        genus = :genus AND 
-        species = :species AND NOT 
+      WHERE
+        genus = :genus AND
+        species = :species AND NOT
         organism_id = :organism_id
     ";
     $args = array(':genus' => $node->genus, ':species' => $node->species, ':organism_id' => $node->organism_id);
@@ -419,16 +438,16 @@ function chado_organism_delete($node) {
 function chado_organism_add_image($node) {
   // check to see if a file was uploaded. If so then copy it to the images
   // directory for display with the organism
-  if (isset($_FILES['files']) && 
+  if (isset($_FILES['files']) &&
       $_FILES['files']['name']['organism_image'] &&
       is_uploaded_file($_FILES['files']['tmp_name']['organism_image'])) {
-        
+
     // make sure the destination directory exists
-    $dest = tripal_file_directory_path() . "/tripal_organism/images";    
+    $dest = tripal_file_directory_path() . "/tripal_organism/images";
     file_prepare_directory($dest, FILE_CREATE_DIRECTORY);
-        
+
     // now move the file
-    $validators = array('file_validate_is_image' => array()); 
+    $validators = array('file_validate_is_image' => array());
     $destination = "public://tripal/tripal_organism/images/";
     $file = file_save_upload('organism_image', $validators, $destination);
     if (!$file) {
@@ -459,7 +478,7 @@ function chado_organism_form($node, $param) {
   $species        = property_exists($node, 'species')        ? property_exists($node, 'species')        : $organism->species;
   $common_name    = property_exists($node, 'common_name')    ? property_exists($node, 'common_name')    : $organism->common_name;
   $description    = property_exists($node, 'description')    ? property_exists($node, 'description')    : $organism->comment;
-  $organism_image = property_exists($node, 'organism_image') ? property_exists($node, 'organism_image') : '';   
+  $organism_image = property_exists($node, 'organism_image') ? property_exists($node, 'organism_image') : '';
 
   $form = array();
   $form['#attributes']['enctype'] = 'multipart/form-data';
@@ -528,7 +547,7 @@ function chado_organism_load($nodes) {
     $organism = tripal_core_generate_chado_var('organism', $values);
 
     // add in the description field
-    $organism = tripal_core_expand_chado_vars($organism, 'field', 'organism.comment');    
+    $organism = tripal_core_expand_chado_vars($organism, 'field', 'organism.comment');
     $nodes[$nid]->organism = $organism;
   }
 }

+ 2 - 1
tripal_views/tripal_views.module

@@ -29,7 +29,8 @@ function tripal_views_menu() {
     //'page callback' => 'theme',
     //'page arguments' => array('tripal_views_admin'),
     'access arguments' => array('manage tripal_views_integration'),
-    'type' => MENU_NORMAL_ITEM
+    'type' => MENU_NORMAL_ITEM,
+    'weight' => -10
   );
 
   $items['admin/tripal/views-integration/list'] = array(