[open-ils-commits] r16139 - in trunk/Open-ILS: web/opac/locale/en-US xul/staff_client/chrome/content/main xul/staff_client/server/cat xul/staff_client/server/circ xul/staff_client/server/locale/en-US (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Apr 6 11:33:20 EDT 2010
Author: phasefx
Date: 2010-04-06 11:33:17 -0400 (Tue, 06 Apr 2010)
New Revision: 16139
Modified:
trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js
trunk/Open-ILS/xul/staff_client/server/cat/util.js
trunk/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js
trunk/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.xul
trunk/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties
Log:
Some polish for Item Details/Quick Summary tab (the Alternate View in Item Status)
* localize more bools
* disambiguate Copy Status, Transit Copy Status, and Hold Status. Flesh copy statuses for display and provide a tooltip for Holdable/OPAC visible
* textual labels for fine_level and loan_duration
* show the Fine Level
* fix display of circ modifier and reference flag
* Removed Hold Shelf Location and Rolling Counter for now since those aren't implemented yet (left in the DTD entities, however)
* display Circulate flag
* remove some old commented out code
* flesh and render the call number
* fix display of Remaining Renewals
* Use open-ils.circ.renewal_chain.retrieve_by_circ.summary for simpler rendering of Checkout Workstation with circ chains
Modified: trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
===================================================================
--- trunk/Open-ILS/web/opac/locale/en-US/lang.dtd 2010-04-06 14:10:52 UTC (rev 16138)
+++ trunk/Open-ILS/web/opac/locale/en-US/lang.dtd 2010-04-06 15:33:17 UTC (rev 16139)
@@ -3147,6 +3147,7 @@
<!ENTITY staff.circ.alternate_copy_summary.Checkout_Date.label "Checkout Date">
<!ENTITY staff.circ.alternate_copy_summary.Checkout_Workstation.label "Checkout Workstation">
<!ENTITY staff.circ.alternate_copy_summary.Circ_Modifier.label "Circ Modifier">
+<!ENTITY staff.circ.alternate_copy_summary.Circulate.label "Circulate">
<!ENTITY staff.circ.alternate_copy_summary.Circulation_History.label "Circulation History">
<!ENTITY staff.circ.alternate_copy_summary.Copy_ID.label "Copy ID">
<!ENTITY staff.circ.alternate_copy_summary.Copy_Location.label "Copy Location">
@@ -3160,6 +3161,7 @@
<!ENTITY staff.circ.alternate_copy_summary.Holds_Transit.label "Holds/Transit">
<!ENTITY staff.circ.alternate_copy_summary.ISBN.label "ISBN">
<!ENTITY staff.circ.alternate_copy_summary.Loan_Duration.label "Loan Duration">
+<!ENTITY staff.circ.alternate_copy_summary.Fine_Level.label "Fine Level">
<!ENTITY staff.circ.alternate_copy_summary.OPAC_Visible.label "OPAC Visible">
<!ENTITY staff.circ.alternate_copy_summary.Owning_Library.label "Owning Library">
<!ENTITY staff.circ.alternate_copy_summary.Price.label "Price">
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js 2010-04-06 14:10:52 UTC (rev 16138)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js 2010-04-06 15:33:17 UTC (rev 16139)
@@ -197,6 +197,7 @@
'FM_CBT_RETRIEVE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.billing_type.ranged.retrieve.all', 'secure' : false },
'FM_CCS_RETRIEVE' : { 'app' : 'open-ils.search', 'method' : 'open-ils.search.config.copy_status.retrieve.all', 'secure' : false },
'FM_CIRC_CHAIN' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.renewal_chain.retrieve_by_circ.atomic' },
+ 'FM_CIRC_CHAIN_SUMMARY' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.renewal_chain.retrieve_by_circ.summary' },
'FM_CIRC_DETAILS' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.fleshed.retrieve' },
'FM_CIRC_DETAILS.authoritative' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.fleshed.retrieve.authoritative' },
'FM_CIRC_RETRIEVE_VIA_ID' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.retrieve' },
Modified: trunk/Open-ILS/xul/staff_client/server/cat/util.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/cat/util.js 2010-04-06 14:10:52 UTC (rev 16138)
+++ trunk/Open-ILS/xul/staff_client/server/cat/util.js 2010-04-06 15:33:17 UTC (rev 16139)
@@ -8,7 +8,8 @@
cat.util.EXPORT_OK = [
'spawn_copy_editor', 'add_copies_to_bucket', 'show_in_opac', 'spawn_spine_editor', 'transfer_copies',
'transfer_title_holds', 'mark_item_missing', 'mark_item_damaged', 'replace_barcode', 'fast_item_add',
- 'make_bookable', 'edit_new_brsrc', 'edit_new_bresv', 'batch_edit_volumes'
+ 'make_bookable', 'edit_new_brsrc', 'edit_new_bresv', 'batch_edit_volumes', 'render_fine_level',
+ 'render_loan_duration'
];
cat.util.EXPORT_TAGS = { ':all' : cat.util.EXPORT_OK };
@@ -719,4 +720,23 @@
}
}
+cat.util.render_fine_level = function(value) {
+ var text;
+ switch(Number(value)){
+ case 1: text = document.getElementById("catStrings").getString("staff.cat.copy_editor.field.fine_level.low"); break;
+ case 2: text = document.getElementById("catStrings").getString("staff.cat.copy_editor.field.fine_level.normal"); break;
+ case 3: text = document.getElementById("catStrings").getString("staff.cat.copy_editor.field.fine_level.high"); break;
+ }
+ return text;
+}
+cat.util.render_loan_duration = function(value) {
+ var text;
+ switch(Number(value)){
+ case 1: text = document.getElementById("catStrings").getString("staff.cat.copy_editor.field.loan_duration.short"); break;
+ case 2: text = document.getElementById("catStrings").getString("staff.cat.copy_editor.field.loan_duration.normal"); break;
+ case 3: text = document.getElementById("catStrings").getString("staff.cat.copy_editor.field.loan_duration.extended"); break;
+ }
+ return text;
+}
+
dump('exiting cat/util.js\n');
Modified: trunk/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js 2010-04-06 14:10:52 UTC (rev 16138)
+++ trunk/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js 2010-04-06 15:33:17 UTC (rev 16139)
@@ -14,6 +14,7 @@
JSAN.use('util.network'); network = new util.network();
JSAN.use('OpenILS.data'); data = new OpenILS.data(); data.stash_retrieve();
JSAN.use('util.date');
+ JSAN.use('cat.util');
// timeout so xulG gets a chance to get pushed in
setTimeout(
@@ -73,53 +74,7 @@
}
if (typeof bib_brief_overlay == 'function') bib_brief_overlay( { 'mvr' : details.mvr, 'acp' : details.copy } );
-/*
- set('title', '');
- set('author', '');
- set('doc_id', '');
- set('doc_type', '');
- set('pubdate', '');
- set('isbn', '');
- set('publisher', '');
- set('tcn', '');
- set('subject', '');
- set('types_of_resource', '');
- set('call_numbers', '');
- set('edition', '');
- set('online_loc', '');
- set('synopsis', '');
- set('physical_description', '');
- set('toc', '');
- set('copy_count', '');
- set('series', '');
- set('serials', '');
- if (details.mvr) {
- set('title',details.mvr.title());
- set('author',details.mvr.author());
- set('doc_id', details.mvr.doc_id());
- set('doc_type', details.mvr.doc_type());
- set('pubdate', details.mvr.pubdate());
- set('isbn',details.mvr.isbn());
- set('publisher', details.mvr.publisher());
- set('tcn', details.mvr.tcn());
- set('subject', details.mvr.subject());
- set('types_of_resource', details.mvr.types_of_resource());
- set('call_numbers', details.mvr.call_numbers());
- set('edition', details.mvr.edition());
- set('online_loc', details.mvr.online_loc());
- set('synopsis', details.mvr.synopsis());
- set('physical_description', details.mvr.physical_description());
- set('toc', details.mvr.toc());
- set('copy_count', details.mvr.copy_count());
- set('series', details.mvr.series());
- set('serials', details.mvr.serials());
- } else {
- set('title',details.copy.dummy_title());
- set('author',details.copy.dummy_author());
- set('isbn',details.copy.dummy_isbn());
- }
-*/
set("stat_cat_entries", '');
set("age_protect", '');
set("alert_message", '');
@@ -151,7 +106,8 @@
set("opac_visible", '');
set("price", '');
set("ref", '');
- set("status", '');
+ set("copy_status", '');
+ set_tooltip("copy_status", '');
set("notes", '');
set("stat_cat_entry_copy_maps", '');
set("circulations", '');
@@ -166,12 +122,19 @@
set("age_protect", details.copy.age_protect());
set("alert_message", details.copy.alert_message());
set("barcode", details.copy.barcode());
- set("call_number", details.copy.call_number());
+ if (typeof details.copy.call_number() == 'object') {
+ set("call_number", details.copy.call_number().label());
+ } else {
+ network.simple_request('FM_ACN_RETRIEVE.authoritative',[details.copy.call_number()], function(req) {
+ var acn_obj = req.getResultObject();
+ set("call_number", acn_obj.label());
+ });
+ }
set("circ_as_type", details.copy.circ_as_type());
set("copy_circ_lib" , typeof details.copy.circ_lib() == 'object' ? details.copy.circ_lib().shortname() : data.hash.aou[ details.copy.circ_lib() ].shortname());
set_tooltip("copy_circ_lib" , typeof details.copy.circ_lib() == 'object' ? details.copy.circ_lib().name() : data.hash.aou[ details.copy.circ_lib() ].name());
set("circ_modifier", details.copy.circ_modifier());
- set("circulate", details.copy.circulate());
+ set("circulate", get_localized_bool( details.copy.circulate() ));
set("copy_number", details.copy.copy_number());
set("copy_create_date", util.date.formatted_date( details.copy.create_date(), '%{localized}' ));
set("status_changed_time", util.date.formatted_date( details.copy.status_changed_time(), '%{localized}' ));
@@ -183,10 +146,10 @@
set("dummy_title", details.copy.dummy_title());
set("copy_edit_date", util.date.formatted_date( details.copy.edit_date(), '%{localized}' ));
set("copy_editor", details.copy.editor());
- set("fine_level", details.copy.fine_level());
- set("holdable", details.copy.holdable());
+ set("fine_level", cat.util.render_fine_level( details.copy.fine_level() ));
+ set("holdable", get_localized_bool( details.copy.holdable() ));
set("copy_id", details.copy.id());
- set("loan_duration", details.copy.loan_duration());
+ set("loan_duration", cat.util.render_loan_duration( details.copy.loan_duration() ));
var copy_location = typeof details.copy.location() == 'object' ? details.copy.location() : data.lookup('acpl',details.copy.location());
set("location", copy_location.name());
set_tooltip("location", document.getElementById('circStrings').getFormattedString(
@@ -198,10 +161,18 @@
get_localized_bool( copy_location.opac_visible() )
]
));
- set("opac_visible", details.copy.opac_visible());
+ set("opac_visible", get_localized_bool( details.copy.opac_visible() ));
set("price", details.copy.price());
- set("ref", details.copy.ref());
- set("status", details.copy.status());
+ set("ref", get_localized_bool( details.copy.ref() ));
+ var copy_status = typeof details.copy.status() == 'object' ? details.copy.status() : data.hash.ccs[ details.copy.status() ];
+ set("copy_status", copy_status.name() );
+ set_tooltip("copy_status", document.getElementById('circStrings').getFormattedString(
+ 'staff.circ.copy_details.copy_status_tooltip',
+ [
+ get_localized_bool( copy_status.opac_visible() ),
+ get_localized_bool( copy_status.holdable() )
+ ]
+ ));
set("notes", details.copy.notes());
set("stat_cat_entry_copy_maps", details.copy.stat_cat_entry_copy_maps());
set("circulations", details.copy.circulations());
@@ -265,7 +236,8 @@
set("uris", details.volume.uris());
}
- set("copy_status", '');
+ set("transit_copy_status", '');
+ set_tooltip("transit_copy_status", '');
set("dest", '');
set("dest_recv_time", '');
set("transit_id", '');
@@ -277,7 +249,15 @@
set("hold_transit_copy", '');
if (details.transit) {
- set("copy_status", details.transit.copy_status());
+ var transit_copy_status = typeof details.transit.copy_status() == 'object' ? details.transit.copy_status() : data.hash.ccs[ details.transit.copy_status() ];
+ set("transit_copy_status", transit_copy_status.name() );
+ set_tooltip("transit_copy_status", document.getElementById('circStrings').getFormattedString(
+ 'staff.circ.copy_details.copy_status_tooltip',
+ [
+ get_localized_bool( transit_copy_status.opac_visible() ),
+ get_localized_bool( transit_copy_status.holdable() )
+ ]
+ ));
set("dest", details.transit.dest());
set("dest_recv_time", util.date.formatted_date( details.transit.dest_recv_time(), '%{localized}' ));
set("transit_id", details.transit.id());
@@ -361,10 +341,15 @@
set("workstation", details.circ.workstation());
if (get_bool(details.circ.opac_renewal())||get_bool(details.circ.phone_renewal())||get_bool(details.circ.desk_renewal())) {
set("renewal_workstation", (typeof details.circ.workstation() == 'object' && details.circ.workstation() != null) ? details.circ.workstation().name() : details.circ.workstation() );
- network.simple_request('FM_CIRC_CHAIN', [ses(), details.circ.id() ], function(req) { // Tiny race condition between details.circ and circs[circs.length-1] here, but meh :)
+ network.simple_request('FM_CIRC_CHAIN_SUMMARY', [ses(), details.circ.id() ], function(req) {
try {
- var circs = req.getResultObject();
- set("checkout_workstation", (typeof circs[0].workstation() == 'object' && circs[0].workstation() != null) ? circs[0].workstation().name() : circs[0].workstation() );
+ var summary = req.getResultObject();
+ set("checkout_workstation", summary.checkout_workstation());
+ set("renewal_workstation", summary.last_renewal_workstation());
+ set("checkin_workstation", summary.last_checkin_workstation());
+ set("stop_fines", summary.last_stop_fines());
+ set("stop_fines_time", util.date.formatted_date( summary.last_stop_fines_time(), '%{localized}' ));
+ set("renewal_time", util.date.formatted_date( summary.last_renewal_time(), '%{localized}' ));
} catch(E) {
alert('Error in alternate_copy_summary.js, FM_CIRC_CHAIN: ' + E);
}
@@ -444,7 +429,7 @@
}
}
- set("status", '');
+ set("hold_status", '');
set("transit", '');
set("capture_time", '');
set("current_copy", '');
@@ -484,7 +469,7 @@
set("notes", '');
if (details.hold) {
- set("status", details.hold.status());
+ set("hold_status", details.hold.status());
set("transit", details.hold.transit());
set("capture_time", util.date.formatted_date( details.hold.capture_time(), '%{localized}' ));
set("current_copy", details.hold.current_copy());
Modified: trunk/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.xul 2010-04-06 14:10:52 UTC (rev 16138)
+++ trunk/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.xul 2010-04-06 15:33:17 UTC (rev 16139)
@@ -33,6 +33,7 @@
<script type="text/javascript" src="alternate_copy_summary.js"/>
<messagecatalog id="circStrings" src="/xul/server/locale/<!--#echo var='locale'-->/circ.properties"/>
+ <messagecatalog id="catStrings" src="/xul/server/locale/<!--#echo var='locale'-->/cat.properties"/>
<groupbox flex="1">
@@ -77,7 +78,7 @@
<label value="&staff.circ.alternate_copy_summary.Call_Number.label;" />
<textbox name="call_number" readonly="true" context="clipboard"/>
<label value="&staff.circ.alternate_copy_summary.Status.label;" />
- <textbox name="status" readonly="true" context="clipboard"/>
+ <textbox name="copy_status" readonly="true" context="clipboard"/>
</row>
<row>
<label value="&staff.circ.alternate_copy_summary.Price.label;" />
@@ -104,8 +105,8 @@
<row>
<label value="&staff.circ.alternate_copy_summary.Date_Created.label;" />
<textbox name="copy_create_date" readonly="true" context="clipboard"/>
- <label value="&staff.circ.alternate_copy_summary.Reference.label;" />
- <textbox name="reference" readonly="true" context="clipboard"/>
+ <label value="&staff.circ.alternate_copy_summary.Fine_Level.label;" />
+ <textbox name="fine_level" readonly="true" context="clipboard"/>
<label value="&staff.circ.alternate_copy_summary.Total_Circs___Current_Year.label;" />
<textbox name="total_circ_count_curr_year" readonly="true" context="clipboard"/>
<label value="&staff.circ.alternate_copy_summary.Checkout_Workstation.label;" />
@@ -114,8 +115,8 @@
<row>
<label value="&staff.circ.alternate_copy_summary.Status_Changed_Time.label;" />
<textbox name="status_changed_time" readonly="true" context="clipboard"/>
- <label value="&staff.circ.alternate_copy_summary.OPAC_Visible.label;" />
- <textbox name="opac_visible" readonly="true" context="clipboard"/>
+ <label value="&staff.circ.alternate_copy_summary.Reference.label;" />
+ <textbox name="ref" readonly="true" context="clipboard"/>
<label value="&staff.circ.alternate_copy_summary.Total_Circs___Prev_Year.label;" />
<textbox name="total_circ_count_prev_year" readonly="true" context="clipboard"/>
<label value="&staff.circ.alternate_copy_summary.Duration_Rule.label;" />
@@ -124,37 +125,44 @@
<row>
<label value="&staff.circ.alternate_copy_summary.Copy_ID.label;" />
<textbox name="copy_id" readonly="true" context="clipboard"/>
- <label value="&staff.circ.alternate_copy_summary.Holdable.label;" />
- <textbox name="holdable" readonly="true" context="clipboard"/>
+ <label value="&staff.circ.alternate_copy_summary.OPAC_Visible.label;" />
+ <textbox name="opac_visible" readonly="true" context="clipboard"/>
+ <!--
<label value="&staff.circ.alternate_copy_summary.Rolling_Counter.label;" />
<textbox name="rolling_counter" readonly="true" context="clipboard"/>
+ -->
+ <label value="&staff.circ.alternate_copy_summary.Renewal_Workstation.label;" />
+ <textbox name="renewal_workstation" readonly="true" context="clipboard"/>
<label value="&staff.circ.alternate_copy_summary.Recurring_Fine_Rule.label;" />
<textbox name="recurring_fine_rule" readonly="true" context="clipboard"/>
</row>
<row>
<label value="&staff.circ.alternate_copy_summary.TCN.label;" />
<textbox name="tcn" readonly="true" context="clipboard"/>
- <label value="&staff.circ.alternate_copy_summary.Circ_Modifier.label;" />
- <textbox name="circ_mod" readonly="true" context="clipboard"/>
- <label value="&staff.circ.alternate_copy_summary.Renewal_Workstation.label;" />
- <textbox name="renewal_workstation" readonly="true" context="clipboard"/>
+ <label value="&staff.circ.alternate_copy_summary.Holdable.label;" />
+ <textbox name="holdable" readonly="true" context="clipboard"/>
+ <label value="&staff.circ.alternate_copy_summary.Remaining_Renewals.label;" />
+ <textbox name="renewal_remaining" readonly="true" context="clipboard"/>
<label value="&staff.circ.alternate_copy_summary.Max_Fine_Rule.label;" />
<textbox name="max_fine_rule" readonly="true" context="clipboard"/>
</row>
<row>
- <spacer />
- <spacer />
- <label value="&staff.circ.alternate_copy_summary.Hold_Shelf_Location.label;" />
- <textbox name="hold_shelf_loc" readonly="true" context="clipboard"/>
- <label value="&staff.circ.alternate_copy_summary.Remaining_Renewals.label;" />
- <textbox name="remaining_renewals" readonly="true" context="clipboard"/>
+ <spacer /><spacer />
+ <label value="&staff.circ.alternate_copy_summary.Circulate.label;" />
+ <textbox name="circulate" readonly="true" context="clipboard"/>
+ <spacer /><spacer />
<label value="&staff.circ.alternate_copy_summary.Checkin_Time.label;" />
<textbox name="checkin_time" readonly="true" context="clipboard"/>
</row>
<row>
<spacer /><spacer />
+ <label value="&staff.circ.alternate_copy_summary.Circ_Modifier.label;" />
+ <textbox name="circ_modifier" readonly="true" context="clipboard"/>
+ <!--
+ <label value="&staff.circ.alternate_copy_summary.Hold_Shelf_Location.label;" />
+ <textbox name="hold_shelf_loc" readonly="true" context="clipboard"/>
+ -->
<spacer /><spacer />
- <spacer /><spacer />
<label value="&staff.circ.alternate_copy_summary.Checkin_Scan_Time.label;" />
<textbox name="checkin_scan_time" readonly="true" context="clipboard"/>
</row>
Modified: trunk/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties 2010-04-06 14:10:52 UTC (rev 16138)
+++ trunk/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties 2010-04-06 15:33:17 UTC (rev 16139)
@@ -102,6 +102,8 @@
staff.circ.copy_details.max_fine_rule_tooltip_format=%3$s Is Percent? %4$s
# From asset::copy_location: 1 - Can Circulate? 2 - Is Holdable? 3 - Hold Capture Requires Verification? 4 - Is OPAC Visible?
staff.circ.copy_details.location_tooltip=Circulate? %1$s Holdable? %2$s Hold Verify? %3$s OPAC Visible? %4$s
+# From config::copy_status: 1 - OPAC Visible? 2 - Is Holdable?
+staff.circ.copy_details.copy_status_tooltip=OPAC Visible? %1$s Holdable? %2$s
staff.circ.copy_status.tab_name=Item Status
staff.circ.copy_status.action.complete=Action complete.
staff.circ.copy_status.sel_checkin.error=Checkin did not likely happen.
More information about the open-ils-commits
mailing list