فهرست منبع

Fixed small bug in content listing and made missing relationship vocab default message more helpful.

Lacey Sanderson 10 سال پیش
والد
کامیت
13fe3b38ce
2فایلهای تغییر یافته به همراه6 افزوده شده و 1 حذف شده
  1. 1 0
      tripal/includes/TripalEntityUIController.inc
  2. 5 1
      tripal_chado/includes/fields/chado_linker__relationship.inc

+ 1 - 0
tripal/includes/TripalEntityUIController.inc

@@ -221,6 +221,7 @@ function tripal_view_entity($entity, $view_mode = 'full') {
 
    // For each entity retrieved add a row to the data listing.
    //while ($entity = $entities->fetchObject()) {
+   if (!isset($results['TripalEntity'])) $results['TripalEntity'] = array();
    foreach ($results['TripalEntity'] as $entity_id => $stub) {
      $vocabulary = '';
      $term_name = '';

+ 5 - 1
tripal_chado/includes/fields/chado_linker__relationship.inc

@@ -343,7 +343,11 @@ class chado_linker__relationship extends TripalField {
     $default_cv = tripal_get_default_cv($field_table, 'type_id');
     $options = array();
     if (!$default_cv) {
-      drupal_set_message("There is no default vocabulary set for the relationships....");
+      $msg = t('There is no default vocabulary set for the relationship types.');
+      if (module_exists('tripal_chado')) {
+        $msg .= t(' Please set the default vocabulary at <a href="@url" target="_blank">Tripal > Data Storage > Chado > Vocabulary Defaults.</a>', array('@url' => url('/admin/tripal/storage/chado/vocab')));
+      }
+      drupal_set_message($msg, 'warning');
     }
     else {
       $options = tripal_get_cvterm_select_options($default_cv->cv_id, TRUE);