From ba7de2fc8eb37faf2853c76efbe5e0c06cd4b5ef Mon Sep 17 00:00:00 2001
From: dakku <dakku@97634.no-reply.drupal.org>
Date: Thu, 7 Apr 2016 15:09:04 +0100
Subject: [PATCH] 2701989

---
 inc/views/photos.views.inc | 46 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)

diff --git a/inc/views/photos.views.inc b/inc/views/photos.views.inc
index 3bfa1e7..996dc97 100644
--- a/inc/views/photos.views.inc
+++ b/inc/views/photos.views.inc
@@ -10,6 +10,52 @@
  */
 function photos_views_data() {
   // Group
+  $data['photos_access_album']['table']['group'] = t('Album Photo Access');
+
+  // Base albums table.
+  $data['photos_access_album']['table']['base'] = array(
+    'field' => 'nid',
+    'title' => t('Photos Albums Access'),
+    'help' => t('Albums Access.'),
+    'weight' => -10,
+  );
+
+  // Join album info to images.
+  $data['photos_access_album']['table']['join'] = array(
+    'photos_album' => array(
+      'left_field' => 'pid',
+      'field' => 'nid',
+      'type' => 'INNER',
+    ),
+  );
+
+  // Access type field.
+  $data['photos_access_album']['viewid'] = array(
+    'title' => t('Access Type'),
+    'help' => t('This albums Access type.'),
+    'field' => array(
+      'handler' => 'views_handler_field_numeric',
+      'click sortable' => TRUE,
+     ),
+    'filter' => array(
+      'handler' => 'views_handler_filter_numeric',
+    ),
+    'sort' => array(
+      'handler' => 'views_handler_sort',
+    ),
+
+    // Define a relationship to the {photos_access_album} table.
+    'relationship' => array(
+      'base' => 'photos_album',
+      'base field' => 'pid',
+      'handler' => 'views_handler_relationship',
+      'label' => t('Access Type'),
+      'title' => t('The Access Type associated with this album.'),
+      'help' => t('Access to the Access Type associated with this album.'),
+    ),
+  );
+
+  // Group
   $data['photos_album']['table']['group'] = t('Album Photos');
 
   // Base albums table.
-- 
1.8.4.2

