From 580fed6d32cd8113c6d45a6c36fa97e28cce9f78 Mon Sep 17 00:00:00 2001 From: Lebbeous Fogle-Weekley Date: Tue, 21 Jun 2011 10:27:11 -0400 Subject: [PATCH] conify type interfaces in progress. not completely deleting old unfinished ones yet; there are probably things to salvage Signed-off-by: Lebbeous Fogle-Weekley --- Open-ILS/examples/fm_IDL.xml | 42 +++++------ .../lib/OpenILS/Application/Cat/Authority.pm | 44 +++++++++++ .../web/js/dojo/openils/authority/nls/authority.js | 4 +- Open-ILS/web/js/dojo/openils/widget/AutoGrid.js | 2 +- Open-ILS/web/opac/locale/en-US/lang.dtd | 5 ++ .../templates/default/authority/control_set.tt2 | 85 ++++++++++++++++++++++ ...authority_field.tt2 => authority_field.tt2.old} | 0 .../authority/{bib_field.tt2 => bib_field.tt2.old} | 0 .../{control_set.tt2 => control_set.tt2.old} | 0 .../authority/{thesaurus.tt2 => thesaurus.tt2.old} | 0 .../xul/staff_client/chrome/content/main/menu.js | 11 ++- .../chrome/content/main/menu_frame_menus.xul | 10 +++ .../chrome/locale/en-US/offline.properties | 1 + 13 files changed, 179 insertions(+), 25 deletions(-) create mode 100644 Open-ILS/web/templates/default/authority/control_set.tt2 rename Open-ILS/web/templates/default/conify/global/authority/{authority_field.tt2 => authority_field.tt2.old} (100%) rename Open-ILS/web/templates/default/conify/global/authority/{bib_field.tt2 => bib_field.tt2.old} (100%) rename Open-ILS/web/templates/default/conify/global/authority/{control_set.tt2 => control_set.tt2.old} (100%) rename Open-ILS/web/templates/default/conify/global/authority/{thesaurus.tt2 => thesaurus.tt2.old} (100%) diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index 621606e74d..052c802206 100644 --- a/Open-ILS/examples/fm_IDL.xml +++ b/Open-ILS/examples/fm_IDL.xml @@ -1759,7 +1759,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - + @@ -1772,16 +1772,16 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - + - - + + - + @@ -1804,16 +1804,16 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - + - - + + - + @@ -1823,10 +1823,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - + - - + + @@ -1843,10 +1843,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - + - - + + @@ -1865,10 +1865,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - + - - + + @@ -1885,10 +1885,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - + - - + + diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat/Authority.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat/Authority.pm index 9e6055739c..937aee7330 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat/Authority.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat/Authority.pm @@ -226,4 +226,48 @@ sub count_linked_bibs { return $link_count; } +__PACKAGE__->register_method( + "method" => "retrieve_acs", + "api_name" => "open-ils.cat.authority.control_set.retrieve", + "api_level" => 1, + "stream" => 1, + "argc" => 2, + "signature" => { + "desc" => q/Retrieve authority.control_set objects with fleshed + thesauri and authority fields/, + "params" => [ + {"name" => "limit", "desc" => "limit (optional; default 15)", "type" => "number"}, + {"name" => "offset", "desc" => "offset doptional; default 0)", "type" => "number"}, + {"name" => "id", "desc" => "acs id (optional; default all)", "type" => "number"} + ] + } +); + +# XXX I don't think this really needs to be protected by perms, or does it? +sub retrieve_acs { + my $self = shift; + my $client = shift; + + my ($limit, $offset, $id) = map int, @_; + + $limit ||= 15; + $offset ||= 0; + $id ||= undef; + + my $e = new_editor; + my $where = {"id" => ($id ? $id : {"!=" => undef})}; + my $sets = $e->search_authority_control_set([ + $where, { + "flesh" => 1, + "flesh_fields" => {"acs" => [qw/thesauri authority_fields/]}, + "order_by" => {"acs" => "name"} + } + ]) or return $e->die_event; + + $e->disconnect; + + $client->respond($_) foreach @$sets; + return undef; +} + 1; diff --git a/Open-ILS/web/js/dojo/openils/authority/nls/authority.js b/Open-ILS/web/js/dojo/openils/authority/nls/authority.js index 732b433377..f7ea8a0b67 100644 --- a/Open-ILS/web/js/dojo/openils/authority/nls/authority.js +++ b/Open-ILS/web/js/dojo/openils/authority/nls/authority.js @@ -15,5 +15,7 @@ "CONFIRM_DELETE_RESULT": "Deleted authority record # ${0}.", "SAVE": "Save", "SAVE_RESULT_SUCCESS": "Record was saved.", - "MERGE_RESULT_SUCCESS": "Record merge is complete." + "MERGE_RESULT_SUCCESS": "Record merge is complete.", + "THESAURI": "Thesauri (${0})", + "AUTHORITY_FIELDS": "Authority Fields (${0})" } diff --git a/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js b/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js index 9e5be71670..ab42a00813 100644 --- a/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js +++ b/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js @@ -208,7 +208,7 @@ if(!dojo._hasResource['openils.widget.AutoGrid']) { var entry = existing.filter(function(i){return (i.field == field.name)})[0]; if(entry) { - entry.name = field.label; + entry.name = entry.name || field.label; } else { // unless specifically requested, hide sequence fields if(!this.showSequenceFields && field.name == this.fmIDL.pkey && this.fmIDL.pkey_sequence) diff --git a/Open-ILS/web/opac/locale/en-US/lang.dtd b/Open-ILS/web/opac/locale/en-US/lang.dtd index 6352be99d4..f5e0502dab 100644 --- a/Open-ILS/web/opac/locale/en-US/lang.dtd +++ b/Open-ILS/web/opac/locale/en-US/lang.dtd @@ -783,6 +783,11 @@ + + + + + diff --git a/Open-ILS/web/templates/default/authority/control_set.tt2 b/Open-ILS/web/templates/default/authority/control_set.tt2 new file mode 100644 index 0000000000..3c408da6b7 --- /dev/null +++ b/Open-ILS/web/templates/default/authority/control_set.tt2 @@ -0,0 +1,85 @@ +[% WRAPPER default/base.tt2 %] +[% ctx.page_title = "Configure Authority Control Sets" %] +
+
+
Control Sets
+
+ + +
+
+
+ + + + + + +
+
+ + +[% END %] diff --git a/Open-ILS/web/templates/default/conify/global/authority/authority_field.tt2 b/Open-ILS/web/templates/default/conify/global/authority/authority_field.tt2.old similarity index 100% rename from Open-ILS/web/templates/default/conify/global/authority/authority_field.tt2 rename to Open-ILS/web/templates/default/conify/global/authority/authority_field.tt2.old diff --git a/Open-ILS/web/templates/default/conify/global/authority/bib_field.tt2 b/Open-ILS/web/templates/default/conify/global/authority/bib_field.tt2.old similarity index 100% rename from Open-ILS/web/templates/default/conify/global/authority/bib_field.tt2 rename to Open-ILS/web/templates/default/conify/global/authority/bib_field.tt2.old diff --git a/Open-ILS/web/templates/default/conify/global/authority/control_set.tt2 b/Open-ILS/web/templates/default/conify/global/authority/control_set.tt2.old similarity index 100% rename from Open-ILS/web/templates/default/conify/global/authority/control_set.tt2 rename to Open-ILS/web/templates/default/conify/global/authority/control_set.tt2.old diff --git a/Open-ILS/web/templates/default/conify/global/authority/thesaurus.tt2 b/Open-ILS/web/templates/default/conify/global/authority/thesaurus.tt2.old similarity index 100% rename from Open-ILS/web/templates/default/conify/global/authority/thesaurus.tt2 rename to Open-ILS/web/templates/default/conify/global/authority/thesaurus.tt2.old 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 79949f431b..3caf9d61b5 100644 --- a/Open-ILS/xul/staff_client/chrome/content/main/menu.js +++ b/Open-ILS/xul/staff_client/chrome/content/main/menu.js @@ -959,6 +959,10 @@ main.menu.prototype = { ['oncommand'], function(event) { open_eg_web_page('conify/global/config/usr_setting_type', null, event); } ], + 'cmd_server_admin_authority_control_set': [ + ['oncommand'], + function(event) { open_eg_web_page('authority/control_set', null, event); } + ], 'cmd_server_admin_booking_resource': [ ['oncommand'], function(event) { open_eg_web_page('conify/global/booking/resource', null, event); } @@ -1157,8 +1161,11 @@ main.menu.prototype = { 'cmd_authority_manage' : [ ['oncommand'], function(event) { - obj.data.stash_retrieve(); - obj.command_tab(event,obj.url_prefix(urls.AUTHORITY_MANAGE),{},{}); + open_eg_web_page( + urls.AUTHORITY_MANAGE, + "menu.cmd_authority_manage.tab", + event + ); } ], 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 741c0ce1d3..d1279c1fd3 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 @@ -199,6 +199,9 @@ + + + @@ -518,6 +521,13 @@ + + + + + + + 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 eceebc7608..753da5845e 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 @@ -251,6 +251,7 @@ menu.cmd_booking_reservation_pickup.tab=Reservation Pickup menu.cmd_booking_reservation_return.tab=Reservation Return menu.cmd_booking_pull_list.tab=Booking Pull List menu.cmd_booking_capture.tab=Booking Capture +menu.cmd_authority_manage.tab=Manage Authorities menu.local_admin.barcode_completion.tab=Barcode Completion menu.local_admin.circ_matrix_matchpoint.tab=Circulation Policies menu.local_admin.hold_matrix_matchpoint.tab=Hold Policies -- 2.11.0