Explorar o código

Added node id fields for feature, organism, library, analysis and stock. This is a temporary fix until we get relationships working in views integration

stephen %!s(int64=13) %!d(string=hai) anos
pai
achega
0a8641260f

+ 16 - 0
base/tripal_analysis/views/chado_analysis.views.inc

@@ -25,6 +25,22 @@ function retrieve_chado_analysis_views_data () {
   // Basic table definition
   $data['chado_analysis']['table'] = array(
     'field' => 'nid',
+    'group' => 'Chado Analysis'
+  );
+
+  $data['chado_analysis']['nid'] = array(
+    'title' => t('Analysis Node ID'),
+    'help' => t('The node ID for this analysis'),
+    'field' => array(
+     	'handler' => 'views_handler_field_numeric',
+ 		  'click sortable' => TRUE,
+    ),
+    'filter' => array(
+     	'handler' => 'views_handler_filter_numeric',
+    ),
+    'sort' => array(
+     	'handler' => 'views_handler_sort',
+    ),
   );
   
   // Note: No joins need to be made from $data['analysis']['table']

+ 17 - 1
base/tripal_feature/views/chado_feature.views.inc

@@ -24,8 +24,24 @@ function retrieve_chado_feature_views_data () {
   // Basic table definition
   $data['chado_feature']['table'] = array(
     'field' => 'nid',
+    'group' => 'Chado Feature'
   );
   
+  $data['chado_feature']['nid'] = array(
+    'title' => t('Feature Node ID'),
+    'help' => t('The node ID for this feature'),
+    'field' => array(
+     	'handler' => 'views_handler_field_numeric',
+ 		  'click sortable' => TRUE,
+    ),
+    'filter' => array(
+     	'handler' => 'views_handler_filter_numeric',
+    ),
+    'sort' => array(
+     	'handler' => 'views_handler_sort',
+    ),
+  );
+
   // Note: No joins need to be made from $data['feature']['table']
   
   // Join the chado feature table to feature
@@ -78,6 +94,6 @@ function retrieve_chado_feature_views_data () {
       'base field' => 'nid'
     ),
   );
-  
+
 	return $data;
 }

+ 16 - 0
base/tripal_library/views/chado_library.views.inc

@@ -24,8 +24,24 @@ function retrieve_chado_library_views_data () {
   // Basic table definition
   $data['chado_library']['table'] = array(
     'field' => 'nid',
+    'group' => 'Chado Library'
   );
   
+  $data['chado_library']['nid'] = array(
+    'title' => t('Library Node ID'),
+    'help' => t('The node ID for this library'),
+    'field' => array(
+     	'handler' => 'views_handler_field_numeric',
+ 		  'click sortable' => TRUE,
+    ),
+    'filter' => array(
+     	'handler' => 'views_handler_filter_numeric',
+    ),
+    'sort' => array(
+     	'handler' => 'views_handler_sort',
+    ),
+  );
+
   // Note: No joins need to be made from $data['library']['table']
   
   // Join the chado library table to library

+ 18 - 2
base/tripal_organism/views/chado_organism.views.inc

@@ -24,8 +24,24 @@ function retrieve_chado_organism_views_data () {
   // Basic table definition
   $data['chado_organism']['table'] = array(
     'field' => 'nid',
+    'group' => 'Chado Organism'
   );
   
+  $data['chado_organism']['nid'] = array(
+    'title' => t('Organism Node ID'),
+    'help' => t('The node ID for this organism'),
+    'field' => array(
+     	'handler' => 'views_handler_field_numeric',
+ 		  'click sortable' => TRUE,
+    ),
+    'filter' => array(
+     	'handler' => 'views_handler_filter_numeric',
+    ),
+    'sort' => array(
+     	'handler' => 'views_handler_sort',
+    ),
+  );
+
   // Note: No joins need to be made from $data['organism']['table']
   
   // Join the chado organism table to organism
@@ -62,7 +78,7 @@ function retrieve_chado_organism_views_data () {
       'base field' => 'organism_id'
     ),
   );
-
+/*
   // Add node relationship to organism
   $data['chado_organism']['nid'] = array(
     'group' => 'Organism',
@@ -78,6 +94,6 @@ function retrieve_chado_organism_views_data () {
       'base field' => 'nid'
     ),
   );
-  
+*/  
 	return $data;
 }

+ 17 - 2
base/tripal_stock/views/chado_stock.views.inc

@@ -27,7 +27,22 @@ function retrieve_chado_stock_views_data () {
   // Basic table definition
   $data['chado_stock']['table'] = array(
     'field' => 'stock_id',
-    'group' => 'Chado Stock Node',
+    'group' => 'Chado Stock',
+  );
+
+  $data['chado_stock']['nid'] = array(
+    'title' => t('Stock Node ID'),
+    'help' => t('The node ID for this analysis'),
+    'field' => array(
+     	'handler' => 'views_handler_field_numeric',
+ 		  'click sortable' => TRUE,
+    ),
+    'filter' => array(
+     	'handler' => 'views_handler_filter_numeric',
+    ),
+    'sort' => array(
+     	'handler' => 'views_handler_sort',
+    ),
   );
   
   // Note: No joins need to be made from $data['stock']['table']
@@ -84,4 +99,4 @@ function retrieve_chado_stock_views_data () {
   );
   
 	return $data;
-}
+}