From: Mike Rylander Date: Fri, 21 Aug 2015 17:11:49 +0000 (-0400) Subject: Supply a "defaults" interface for disabling element and setting call number batch... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=26076ffdd32e8fccaadcd779af21fac25cbbd0bd;p=working%2FEvergreen.git Supply a "defaults" interface for disabling element and setting call number batch defaults Signed-off-by: Mike Rylander Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/templates/staff/cat/volcopy/t_attr_edit.tt2 b/Open-ILS/src/templates/staff/cat/volcopy/t_attr_edit.tt2 index 509a3dac5a..92a9abe1cb 100644 --- a/Open-ILS/src/templates/staff/cat/volcopy/t_attr_edit.tt2 +++ b/Open-ILS/src/templates/staff/cat/volcopy/t_attr_edit.tt2 @@ -51,13 +51,13 @@
@@ -65,7 +65,7 @@
@@ -90,13 +90,13 @@
@@ -118,7 +118,7 @@
@@ -126,13 +126,13 @@
@@ -154,14 +154,14 @@
- +
@@ -178,14 +178,14 @@
-
- +
@@ -203,7 +203,7 @@
@@ -211,13 +211,13 @@
@@ -241,20 +241,20 @@
- +
@@ -272,7 +272,7 @@
@@ -280,13 +280,13 @@
@@ -304,7 +304,7 @@
- diff --git a/Open-ILS/src/templates/staff/cat/volcopy/t_defaults.tt2 b/Open-ILS/src/templates/staff/cat/volcopy/t_defaults.tt2 new file mode 100644 index 0000000000..9f74e13d8e --- /dev/null +++ b/Open-ILS/src/templates/staff/cat/volcopy/t_defaults.tt2 @@ -0,0 +1,291 @@ +
+
+
+
+
+

[% l('Volume/Copy Detail defaults') %]

+ +
+
+ +
+
+

[% l('Creation Defaults') %]

+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+ +
+
+
+

[% l('Display defaults for Working Copy tab') %]

+
+
+ +
+
+
[% l('Copy display') %]
+
+
+
[% l('Miscellaneous') %]
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+
[% l('Circulation') %]
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+
[% l('Statistical Categories') %]
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+ +
+ +
+
+
+

[% l('Display defaults for Completed Copies tab') %]

+
+
+ +
+
+ +
+
+ +
+
+
diff --git a/Open-ILS/src/templates/staff/cat/volcopy/t_edit.tt2 b/Open-ILS/src/templates/staff/cat/volcopy/t_edit.tt2 index 7eefe82804..c663610079 100644 --- a/Open-ILS/src/templates/staff/cat/volcopy/t_edit.tt2 +++ b/Open-ILS/src/templates/staff/cat/volcopy/t_edit.tt2 @@ -16,19 +16,16 @@
- +
- +
- +
diff --git a/Open-ILS/src/templates/staff/cat/volcopy/t_view.tt2 b/Open-ILS/src/templates/staff/cat/volcopy/t_view.tt2 index cbaa19296f..0379fad2f1 100644 --- a/Open-ILS/src/templates/staff/cat/volcopy/t_view.tt2 +++ b/Open-ILS/src/templates/staff/cat/volcopy/t_view.tt2 @@ -22,11 +22,9 @@
-
diff --git a/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js b/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js index 92d2366cc1..27498fcdd1 100644 --- a/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js +++ b/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js @@ -482,6 +482,47 @@ function(egCore , $q) { ['$scope','$q','$routeParams','$location','$timeout','egCore','egNet','egGridDataProvider','itemSvc', function($scope , $q , $routeParams , $location , $timeout , egCore , egNet , egGridDataProvider , itemSvc) { + $scope.defaults = { // If defaults are not set at all, allow everything + attributes : { + status : true, + loan_duration : true, + fine_level : true, + cost : true, + alerts : true, + deposit : true, + deposit_amount : true, + opac_visible : true, + price : true, + circulate : true, + mint_condition : true, + circ_lib : true, + ref : true, + circ_modifier : true, + circ_as_type : true, + location : true, + holdable : true, + age_protect : true + } + }; + + $scope.saveDefaults = function () { + egCore.hatch.setItem('cat.copy.defaults', $scope.defaults); + } + + $scope.fetchDefaults = function () { + egCore.hatch.getItem('cat.copy.defaults').then(function(t) { + if (t) { + $scope.defaults = t; + if (!$scope.batch) $scope.batch = {}; + $scope.batch.classification = $scope.defaults.classification; + $scope.batch.prefix = $scope.defaults.prefix; + $scope.batch.suffix = $scope.defaults.suffix; + if ($scope.defaults.always_vols) $scope.show_vols = true; + } + }); + } + $scope.fetchDefaults(); + $scope.dirty = false; $scope.show_vols = true; @@ -577,7 +618,7 @@ function($scope , $q , $routeParams , $location , $timeout , egCore , egNet , eg $scope.completed_copies = []; $scope.location_orgs = []; $scope.location_cache = {}; - $scope.batch = {}; + if (!$scope.batch) $scope.batch = {}; $scope.applyBatchCNValues = function () { if ($scope.data.tree) { @@ -630,7 +671,7 @@ function($scope , $q , $routeParams , $location , $timeout , egCore , egNet , eg ).then(function (data) { if (data) { - if (data.hide_vols) $scope.show_vols = false; + if (data.hide_vols && !$scope.defaults.always_vols) $scope.show_vols = false; if (data.hide_copies) $scope.show_copies = false; $scope.record_id = data.record_id; @@ -769,6 +810,38 @@ function($scope , $q , $routeParams , $location , $timeout , egCore , egNet , eg controller : ['$scope','itemSvc','egCore', function ( $scope , itemSvc , egCore ) { + $scope.defaults = { // If defaults are not set at all, allow everything + attributes : { + status : true, + loan_duration : true, + fine_level : true, + cost : true, + alerts : true, + deposit : true, + deposit_amount : true, + opac_visible : true, + price : true, + circulate : true, + mint_condition : true, + circ_lib : true, + ref : true, + circ_modifier : true, + circ_as_type : true, + location : true, + holdable : true, + age_protect : true + } + }; + + $scope.fetchDefaults = function () { + egCore.hatch.getItem('cat.copy.defaults').then(function(t) { + if (t) { + $scope.defaults = t; + } + }); + } + $scope.fetchDefaults(); + $scope.dirty = false; $scope.template_controls = true;