[open-ils-commits] r19092 - in trunk/Open-ILS: src/perlmods/OpenILS/Application src/perlmods/OpenILS/WWW xul/staff_client/server/cat (dbs)
svn at svn.open-ils.org
svn at svn.open-ils.org
Sun Jan 2 22:09:35 EST 2011
Author: dbs
Date: 2011-01-02 22:09:33 -0500 (Sun, 02 Jan 2011)
New Revision: 19092
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm
trunk/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm
trunk/Open-ILS/xul/staff_client/server/cat/marcedit.js
Log:
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.
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm 2011-01-02 18:30:02 UTC (rev 19091)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm 2011-01-03 03:09:33 UTC (rev 19092)
@@ -23,7 +23,7 @@
# 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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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,14 +912,74 @@
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' }
+ }
+);
sub authority_tag_sf_browse {
my $self = shift;
@@ -945,6 +1005,16 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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,14 +1410,74 @@
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' }
+ }
+);
sub authority_tag_sf_startwith {
my $self = shift;
@@ -1362,6 +1492,16 @@
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 @@
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 =>
[
Modified: trunk/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm 2011-01-02 18:30:02 UTC (rev 19091)
+++ trunk/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm 2011-01-03 03:09:33 UTC (rev 19092)
@@ -165,7 +165,7 @@
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 @@
}
}
- 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 @@
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 );
Modified: trunk/Open-ILS/xul/staff_client/server/cat/marcedit.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/cat/marcedit.js 2011-01-02 18:30:02 UTC (rev 19091)
+++ trunk/Open-ILS/xul/staff_client/server/cat/marcedit.js 2011-01-03 03:09:33 UTC (rev 19092)
@@ -2376,7 +2376,7 @@
}
var url = '/opac/extras/browse/marcxml/'
- + type
+ + type + '.refs'
+ '/1' // OU - currently unscoped
+ '/' + sf.toString()
+ '/' + page
@@ -2488,13 +2488,13 @@
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 @@
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);
More information about the open-ils-commits
mailing list