From 90212dfd20a00374d31d10e2b491277562a47412 Mon Sep 17 00:00:00 2001 From: dbs Date: Mon, 3 Jan 2011 03:09:33 +0000 Subject: [PATCH] Create and use authority browse feeds that match against see and see also references Approaching something workable for recognizing 4xx/5xx entries in authority records by registering feeds with ".refs." axes that search the 4xx/5xx as well as the 1xx, then using the feeds in the MARC editor authority context menu. Also tighten up the layout of the see / see from entries when they appear in the authority context menu; "text-align: right" was a bit over the top. git-svn-id: svn://svn.open-ils.org/ILS/trunk@19092 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../src/perlmods/OpenILS/Application/SuperCat.pm | 222 +++++++++++++++++---- Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm | 10 +- Open-ILS/xul/staff_client/server/cat/marcedit.js | 8 +- 3 files changed, 190 insertions(+), 50 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm b/Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm index 2f52bdf7a5..5ce3d51b9d 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm @@ -23,7 +23,7 @@ use base qw/OpenILS::Application/; # This is the client class, used for connecting to open-ils.storage use OpenSRF::AppSession; -# This is an extention of Error.pm that supplies some error types to throw +# This is an extension of Error.pm that supplies some error types to throw use OpenSRF::EX qw(:try); # This is a helper class for querying the OpenSRF Settings application ... @@ -589,12 +589,12 @@ __PACKAGE__->register_method( api_level => 1, argc => 1, signature => - { desc => "Returns a list of the requested org-scoped record ids held", + { desc => "Returns a list of the requested org-scoped record IDs held", params => [ { name => 'value', desc => 'The target title', type => 'string' }, { name => 'org_unit', desc => 'The org unit shortname (or "-" or undef for global) to browse', type => 'string' }, { name => 'page_size', desc => 'Count of records to retrieve, default is 9', type => 'number' }, - { name => 'page', desc => 'The page of records retrieve, calculated based on page_size. Can be positive, negative or 0.', type => 'number' }, + { name => 'page', desc => 'The page of records retrieved, calculated based on page_size. Can be positive, negative or 0.', type => 'number' }, { name => 'statuses', desc => 'Array of statuses to filter copies by, optional and can be undef.', type => 'array' }, { name => 'locations', desc => 'Array of copy locations to filter copies by, optional and can be undef.', type => 'array' }, ], 'return' => { desc => 'Record IDs that have copies at the relevant org units', type => 'array' } @@ -607,12 +607,12 @@ __PACKAGE__->register_method( api_level => 1, argc => 1, signature => - { desc => "Returns a list of the requested org-scoped record ids held", + { desc => "Returns a list of the requested org-scoped record IDs held", params => [ { name => 'value', desc => 'The target author', type => 'string' }, { name => 'org_unit', desc => 'The org unit shortname (or "-" or undef for global) to browse', type => 'string' }, { name => 'page_size', desc => 'Count of records to retrieve, default is 9', type => 'number' }, - { name => 'page', desc => 'The page of records retrieve, calculated based on page_size. Can be positive, negative or 0.', type => 'number' }, + { name => 'page', desc => 'The page of records retrieved, calculated based on page_size. Can be positive, negative or 0.', type => 'number' }, { name => 'statuses', desc => 'Array of statuses to filter copies by, optional and can be undef.', type => 'array' }, { name => 'locations', desc => 'Array of copy locations to filter copies by, optional and can be undef.', type => 'array' }, ], 'return' => { desc => 'Record IDs that have copies at the relevant org units', type => 'array' } @@ -625,12 +625,12 @@ __PACKAGE__->register_method( api_level => 1, argc => 1, signature => - { desc => "Returns a list of the requested org-scoped record ids held", + { desc => "Returns a list of the requested org-scoped record IDs held", params => [ { name => 'value', desc => 'The target subject', type => 'string' }, { name => 'org_unit', desc => 'The org unit shortname (or "-" or undef for global) to browse', type => 'string' }, { name => 'page_size', desc => 'Count of records to retrieve, default is 9', type => 'number' }, - { name => 'page', desc => 'The page of records retrieve, calculated based on page_size. Can be positive, negative or 0.', type => 'number' }, + { name => 'page', desc => 'The page of records retrieved, calculated based on page_size. Can be positive, negative or 0.', type => 'number' }, { name => 'statuses', desc => 'Array of statuses to filter copies by, optional and can be undef.', type => 'array' }, { name => 'locations', desc => 'Array of copy locations to filter copies by, optional and can be undef.', type => 'array' }, ], 'return' => { desc => 'Record IDs that have copies at the relevant org units', type => 'array' } @@ -643,12 +643,12 @@ __PACKAGE__->register_method( api_level => 1, argc => 1, signature => - { desc => "Returns a list of the requested org-scoped record ids held", + { desc => "Returns a list of the requested org-scoped record IDs held", params => [ { name => 'value', desc => 'The target topical subject', type => 'string' }, { name => 'org_unit', desc => 'The org unit shortname (or "-" or undef for global) to browse', type => 'string' }, { name => 'page_size', desc => 'Count of records to retrieve, default is 9', type => 'number' }, - { name => 'page', desc => 'The page of records retrieve, calculated based on page_size. Can be positive, negative or 0.', type => 'number' }, + { name => 'page', desc => 'The page of records retrieved, calculated based on page_size. Can be positive, negative or 0.', type => 'number' }, { name => 'statuses', desc => 'Array of statuses to filter copies by, optional and can be undef.', type => 'array' }, { name => 'locations', desc => 'Array of copy locations to filter copies by, optional and can be undef.', type => 'array' }, ], 'return' => { desc => 'Record IDs that have copies at the relevant org units', type => 'array' } @@ -661,12 +661,12 @@ __PACKAGE__->register_method( api_level => 1, argc => 1, signature => - { desc => "Returns a list of the requested org-scoped record ids held", + { desc => "Returns a list of the requested org-scoped record IDs held", params => [ { name => 'value', desc => 'The target series', type => 'string' }, { name => 'org_unit', desc => 'The org unit shortname (or "-" or undef for global) to browse', type => 'string' }, { name => 'page_size', desc => 'Count of records to retrieve, default is 9', type => 'number' }, - { name => 'page', desc => 'The page of records retrieve, calculated based on page_size. Can be positive, negative or 0.', type => 'number' }, + { name => 'page', desc => 'The page of records retrieved, calculated based on page_size. Can be positive, negative or 0.', type => 'number' }, { name => 'statuses', desc => 'Array of statuses to filter copies by, optional and can be undef.', type => 'array' }, { name => 'locations', desc => 'Array of copy locations to filter copies by, optional and can be undef.', type => 'array' }, ], 'return' => { desc => 'Record IDs that have copies at the relevant org units', type => 'array' } @@ -820,7 +820,7 @@ __PACKAGE__->register_method( argc => 1, signature => { desc => <<" DESC", -Returns a list of the requested org-scoped record ids held +Returns a list of the requested org-scoped record IDs held DESC params => [ @@ -867,11 +867,11 @@ __PACKAGE__->register_method( api_level => 1, argc => 1, signature => - { desc => "Returns a list of the requested authority record ids held", + { desc => "Returns a list of the requested authority record IDs held", params => [ { name => 'value', desc => 'The target title', type => 'string' }, { name => 'page_size', desc => 'Count of records to retrieve, default is 9', type => 'number' }, - { name => 'page', desc => 'The page of records retrieve, calculated based on page_size. Can be positive, negative or 0.', type => 'number' }, ], + { name => 'page', desc => 'The page of records retrieved, calculated based on page_size. Can be positive, negative or 0.', type => 'number' }, ], 'return' => { desc => 'Authority Record IDs that are near the target string', type => 'array' } } ); @@ -882,11 +882,11 @@ __PACKAGE__->register_method( api_level => 1, argc => 1, signature => - { desc => "Returns a list of the requested authority record ids held", + { desc => "Returns a list of the requested authority record IDs held", params => [ { name => 'value', desc => 'The target author', type => 'string' }, { name => 'page_size', desc => 'Count of records to retrieve, default is 9', type => 'number' }, - { name => 'page', desc => 'The page of records retrieve, calculated based on page_size. Can be positive, negative or 0.', type => 'number' }, ], + { name => 'page', desc => 'The page of records retrieved, calculated based on page_size. Can be positive, negative or 0.', type => 'number' }, ], 'return' => { desc => 'Authority Record IDs that are near the target string', type => 'array' } } ); @@ -897,11 +897,11 @@ __PACKAGE__->register_method( api_level => 1, argc => 1, signature => - { desc => "Returns a list of the requested authority record ids held", + { desc => "Returns a list of the requested authority record IDs held", params => [ { name => 'value', desc => 'The target subject', type => 'string' }, { name => 'page_size', desc => 'Count of records to retrieve, default is 9', type => 'number' }, - { name => 'page', desc => 'The page of records retrieve, calculated based on page_size. Can be positive, negative or 0.', type => 'number' }, ], + { name => 'page', desc => 'The page of records retrieved, calculated based on page_size. Can be positive, negative or 0.', type => 'number' }, ], 'return' => { desc => 'Authority Record IDs that are near the target string', type => 'array' } } ); @@ -912,11 +912,71 @@ __PACKAGE__->register_method( api_level => 1, argc => 1, signature => - { desc => "Returns a list of the requested authority record ids held", + { desc => "Returns a list of the requested authority record IDs held", params => [ { name => 'value', desc => 'The target topical subject', type => 'string' }, { name => 'page_size', desc => 'Count of records to retrieve, default is 9', type => 'number' }, - { name => 'page', desc => 'The page of records retrieve, calculated based on page_size. Can be positive, negative or 0.', type => 'number' }, ], + { name => 'page', desc => 'The page of records retrieved, calculated based on page_size. Can be positive, negative or 0.', type => 'number' }, ], + 'return' => { desc => 'Authority Record IDs that are near the target string', type => 'array' } + } +); +__PACKAGE__->register_method( + method => 'general_authority_browse', + api_name => 'open-ils.supercat.authority.title.refs.browse', + tag => '130', subfield => 'a', + api_level => 1, + argc => 1, + signature => + { desc => "Returns a list of the requested authority record IDs held, including see (4xx) and see also (5xx) references", + params => + [ { name => 'value', desc => 'The target title', type => 'string' }, + { name => 'page_size', desc => 'Count of records to retrieve, default is 9', type => 'number' }, + { name => 'page', desc => 'The page of records retrieved, calculated based on page_size. Can be positive, negative or 0.', type => 'number' }, ], + 'return' => { desc => 'Authority Record IDs that are near the target string', type => 'array' } + } +); +__PACKAGE__->register_method( + method => 'general_authority_browse', + api_name => 'open-ils.supercat.authority.author.refs.browse', + tag => [qw/100 110 111/], subfield => 'a', + api_level => 1, + argc => 1, + signature => + { desc => "Returns a list of the requested authority record IDs held, including see (4xx) and see also (5xx) references", + params => + [ { name => 'value', desc => 'The target author', type => 'string' }, + { name => 'page_size', desc => 'Count of records to retrieve, default is 9', type => 'number' }, + { name => 'page', desc => 'The page of records retrieved, calculated based on page_size. Can be positive, negative or 0.', type => 'number' }, ], + 'return' => { desc => 'Authority Record IDs that are near the target string', type => 'array' } + } +); +__PACKAGE__->register_method( + method => 'general_authority_browse', + api_name => 'open-ils.supercat.authority.subject.refs.browse', + tag => [qw/148 150 151 155/], subfield => 'a', + api_level => 1, + argc => 1, + signature => + { desc => "Returns a list of the requested authority record IDs held, including see (4xx) and see also (5xx) references", + params => + [ { name => 'value', desc => 'The target subject', type => 'string' }, + { name => 'page_size', desc => 'Count of records to retrieve, default is 9', type => 'number' }, + { name => 'page', desc => 'The page of records retrieved, calculated based on page_size. Can be positive, negative or 0.', type => 'number' }, ], + 'return' => { desc => 'Authority Record IDs that are near the target string', type => 'array' } + } +); +__PACKAGE__->register_method( + method => 'general_authority_browse', + api_name => 'open-ils.supercat.authority.topic.refs.browse', + tag => '150', subfield => 'a', + api_level => 1, + argc => 1, + signature => + { desc => "Returns a list of the requested authority record IDs held, including see (4xx) and see also (5xx) references", + params => + [ { name => 'value', desc => 'The target topical subject', type => 'string' }, + { name => 'page_size', desc => 'Count of records to retrieve, default is 9', type => 'number' }, + { name => 'page', desc => 'The page of records retrieved, calculated based on page_size. Can be positive, negative or 0.', type => 'number' }, ], 'return' => { desc => 'Authority Record IDs that are near the target string', type => 'array' } } ); @@ -945,6 +1005,16 @@ sub authority_tag_sf_browse { my $_storage = OpenSRF::AppSession->create( 'open-ils.cstore' ); + # .refs variant includes 4xx and 5xx variants for see / see also + if ($self->api_name =~ /\.refs\./) { + my @ref_tags; + foreach my $tagname (@$tag) { + push(@ref_tags, '4' . substr($tagname, 1, 2)); + push(@ref_tags, '5' . substr($tagname, 1, 2)); + } + push(@$tag, @ref_tags); + } + my @list = (); if ($page <= 0) { @@ -990,7 +1060,7 @@ __PACKAGE__->register_method( argc => 1, signature => { desc => <<" DESC", -Returns a list of the requested authority record ids held +Returns a list of the requested authority record IDs held DESC params => [ @@ -1028,12 +1098,12 @@ __PACKAGE__->register_method( api_level => 1, argc => 1, signature => - { desc => "Returns a list of the requested org-scoped record ids held", + { desc => "Returns a list of the requested org-scoped record IDs held", params => [ { name => 'value', desc => 'The target title', type => 'string' }, { name => 'org_unit', desc => 'The org unit shortname (or "-" or undef for global) to browse', type => 'string' }, { name => 'page_size', desc => 'Count of records to retrieve, default is 9', type => 'number' }, - { name => 'page', desc => 'The page of records retrieve, calculated based on page_size. Can be positive, negative or 0.', type => 'number' }, + { name => 'page', desc => 'The page of records retrieved, calculated based on page_size. Can be positive, negative or 0.', type => 'number' }, { name => 'statuses', desc => 'Array of statuses to filter copies by, optional and can be undef.', type => 'array' }, { name => 'locations', desc => 'Array of copy locations to filter copies by, optional and can be undef.', type => 'array' }, ], 'return' => { desc => 'Record IDs that have copies at the relevant org units', type => 'array' } @@ -1046,12 +1116,12 @@ __PACKAGE__->register_method( api_level => 1, argc => 1, signature => - { desc => "Returns a list of the requested org-scoped record ids held", + { desc => "Returns a list of the requested org-scoped record IDs held", params => [ { name => 'value', desc => 'The target author', type => 'string' }, { name => 'org_unit', desc => 'The org unit shortname (or "-" or undef for global) to browse', type => 'string' }, { name => 'page_size', desc => 'Count of records to retrieve, default is 9', type => 'number' }, - { name => 'page', desc => 'The page of records retrieve, calculated based on page_size. Can be positive, negative or 0.', type => 'number' }, + { name => 'page', desc => 'The page of records retrieved, calculated based on page_size. Can be positive, negative or 0.', type => 'number' }, { name => 'statuses', desc => 'Array of statuses to filter copies by, optional and can be undef.', type => 'array' }, { name => 'locations', desc => 'Array of copy locations to filter copies by, optional and can be undef.', type => 'array' }, ], 'return' => { desc => 'Record IDs that have copies at the relevant org units', type => 'array' } @@ -1064,12 +1134,12 @@ __PACKAGE__->register_method( api_level => 1, argc => 1, signature => - { desc => "Returns a list of the requested org-scoped record ids held", + { desc => "Returns a list of the requested org-scoped record IDs held", params => [ { name => 'value', desc => 'The target subject', type => 'string' }, { name => 'org_unit', desc => 'The org unit shortname (or "-" or undef for global) to browse', type => 'string' }, { name => 'page_size', desc => 'Count of records to retrieve, default is 9', type => 'number' }, - { name => 'page', desc => 'The page of records retrieve, calculated based on page_size. Can be positive, negative or 0.', type => 'number' }, + { name => 'page', desc => 'The page of records retrieved, calculated based on page_size. Can be positive, negative or 0.', type => 'number' }, { name => 'statuses', desc => 'Array of statuses to filter copies by, optional and can be undef.', type => 'array' }, { name => 'locations', desc => 'Array of copy locations to filter copies by, optional and can be undef.', type => 'array' }, ], 'return' => { desc => 'Record IDs that have copies at the relevant org units', type => 'array' } @@ -1082,12 +1152,12 @@ __PACKAGE__->register_method( api_level => 1, argc => 1, signature => - { desc => "Returns a list of the requested org-scoped record ids held", + { desc => "Returns a list of the requested org-scoped record IDs held", params => [ { name => 'value', desc => 'The target topical subject', type => 'string' }, { name => 'org_unit', desc => 'The org unit shortname (or "-" or undef for global) to browse', type => 'string' }, { name => 'page_size', desc => 'Count of records to retrieve, default is 9', type => 'number' }, - { name => 'page', desc => 'The page of records retrieve, calculated based on page_size. Can be positive, negative or 0.', type => 'number' }, + { name => 'page', desc => 'The page of records retrieved, calculated based on page_size. Can be positive, negative or 0.', type => 'number' }, { name => 'statuses', desc => 'Array of statuses to filter copies by, optional and can be undef.', type => 'array' }, { name => 'locations', desc => 'Array of copy locations to filter copies by, optional and can be undef.', type => 'array' }, ], 'return' => { desc => 'Record IDs that have copies at the relevant org units', type => 'array' } @@ -1100,12 +1170,12 @@ __PACKAGE__->register_method( api_level => 1, argc => 1, signature => - { desc => "Returns a list of the requested org-scoped record ids held", + { desc => "Returns a list of the requested org-scoped record IDs held", params => [ { name => 'value', desc => 'The target series', type => 'string' }, { name => 'org_unit', desc => 'The org unit shortname (or "-" or undef for global) to browse', type => 'string' }, { name => 'page_size', desc => 'Count of records to retrieve, default is 9', type => 'number' }, - { name => 'page', desc => 'The page of records retrieve, calculated based on page_size. Can be positive, negative or 0.', type => 'number' }, + { name => 'page', desc => 'The page of records retrieved, calculated based on page_size. Can be positive, negative or 0.', type => 'number' }, { name => 'statuses', desc => 'Array of statuses to filter copies by, optional and can be undef.', type => 'array' }, { name => 'locations', desc => 'Array of copy locations to filter copies by, optional and can be undef.', type => 'array' }, ], 'return' => { desc => 'Record IDs that have copies at the relevant org units', type => 'array' } @@ -1248,7 +1318,7 @@ __PACKAGE__->register_method( argc => 1, signature => { desc => <<" DESC", -Returns a list of the requested org-scoped record ids held +Returns a list of the requested org-scoped record IDs held DESC params => [ @@ -1295,11 +1365,11 @@ __PACKAGE__->register_method( api_level => 1, argc => 1, signature => - { desc => "Returns a list of the requested authority record ids held", + { desc => "Returns a list of the requested authority record IDs held", params => [ { name => 'value', desc => 'The target title', type => 'string' }, { name => 'page_size', desc => 'Count of records to retrieve, default is 9', type => 'number' }, - { name => 'page', desc => 'The page of records retrieve, calculated based on page_size. Can be positive, negative or 0.', type => 'number' }, ], + { name => 'page', desc => 'The page of records retrieved, calculated based on page_size. Can be positive, negative or 0.', type => 'number' }, ], 'return' => { desc => 'Authority Record IDs that are near the target string', type => 'array' } } ); @@ -1310,11 +1380,11 @@ __PACKAGE__->register_method( api_level => 1, argc => 1, signature => - { desc => "Returns a list of the requested authority record ids held", + { desc => "Returns a list of the requested authority record IDs held", params => [ { name => 'value', desc => 'The target author', type => 'string' }, { name => 'page_size', desc => 'Count of records to retrieve, default is 9', type => 'number' }, - { name => 'page', desc => 'The page of records retrieve, calculated based on page_size. Can be positive, negative or 0.', type => 'number' }, ], + { name => 'page', desc => 'The page of records retrieved, calculated based on page_size. Can be positive, negative or 0.', type => 'number' }, ], 'return' => { desc => 'Authority Record IDs that are near the target string', type => 'array' } } ); @@ -1325,11 +1395,11 @@ __PACKAGE__->register_method( api_level => 1, argc => 1, signature => - { desc => "Returns a list of the requested authority record ids held", + { desc => "Returns a list of the requested authority record IDs held", params => [ { name => 'value', desc => 'The target subject', type => 'string' }, { name => 'page_size', desc => 'Count of records to retrieve, default is 9', type => 'number' }, - { name => 'page', desc => 'The page of records retrieve, calculated based on page_size. Can be positive, negative or 0.', type => 'number' }, ], + { name => 'page', desc => 'The page of records retrieved, calculated based on page_size. Can be positive, negative or 0.', type => 'number' }, ], 'return' => { desc => 'Authority Record IDs that are near the target string', type => 'array' } } ); @@ -1340,11 +1410,71 @@ __PACKAGE__->register_method( api_level => 1, argc => 1, signature => - { desc => "Returns a list of the requested authority record ids held", + { desc => "Returns a list of the requested authority record IDs held", params => [ { name => 'value', desc => 'The target topical subject', type => 'string' }, { name => 'page_size', desc => 'Count of records to retrieve, default is 9', type => 'number' }, - { name => 'page', desc => 'The page of records retrieve, calculated based on page_size. Can be positive, negative or 0.', type => 'number' }, ], + { name => 'page', desc => 'The page of records retrieved, calculated based on page_size. Can be positive, negative or 0.', type => 'number' }, ], + 'return' => { desc => 'Authority Record IDs that are near the target string', type => 'array' } + } +); +__PACKAGE__->register_method( + method => 'general_authority_startwith', + api_name => 'open-ils.supercat.authority.title.refs.startwith', + tag => '130', subfield => 'a', + api_level => 1, + argc => 1, + signature => + { desc => "Returns a list of the requested authority record IDs held, including see (4xx) and see also (5xx) references", + params => + [ { name => 'value', desc => 'The target title', type => 'string' }, + { name => 'page_size', desc => 'Count of records to retrieve, default is 9', type => 'number' }, + { name => 'page', desc => 'The page of records retrieved, calculated based on page_size. Can be positive, negative or 0.', type => 'number' }, ], + 'return' => { desc => 'Authority Record IDs that are near the target string', type => 'array' } + } +); +__PACKAGE__->register_method( + method => 'general_authority_startwith', + api_name => 'open-ils.supercat.authority.author.refs.startwith', + tag => [qw/100 110 111/], subfield => 'a', + api_level => 1, + argc => 1, + signature => + { desc => "Returns a list of the requested authority record IDs held, including see (4xx) and see also (5xx) references", + params => + [ { name => 'value', desc => 'The target author', type => 'string' }, + { name => 'page_size', desc => 'Count of records to retrieve, default is 9', type => 'number' }, + { name => 'page', desc => 'The page of records retrieved, calculated based on page_size. Can be positive, negative or 0.', type => 'number' }, ], + 'return' => { desc => 'Authority Record IDs that are near the target string', type => 'array' } + } +); +__PACKAGE__->register_method( + method => 'general_authority_startwith', + api_name => 'open-ils.supercat.authority.subject.refs.startwith', + tag => [qw/148 150 151 155/], subfield => 'a', + api_level => 1, + argc => 1, + signature => + { desc => "Returns a list of the requested authority record IDs held, including see (4xx) and see also (5xx) references", + params => + [ { name => 'value', desc => 'The target subject', type => 'string' }, + { name => 'page_size', desc => 'Count of records to retrieve, default is 9', type => 'number' }, + { name => 'page', desc => 'The page of records retrieved, calculated based on page_size. Can be positive, negative or 0.', type => 'number' }, ], + 'return' => { desc => 'Authority Record IDs that are near the target string', type => 'array' } + } +); +__PACKAGE__->register_method( + method => 'general_authority_startwith', + api_name => 'open-ils.supercat.authority.topic.refs.startwith', + tag => '150', subfield => 'a', + api_level => 1, + argc => 1, + signature => + { desc => "Returns a list of the requested authority record IDs held, including see (4xx) and see also (5xx) references", + params => + [ { name => 'value', desc => 'The target topical subject', type => 'string' }, + { name => 'page_size', desc => 'Count of records to retrieve, default is 9', type => 'number' }, + { name => 'page', desc => 'The page of records retrieved, calculated based on page_size. Can be positive, negative or 0.', type => 'number' }, ], 'return' => { desc => 'Authority Record IDs that are near the target string', type => 'array' } } ); @@ -1362,6 +1492,16 @@ sub authority_tag_sf_startwith { my $offset = $limit * abs($page); my $_storage = OpenSRF::AppSession->create( 'open-ils.cstore' ); + # .refs variant includes 4xx and 5xx variants for see / see also + if ($self->api_name =~ /\.refs\./) { + my @ref_tags; + foreach my $tagname (@$tag) { + push(@ref_tags, '4' . substr($tagname, 1, 2)); + push(@ref_tags, '5' . substr($tagname, 1, 2)); + } + push(@$tag, @ref_tags); + } + my @list = (); if ($page < 0) { @@ -1410,7 +1550,7 @@ __PACKAGE__->register_method( argc => 1, signature => { desc => <<" DESC", -Returns a list of the requested authority record ids held +Returns a list of the requested authority record IDs held DESC params => [ diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm b/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm index bf542402dc..040b88897e 100644 --- a/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm +++ b/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm @@ -165,7 +165,7 @@ sub child_init { my $base = shift; my $site = shift; - $log->info("Creating record feed with params [$real_format, $record_list, $unapi, $site]"); + $log->info("Creating record feed with params [$real_format, $record_list, $unapi, $site]"); my $feed = create_record_feed( 'record', $real_format, $record_list, $unapi, $site, undef, $real_format =~ /(-full|-uris)$/o ? 1 : 0 ); $feed->root( "$base/../" ); $feed->lib( $site ); @@ -181,10 +181,10 @@ sub child_init { } } - for my $browse_axis ( qw/authority.title authority.author authority.subject authority.topic/ ) { - for my $record_browse_format ( qw/marcxml/ ) { + for my $basic_axis ( qw/authority.title authority.author authority.subject authority.topic/ ) { + for my $browse_axis ( ($basic_axis, $basic_axis . ".refs") ) { { - my $__f = $record_browse_format; + my $__f = 'marcxml'; my $__a = $browse_axis; $browse_types{$__a}{$__f} = sub { @@ -196,7 +196,7 @@ sub child_init { my $base = shift; my $site = shift; - $log->info("Creating record feed with params [$real_format, $record_list, $unapi, $site]"); + $log->info("Creating record feed with params [$real_format, $record_list, $unapi, $site]"); my $feed = create_record_feed( 'authority', $real_format, $record_list, $unapi, $site, undef, $real_format =~ /-full$/o ? -1 : 0 ); $feed->root( "$base/../" ); $feed->link( next => $next => $feed->type ); diff --git a/Open-ILS/xul/staff_client/server/cat/marcedit.js b/Open-ILS/xul/staff_client/server/cat/marcedit.js index 4e597aa07d..1a352ebdeb 100644 --- a/Open-ILS/xul/staff_client/server/cat/marcedit.js +++ b/Open-ILS/xul/staff_client/server/cat/marcedit.js @@ -2376,7 +2376,7 @@ function browseAuthority (sf_popup, menu_id, target, sf, limit, page) { } var url = '/opac/extras/browse/marcxml/' - + type + + type + '.refs' + '/1' // OU - currently unscoped + '/' + sf.toString() + '/' + page @@ -2488,13 +2488,13 @@ function browseAuthority (sf_popup, menu_id, target, sf, limit, page) { buildAuthorityPopup(main_text, record, auth_org, auth_id, sf_popup, target, sf); dojo.forEach(see_from, function(entry_text) { - buildAuthorityPopup(entry_text, record, auth_org, auth_id, sf_popup, target, sf, "font-style: italic; text-align: right; margin-left: 2em;"); + buildAuthorityPopup(entry_text, record, auth_org, auth_id, sf_popup, target, sf, "font-style: italic; margin-left: 2em;"); }); // To-do: instead of launching the standard selector menu, invoke // a new authority search using the 5XX entry text dojo.forEach(see_also, function(entry_text) { - buildAuthorityPopup(entry_text, record, auth_org, auth_id, sf_popup, target, sf, "font-style: italic; text-align: right; margin-left: 2em;"); + buildAuthorityPopup(entry_text, record, auth_org, auth_id, sf_popup, target, sf, "font-style: italic; margin-left: 2em;"); }); }); @@ -2530,7 +2530,7 @@ function buildAuthorityPopup (entry_text, record, auth_org, auth_id, sf_popup, t var popup = createMenuPopup({ "flex": "1" }); if (style) { submenu.setAttribute('style', style); - popup.setAttribute('style', 'font-style: normal; text-align: left; margin-left: 0em;'); + popup.setAttribute('style', 'font-style: normal; margin-left: 0em;'); } submenu.appendChild(popup); -- 2.11.0