Browse Source

Fixed a small bug in the 'link to node' functionality -now only fields from the base view table can be linked to their node

Lacey Sanderson 12 years ago
parent
commit
e7b5e52c0b
1 changed files with 2 additions and 2 deletions
  1. 2 2
      tripal_views/views/handlers/chado_views_handler_field.inc

+ 2 - 2
tripal_views/views/handlers/chado_views_handler_field.inc

@@ -34,8 +34,8 @@ class chado_views_handler_field extends views_handler_field {
     parent::options_form($form, $form_state);
 
     // Add a link to node checkbox
-    // but only if this base table is linked to a node
-    if (tripal_core_is_tripal_node_type($this->table)) {
+    // but only if this base table is linked to a node and this field is from the base_table
+    if (tripal_core_is_tripal_node_type($this->table) && $this->table == $this->view->base_table) {
       // If there is a Node: NID field then show a link to node checkbox
       if (isset($this->view->display['default']->display_options['fields']['nid'])) {
         $form['link_to_node'] = array(