Bladeren bron

Set paths for theme templates

spficklin 11 jaren geleden
bovenliggende
commit
7269960a32

+ 17 - 12
tripal_analysis/tripal_analysis.module

@@ -26,8 +26,8 @@ require('includes/tripal_analysis.form.inc');
  * @ingroup tripal_analysis
  */
 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_js(drupal_get_path('module', 'tripal_analysis') . '/theme/js/tripal_analysis.js');
+  drupal_add_css(drupal_get_path('module', 'tripal_analysis') . '/theme/css/tripal_analysis.css');
 }
 
 /**
@@ -74,7 +74,7 @@ function tripal_analysis_menu() {
       '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'),
+      'page arguments' => array('tripal_analysis_help'),
       'access arguments' => array('administer tripal analyses'),
       'type' => MENU_NORMAL_ITEM,
       'file' => 'includes/tripal_analysis.admin.inc',
@@ -85,7 +85,7 @@ function tripal_analysis_menu() {
       'title' => 'Configuration',
       'description' => 'Settings for the displays of analysis results.',
       'page callback' => 'drupal_get_form',
-      'page arguments' => array('tripal_analysis_admin'),
+      'page arguments' => array('tripal_analysis_help'),
       'access arguments' => array('administer tripal analyses'),
       'type' => MENU_NORMAL_ITEM,
       'file' => 'includes/tripal_analysis.admin.inc',
@@ -109,7 +109,7 @@ function tripal_analysis_menu() {
  */
 function tripal_analysis_help ($path, $arg) {
   if ($path == 'admin/help#tripal_analysis') {
-    return theme('tripal_analysis_admin', array());
+    return theme('tripal_analysis_help', array());
   }
 }
 
@@ -555,26 +555,31 @@ function tripal_analysis_permission() {
  * @ingroup tripal_analysis
  */
 function tripal_analysis_theme() {
+  
+  $theme_path = drupal_get_path('module', 'tripal_analysis') . '/theme';
   $items = array(
     'tripal_analysis_base' => array(
        'arguments' => array('node' => NULL),
        'template' => 'tripal_analysis_base',
+       'path' => "$theme_path/tripal_analysis",
     ),
     'tripal_feature_analyses' => array(
       'template' => 'tripal_feature_analyses',
       'arguments' =>  array('node' => NULL),
+      'path' => "$theme_path/tripal_analysis",
     ),
-    'tripal_analysis_admin' => array(
-      'template' => 'tripal_analysis_admin',
-      'arguments' =>  array(NULL),
-      'path' => drupal_get_path('module', 'tripal_analysis') . '/theme',
+   'tripal_analysis_properties' => array(
+     'arguments' => array('node' => NULL),
+     'path' => "$theme_path/tripal_analysis",
     ),
-     'tripal_analysis_properties' => array(
-     'arguments' => array('node' => NULL)
+    'tripal_analysis_help' => array(
+      'template' => 'tripal_analysis_help',
+      'arguments' =>  array(NULL),
+      'path' => $theme_path,
     ),
-    // Themed Forms
     'chado_analysis_node_form' => array(
       'arguments' => array('form'),
+      'path' => $theme_path,
     ),
   );
 

+ 3 - 1
tripal_contact/tripal_contact.module

@@ -47,7 +47,9 @@ function tripal_contact_views_api() {
  * @ingroup tripal_contact
  */
 function tripal_contact_init() {
-  drupal_add_css(drupal_get_path('theme', 'tripal') . '/css/tripal_contact.css');  
+  drupal_add_js(drupal_get_path('module', 'tripal_contact') . '/theme/js/tripal_contact.js');
+  drupal_add_css(drupal_get_path('module', 'tripal_contact') . '/theme/css/tripal_contact.css');
+    
 }
 
 /**

+ 3 - 1
tripal_core/tripal_core.module

@@ -61,7 +61,9 @@ function tripal_core_init() {
   global $base_url;
 
   // add javascript files
-  drupal_add_js(drupal_get_path('theme', 'tripal') . '/js/tripal.ahah.js');
+  drupal_add_js(drupal_get_path('module', 'tripal_core') . '/theme/js/tripal_core.js');
+  drupal_add_css(drupal_get_path('module', 'tripal_core') . '/theme/css/tripal_core.css');
+  
 
   // create the 'tripal' controlled volcabulary in chado but only if it doesn't already exist, and
   // only if the chado database is present.

+ 15 - 12
tripal_cv/tripal_cv.module

@@ -24,16 +24,16 @@ require_once "includes/cvtermpath_form.inc";
 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');
+  drupal_add_css(drupal_get_path('module', 'tripal_cv') . '/theme/css/tripal_cv.css');
+  drupal_add_js(drupal_get_path('module', 'tripal_cv') . '/theme/js/tripal_cv.js');
 
   // add the jgCharts.js
-  drupal_add_js(drupal_get_path('theme', 'tripal') . '/js/jgcharts/jgcharts.js');
+  drupal_add_js(drupal_get_path('module', 'tripal_cv') . '/theme/js/jgcharts/jgcharts.js');
 
   // add the jsTree JS and CSS
-  drupal_add_css(drupal_get_path('theme', 'tripal') . '/js/jsTree/source/tree_component.css');
-  drupal_add_js(drupal_get_path('theme', 'tripal') . '/js/jsTree/source/_lib.js');
-  drupal_add_js(drupal_get_path('theme', 'tripal') . '/js/jsTree/source/tree_component.js');
+  drupal_add_css(drupal_get_path('module', 'tripal_cv') . '/theme/js/jsTree/source/tree_component.css');
+  drupal_add_js(drupal_get_path('module', 'tripal_cv') . '/theme/js/jsTree/source/_lib.js');
+  drupal_add_js(drupal_get_path('module', 'tripal_cv') . '/theme/js/jsTree/source/tree_component.js');
 }
 
 /**
@@ -56,7 +56,7 @@ function tripal_cv_menu() {
     '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'),
+    'page arguments' => array('tripal_cv_help'),
     'access arguments' => array('administer controlled vocabularies'),
     'type' => MENU_NORMAL_ITEM,
     'weight' => 10
@@ -198,7 +198,7 @@ function tripal_cv_menu() {
  */
 function tripal_cv_help ($path, $arg) {
   if ($path == 'admin/help#tripal_cv') {
-    return theme('tripal_cv_admin', array());
+    return theme('tripal_cv_help', array());
   }
 }
 
@@ -266,11 +266,14 @@ function tripal_cv_form_alter(&$form, &$form_state, $form_id) {
  * @ingroup tripal_db
  */
 function tripal_cv_theme() {
-  return array(
-    'tripal_cv_admin' => array(
-      'template' => 'tripal_cv_admin',
+  $theme_path = drupal_get_path('module', 'tripal_cv') . '/theme';
+  $items = array(
+    'tripal_cv_help' => array(
+      'template' => 'tripal_cv_help',
       'arguments' =>  array(NULL),
-      'path' => drupal_get_path('module', 'tripal_cv') . '/theme',
+      'path' => $theme_path,
     ),
   );
+  
+  return $items;
 }

+ 10 - 8
tripal_db/tripal_db.module

@@ -15,8 +15,8 @@ require_once "includes/tripal_db.admin.inc";
 function tripal_db_init() {
 
   // add the tripal_db JS and CSS
-  drupal_add_css(drupal_get_path('theme', 'tripal') . '/css/tripal_db.css');
-  drupal_add_js(drupal_get_path('theme', 'tripal') . '/js/tripal_db.js');
+  drupal_add_css(drupal_get_path('module', 'tripal_db') . '/theme/css/tripal_db.css');
+  drupal_add_js(drupal_get_path('module', 'tripal_db') . '/theme/js/tripal_db.js');
 }
 /**
  *
@@ -36,7 +36,7 @@ function tripal_db_menu() {
     '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'),
+    'page arguments' => array('tripal_db_help'),
     'access arguments' => array('administer db cross-references'),
     'type' => MENU_NORMAL_ITEM,
     'weight' => 10
@@ -72,7 +72,7 @@ function tripal_db_menu() {
  */
 function tripal_db_help ($path, $arg) {
   if ($path == 'admin/help#tripal_db') {
-    return theme('tripal_db_admin', array());
+    return theme('tripal_db_help', array());
   }
 }
 
@@ -114,11 +114,13 @@ function tripal_db_views_api() {
  * @ingroup tripal_db
  */
 function tripal_db_theme() {
-  return array(
-    'tripal_db_admin' => array(
-      'template' => 'tripal_db_admin',
+  $theme_path = drupal_get_path('module', 'tripal_db') . '/theme';
+  $items = array(
+    'tripal_db_help' => array(
+      'template' => 'tripal_db_help',
       'arguments' =>  array(NULL),
-      'path' => drupal_get_path('module', 'tripal_db') . '/theme',
+      'path' => $theme_path,
     ),
   );
+  return $items;
 }

+ 65 - 64
tripal_feature/tripal_feature.module

@@ -27,8 +27,8 @@ require_once "includes/tripal_feature-delete.inc";
  */
 function tripal_feature_init() {
 
-  drupal_add_js(drupal_get_path('theme', 'tripal') . '/js/tripal_feature.js');
-  drupal_add_css(drupal_get_path('theme', 'tripal') . '/css/tripal_feature.css');
+  drupal_add_css(drupal_get_path('module', 'tripal_feature') . '/theme/css/tripal_feature.css');
+  drupal_add_js(drupal_get_path('module', 'tripal_feature') . '/theme/js/tripal_feature.js');
 }
 
 /**
@@ -47,26 +47,13 @@ function tripal_feature_views_api() {
 }
 
 /**
- * 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_feature
+ * Implements hook_help()
+ * Purpose: Adds a help page to the module list
  */
-function tripal_feature_help($path, $arg) {
-  $output = '';
-  switch ($path) {
-  case "admin/help#tripal_feature":
-    $output='<p>' . t("Displays links to nodes created on this date") . '</p>';
-    break;
+function tripal_feature_help ($path, $arg) {
+  if ($path == 'admin/help#tripal_feature') {
+    return theme('tripal_feature_help', array());
   }
-  return $output;
 }
 
 /**
@@ -202,7 +189,7 @@ function tripal_feature_menu() {
     'title' => 'Features',
     'description' => 'Basic Description of Tripal Organism Module Functionality',
     'page callback' => 'theme',
-    'page arguments' => array('tripal_feature_admin'),
+    'page arguments' => array('tripal_feature_help'),
     'access arguments' => array('administer tripal features'),
     'type' => MENU_NORMAL_ITEM,
   );
@@ -210,7 +197,7 @@ function tripal_feature_menu() {
     'title' => 'Configuration',
     'description' => 'Configure the Tripal Feature module.',
     'page callback' => 'drupal_get_form',
-    'page arguments' => array('tripal_feature_admin'),
+    'page arguments' => array('tripal_feature_help'),
     'access arguments' => array('administer tripal features'),
     'type' => MENU_NORMAL_ITEM,
   );
@@ -267,84 +254,98 @@ function tripal_feature_menu() {
  * @ingroup tripal_feature
  */
 function tripal_feature_theme() {
-  return array(
+  $theme_path = drupal_get_path('module', 'tripal_feature') . '/theme';
+  $items = array(
+    // themed functions
+    'tripal_feature_seq_extract_form' => array(
+      'arguments' => array('form'),
+    ),
     'tripal_feature_search_index' => array(
       'arguments' => array('node'),
     ),
     'tripal_feature_search_results' => array(
-       'arguments' => array('node'),
+      'arguments' => array('node'),
     ),
+    // tripal_organism templates
     'tripal_organism_feature_browser' => array(
-       'arguments' => array('node' => NULL),
-       'template' => 'tripal_organism_feature_browser',
+      'arguments' => array('node' => NULL),
+      'template' => 'tripal_organism_feature_browser',
+      'path' => "$theme_path/tripal_organism",
     ),
     'tripal_organism_feature_counts' => array(
-       'arguments' => array('node' => NULL),
-       'template' => 'tripal_organism_feature_counts',
+      'arguments' => array('node' => NULL),
+      'template' => 'tripal_organism_feature_counts',
+      'path' => "$theme_path/tripal_organism",
     ),
+    // tripal_feature templates
     'tripal_feature_base' => array(
-       'arguments' => array('node' => NULL),
-       'template' => 'tripal_feature_base',
+      'arguments' => array('node' => NULL),
+      'template' => 'tripal_feature_base',
+      'path' => "$theme_path/tripal_feature",
     ),
     'tripal_feature_sequence' => array(
-       'arguments' => array('node' => NULL),
-       'template' => 'tripal_feature_sequence',
+      'arguments' => array('node' => NULL),
+      'template' => 'tripal_feature_sequence',
+      'path' => "$theme_path/tripal_feature",
     ),
     'tripal_feature_proteins' => array(
-       'arguments' => array('node' => NULL),
-       'template' => 'tripal_feature_proteins',
+      'arguments' => array('node' => NULL),
+      'template' => 'tripal_feature_proteins',
+      'path' => "$theme_path/tripal_feature",
     ),
     'tripal_feature_synonyms' => array(
-       'arguments' => array('node' => NULL),
-       'template' => 'tripal_feature_synonyms',
+      'arguments' => array('node' => NULL),
+      'template' => 'tripal_feature_synonyms',
+      'path' => "$theme_path/tripal_feature",
     ),
     'tripal_feature_phenotypes' => array(
-       'arguments' => array('node' => NULL),
-       'template' => 'tripal_feature_phenotypes',
+      'arguments' => array('node' => NULL),
+      'template' => 'tripal_feature_phenotypes',
+      'path' => "$theme_path/tripal_feature",
     ),
     'tripal_feature_featurepos' => array(
-       'arguments' => array('node' => NULL),
-       'template' => 'tripal_feature_featurepos',
+      'arguments' => array('node' => NULL),
+      'template' => 'tripal_feature_featurepos',
+      'path' => "$theme_path/tripal_feature",
     ),
     'tripal_feature_featureloc_sequences' => array(
-       'arguments' => array('node' => NULL),
-       'template' => 'tripal_feature_featureloc_sequences',
+      'arguments' => array('node' => NULL),
+      'template' => 'tripal_feature_featureloc_sequences',
+      'path' => "$theme_path/tripal_feature",
     ),
     'tripal_feature_references' => array(
-       'arguments' => array('node' => NULL),
-       'template' => 'tripal_feature_references',
+      'arguments' => array('node' => NULL),
+      'template' => 'tripal_feature_references',
+      'path' => "$theme_path/tripal_feature",
     ),
     'tripal_feature_properties' => array(
-       'arguments' => array('node' => NULL),
-       'template' => 'tripal_feature_properties',
+      'arguments' => array('node' => NULL),
+      'template' => 'tripal_feature_properties',
+      'path' => "$theme_path/tripal_feature",
     ),
     'tripal_feature_terms' => array(
-       'arguments' => array('node' => NULL),
-       'template' => 'tripal_feature_terms',
+      'arguments' => array('node' => NULL),
+      'template' => 'tripal_feature_terms',
+      'path' => "$theme_path/tripal_feature",
     ),
     'tripal_feature_alignments' => array(
-       'arguments' => array('node' => NULL),
-       'template' => 'tripal_feature_alignments',
+      'arguments' => array('node' => NULL),
+      'template' => 'tripal_feature_alignments',
+      'path' => "$theme_path/tripal_feature",
     ),
     'tripal_feature_relationships' => array(
-       'arguments' => array('node' => NULL),
-       'template' => 'tripal_feature_relationships',
+      'arguments' => array('node' => NULL),
+      'template' => 'tripal_feature_relationships',
+      'path' => "$theme_path/tripal_feature",
     ),
-    'tripal_feature_edit_ALL_properties_form' => array(
-      'arguments' => array('form' => NULL),
-      'function' => 'theme_tripal_feature_edit_ALL_properties_form',
-    ),
-    'tripal_feature_admin' => array(
-      'template' => 'tripal_feature_admin',
+    'tripal_feature_help' => array(
+      'template' => 'tripal_feature_help',
       'arguments' =>  array(NULL),
-      'path' => drupal_get_path('module', 'tripal_feature') . '/theme'
+      'path' => $theme_path
     ),
-    
-    // themed forms
-    'tripal_feature_seq_extract_form' => array(
-       'arguments' => array('form'),
-    )
+
   );
+  return $items;
 }
 /**
  *

+ 31 - 14
tripal_featuremap/tripal_featuremap.module

@@ -17,8 +17,8 @@ require('includes/tripal_featuremap.form.inc');
  * @ingroup tripal_featuremap
  */
 function tripal_featuremap_init() {
-  //drupal_add_js(drupal_get_path('theme', 'tripal') . '/js/tripal_pub.js');
-  drupal_add_css(drupal_get_path('theme', 'tripal') . '/css/tripal_featuremap.css');
+  drupal_add_css(drupal_get_path('module', 'tripal_featuremap') . '/theme/css/tripal_featuremap.css');
+  drupal_add_js(drupal_get_path('module', 'tripal_featuremap') . '/theme/js/tripal_featuremap.js');
 }
 
 
@@ -138,7 +138,7 @@ function tripal_featuremap_menu() {
     'title' => 'Maps',
     'description' => 'Basic Description of Tripal Map Module Functionality',
     'page callback' => 'theme',
-    'page arguments' => array('tripal_featuremap_admin'),
+    'page arguments' => array('tripal_featuremap_help'),
     'access arguments' => array('administer tripal featuremap'),
     'type' => MENU_NORMAL_ITEM,
   );
@@ -147,7 +147,7 @@ function tripal_featuremap_menu() {
     'title' => 'Configuration',
     'description' => 'Manage integration of Chado maps including associated features.',
     'page callback' => 'drupal_get_form',
-    'page arguments' => array('tripal_featuremap_admin'),
+    'page arguments' => array('tripal_featuremap_help'),
     'access arguments' => array('administer tripal featuremap'),
     'type' => MENU_NORMAL_ITEM,
   );
@@ -203,46 +203,63 @@ function tripal_featuremap_views_api() {
  * @ingroup tripal_featuremap
  */
 function tripal_featuremap_theme() {
-  return array(
+  $theme_path = drupal_get_path('module', 'tripal_featuremap') . '/theme';
+  $items = array(
+    // themed functions
     'tripal_featuremap_search_index' => array(
-       'arguments' => array('node'),
+      'arguments' => array('node'),
     ),
     'tripal_featuremap_search_result' => array(
-       'arguments' => array('node'),
+      'arguments' => array('node'),
     ),
+    // tripal_featuremap templates
     'tripal_featuremap_base' => array(
-       'arguments' => array('node' => NULL),
-       'template' => 'tripal_featuremap_base',
+      'arguments' => array('node' => NULL),
+      'template' => 'tripal_featuremap_base',
+      'path' => "$theme_path/tripal_featuremap",
     ),
     'tripal_featuremap_properties' => array(
       'arguments' => array('node' => NULL),
       'template' => 'tripal_featuremap_properties',
+      'path' => "$theme_path/tripal_featuremap",
     ),
     'tripal_featuremap_featurepos' => array(
       'arguments' => array('node' => NULL),
       'template' => 'tripal_featuremap_featurepos',
+      'path' => "$theme_path/tripal_featuremap",
     ),
     'tripal_featuremap_publication' => array(
       'arguments' => array('node' => NULL),
       'template' => 'tripal_featuremap_publication',
+      'path' => "$theme_path/tripal_featuremap",
     ),
     'tripal_featuremap_references' => array(
       'arguments' => array('node' => NULL),
       'template' => 'tripal_featuremap_references',
+      'path' => "$theme_path/tripal_featuremap",
     ),
-    'tripal_featuremap_admin' => array(
-      'template' => 'tripal_featuremap_admin',
+    'tripal_featuremap_help' => array(
+      'template' => 'tripal_featuremap_help',
       'arguments' =>  array(NULL),
-      'path' => drupal_get_path('module', 'tripal_featuremap') . '/theme'
+      'path' => $theme_path,
     ),
     
     // Themed Forms
     'chado_featuremap_node_form' => array(
-     'arguments' => array('form'),
+      'arguments' => array('form'),
     ),      
   );
+  return $items;
+}
+/**
+ * Implements hook_help()
+ * Purpose: Adds a help page to the module list
+ */
+function tripal_featuremap_help ($path, $arg) {
+  if ($path == 'admin/help#tripal_featuremap') {
+    return theme('tripal_featuremap_help', array());
+  }
 }
-
 /**
  * @ingroup tripal_library
  */

+ 0 - 0
tripal_feature/theme/tripal_feature/tripal_feature_genotypes.tpl.php → tripal_genetic/theme/tripal_feature/tripal_feature_genotypes.tpl.php


+ 0 - 0
tripal_stock/theme/tripal_stock/tripal_stock_genotypes.tpl.php → tripal_genetic/theme/tripal_stock/tripal_stock_genotypes.tpl.php


+ 9 - 5
tripal_genetic/tripal_genetic.module

@@ -36,16 +36,20 @@ function tripal_genetic_views_api() {
  * @ingroup tripal_genetic
  */
 function tripal_genetic_theme() {
-  return array(
+  $theme_path = drupal_get_path('module', 'tripal_genetic') . '/theme';
+  $items = array(
     'tripal_feature_genotypes' => array(
-       'arguments' => array('node' => NULL),
-       'template' => 'tripal_feature_genotypes',
+      'arguments' => array('node' => NULL),
+      'template' => 'tripal_feature_genotypes',
+      'path' => "$theme_path/tripal_feature",
     ),
     'tripal_stock_genotypes' => array(
-       'arguments' => array('node' => NULL),
-       'template' => 'tripal_stock_genotypes',
+      'arguments' => array('node' => NULL),
+      'template' => 'tripal_stock_genotypes',
+      'path' => "$theme_path/tripal_stock",
     ),
   );
+  return $items;
 }
 
 /**

+ 0 - 0
tripal_feature/theme/tripal_feature/tripal_feature_libraries.tpl.php → tripal_library/theme/tripal_feature/tripal_feature_libraries.tpl.php


+ 0 - 0
tripal_organism/theme/tripal_organism/tripal_organism_libraries.tpl.php → tripal_library/theme/tripal_organism/tripal_organism_libraries.tpl.php


+ 47 - 23
tripal_library/tripal_library.module

@@ -144,7 +144,7 @@ function tripal_library_menu() {
     'title' => 'Libraries',
     'description' => 'Basic Description of Tripal Library Module Functionality',
     'page callback' => 'theme',
-    'page arguments' => array('tripal_library_admin'),
+    'page arguments' => array('tripal_library_help'),
     'access arguments' => array('administer tripal libraries'),
     'type' => MENU_NORMAL_ITEM,
   );
@@ -153,7 +153,7 @@ function tripal_library_menu() {
     'title' => 'Configuration',
     'description' => 'Configure the Tripal Library module',
     'page callback' => 'drupal_get_form',
-    'page arguments' => array('tripal_library_admin'),
+    'page arguments' => array('tripal_library_help'),
     'access arguments' => array('administer tripal libraries'),
     'type' => MENU_NORMAL_ITEM,
   );
@@ -212,50 +212,74 @@ function tripal_library_node_view(&$node, $view_mode, $langcode) {
  * @ingroup tripal_library
  */
 function tripal_library_theme() {
-  return array(
+  $theme_path = drupal_get_path('module', 'tripal_library') . '/theme';
+  $items = array(
+    // themed functions
     'tripal_library_library_table' => array(
-       'arguments' => array('libraries'),
+      'arguments' => array('libraries'),
     ),
     'tripal_library_search_index' => array(
-       'arguments' => array('node'),
+      'arguments' => array('node'),
     ),
     'tripal_library_search_result' => array(
-       'arguments' => array('node'),
+      'arguments' => array('node'),
     ),
+    // tripal_organism templates
     'tripal_organism_libraries' => array(
-       'arguments' => array('node' => NULL),
-       'template' => 'tripal_organism_libraries',
+      'arguments' => array('node' => NULL),
+      'template' => 'tripal_organism_libraries',
+      'path' => "$theme_path/tripal_organism",
     ),
+    // tripal_feature templates
     'tripal_feature_libraries' => array(
-       'arguments' => array('node' => NULL),
-       'template' => 'tripal_feature_libraries',
+      'arguments' => array('node' => NULL),
+      'template' => 'tripal_feature_libraries',
+      'path' => "$theme_path/tripal_feature",
     ),
+    // tripal_library templates
     'tripal_library_base' => array(
-       'arguments' => array('node' => NULL),
-       'template' => 'tripal_library_base',
+      'arguments' => array('node' => NULL),
+      'template' => 'tripal_library_base',
+      'path' => "$theme_path/tripal_library",
     ),
     'tripal_library_synonyms' => array(
-       'arguments' => array('node' => NULL),
-       'template' => 'tripal_library_synonyms',
+      'arguments' => array('node' => NULL),
+      'template' => 'tripal_library_synonyms',
+      'path' => "$theme_path/tripal_library",
     ),
     'tripal_library_references' => array(
-       'arguments' => array('node' => NULL),
-       'template' => 'tripal_library_references',
+      'arguments' => array('node' => NULL),
+      'template' => 'tripal_library_references',
+      'path' => "$theme_path/tripal_library",
     ),
     'tripal_library_properties' => array(
-       'arguments' => array('node' => NULL),
-       'template' => 'tripal_library_properties',
+      'arguments' => array('node' => NULL),
+      'template' => 'tripal_library_properties',
+      'path' => "$theme_path/tripal_library",
     ),
     'tripal_library_terms' => array(
-       'arguments' => array('node' => NULL),
-       'template' => 'tripal_library_terms',
+      'arguments' => array('node' => NULL),
+      'template' => 'tripal_library_terms',
+      'path' => "$theme_path/tripal_library",
     ),
-    'tripal_library_admin' => array(
-      'template' => 'tripal_library_admin',
+    // help template
+    'tripal_library_help' => array(
+      'template' => 'tripal_library_help',
       'arguments' =>  array(NULL),
-      'path' => drupal_get_path('module', 'tripal_library') . '/theme',
+      'path' => $theme_path,
     ),
   );
+  return $items;
+}
+
+/**
+ * Implements hook_help()
+ * Purpose: Adds a help page to the module list
+ */
+function tripal_library_help ($path, $arg) {
+  if ($path == 'admin/help#tripal_library') {
+    return theme('tripal_library_help', array());
+  }
 }
 /**
  * @ingroup tripal_library

+ 0 - 0
tripal_feature/theme/tripal_feature/tripal_feature_nd_genotypes.tpl.php → tripal_natural_diversity/theme/tripal_feature/tripal_feature_nd_genotypes.tpl.php


+ 0 - 0
tripal_stock/theme/tripal_stock/tripal_stock_nd_genotypes.tpl.php → tripal_natural_diversity/theme/tripal_stock/tripal_stock_nd_genotypes.tpl.php


+ 0 - 0
tripal_stock/theme/tripal_stock/tripal_stock_nd_phenotypes.tpl.php → tripal_natural_diversity/theme/tripal_stock/tripal_stock_nd_phenotypes.tpl.php


+ 8 - 1
tripal_natural_diversity/tripal_natural_diversity.module

@@ -35,20 +35,27 @@ function tripal_natural_diversity_views_api() {
  * @ingroup tripal_natural_diversity
  */
 function tripal_natural_diversity_theme() {
-  return array(
+  $theme_path = drupal_get_path('module', 'tripal_natural_diversity') . '/theme';
+  $items = array(
+    // tripal_feature templates
     'tripal_feature_nd_genotypes' => array(
       'arguments' => array('node' => NULL),
       'template' => 'tripal_feature_nd_genotypes',
+      'path' => "$theme_path/tripal_feature",
     ),
+    // tripal_stock templates
     'tripal_stock_nd_genotypes' => array(
       'arguments' => array('node' => NULL),
       'template' => 'tripal_stock_nd_genotypes',
+      'path' => "$theme_path/tripal_stock",
     ),
     'tripal_stock_nd_phenotypes' => array(
       'arguments' => array('node' => NULL),
       'template' => 'tripal_stock_nd_phenotypes',
+      'path' => "$theme_path/tripal_stock",
     ),
   );
+  return $items;
 }
 
 /**

+ 23 - 17
tripal_organism/tripal_organism.module

@@ -16,8 +16,8 @@ require_once "includes/tripal_organism.admin.inc";
 function tripal_organism_init() {
 
   // add the jGCharts JS and CSS
-  drupal_add_js(drupal_get_path('theme', 'tripal') . '/js/tripal_organism.js');
-  drupal_add_css(drupal_get_path('theme', 'tripal') . '/css/tripal_organism.css');
+  drupal_add_css(drupal_get_path('module', 'tripal_organism') . '/theme/css/tripal_organism.css');
+  drupal_add_js(drupal_get_path('module', 'tripal_organism') . '/theme/js/tripal_organism.js');
 }
 
 /**
@@ -108,7 +108,7 @@ function tripal_organism_menu() {
    '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'),
+   'page arguments' => array('tripal_organism_help'),
    'access arguments' => array('adminster tripal organism'),
    'type' => MENU_NORMAL_ITEM,
   );
@@ -117,7 +117,7 @@ function tripal_organism_menu() {
    'title' => 'Configuration',
    'description' => 'Manage integration of Chado organisms including associated features',
    'page callback' => 'drupal_get_form',
-   'page arguments' => array('tripal_organism_admin'),
+   'page arguments' => array('tripal_organism_help'),
    'access arguments' => array('adminster tripal organism'),
    'type' => MENU_NORMAL_ITEM,
   );
@@ -132,7 +132,7 @@ function tripal_organism_menu() {
  */
 function tripal_organism_help ($path, $arg) {
   if ($path == 'admin/help#tripal_organism') {
-    return theme('tripal_organism_admin', array());
+    return theme('tripal_organism_help', array());
   }
 }
 
@@ -144,29 +144,35 @@ function tripal_organism_help ($path, $arg) {
  * @ingroup tripal_organism
  */
 function tripal_organism_theme() {
-  return array(
+  $theme_path = drupal_get_path('module', 'tripal_organism') . '/theme';
+  $items = array(
     'tripal_organism_base' => array(
-       'arguments' => array('node' => NULL),
-       'template' => 'tripal_organism_base',
+      'arguments' => array('node' => NULL),
+      'template' => 'tripal_organism_base',
+      'path' => "$theme_path/tripal_organism",
     ),
     'tripal_organism_description' => array(
-       'arguments' => array('node' => NULL),
-       'template' => 'tripal_organism_description',
+      'arguments' => array('node' => NULL),
+      'template' => 'tripal_organism_description',
+      'path' => "$theme_path/tripal_organism",
     ),
     'tripal_organism_image' => array(
-       'arguments' => array('node' => NULL),
-       'template' => 'tripal_organism_image',
+      'arguments' => array('node' => NULL),
+      'template' => 'tripal_organism_image',
+      'path' => "$theme_path/tripal_organism",
     ),
     'tripal_organism_teaser' => array(
-       'arguments' => array('node' => NULL),
-       'template' => 'tripal_organism_teaser',
+      'arguments' => array('node' => NULL),
+      'template' => 'tripal_organism_teaser',
+      'path' => "$theme_path/tripal_organism",
     ),
-    'tripal_organism_admin' => array(
-      'template' => 'tripal_organism_admin',
+    'tripal_organism_help' => array(
+      'template' => 'tripal_organism_help',
       'arguments' =>  array(NULL),
-      'path' => drupal_get_path('module', 'tripal_organism') . '/theme'
+      'path' => $theme_path,
     ),
   );
+  return $items;
 }
 /**
  * Implement hook_access().

+ 23 - 15
tripal_project/tripal_project.module

@@ -72,7 +72,7 @@ function tripal_project_menu() {
     'title' => 'Help',
     'description' => ("A description of the Tripal Project module including a short description of it's usage."),
     'page callback' => 'theme',
-    'page arguments' => array('tripal_project_admin'),
+    'page arguments' => array('tripal_project_help'),
     'access arguments' => array('adminster tripal projects'),
     'type' => MENU_NORMAL_ITEM
   );
@@ -80,7 +80,7 @@ function tripal_project_menu() {
   $items[ 'admin/tripal/chado/tripal_project/configuration' ]= array(
     'title' => 'Configuration',
     'page callback' => 'drupal_get_form',
-    'page arguments' => array('tripal_project_admin'),
+    'page arguments' => array('tripal_project_help'),
     'access arguments' => array('adminster tripal projects'),
     'type' => MENU_NORMAL_ITEM
   );
@@ -94,7 +94,7 @@ function tripal_project_menu() {
  */
 function tripal_project_help ($path, $arg) {
   if ($path == 'admin/help#tripal_project') {
-    return theme('tripal_project_admin', array());
+    return theme('tripal_project_help', array());
   }
 }
 
@@ -190,33 +190,41 @@ function chado_project_node_access($node, $op, $account) {
  * @ingroup tripal_project
  */
 function tripal_project_theme() {
-  return array(
+  $theme_path = drupal_get_path('module', 'tripal_project') . '/theme';
+  
+  $items = array(
     'tripal_project_base' => array(
       'arguments' => array('node' => NULL),
       'template' => 'tripal_project_base',
+      'path' => "$theme_path/tripal_project",
     ),
     'tripal_project_contact' => array(
-       'arguments' => array('node' => NULL),
-       'template' => 'tripal_project_contact',
+      'arguments' => array('node' => NULL),
+      'template' => 'tripal_project_contact',
+      'path' => "$theme_path/tripal_project",
     ),
     'tripal_project_publications' => array(
-       'arguments' => array('node' => NULL),
-       'template' => 'tripal_project_publications',
+      'arguments' => array('node' => NULL),
+      'template' => 'tripal_project_publications',
+      'path' => "$theme_path/tripal_project",
     ),
     'tripal_project_relationships' => array(
-       'arguments' => array('node' => NULL),
-       'template' => 'tripal_project_relationships',
+      'arguments' => array('node' => NULL),
+      'template' => 'tripal_project_relationships',
+      'path' => "$theme_path/tripal_project",
     ),
     'tripal_project_properties' => array(
-       'arguments' => array('node' => NULL),
-       'template' => 'tripal_project_properties',
+      'arguments' => array('node' => NULL),
+      'template' => 'tripal_project_properties',
+      'path' => "$theme_path/tripal_project",
     ),
-    'tripal_project_admin' => array(
-      'template' => 'tripal_project_admin',
+    'tripal_project_help' => array(
+      'template' => 'tripal_project_help',
       'arguments' =>  array(NULL),
-      'path' => drupal_get_path('module', 'tripal_project') . '/theme'
+      'path' => $theme_path,
     ),
   );
+  return $items;
 }
 /**
  * Implementation of hook_form().

+ 49 - 20
tripal_pub/tripal_pub.module

@@ -24,8 +24,8 @@ require_once "includes/importers/AGL.inc";
  * @ingroup tripal_pub
  */
 function tripal_pub_init() {
-  drupal_add_js(drupal_get_path('theme', 'tripal') . '/js/tripal_pub.js');
-  drupal_add_css(drupal_get_path('theme', 'tripal') . '/css/tripal_pub.css');
+  drupal_add_css(drupal_get_path('module', 'tripal_pub') . '/theme/css/tripal_pub.css');
+  drupal_add_js(drupal_get_path('module', 'tripal_pub') . '/theme/js/tripal_pub.js');
 }
 
 
@@ -83,7 +83,7 @@ function tripal_pub_menu() {
     'title' => 'Publications',
     'description' => ('A module for interfacing the GMOD chado database with Drupal, providing viewing of publications'),
     'page callback' => 'theme',
-    'page arguments' => array('tripal_pub_admin'),
+    'page arguments' => array('tripal_pub_help'),
     'access arguments' => array('administer tripal pubs'),
     'type' => MENU_NORMAL_ITEM
   );
@@ -92,7 +92,7 @@ function tripal_pub_menu() {
     'title' => 'Configuration',
     'description' => 'Configure the Tripal publication module.',
     'page callback' => 'drupal_get_form',
-    'page arguments' => array('tripal_pub_admin'),
+    'page arguments' => array('tripal_pub_help'),
     'access arguments' => array('administer tripal pubs'),
     'type' => MENU_NORMAL_ITEM,
   );
@@ -197,45 +197,65 @@ function tripal_pub_menu() {
  *
  */
 function tripal_pub_theme() {
-
-  $themes = array(
-  // node templates
+  $theme_path = drupal_get_path('module', 'tripal_pub') . '/theme';
+  $items = array(
+    // node templates
     'tripal_pub_base' => array(
       'arguments' => array('node' => NULL),
+      'template' => 'tripal_project_base',
+      'path' => "$theme_path/tripal_pub",
     ),
     'tripal_pub_properties' => array(
-      'arguments' => array('node' => NULL)
+      'arguments' => array('node' => NULL),
+      'template' => 'tripal_project_base',
+      'path' => "$theme_path/tripal_pub",
     ),
     'tripal_pub_authors' => array(
-      'arguments' => array('node' => NULL)
+      'arguments' => array('node' => NULL),
+      'template' => 'tripal_project_base',
+      'path' => "$theme_path/tripal_pub",
     ),
     'tripal_pub_references' => array(
-      'arguments' => array('node' => NULL)
+      'arguments' => array('node' => NULL),
+      'template' => 'tripal_project_base',
+      'path' => "$theme_path/tripal_pub",
     ),
     'tripal_pub_relationships' => array(
-      'arguments' => array('node' => NULL)
+      'arguments' => array('node' => NULL),
+      'template' => 'tripal_project_base',
+      'path' => "$theme_path/tripal_pub",
     ),
     'tripal_pub_featuremaps' => array(
-      'arguments' => array('node' => NULL)
+      'arguments' => array('node' => NULL),
+      'template' => 'tripal_project_base',
+      'path' => "$theme_path/tripal_pub",
     ),
     'tripal_pub_features' => array(
-      'arguments' => array('node' => NULL)
+      'arguments' => array('node' => NULL),
+      'template' => 'tripal_project_base',
+      'path' => "$theme_path/tripal_pub",
     ),
     'tripal_pub_libraries' => array(
-      'arguments' => array('node' => NULL)
+      'arguments' => array('node' => NULL),
+      'template' => 'tripal_project_base',
+      'path' => "$theme_path/tripal_pub",
     ),
     'tripal_pub_projects' => array(
-      'arguments' => array('node' => NULL)
+      'arguments' => array('node' => NULL),
+      'template' => 'tripal_project_base',
+      'path' => "$theme_path/tripal_pub",
     ),
     'tripal_pub_stocks' => array(
-      'arguments' => array('node' => NULL)
+      'arguments' => array('node' => NULL),
+      'template' => 'tripal_project_base',
+      'path' => "$theme_path/tripal_pub",
     ),
 
     // instructions page for the pub module
-    'tripal_pub_admin' => array(
-      'template' => 'tripal_pub_admin',  
+    'tripal_pub_help' => array(
+      'template' => 'tripal_pub_help',  
       'arguments' =>  array(NULL),  
-      'path' => drupal_get_path('module', 'tripal_pub') . '/theme' 
+      'path' => $theme_path, 
     ),
 
     // themed forms
@@ -250,9 +270,18 @@ function tripal_pub_theme() {
     ),
   );
 
-  return $themes;
+  return $items;
 }
 
+/**
+ * Implements hook_help()
+ * Purpose: Adds a help page to the module list
+ */
+function tripal_pub_help ($path, $arg) {
+  if ($path == 'admin/help#tripal_pub') {
+    return theme('tripal_pub_help', array());
+  }
+}
 /**
  * Implement hook_perm().
  */

+ 0 - 0
tripal_organism/theme/tripal_organism/tripal_organism_stocks.tpl.php → tripal_stock/theme/tripal_organism/tripal_organism_stocks.tpl.php


+ 41 - 19
tripal_stock/tripal_stock.module

@@ -45,7 +45,7 @@ function tripal_stock_menu() {
     'title' => 'Stocks',
     'description' => 'Basic Description of Tripal Stock Module Functionality',
     'page callback' => 'theme',
-    'page arguments' => array('tripal_stock_admin'),
+    'page arguments' => array('tripal_stock_help'),
     'access arguments' => array('administer tripal stocks'),
     'type' => MENU_NORMAL_ITEM
   );
@@ -54,7 +54,7 @@ function tripal_stock_menu() {
     'title' => 'Configuration',
     'description' => 'Settings for Chado Stocks',
     'page callback' => 'drupal_get_form',
-    'page arguments' => array('tripal_stock_admin'),
+    'page arguments' => array('tripal_stock_help'),
     'access arguments' => array('administer tripal stocks'),
     'type' => MENU_NORMAL_ITEM
   );
@@ -259,9 +259,10 @@ function tripal_stock_views_api() {
  * @ingroup tripal_stock
  */
 function tripal_stock_theme() {
-  return array(
+  $theme_path = drupal_get_path('module', 'tripal_stock') . '/theme';
+  $items = array(
 
-    // Property edit forms--------------------------
+    // property edit forms function templates
     'tripal_stock_edit_ALL_properties_form' => array(
       'arguments' => array('form'),
       'function' => 'theme_tripal_stock_edit_ALL_properties_form',
@@ -274,55 +275,76 @@ function tripal_stock_theme() {
       'arguments' => array('form'),
       'function' => 'theme_tripal_stock_edit_ALL_relationships_form',
     ),
-    // Block Templates------------------------------
+    // tripal_stock templates
     'tripal_stock_base' => array(
       'arguments' => array('node' => NULL),
       'template' => 'tripal_stock_base',
+      'path' => "$theme_path/tripal_stock",
     ),
     'tripal_stock_properties' => array(
       'arguments' => array('node' => NULL),
       'template' => 'tripal_stock_properties',
+      'path' => "$theme_path/tripal_stock",
     ),
     'tripal_stock_references' => array(
       'arguments' => array('node' => NULL),
       'template' => 'tripal_stock_references',
+      'path' => "$theme_path/tripal_stock",
     ),
     'tripal_stock_relationships' => array(
       'arguments' => array('node' => NULL),
       'template' => 'tripal_stock_relationships',
+      'path' => "$theme_path/tripal_stock",
     ),
     'tripal_stock_synonyms' => array(
       'arguments' => array('node' => NULL),
       'template' => 'tripal_stock_synonyms',
+      'path' => "$theme_path/tripal_stock",
     ),
     'tripal_stock_collections' => array(
-       'arguments' => array('node' => NULL),
-       'template' => 'tripal_stock_collections',
+      'arguments' => array('node' => NULL),
+      'template' => 'tripal_stock_collections',
+      'path' => "$theme_path/tripal_stock",
     ),
     'tripal_stock_collections' => array(
-       'arguments' => array('node' => NULL),
-       'template' => 'tripal_stock_collections',
+      'arguments' => array('node' => NULL),
+      'template' => 'tripal_stock_collections',
+      'path' => "$theme_path/tripal_stock",
     ),
     'tripal_stock_phenotypes' => array(
-       'arguments' => array('node' => NULL),
-       'template' => 'tripal_stock_phenotypes',
+      'arguments' => array('node' => NULL),
+      'template' => 'tripal_stock_phenotypes',
+      'path' => "$theme_path/tripal_stock",
     ),
     'tripal_stock_locations' => array(
-       'arguments' => array('node' => NULL),
-       'template' => 'tripal_stock_locations',
+      'arguments' => array('node' => NULL),
+      'template' => 'tripal_stock_locations',
+      'path' => "$theme_path/tripal_stock",
     ),    
+    // tripal_organism templates
     'tripal_organism_stocks' => array(
-       'arguments' => array('node' => NULL),
-       'template' => 'tripal_organism_stocks',
+      'arguments' => array('node' => NULL),
+      'template' => 'tripal_organism_stocks',
+      'path' => "$theme_path/tripal_organism",
     ),    
-    'tripal_stock_admin' => array(
-      'template' => 'tripal_stock_admin',  
+    // help template
+    'tripal_stock_help' => array(
+      'template' => 'tripal_stock_help',  
       'arguments' =>  array(NULL),  
-      'path' => drupal_get_path('module', 'tripal_stock') . '/theme', 
+      'path' => $theme_path, 
     ),
   );
+  return $items;
+}
+/**
+ * Implements hook_help()
+ * Purpose: Adds a help page to the module list
+ */
+function tripal_stock_help ($path, $arg) {
+  if ($path == 'admin/help#tripal_stock') {
+    return theme('tripal_stock_help', array());
+  }
 }
-
 /**
  * Implements hook_node_info(): registers a stock node type
  *