Browse Source

Fixed a few fields

Stephen Ficklin 8 years ago
parent
commit
8885a825d3

+ 1 - 1
tripal_chado/includes/fields/chado_gene__transcripts.inc

@@ -207,7 +207,7 @@ class chado_gene__transcripts extends TripalField {
       'sticky' => FALSE,
       'caption' => "",
       'colgroups' => array(),
-      'empty' => '',
+      'empty' => 'This feature has no transcripts',
     );
     $content = theme_table($table);
 

+ 11 - 10
tripal_chado/includes/fields/chado_linker__dbxref.inc

@@ -172,18 +172,19 @@ class chado_linker__dbxref extends TripalField {
 
     $chado_table = $field['settings']['chado_table'];
     foreach ($items as $delta => $item) {
-      if ($item['value']) {
-        $content = $item['value']['vocabulary'] . ':' . $item['value']['accession'];
-        if ($item['value']['URL']) {
-          $content = l($item['value']['URL'], $item['value']['URL']);
-        }
-        $element[$delta] = array(
-          '#type' => 'markup',
-          '#markup' => $content,
-        );
+      if (!$item['value']) {
+        continue;
+      }
+      $content = $item['value']['vocabulary'] . ':' . $item['value']['accession'];
+      if ($item['value']['URL']) {
+        $content = l($item['value']['URL'], $item['value']['URL']);
       }
+      $element[$delta] = array(
+        '#type' => 'markup',
+        '#markup' => $content,
+      );
     }
-    if (count($items) > 0) {
+    if (count($items) == 0) {
       $element[$delta] = array(
         '#type' => 'markup',
         '#markup' => '',

+ 0 - 3
tripal_ws/tripal_ws.module

@@ -156,7 +156,6 @@ function tripal_ws_load_remote_entity($site_id, $api_version, $ctype, $id) {
   $url = $site->url . "/ws/v0.1/content/" . $ctype . "/" . $id;
   $json = file_get_contents($url);
   $response = json_decode($json, TRUE);
-dpm($response);
 
   // Set the title for this page to match the title provided.
   drupal_set_title($response['label']);
@@ -236,8 +235,6 @@ dpm($response);
         }
         // If the result is not a collection then just add it.
         else {
-          dpm($response[$term_name]);
-          dpm($subquery);
           unset($subquery['@context']);
           unset($subquery['@id']);
           $f = array();