Index: data_ui/data_ui.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/data/data_ui/data_ui.admin.inc,v
retrieving revision 1.25.2.13
diff -u -r1.25.2.13 data_ui.admin.inc
--- data_ui/data_ui.admin.inc	19 Oct 2009 19:30:34 -0000	1.25.2.13
+++ data_ui/data_ui.admin.inc	28 Oct 2009 04:50:38 -0000
@@ -18,7 +18,8 @@
       db_result(db_query('SELECT COUNT(*) FROM {'. db_escape_table($table->get('name')) .'}')),
     );
     if (module_exists('views')) {
-      $row[] = l(t('View'), data_ui_get_default_path($table->get('name')));
+      $path = data_ui_get_default_path($table->get('name'));
+      $row[] = $path ? l(t('View'), $path) : l(t('Edit schema'), 'admin/build/data/edit/' . $table->get('name'));
     }
     $rows[] = $row;
   }
Index: data_ui/data_ui.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/data/data_ui/data_ui.module,v
retrieving revision 1.15.2.6
diff -u -r1.15.2.6 data_ui.module
--- data_ui/data_ui.module	27 Oct 2009 22:49:50 -0000	1.15.2.6
+++ data_ui/data_ui.module	28 Oct 2009 04:50:38 -0000
@@ -11,7 +11,7 @@
 function data_ui_help($path, $arg) {
   switch ($path) {
     case 'admin/content/data':
-      $output = '<p>'. t('View content in data tables. If you would like to edit these tables, visit the !data_manage_page.', array('!data_manage_page' => l(t('Data table management page'), 'admin/build/data'))) .'</p>';
+      $output = '<p>'. t('View content in data tables. If you would like to edit these tables, visit the !data_manage_page.', array('!data_manage_page' => l(t('Data table management page'), 'admin/build/data'))) .'</p><p>' . t('Some tables may not have a \'view\' link; this happens when a table doesn\'t have a \'primary key\' or is not joined to another table with a primary key. You can add a primary key field or a join from the table\'s \'Edit schema\' page.') . '</p>';
       return $output;
     case 'admin/build/data':
       if (module_exists('views')) {
@@ -220,7 +220,13 @@
  */
 function data_ui_get_default_path($name) {
   if ($table = data_get_table($name)) {
-    // Check, whether there is a data mananged table to the left.
+    // Check whether this can be a Views base table.
+    $table_schema = $table->get('table_schema');
+    if (isset($table_schema['primary key'])) {
+      return 'admin/content/data/view/'. $name;
+    }
+
+    // Check whether there is a data mananged table to the left.
     // @todo: go all the way to the left.
     $path = '';
     $meta = $table->get('meta');
@@ -229,8 +235,8 @@
       if ($left_table = data_get_table($left_table_name)) {
         $path .= $left_table_name .'/';
       }
+      return 'admin/content/data/view/'. $path . $name;
     }
-    return 'admin/content/data/view/'. $path . $name;
   }
   return '';
 }
\ No newline at end of file
Index: data_ui/data_ui.views_default.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/data/data_ui/data_ui.views_default.inc,v
retrieving revision 1.6.2.1
diff -u -r1.6.2.1 data_ui.views_default.inc
--- data_ui/data_ui.views_default.inc	15 Oct 2009 02:34:07 -0000	1.6.2.1
+++ data_ui/data_ui.views_default.inc	28 Oct 2009 04:50:38 -0000
@@ -50,7 +50,7 @@
     $meta_fields = $meta['fields'];
     foreach ($schema['fields'] as $field_name => $field) {
       $fields[$field_name] = array(
-        'label' => isset($meta_fields[$field_name]['label']) ? $meta_fields[$field_name]['label'] : $field_name,
+        'label' => $meta_fields[$field_name]['label'] ? $meta_fields[$field_name]['label'] : $field_name,
         'id' => $field_name,
         'table' => $table->get('name'),
         'field' => $field_name,
