Browse Source

Further cleaning up of menus including Tripal Project.

Lacey Sanderson 11 years ago
parent
commit
01e603a540

+ 50 - 25
tripal_core/tripal_core.module

@@ -135,23 +135,57 @@ function tripal_core_menu() {
     'file' => 'system.admin.inc',
     'file' => 'system.admin.inc',
     'file path' => drupal_get_path('module', 'system'),
     'file path' => drupal_get_path('module', 'system'),
   );
   );
-  $items['admin/tripal/customize'] = array(
+  $items['admin/tripal/schema'] = array(
+    'title' => 'Chado Schema',
+    'description' => "Tools to extend the chado schema through custom tables & materialized views.",
+    'weight' => -2,
+    'access arguments' => array('administer site configuration'),
+  );
+  $items['admin/tripal/chado'] = array(
+    'title' => 'Chado Modules',
+    'description' => 'Configuration for specific chado data types such as Vocabularies, Features, etc.',
+    'access arguments' => array('access administration pages'),
+    'type' => MENU_NORMAL_ITEM,
+    'weight' => -6
+  );
+  $items['admin/tripal/loaders'] = array(
+    'title' => 'Chado Data Loaders',
+    'description' => 'Tools facilitating loading data into the chado database. Includes a generic tab-delimited loader (Bulk Loader).',
+    'access arguments' => array('access administration pages'),
+    'type' => MENU_NORMAL_ITEM,
+    'weight' => -4
+  );
+  $items['admin/tripal/extension'] = array(
+    'title' => 'Extension Modules',
+    'description' => 'Configuration for Tripal extension modules.',
+    'access arguments' => array('access administration pages'),
+    'type' => MENU_NORMAL_ITEM,
+    'weight' => 0
+  );
+
+  // Tripal Setup
+  $items['admin/tripal/setup'] = array(
+    'title' => 'Setup Tripal',
+    'description' => 'Tools for initial setup of Tripal',
+    'access arguments' => array('administer site configuration'),
+    'weight' => -8
+  );
+  $items['admin/tripal/setup/customize'] = array(
     'title' => 'Customize Tripal',
     'title' => 'Customize Tripal',
     'description' => 'Information on how to customize tripal',
     'description' => 'Information on how to customize tripal',
-    'position' => 'right',
     'page callback' => 'theme',
     'page callback' => 'theme',
     'page arguments' => array('tripal_core_customize'),
     'page arguments' => array('tripal_core_customize'),
     'access arguments' => array('administer site configuration'),
     'access arguments' => array('administer site configuration'),
     'weight' => 10
     'weight' => 10
   );
   );
-  $items['admin/tripal/chado_install'] = array(
+  $items['admin/tripal/setup/chado_install'] = array(
     'title' => 'Install Chado Schema',
     'title' => 'Install Chado Schema',
     'description' => 'Installs the Chado database tables, views, etc., inside the current Drupal database',
     'description' => 'Installs the Chado database tables, views, etc., inside the current Drupal database',
     'page callback' => 'drupal_get_form',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('tripal_core_chado_load_form'),
     'page arguments' => array('tripal_core_chado_load_form'),
     'access arguments' => array('install chado'),
     'access arguments' => array('install chado'),
     'type' => MENU_NORMAL_ITEM,
     'type' => MENU_NORMAL_ITEM,
-    'weight' => 10
+    'weight' => -10
   );
   );
 
 
   // Jobs Management
   // Jobs Management
@@ -189,14 +223,14 @@ function tripal_core_menu() {
   );
   );
 
 
   // Materialized Views
   // Materialized Views
-  $items['admin/tripal/mviews'] = array(
+  $items['admin/tripal/schema/mviews'] = array(
     'title' => 'Materialized Views',
     'title' => 'Materialized Views',
     '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.',
     'access arguments' => array('access administration pages'),
     'access arguments' => array('access administration pages'),
     'type' => MENU_NORMAL_ITEM,
     'type' => MENU_NORMAL_ITEM,
     'weight' => -10
     'weight' => -10
   );
   );
-  $items['admin/tripal/mviews/list'] = array(
+  $items['admin/tripal/schema/mviews/list'] = array(
     'title' => 'List Materialized Views',
     'title' => 'List Materialized Views',
     'description' => 'A list of existing materialized views with the ability to edit & delete existing materialized views.',
     'description' => 'A list of existing materialized views with the ability to edit & delete existing materialized views.',
     'page callback' => 'tripal_mviews_report',
     'page callback' => 'tripal_mviews_report',
@@ -204,7 +238,7 @@ function tripal_core_menu() {
     'type' => MENU_NORMAL_ITEM,
     'type' => MENU_NORMAL_ITEM,
     'weight' => -10
     'weight' => -10
   );
   );
-  $items['admin/tripal/mviews/report/%'] = array(
+  $items['admin/tripal/schema/mviews/report/%'] = array(
     'title' => 'Materialized View',
     'title' => 'Materialized View',
     'description' => 'Materialized views are used to improve speed of large or complex queries. These are database views as compared to Drupal views.',
     '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 callback' => 'tripal_mview_report',
@@ -212,7 +246,7 @@ function tripal_core_menu() {
     'access arguments' => array('access administration pages'),
     'access arguments' => array('access administration pages'),
     'type' => MENU_NORMAL_ITEM,
     'type' => MENU_NORMAL_ITEM,
   );
   );
-  $items['admin/tripal/mviews/new'] = array(
+  $items['admin/tripal/schema/mviews/new'] = array(
     'title' => 'Create Materialized View',
     'title' => 'Create Materialized View',
     'description' => 'Create a new materialized view.',
     'description' => 'Create a new materialized view.',
     'page callback' => 'drupal_get_form',
     'page callback' => 'drupal_get_form',
@@ -220,14 +254,14 @@ function tripal_core_menu() {
     'access arguments' => array('access administration pages'),
     'access arguments' => array('access administration pages'),
     'type' => MENU_NORMAL_ITEM,
     'type' => MENU_NORMAL_ITEM,
   );
   );
-  $items['admin/tripal/mviews/edit/%'] = array(
+  $items['admin/tripal/schema/mviews/edit/%'] = array(
     'title' => 'Edit Materialized View',
     'title' => 'Edit Materialized View',
     'page callback' => 'drupal_get_form',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('tripal_mviews_form', 4),
     'page arguments' => array('tripal_mviews_form', 4),
     'access arguments' => array('access administration pages'),
     'access arguments' => array('access administration pages'),
     'type' => MENU_NORMAL_ITEM,
     'type' => MENU_NORMAL_ITEM,
   );
   );
-  $items['admin/tripal/mviews/action/%/%'] = array(
+  $items['admin/tripal/schema/mviews/action/%/%'] = array(
     'title' => 'Create Materialized View',
     'title' => 'Create 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.',
     'page callback' => 'tripal_mviews_action',
     'page callback' => 'tripal_mviews_action',
@@ -237,14 +271,14 @@ function tripal_core_menu() {
   );
   );
 
 
   // Custom Tables
   // Custom Tables
-  $items['admin/tripal/custom_tables'] = array(
+  $items['admin/tripal/schema/custom_tables'] = array(
     'title' => 'Custom Tables',
     'title' => 'Custom Tables',
     'description' => 'Creation of custom tables that are added to Chado database.',
     'description' => 'Creation of custom tables that are added to Chado database.',
     'access arguments' => array('access administration pages'),
     'access arguments' => array('access administration pages'),
     'type' => MENU_NORMAL_ITEM,
     'type' => MENU_NORMAL_ITEM,
     'weight' => -10
     'weight' => -10
   );
   );
-  $items['admin/tripal/custom_tables/list'] = array(
+  $items['admin/tripal/schema/custom_tables/list'] = array(
     'title' => 'List of Custom Tables',
     '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.',
     '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',
     'page callback' => 'tripal_custom_tables_list',
@@ -252,7 +286,7 @@ function tripal_core_menu() {
     'type' => MENU_NORMAL_ITEM,
     'type' => MENU_NORMAL_ITEM,
     'weight' => -10
     'weight' => -10
   );
   );
-  $items['admin/tripal/custom_tables/view/%'] = array(
+  $items['admin/tripal/schema/custom_tables/view/%'] = array(
     'title' => 'Custom Tables',
     'title' => 'Custom Tables',
     'description' => 'Custom tables are added to Chado.',
     'description' => 'Custom tables are added to Chado.',
     'page callback' => 'tripal_custom_table_view',
     'page callback' => 'tripal_custom_table_view',
@@ -260,21 +294,21 @@ function tripal_core_menu() {
     'access arguments' => array('access administration pages'),
     'access arguments' => array('access administration pages'),
     'type' => MENU_NORMAL_ITEM,
     'type' => MENU_NORMAL_ITEM,
   );
   );
-  $items['admin/tripal/custom_tables/new'] = array(
+  $items['admin/tripal/schema/custom_tables/new'] = array(
     'title' => 'Create Custom Table',
     'title' => 'Create Custom Table',
     'description' => 'An interface for creating your own custom tables.',
     'description' => 'An interface for creating your own custom tables.',
     'page callback' => 'tripal_custom_table_new_page',
     'page callback' => 'tripal_custom_table_new_page',
     'access arguments' => array('access administration pages'),
     'access arguments' => array('access administration pages'),
     'type' => MENU_NORMAL_ITEM,
     'type' => MENU_NORMAL_ITEM,
   );
   );
-  $items['admin/tripal/custom_tables/edit/%'] = array(
+  $items['admin/tripal/schema/custom_tables/edit/%'] = array(
     'title' => 'Edit Custom Table',
     'title' => 'Edit Custom Table',
     'page callback' => 'drupal_get_form',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('tripal_custom_tables_form', 4),
     'page arguments' => array('tripal_custom_tables_form', 4),
     'access arguments' => array('access administration pages'),
     'access arguments' => array('access administration pages'),
     'type' => MENU_NORMAL_ITEM,
     'type' => MENU_NORMAL_ITEM,
   );
   );
-  $items['admin/tripal/custom_tables/action/%/%'] = array(
+  $items['admin/tripal/schema/custom_tables/action/%/%'] = array(
     'title' => 'Create Custom Table',
     'title' => 'Create Custom Table',
     'description' => 'Custom tables are added to Chado.',
     'description' => 'Custom tables are added to Chado.',
     'page callback' => 'tripal_custom_tables_action',
     'page callback' => 'tripal_custom_tables_action',
@@ -283,15 +317,6 @@ function tripal_core_menu() {
     'type' => MENU_CALLBACK,
     '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;
   return $items;
 }
 }
 
 

+ 4 - 8
tripal_project/theme/tripal_project_admin.tpl.php

@@ -1,7 +1,3 @@
-<h3>Tripal Project Administrative Tools Quick Links:</h3>
-<ul>
- <li><a href="<?php print url("admin/tripal/tripal_project/configuration") ?>">Project Configuration</a></li>
-</ul>
 <h3>Module Description:</h3>
 <h3>Module Description:</h3>
 <p>The Tripal Project module provides support for visualization of "project" pages, editing and updating.</p>
 <p>The Tripal Project module provides support for visualization of "project" pages, editing and updating.</p>
 
 
@@ -9,7 +5,7 @@
 <ol>
 <ol>
    <li><p><b>Set Permissions</b>: By default only the site administrator account has access to create, edit, delete
    <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
    or administer features. Navigate to the <?php print l('permissions page', 'admin/user/permissions')?> and set the
-   permissions under the 'tripal_project' section as appropriate for your site. For a simple setup, allow anonymous 
+   permissions under the 'tripal_project' 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>
    users access to view content and create a special role for creating, editing and other administrative tasks.</p></li>
 
 
 <li><p><b>Sync any Existing Projects</b>: Near the top of the <?php print l('Project Configuration page', 'admin/tripal/tripal_project/configuration') ?> there is
 <li><p><b>Sync any Existing Projects</b>: Near the top of the <?php print l('Project Configuration page', 'admin/tripal/tripal_project/configuration') ?> there is
@@ -20,12 +16,12 @@
 
 
 <h3>Features of this Module:</h3>
 <h3>Features of this Module:</h3>
 <ul>
 <ul>
-  <li><b>Add/Edit/Delete Projects</b>: Projects can be created <?php print l('here', 'node/add/chado-project') ?>. 
+  <li><b>Add/Edit/Delete Projects</b>: Projects can be created <?php print l('here', 'node/add/chado-project') ?>.
   After creation, projects (regardless of the method used to create them) can be
   After creation, projects (regardless of the method used to create them) can be
   edited or deleted by clicking the Edit tab at the top of the Project Page.</li>
   edited or deleted by clicking the Edit tab at the top of the Project Page.</li>
-    <li><p><b>Simple Search Tool</b>: A <?php print l('simple search tool','chado/projects') ?> is provided for 
+    <li><p><b>Simple Search Tool</b>: A <?php print l('simple search tool','chado/projects') ?> is provided for
     finding projects. This tool relies on Drupal Views.  <a href="http://drupal.org/project/views">Drupal Views</a>
     finding projects. 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>
     "Search Biological Data". </p></li>
 
 
 </ul>
 </ul>

+ 2 - 0
tripal_project/tripal_project.info

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

+ 29 - 12
tripal_project/tripal_project.module

@@ -37,16 +37,23 @@ function tripal_project_views_api() {
  * @ingroup tripal_project
  * @ingroup tripal_project
  */
  */
 function tripal_project_menu() {
 function tripal_project_menu() {
-  $items[ 'admin/tripal/tripal_project' ]= array(
+  $items[ 'admin/tripal/chado/tripal_project' ]= array(
     'title' => 'Projects',
     'title' => 'Projects',
     'description' => ('A module for interfacing the GMOD chado database with Drupal, providing viewing of projects'),
     'description' => ('A module for interfacing the GMOD chado database with Drupal, providing viewing of projects'),
+    'access arguments' => array('adminster tripal projects'),
+    'type' => MENU_NORMAL_ITEM
+  );
+
+  $items[ 'admin/tripal/chado/tripal_project/help' ]= array(
+    'title' => 'Help',
+    'description' => ("A description of the Tripal Project module including a short description of it's usage."),
     'page callback' => 'theme',
     'page callback' => 'theme',
     'page arguments' => array('tripal_project_admin'),
     'page arguments' => array('tripal_project_admin'),
     'access arguments' => array('adminster tripal projects'),
     'access arguments' => array('adminster tripal projects'),
     'type' => MENU_NORMAL_ITEM
     'type' => MENU_NORMAL_ITEM
   );
   );
 
 
-  $items[ 'admin/tripal/tripal_project/configuration' ]= array(
+  $items[ 'admin/tripal/chado/tripal_project/configuration' ]= array(
     'title' => 'Configuration',
     'title' => 'Configuration',
     'page callback' => 'drupal_get_form',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('tripal_project_admin'),
     'page arguments' => array('tripal_project_admin'),
@@ -57,6 +64,16 @@ function tripal_project_menu() {
   return $items;
   return $items;
 }
 }
 
 
+/**
+ * Implements hook_help()
+ * Purpose: Adds a help page to the module list
+ */
+function tripal_project_help ($path, $arg) {
+  if ($path == 'admin/help#tripal_project') {
+    return theme('tripal_project_admin', array());
+  }
+}
+
 /**
 /**
  * Implements hook_perm()
  * Implements hook_perm()
  *
  *
@@ -99,7 +116,7 @@ function tripal_project_permission() {
  *  @param $node
  *  @param $node
  *  The node on which the operation is to be performed, or, if it does not yet exist, the
  *  The node on which the operation is to be performed, or, if it does not yet exist, the
  *  type of node to be created
  *  type of node to be created
- *  
+ *
  *  @param $op
  *  @param $op
  *  The operation to be performed
  *  The operation to be performed
  *
  *
@@ -110,9 +127,9 @@ function tripal_project_permission() {
  *  @return
  *  @return
  *  If the permission for the specified operation is not set then return FALSE. If the
  *  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
  *  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.
  *  return TRUE if the permission is set.
- *  
+ *
  * @ingroup tripal_project
  * @ingroup tripal_project
  */
  */
 function chado_project_node_access($node, $op, $account) {
 function chado_project_node_access($node, $op, $account) {
@@ -444,19 +461,19 @@ function tripal_project_block_info() {
 
 
   $blocks['projectbase']['info'] = t('Tripal Project Details');
   $blocks['projectbase']['info'] = t('Tripal Project Details');
   $blocks['projectbase']['cache'] = BLOCK_NO_CACHE;
   $blocks['projectbase']['cache'] = BLOCK_NO_CACHE;
-  
+
   $blocks['projectprops']['info'] = t('Tripal Project Properties');
   $blocks['projectprops']['info'] = t('Tripal Project Properties');
   $blocks['projectprops']['cache'] = BLOCK_NO_CACHE;
   $blocks['projectprops']['cache'] = BLOCK_NO_CACHE;
-  
+
   $blocks['projectpubs']['info'] = t('Tripal Project Publications');
   $blocks['projectpubs']['info'] = t('Tripal Project Publications');
   $blocks['projectpubs']['cache'] = BLOCK_NO_CACHE;
   $blocks['projectpubs']['cache'] = BLOCK_NO_CACHE;
-  
+
   $blocks['projectcont']['info'] = t('Tripal Project Contact');
   $blocks['projectcont']['info'] = t('Tripal Project Contact');
   $blocks['projectcont']['cache'] = BLOCK_NO_CACHE;
   $blocks['projectcont']['cache'] = BLOCK_NO_CACHE;
-  
+
   $blocks['projectrels']['info'] = t('Tripal Project Relationships');
   $blocks['projectrels']['info'] = t('Tripal Project Relationships');
   $blocks['projectrels']['cache'] = BLOCK_NO_CACHE;
   $blocks['projectrels']['cache'] = BLOCK_NO_CACHE;
-  
+
   return $blocks;
   return $blocks;
 }
 }
 /**
 /**
@@ -464,11 +481,11 @@ function tripal_project_block_info() {
  * @ingroup tripal_project
  * @ingroup tripal_project
  */
  */
 function tripal_project_block_view($delta = '') {
 function tripal_project_block_view($delta = '') {
- 
+
   if (user_access('access chado_project content') and arg(0) == 'node' and is_numeric(arg(1))) {
   if (user_access('access chado_project content') and arg(0) == 'node' and is_numeric(arg(1))) {
     $nid = arg(1);
     $nid = arg(1);
     $node = node_load($nid);
     $node = node_load($nid);
-  
+
     $block = array();
     $block = array();
     switch ($delta) {
     switch ($delta) {
       case 'projectbase':
       case 'projectbase':

+ 1 - 1
tripal_views/tripal_views.module

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