Browse Source

add menu item for creating Tripal content

bradfordcondon 6 years ago
parent
commit
d1449457d5
2 changed files with 15 additions and 2 deletions
  1. 0 2
      tripal/includes/TripalEntityUIController.inc
  2. 15 0
      tripal/tripal.module

+ 0 - 2
tripal/includes/TripalEntityUIController.inc

@@ -927,8 +927,6 @@ function tripal_entity_delete_form_submit($form, &$form_state) {
  */
 function _tripal_entity_add_access() {
   global $user;
-
-
   $types = tripal_get_content_types();
   foreach ($types as $type) {
     if (user_access('create ' . $type->name, $user)) {

+ 15 - 0
tripal/tripal.module

@@ -109,6 +109,21 @@ function tripal_menu() {
     'file path' => drupal_get_path('module', 'system'),
   );
 
+
+
+  $items['admin/content/bio_data/add'] = [
+    'title' => 'Add Tripal Content',
+    'description' => t('Create new Tripal Content.'),
+    'page callback' => 'tripal_add_page',
+    //'page arguments' => [''],
+    'access arguments' => ['administer tripal'],
+    'file' => 'includes/TripalEntityUIController.inc',
+    'file path' => drupal_get_path('module', 'tripal'),
+    'type' => MENU_LOCAL_ACTION,
+  ];
+
+
+
   $items['admin/content/bio_data/unpublish'] = [
     'title' => 'Unpublish Orphaned Content',
     'description' => t('Unpublish content that has no associated records in the data store.'),