|
@@ -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;
|
|
|
}
|
|
|
/**
|
|
|
*
|