2 <!-- Application: Evergreen Staff Client -->
3 <!-- Screen: Brief Bib Display -->
5 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
7 <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
8 <?xml-stylesheet href="chrome://open_ils_staff_client/skin/global.css" type="text/css"?>
9 <?xml-stylesheet href="/xul/server/skin/global.css" type="text/css"?>
11 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
13 <!DOCTYPE window PUBLIC "" ""[
14 <!--#include virtual="/opac/locale/en-US/lang.dtd"-->
17 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
19 <?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?>
21 <window id="cat_copy_summary_win"
22 onload="try { my_init(); } catch(E) { alert(E); }"
23 xmlns:html="http://www.w3.org/1999/xhtml"
24 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
26 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
28 <script type="text/javascript">
29 var myPackageDir = 'open_ils_staff_client'; var IAMXUL = true; var g = {};
31 <scripts id="openils_util_scripts"/>
33 <script type="text/javascript" src="/xul/server/main/JSAN.js"/>
36 function $(id) { return document.getElementById(id); }
37 function $w(id,text) { if ($(id)) util.widgets.set_text($(id),text); }
41 netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
42 if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
43 JSAN.errorLevel = "die"; // none, warn, or die
44 JSAN.addRepository('/xul/server/');
45 JSAN.use('util.error'); g.error = new util.error();
46 g.error.sdump('D_TRACE','my_init() for cat_copy_summary.xul');
49 var copy_id = g.cgi.param('copy_id');
51 JSAN.use('util.network'); g.network = new util.network();
52 JSAN.use('util.date'); JSAN.use('util.widgets');
53 JSAN.use('OpenILS.data'); g.data = new OpenILS.data(); g.data.stash_retrieve();
55 $('caption').setAttribute('tooltiptext','Copy ID = ' + copy_id);
57 g.network.simple_request(
62 var copy = req.getResultObject();
63 if (typeof copy.ilsevent != 'undefined') throw(copy);
64 g.network.simple_request(
66 [ copy.call_number() ],
69 $w('barcode',copy.barcode());
70 $w('ref',get_bool(copy.ref()) ? 'Yes' : 'No');
71 $w('opac_visible',get_bool(copy.opac_visible()) ? 'Yes' : 'No');
72 $w('circulate',get_bool(copy.circulate()) ? 'Yes' : 'No');
73 $w('holdable',get_bool(copy.holdable()) ? 'Yes' : 'No');
74 $w('age_protect',copy.age_protect() == null ? '<Unset>' : ( typeof copy.age_protect() == 'object' ? copy.age_protect().name() : g.data.hash.crahp[ copy.age_protect() ].name() ) );
75 $w('location',copy.location().name());
76 $w('create_date',util.date.formatted_date(copy.create_date(),'%F'));
77 $w('edit_date',util.date.formatted_date(copy.edit_date(),'%F'));
78 $w('status',copy.status().name());
80 g.error.standard_unexpected_error_alert('rendering copy',E);
83 var cn = rreq.getResultObject();
84 if (typeof cn.ilsevent != 'undefined') {
86 case 1508 /* ASSET_CALL_NUMBER_NOT_FOUND */ :
87 $w('callnumber','Not Cataloged');
94 $w('callnumber',cn.label());
97 g.error.standard_unexpected_error_alert('retrieving volume',E);
102 g.error.standard_unexpected_error_alert('retrieving copy',E);
107 g.network.simple_request('FM_CIRC_COUNT_RETRIEVE_VIA_COPY',[ g.copy_id ],function(req) {
109 var robj = req.getResultObject();
110 if (typeof robj.ilsevent != 'undefined') throw(robj);
111 $w('total_circs',robj.total.count);
113 g.error.standard_unexpected_error_alert('retrieving circ total',E);
120 var err_msg = "!! This software has encountered an error. Please tell your friendly " +
121 "system administrator or software developer the following:\ncat/copy_summary.xul\n" + E + '\n';
122 try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
130 <groupbox id="groupbox" flex="1" style="overflow: auto; min-height: 100px;">
131 <caption label="Item Summary" id="caption"/>
145 <label style="font-weight: bold" value="Barcode:"/>
146 <label id="barcode"/>
147 <label style="font-weight: bold" value="Location:"/>
148 <label id="location"/>
149 <label style="font-weight: bold" value="Call Number:"/>
150 <label id="callnumber"/>
151 <label style="font-weight: bold" value="Status:"/>
155 <label style="font-weight: bold" value="Circulate:"/>
156 <label id="circulate"/>
157 <label style="font-weight: bold" value="Reference:"/>
159 <label style="font-weight: bold" value="Holdable:"/>
160 <label id="holdable"/>
161 <label style="font-weight: bold" value="Opac Visible:"/>
162 <label id="opac_visible"/>
165 <label style="font-weight: bold" value="Created:"/>
166 <label id="create_date"/>
167 <label style="font-weight: bold" value="Edited:"/>
168 <label id="edit_date"/>
169 <label style="font-weight: bold" value="Age Protect:"/>
170 <label id="age_protect"/>
171 <label style="font-weight: bold" value="Total Circs:"/>
172 <label id="total_circs"/>