From 2dd02559cfbf040ade45f4cbcdb3f8b18ebc8c28 Mon Sep 17 00:00:00 2001 From: phasefx Date: Tue, 18 Jul 2006 19:44:25 +0000 Subject: [PATCH] net access level in patron summary git-svn-id: svn://svn.open-ils.org/ILS/trunk@5070 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../chrome/content/OpenILS/data.js | 21 +++++++++++++++++++ .../chrome/content/main/constants.js | 1 + .../xul/staff_client/server/patron/summary.js | 13 ++++++++++++ .../server/patron/summary_overlay.xul | 3 +++ 4 files changed, 38 insertions(+) diff --git a/Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js b/Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js index e2ac577b78..9714bbb9f6 100644 --- a/Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js +++ b/Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js @@ -280,6 +280,27 @@ OpenILS.data.prototype = { this.chain = []; + this.chain.push( + function() { + var f = gen_fm_retrieval_func( + 'cnal', + [ + api.FM_CNAL_RETRIEVE.app, + api.FM_CNAL_RETRIEVE.method, + [ obj.session.key ], + false + ] + ); + try { + f(); + } catch(E) { + var error = 'Error: ' + js2JSON(E); + obj.error.sdump('D_ERROR',error); + throw(E); + } + } + ); + this.chain.push( function() { var f = gen_fm_retrieval_func( diff --git a/Open-ILS/xul/staff_client/chrome/content/main/constants.js b/Open-ILS/xul/staff_client/chrome/content/main/constants.js index 1050dd91c1..9c29e42289 100644 --- a/Open-ILS/xul/staff_client/chrome/content/main/constants.js +++ b/Open-ILS/xul/staff_client/chrome/content/main/constants.js @@ -86,6 +86,7 @@ const api = { 'FM_CIRC_EDIT_DUE_DATE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.circulation.due_date.update' }, 'FM_CIT_RETRIEVE' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.ident_types.retrieve' }, 'FM_CITM_RETRIEVE' : { 'app' : 'open-ils.search', 'method' : 'open-ils.search.biblio.item_type_map.retrieve.all' }, + 'FM_CNAL_RETRIEVE' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.net_access_level.retrieve.all' }, 'FM_CNCT_RETRIEVE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.non_cat_types.retrieve.all' }, 'FM_CRAHP_RETRIEVE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.config.rules.age_hold_protect.retrieve.all' }, 'FM_CST_RETRIEVE' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.standings.retrieve' }, diff --git a/Open-ILS/xul/staff_client/server/patron/summary.js b/Open-ILS/xul/staff_client/server/patron/summary.js index 5263b87937..1dfa50995e 100644 --- a/Open-ILS/xul/staff_client/server/patron/summary.js +++ b/Open-ILS/xul/staff_client/server/patron/summary.js @@ -72,6 +72,19 @@ patron.summary.prototype = { }; } ], + 'patron_net_access' : [ + ['render'], + function(e) { + return function() { + e.setAttribute('value', + 'Internet: ' + + obj.OpenILS.data.hash.cnal[ + obj.patron.net_access_level() + ].name() + ); + }; + } + ], 'patron_standing' : [ ['render'], function(e) { diff --git a/Open-ILS/xul/staff_client/server/patron/summary_overlay.xul b/Open-ILS/xul/staff_client/server/patron/summary_overlay.xul index 792d21f60c..bd4737ba9d 100644 --- a/Open-ILS/xul/staff_client/server/patron/summary_overlay.xul +++ b/Open-ILS/xul/staff_client/server/patron/summary_overlay.xul @@ -45,6 +45,9 @@ + + -- 2.43.2