From bb4056f1acaf5fabb2a2b102cb9925c233e6485b Mon Sep 17 00:00:00 2001 From: senator Date: Thu, 15 Apr 2010 21:29:27 +0000 Subject: [PATCH] Acq: admin interfaces for claims objects, link to claim policy from LI table git-svn-id: svn://svn.open-ils.org/ILS/trunk@16246 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/examples/fm_IDL.xml | 16 +++++++-- Open-ILS/web/js/ui/default/acq/common/li_table.js | 9 +++++ .../js/ui/default/conify/global/acq/claim_grid.js | 35 ++++++++++++++++++ Open-ILS/web/opac/locale/en-US/lang.dtd | 8 +++++ .../web/templates/default/acq/common/li_table.tt2 | 2 ++ .../default/conify/global/acq/claim_event_type.tt2 | 41 ++++++++++++++++++++++ .../default/conify/global/acq/claim_policy.tt2 | 39 ++++++++++++++++++++ .../conify/global/acq/claim_policy_action.tt2 | 32 +++++++++++++++++ .../default/conify/global/acq/claim_type.tt2 | 39 ++++++++++++++++++++ .../xul/staff_client/chrome/content/main/menu.js | 16 +++++++++ .../chrome/content/main/menu_frame_menus.xul | 9 +++++ 11 files changed, 244 insertions(+), 2 deletions(-) create mode 100644 Open-ILS/web/js/ui/default/conify/global/acq/claim_grid.js create mode 100644 Open-ILS/web/templates/default/conify/global/acq/claim_event_type.tt2 create mode 100644 Open-ILS/web/templates/default/conify/global/acq/claim_policy.tt2 create mode 100644 Open-ILS/web/templates/default/conify/global/acq/claim_policy_action.tt2 create mode 100644 Open-ILS/web/templates/default/conify/global/acq/claim_type.tt2 diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index 64a8636625..19f540caae 100644 --- a/Open-ILS/examples/fm_IDL.xml +++ b/Open-ILS/examples/fm_IDL.xml @@ -6156,12 +6156,18 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + + + + + + - + @@ -6171,6 +6177,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + + + + + + @@ -6231,7 +6243,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - + diff --git a/Open-ILS/web/js/ui/default/acq/common/li_table.js b/Open-ILS/web/js/ui/default/acq/common/li_table.js index 1393933196..7a9288ea5b 100644 --- a/Open-ILS/web/js/ui/default/acq/common/li_table.js +++ b/Open-ILS/web/js/ui/default/acq/common/li_table.js @@ -220,6 +220,15 @@ function AcqLiTable() { this.updateLiNotesCount(li, row); + if (li.claim_policy()) { + var actViewInvoice = nodeByName("action_view_claim_policy", row); + actViewInvoice.disabled = false; + actViewInvoice.onclick = function() { + location.href = oilsBasePath + "/conify/global/acq/claim_policy/" + + li.claim_policy(); + }; + } + // show which PO this lineitem is a member of if(li.purchase_order() && !this.isPO) { var po = diff --git a/Open-ILS/web/js/ui/default/conify/global/acq/claim_grid.js b/Open-ILS/web/js/ui/default/conify/global/acq/claim_grid.js new file mode 100644 index 0000000000..2557717003 --- /dev/null +++ b/Open-ILS/web/js/ui/default/conify/global/acq/claim_grid.js @@ -0,0 +1,35 @@ +dojo.require("openils.widget.AutoGrid"); +dojo.require("openils.widget.OrgUnitFilteringSelect"); + +var owner; + +function prepareOwnerSelector(perm) { + new openils.User().buildPermOrgSelector( + perm, + ownerSelect, + null, + function() { + dojo.connect( + ownerSelect, + "onChange", + function() { + owner = fieldmapper.aou.findOrgUnit(this.attr("value")); + grid.resetStore(); + populateGrid(); + } + ); + } + ); +} + +function populateGrid(id) { + var search = typeof(ownerSelect) == "undefined" ? {"id": {"!=": null}} : { + "org_unit": fieldmapper.aou.orgNodeTrail( + owner || fieldmapper.aou.findOrgUnit(openils.User.user.ws_ou()), + true /* asId */ + ) + }; + if (id) search.id = id; + + grid.loadAll(null, search); +} diff --git a/Open-ILS/web/opac/locale/en-US/lang.dtd b/Open-ILS/web/opac/locale/en-US/lang.dtd index 7dfbd5a42b..93ac6ce182 100644 --- a/Open-ILS/web/opac/locale/en-US/lang.dtd +++ b/Open-ILS/web/opac/locale/en-US/lang.dtd @@ -696,6 +696,14 @@ + + + + + + + + diff --git a/Open-ILS/web/templates/default/acq/common/li_table.tt2 b/Open-ILS/web/templates/default/acq/common/li_table.tt2 index 4d42f380aa..a1e969472e 100644 --- a/Open-ILS/web/templates/default/acq/common/li_table.tt2 +++ b/Open-ILS/web/templates/default/acq/common/li_table.tt2 @@ -77,6 +77,7 @@ () + @@ -111,6 +112,7 @@ + diff --git a/Open-ILS/web/templates/default/conify/global/acq/claim_event_type.tt2 b/Open-ILS/web/templates/default/conify/global/acq/claim_event_type.tt2 new file mode 100644 index 0000000000..0ae7b59c9a --- /dev/null +++ b/Open-ILS/web/templates/default/conify/global/acq/claim_event_type.tt2 @@ -0,0 +1,41 @@ +[% WRAPPER default/base.tt2 %] + + +
+
+
Claim Event Types
+
+ + +
+
+
+ Show claim event types available to + +
+ +
+
+[% END %] diff --git a/Open-ILS/web/templates/default/conify/global/acq/claim_policy.tt2 b/Open-ILS/web/templates/default/conify/global/acq/claim_policy.tt2 new file mode 100644 index 0000000000..5c3724c04b --- /dev/null +++ b/Open-ILS/web/templates/default/conify/global/acq/claim_policy.tt2 @@ -0,0 +1,39 @@ +[% WRAPPER default/base.tt2 %] + + +
+
+
Claim Policies
+
+ + +
+
+
+ Show claim policies available to + +
+ +
+
+[% END %] diff --git a/Open-ILS/web/templates/default/conify/global/acq/claim_policy_action.tt2 b/Open-ILS/web/templates/default/conify/global/acq/claim_policy_action.tt2 new file mode 100644 index 0000000000..27fe36f3aa --- /dev/null +++ b/Open-ILS/web/templates/default/conify/global/acq/claim_policy_action.tt2 @@ -0,0 +1,32 @@ +[% WRAPPER default/base.tt2 %] + + +
+
+
Claim Policy Actions
+
+ + +
+
+ +
+
+[% END %] diff --git a/Open-ILS/web/templates/default/conify/global/acq/claim_type.tt2 b/Open-ILS/web/templates/default/conify/global/acq/claim_type.tt2 new file mode 100644 index 0000000000..84255580bb --- /dev/null +++ b/Open-ILS/web/templates/default/conify/global/acq/claim_type.tt2 @@ -0,0 +1,39 @@ +[% WRAPPER default/base.tt2 %] + + +
+
+
Claim Types
+
+ + +
+
+
+ Show claim types available to + +
+ +
+
+[% END %] diff --git a/Open-ILS/xul/staff_client/chrome/content/main/menu.js b/Open-ILS/xul/staff_client/chrome/content/main/menu.js index 51f1c4c412..aea955ee0b 100644 --- a/Open-ILS/xul/staff_client/chrome/content/main/menu.js +++ b/Open-ILS/xul/staff_client/chrome/content/main/menu.js @@ -667,6 +667,22 @@ main.menu.prototype = { ['oncommand'], function() { open_eg_web_page('conify/global/acq/cancel_reason'); } ], + 'cmd_server_admin_acq_claim_type' : [ + ['oncommand'], + function() { open_eg_web_page('conify/global/acq/claim_type'); } + ], + 'cmd_server_admin_acq_claim_event_type' : [ + ['oncommand'], + function() { open_eg_web_page('conify/global/acq/claim_event_type'); } + ], + 'cmd_server_admin_acq_claim_policy' : [ + ['oncommand'], + function() { open_eg_web_page('conify/global/acq/claim_policy'); } + ], + 'cmd_server_admin_acq_claim_policy_action' : [ + ['oncommand'], + function() { open_eg_web_page('conify/global/acq/claim_policy_action'); } + ], 'cmd_server_admin_z39_source' : [ ['oncommand'], function() { open_eg_web_page('conify/global/config/z3950_source'); } diff --git a/Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul b/Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul index 52bf257100..62dfe83db8 100644 --- a/Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul +++ b/Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul @@ -133,6 +133,10 @@ + + + + @@ -357,6 +361,11 @@ + + + + + -- 2.11.0