--- /dev/null
+BEGIN;
+
+-- SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+INSERT INTO config.org_unit_setting_type
+ (name, label, description, grp, datatype)
+VALUES (
+ 'ui.staff.max_recent_patrons',
+ oils_i18n_gettext(
+ 'ui.staff.max_recent_patrons',
+ 'Number of Retrievable Recent Patrons',
+ 'coust',
+ 'label'
+ ),
+ oils_i18n_gettext(
+ 'ui.staff.max_recent_patrons',
+ 'Number of most recently accessed patrons that can be re-retrieved in the staff client. A value of 0 or less disables the feature',
+ 'coust',
+ 'description'
+ ),
+ 'opac',
+ 'integer'
+);
+
+
+
+COMMIT;
[% l('Register Patron') %]
</a>
</li>
- <li>
+ <li ng-if="showRecentPatron">
<a href="./circ/patron/last" target="_self"
eg-accesskey="[% l('f8') %]"
eg-accesskey-desc="[% l('Retrieve Last Patron') %]">
[% l('Retrieve Last Patron') %]
</a>
</li>
+ <li ng-if="showRecentPatrons">
+ <a href="./circ/patron/recent" target="_self"
+ eg-accesskey="[% l('f8') %]"
+ eg-accesskey-desc="[% l('Retrieve Recent Patrons') %]">
+ <span class="glyphicon glyphicon-share-alt"></span>
+ [% l('Retrieve Recent Patrons') %]
+ </a>
+ </li>
<li>
<a href="./circ/patron/pending/list" target="_self">
<span class="glyphicon glyphicon-thumbs-up"></span>
resolve : resolver
});
+ $routeProvider.when('/circ/patron/recent', {
+ templateUrl: './circ/patron/t_search',
+ controller: 'PatronSearchCtrl',
+ resolve : resolver
+ });
+
// the following require a patron ID
$routeProvider.when('/circ/patron/:id/alerts', {
$scope.op_changed = egCore.auth.OCtoken() ? true : false;
$scope.username = egCore.auth.user().usrname();
$scope.workstation = egCore.auth.workstation();
+
+ egCore.org.settings('ui.staff.max_recent_patrons')
+ .then(function(s) {
+ var val = s['ui.staff.max_recent_patrons'];
+ $scope.showRecentPatron = (val && val > 0);
+ $scope.showRecentPatrons = (val && val > 1);
+ });
}
}
);
function() {
return egOrg.settings([
'webstaff.format.dates',
- 'webstaff.format.date_and_time'
+ 'webstaff.format.date_and_time',
+ 'ui.staff.max_recent_patrons' // affects all pages
]).then(
function(set) {
$rootScope.egDateFormat =