Browse Source

Added a few more improvements to cv lookup interface

Stephen Ficklin 7 years ago
parent
commit
005b41ff01

+ 2 - 1
tripal/includes/tripal.term_lookup.inc

@@ -31,7 +31,7 @@ function tripal_vocabulary_lookup_page() {
     'sticky' => FALSE,
     'caption' => '',
     'colgroups' => array(),
-    'empty' => '',
+    'empty' => t('There are no controlled vocabularies'),
   );
 
   $content = array(
@@ -75,6 +75,7 @@ function tripal_vocabulary_lookup_vocab_page($vocabulary) {
   $headers = array();
   $rows = array();
   $vocab_name = $vocab['name'];
+  $short_name = $vocab['short_name'];
   if ($vocab['url']) {
     $short_name = l($vocab['short_name'], $vocab['url'], array('attributes' => array('target' => '_blank')));
   }

+ 3 - 1
tripal/tripal.module

@@ -577,6 +577,7 @@ function tripal_libraries_info() {
  * Define administrative paths.
  */
 function tripal_admin_paths() {
+  $paths = array();
   if (variable_get('node_admin_theme')) {
     $paths = array(
       'bio_data/*/edit' => TRUE,
@@ -584,8 +585,9 @@ function tripal_admin_paths() {
       'bio_data/add' => TRUE,
       'bio_data/add/*' => TRUE,
     );
-    return $paths;
   }
+  $paths['cv/lookup/*/*'] = TRUE;
+  return $paths;
 }
 
 /**

+ 6 - 0
tripal_chado/includes/tripal_chado.vocab_storage.inc

@@ -62,6 +62,12 @@ function tripal_chado_vocab_get_vocabularies() {
     $result['sw_url'] = $sw_url;
     $vocabs[] = $result;
   }
+
+  if (count($vocabs) == 0) {
+    $link = l('populating', 'admin/tripal/storage/chado/mviews/update', array('attributes' => array('target' => '_blank')));
+    $message = t('If there are no controlled vocabularies it is mostly likely because the db2cv_mview is not populated.  Try !populating this mview.', array('!populating' => $link));
+    tripal_set_message($message, TRIPAL_NOTICE);
+  }
   return $vocabs;
 }
 /**