From 5a5834d993e2ad7b4e9fdce9e839b956414a9ab3 Mon Sep 17 00:00:00 2001 From: Michele Morgan Date: Thu, 2 Jun 2016 12:44:02 -0400 Subject: [PATCH] LP#1588450 asset.copy.cost Field Missing from Client Interfaces This patch adds the asset.copy.cost cost field, with the label 'Acquisition Cost' to the following: XUL client: - Item status list view column picker - Item status alternate view - Copy editor Web client: - Item status alternate view - Copy editor label change Signed-off-by: Michele Morgan Signed-off-by: Mike Rylander --- .../staff/cat/item/t_summary_pane.tt2 | 38 +++++++++---------- .../staff/cat/volcopy/t_attr_edit.tt2 | 2 +- .../staff/cat/volcopy/t_defaults.tt2 | 2 +- Open-ILS/web/opac/locale/en-US/lang.dtd | 1 + .../staff_client/server/cat/copy_editor.js | 8 ++++ .../server/circ/alternate_copy_summary.js | 6 +++ .../server/circ/alternate_copy_summary.xul | 31 +++++++-------- Open-ILS/xul/staff_client/server/circ/util.js | 16 ++++++++ .../server/locale/en-US/cat.properties | 1 + .../server/locale/en-US/common.properties | 1 + 10 files changed, 69 insertions(+), 37 deletions(-) diff --git a/Open-ILS/src/templates/staff/cat/item/t_summary_pane.tt2 b/Open-ILS/src/templates/staff/cat/item/t_summary_pane.tt2 index 7d1a67607d..c21c9cdf4b 100644 --- a/Open-ILS/src/templates/staff/cat/item/t_summary_pane.tt2 +++ b/Open-ILS/src/templates/staff/cat/item/t_summary_pane.tt2 @@ -41,10 +41,8 @@
-
[% l('ISBN') %]
-
- {{copy.call_number().record().simple_record().isbn()}} -
+
[% l('Acquisition Cost') %]
+
{{copy.cost()}}
[% l('Copy Location') %]
-
[% l('Date Created') %]
-
{{copy.create_date() | date:'short'}}
+
[% l('ISBN') %]
+
+ {{copy.call_number().record().simple_record().isbn()}} +
[% l('Loan Duration') %]
{{circ.duration()}}
@@ -80,9 +80,8 @@
-
[% l('Date Active') %]
-
{{copy.active_date() | date:'short'}}
- +
[% l('Date Created') %]
+
{{copy.create_date() | date:'short'}}
[% l('Fine Level') %]
{{circ.duration_rule().name()}}
@@ -94,8 +93,8 @@
-
[% l('Status Changed') %]
-
{{copy.status_changed_time() | date:'short'}}
+
[% l('Date Active') %]
+
{{copy.active_date() | date:'short'}}
[% l('Reference') %]
{{copy.ref()}}
@@ -108,8 +107,8 @@
-
[% l('Copy ID') %]
-
{{copy.id()}}
+
[% l('Status Changed') %]
+
{{copy.status_changed_time() | date:'short'}}
[% l('OPAC Visible') %]
{{copy.opac_visible()}}
@@ -122,8 +121,8 @@
-
[% l('TCN') %]
-
{{copy.call_number().record().tcn_value()}}
+
[% l('Copy ID') %]
+
{{copy.id()}}
[% l('Holdable') %]
{{copy.opac_visible()}}
@@ -139,8 +138,8 @@
-
[% l('Floating') %]
-
{{copy.floating().name()}}
+
[% l('TCN') %]
+
{{copy.call_number().record().tcn_value()}}
[% l('Circulate') %]
{{copy.circulate()}}
@@ -156,9 +155,8 @@
- -
-
+
[% l('Floating') %]
+
{{copy.floating().name()}}
[% l('Circ Modifier') %]
{{copy.circ_modifier().name()}}
diff --git a/Open-ILS/src/templates/staff/cat/volcopy/t_attr_edit.tt2 b/Open-ILS/src/templates/staff/cat/volcopy/t_attr_edit.tt2 index 09e87d234c..38dde8fe86 100644 --- a/Open-ILS/src/templates/staff/cat/volcopy/t_attr_edit.tt2 +++ b/Open-ILS/src/templates/staff/cat/volcopy/t_attr_edit.tt2 @@ -228,7 +228,7 @@ [% l('Loan Duration') %]
- [% l('Cost') %] + [% l('Acquisition Cost') %]
diff --git a/Open-ILS/src/templates/staff/cat/volcopy/t_defaults.tt2 b/Open-ILS/src/templates/staff/cat/volcopy/t_defaults.tt2 index df0a1d794f..44b328beb0 100644 --- a/Open-ILS/src/templates/staff/cat/volcopy/t_defaults.tt2 +++ b/Open-ILS/src/templates/staff/cat/volcopy/t_defaults.tt2 @@ -201,7 +201,7 @@
diff --git a/Open-ILS/web/opac/locale/en-US/lang.dtd b/Open-ILS/web/opac/locale/en-US/lang.dtd index a820074568..bbdf8ac7d2 100644 --- a/Open-ILS/web/opac/locale/en-US/lang.dtd +++ b/Open-ILS/web/opac/locale/en-US/lang.dtd @@ -3765,6 +3765,7 @@ + diff --git a/Open-ILS/xul/staff_client/server/cat/copy_editor.js b/Open-ILS/xul/staff_client/server/cat/copy_editor.js index 0bd3fa6312..f4537a2742 100644 --- a/Open-ILS/xul/staff_client/server/cat/copy_editor.js +++ b/Open-ILS/xul/staff_client/server/cat/copy_editor.js @@ -66,6 +66,7 @@ function my_init() { remote xul for new copies */ fake_item.deposit(0); fake_item.price(0); + fake_item.cost(0); fake_item.deposit_amount(0); fake_item.fine_level(2); // Normal fake_item.loan_duration(2); // Normal @@ -1150,6 +1151,13 @@ g.panes_and_field_names = { render: 'fm.ref() == null ? $("catStrings").getString("staff.cat.copy_editor.field.unset_or_null") : ( get_bool( fm.ref() ) ? $("catStrings").getString("staff.cat.copy_editor.field.reference.yes_or_true") : $("catStrings").getString("staff.cat.copy_editor.field.reference.no_or_false") )', input: 'c = function(v){ g.apply("ref",v); if (typeof post_c == "function") post_c(v); }; x = util.widgets.make_menulist( [ [ $("catStrings").getString("staff.cat.copy_editor.field.reference.yes_or_true"), get_db_true() ], [ $("catStrings").getString("staff.cat.copy_editor.field.reference.no_or_false"), get_db_false() ] ] ); x.addEventListener("apply",function(f){ return function(ev) { f(ev.target.value); } }(c), false);', } + ], + [ + $('catStrings').getString('staff.cat.copy_editor.field.cost.label'), + { + render: 'if (fm.cost() == null) { $("catStrings").getString("staff.cat.copy_editor.field.unset_or_null"); } else { util.money.sanitize( fm.cost() ); }', + input: 'c = function(v){ g.apply("cost",v); if (typeof post_c == "function") post_c(v); }; x = document.createElement("textbox"); x.addEventListener("apply",function(f){ return function(ev) { f(ev.target.value); } }(c), false);', + } ], [ $('catStrings').getString('staff.cat.copy_editor.field.mint_condition.label'), diff --git a/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js b/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js index 2e82c0a7d5..74b7ae3d14 100644 --- a/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js +++ b/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js @@ -174,6 +174,9 @@ function load_item() { set("renewal_type", ''); set("opac_visible", ''); set("price", ''); + set_tooltip("price", ''); + set("cost", ''); + set_tooltip("cost", ''); set("ref", ''); set("copy_status", ''); set_tooltip("copy_status", ''); @@ -245,6 +248,9 @@ function load_item() { )); set("opac_visible", get_localized_bool( details.copy.opac_visible() )); set("price", details.copy.price()); + set_tooltip("price" , "Replacement Amount charged to Patron"); + set("cost", details.copy.cost()); + set_tooltip("cost" , "Acquisition Amount paid by Library"); 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() ); diff --git a/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.xul b/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.xul index fd4aba1acc..3c4ba95b83 100644 --- a/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.xul +++ b/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.xul @@ -100,8 +100,8 @@ - - - -