record bucket title links recovered
authorBill Erickson <berick@esilibrary.com>
Wed, 25 Jun 2014 21:03:45 +0000 (17:03 -0400)
committerBill Erickson <berick@esilibrary.com>
Wed, 25 Jun 2014 21:03:45 +0000 (17:03 -0400)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/templates/staff/cat/bucket/record/t_view.tt2
Open-ILS/web/js/ui/default/staff/services/grid.js

index d3d95d3..6943d59 100644 (file)
   <eg-grid-action label="[% l('Export Records') %]" 
     handler="openExportBucketDialog"></eg-grid-action>
 
+  <eg-grid-field path="id" required hidden></eg-grid-field>
+
+  <eg-grid-field label="[% l('Title') %]" path="title">
+    <a target="_self" href="[% ctx.base_path %]/opac/record/{{item.id}}">
+      {{item.title}}
+    </a>
+  </eg-grid-field>
+
+
 </eg-grid>
index fd71ac4..3660eec 100644 (file)
@@ -74,6 +74,9 @@ angular.module('egGridMod',
             // link() is called after page compilation, which means our
             // eg-grid-field's have been parsed and loaded.  Now it's 
             // safe to perform our initial page load.
+
+            // load auto fields after eg-grid-field's so they are not clobbered
+            scope.handleAutoFields();
             scope.collect();
         },
 
@@ -122,13 +125,15 @@ angular.module('egGridMod',
                     defaultToNoMultiSort : (features.indexOf('-multisort') > -1)
                 });
 
-                if ($scope.autoFields) {
-                    if (grid.autoLabel) {
-                        $scope.mainLabel = 
-                            egCore.idl.classes[grid.idlClass].label;
+                $scope.handleAutoFields = function() {
+                    if ($scope.autoFields) {
+                        if (grid.autoLabel) {
+                            $scope.mainLabel = 
+                                egCore.idl.classes[grid.idlClass].label;
+                        }
+                        grid.columnsProvider.compileAutoColumns();
+                        delete $scope.autoFields;
                     }
-                    grid.columnsProvider.compileAutoColumns();
-                    delete $scope.autoFields;
                 }
    
                 if (!grid.dataProvider) {
@@ -920,7 +925,6 @@ angular.module('egGridMod',
         }
 
         cols.compileAutoColumns = function() {
-
             var idl_class = egCore.idl.classes[cols.idlClass];
 
             angular.forEach(