From: phasefx Date: Tue, 19 Jan 2010 22:06:26 +0000 (+0000) Subject: backport changeset 15290: Add Volumes directly off Record Summary page X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=a13818994e68fadcc27d05402cef147d8249f47a;p=Evergreen.git backport changeset 15290: Add Volumes directly off Record Summary page git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_6@15343 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/xul/staff_client/chrome/content/cat/opac.js b/Open-ILS/xul/staff_client/chrome/content/cat/opac.js index 926d12418b..3035ceb941 100644 --- a/Open-ILS/xul/staff_client/chrome/content/cat/opac.js +++ b/Open-ILS/xul/staff_client/chrome/content/cat/opac.js @@ -436,4 +436,39 @@ function set_default() { } } +function add_volumes() { + try { + var edit = 0; + try { + edit = g.network.request( + api.PERM_MULTI_ORG_CHECK.app, + api.PERM_MULTI_ORG_CHECK.method, + [ + ses(), + ses('staff_id'), + [ ses('ws_ou') ], + [ 'CREATE_VOLUME', 'CREATE_COPY' ] + ] + ).length == 0 ? 1 : 0; + } catch(E) { + g.error.sdump('D_ERROR','batch permission check: ' + E); + } + + if (edit==0) { + alert(document.getElementById('offlineStrings').getString('staff.circ.copy_status.add_volumes.perm_failure')); + return; // no read-only view for this interface + } + + var title = document.getElementById('offlineStrings').getFormattedString('staff.circ.copy_status.add_volumes.title', [docid]); + JSAN.use('util.window'); var win = new util.window(); + var w = win.open( + window.xulG.url_prefix(urls.XUL_VOLUME_COPY_CREATOR), + title, + 'chrome,resizable', + { 'doc_id' : docid, 'ou_ids' : [ ses('ws_ou') ] } + ); + } catch(E) { + alert('Error in chrome/content/cat/opac.js, add_volumes(): ' + E); + } +} diff --git a/Open-ILS/xul/staff_client/chrome/content/cat/opac.xul b/Open-ILS/xul/staff_client/chrome/content/cat/opac.xul index 14710e4bd1..d03f7a64f9 100644 --- a/Open-ILS/xul/staff_client/chrome/content/cat/opac.xul +++ b/Open-ILS/xul/staff_client/chrome/content/cat/opac.xul @@ -55,6 +55,8 @@ + + diff --git a/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties b/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties index d91c458f4a..309e3bdaed 100644 --- a/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties +++ b/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties @@ -241,3 +241,5 @@ staff.cat.util.copy_editor.batch_edit=Batch Edit staff.cat.util.copy_editor.batch_view=Batch View staff.cat.util.copy_editor.edit=Edit staff.cat.util.copy_editor.view=View +staff.circ.copy_status.add_volumes.perm_failure=You do not have permission to add volumes to the workstation library. +staff.circ.copy_status.add_volumes.title=Add Volume/Item for Record # %1$s