Index: includes/nat.views.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/nat/includes/nat.views.inc,v
retrieving revision 1.2.2.5
diff -u -p -r1.2.2.5 nat.views.inc
--- includes/nat.views.inc	18 Feb 2010 18:09:50 -0000	1.2.2.5
+++ includes/nat.views.inc	26 Feb 2010 00:24:11 -0000
@@ -1,5 +1,5 @@
 <?php
-// $Id: nat.views.inc,v 1.2.2.5 2010/02/18 18:09:50 anantagati Exp $
+// $Id: nat.views.inc,v 1.2.2.4 2010/02/16 16:56:55 anantagati Exp $
 
 function nat_views_data() {
   $data = array();
@@ -71,6 +71,30 @@ function nat_views_data() {
       'handler' => 'views_handler_filter_numeric',
     ),
   );
+  
+  // Uses data from Term Node Count module
+  if (module_exists('term_node_count')) {
+    $data['nat_term_node_count']['table']['group'] = t('NAT');  
+    $data['nat_term_node_count']['table']['join']['node'] = array(
+      'table' => 'term_node_count',
+      'left_table' => 'nat_tnc',
+      'left_field' => 'tid',
+      'field' => 'tid',
+    );
+    $data['nat_tnc']['table']['join']['node'] = array(
+      'table' => 'nat',
+      'left_field' => 'nid',
+      'field' => 'nid',
+    );
+    $data['nat_term_node_count']['node_count'] = array(
+      'field' => 'node_count',
+      'title' => t('Node Count'),
+      'help' => t('The number of nodes associated with NAT term'),
+      'filter' => array(
+        'handler' => 'views_handler_filter_numeric',
+      ),
+    );
+  }
 
   return $data;
 }
