TPAC: Improvement to serials display (under the "issues held" label)
(All the following text assumes you're using "new" 2.0+ serials and that
the org unit setting 'opac.fully_compressed_serial_holdings' is true
in the context where you're browsing.)
Today on the TPAC record detail page under the "issues held" label, you
get a list of serial summary statements, which you can expand to a list of
issuances for which items have been received. You can place issuance-level
holds on these.
That existing interface just kind of burps up all your holdings within
scope and doesn't show you what holdings belong to what org unit.
Furthermore, it doesn't group your holdings into enumeration or
chronology units, which can matter a lot if you've got 150 years of
some daily newspaper and you're trying to browse through them in the
OPAC.
This new interface presents expanded serials holdings organized into a
tree, with summaries placed under their org units and holdings grouped
under their summaries under either chronology units (default) or
enumeration ones, controlled by a new field on serial.distribution.
There's also a new org unit setting that lets you change the default
value for this new field in the Alternate Serial Control view to
enumeration, if you want.
Like the issues-held interface it's replacing, this knows how to deal
with holdings where you have one unit per received item, or no units per
received item, but its behavior is not yet defined for one unit per many
items (the binding case). The "regular" Serial Control view doesn't
have a widget to control the new field on serial.distribution yet.
These are the areas where I'd be interested in helping to close the
gaps, before or after this is committed.
Jason Etheridge [Fri, 16 Mar 2012 19:54:59 +0000 (15:54 -0400)]
prevent templates from changing unsafe fields
in the Item Attribute Editor, for any of the fields are hidden via util.hide,
and for statuses which shouldn't be changed (like from Checked Out to something else)
Signed-off-by: Jason Etheridge <jason@esilibrary.com> Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Jason Etheridge [Thu, 15 Mar 2012 17:52:20 +0000 (13:52 -0400)]
wire up util.hide in the item attribute editor
Currently, hidden elements may still be affected through templates.
Thanks goes to MassLNC for this one. Based on SC-D3 at
http://www.esilibrary.com/esi/docs/?p=841, with some implementation
simplifications.
Signed-off-by: Jason Etheridge <jason@esilibrary.com> Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Jason Etheridge [Thu, 15 Mar 2012 04:58:05 +0000 (00:58 -0400)]
util.hide library
Provides util.hide.generate_dialog and util.hide.generate_css.
util.hide.generate_css takes one parameter, an org unit setting name for a
setting of type array. It tests this setting and for every value in the array
it looks for DOM elements with 'hideable' attributes containing those values.
It adds the CSS classname 'hideme' to such elements, and removes 'hideme' from
any non-matched elements that also have 'hideable' attributes.
util.hide.generate_dialog takes the same setting parameter as generate_css, and
an optional context org parameter (defaults to the workstation library). It pops
up a dialog with a checkbox for every 'hideable' DOM element. Clicking 'OK' will
update the org unit setting with every checked element, and it then calls
generate_css to update the interface being affected.
Signed-off-by: Jason Etheridge <jason@esilibrary.com> Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Jason Etheridge [Thu, 15 Mar 2012 17:16:24 +0000 (13:16 -0400)]
move .hideme css to global.css
Signed-off-by: Jason Etheridge <jason@esilibrary.com> Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Jason Etheridge [Thu, 15 Mar 2012 06:30:31 +0000 (02:30 -0400)]
liberate this perm-cognizant lib menu generator
for re-use in other interfaces
Signed-off-by: Jason Etheridge <jason@esilibrary.com> Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Bill Erickson [Thu, 29 Mar 2012 19:15:24 +0000 (15:15 -0400)]
AutoGrid retains external search filters
AutoGrid now caches the search passed to the most recent loadAll call
separately from any filters passed via PCrudFilterDialog. This allows
AutoGrid to retain externally-supplied (persistent) filters (e.g.
context org unit selector) while being able to easily remove filters
passed via the filter dialog.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Dan Scott [Thu, 29 Mar 2012 03:10:17 +0000 (23:10 -0400)]
TPAC: Centralized preferred library indicator
Create an explicit "Preferred library: Foobar" entry at the top of the
page (on the same line as pagination information), and include a subtle
checkmark to enable users to quickly jump to their "Search preferences"
settings and change their preferred library.
This enables us to remove the "(Preferred library)" note in the copy
counts for search results.
At the same time, move from a table display (for a single row? what?) to
a simple div/span layout for the search results.
Signed-off-by: Dan Scott <dan@coffeecode.net> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Bill Erickson [Tue, 30 Aug 2011 17:56:44 +0000 (13:56 -0400)]
Remove block on mark-receive from non-PO UI
Allow lineitem mark-received action to take place from lineitem table UI
even when not viewing a PO (e.g. from search results)
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Bill Erickson [Tue, 22 Nov 2011 21:53:30 +0000 (16:53 -0500)]
ACQ: allow recv actions on copies from non-PO interface
* Allow PO actions on copies, like recieve, unreceive, and cancel from
non-PO interfaces like the picklist UI and lineitem search interfaces.
Instead of relying on whether the user is viewing a PO, use the status
of each copy to determine which actions are appropriate to display.
* General cleanup and better arrangment of the copy actions hide/display
logic
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Bill Erickson [Thu, 25 Aug 2011 20:03:12 +0000 (16:03 -0400)]
Make ACQ Lineitem actions more readily accessible
No longer limit PO-related lineitem actions to the PO view UI. Instead,
limit lineitem actions on the state of the lineitem. This allows staff
to perform PO-related (e.g. create invoice) directly from the LI search
interface.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Bill Erickson [Mon, 26 Mar 2012 15:29:08 +0000 (11:29 -0400)]
ACQ Upload import-copy option
With the addition of the new Vandelay features in ACQ, the "Load bibs
and Items" option was replaced with Vandeley import options. In the
context of ACQ, however, Vandelay is only concerned with importing bibs
and not copies. Subsequently, the user lost the ability to both create
catalog records and catalog copies in one step during ACQ upload.
The patch remedies that by providing a new "Load Items for Imported
Records" option within the upload page. When enabled, all successfully
loaded ACQ copies will also be imported as real/catalog copies.
Note that it's only added to the upload page, because all other ACQ
interfaces assume that both bibs and copies should be created (e.g.
during PO activation).
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Flattened searching: generalized data retrieval via public service
For a better overview of what this feature is about than what I could
write here, see docs/TechRef/Flattener/design.txt in this commit.
This is the first new feature (as far as I know) to take advantage of
PCRUD fleshing. Very briefly, imagine issuing a query to PCRUD with lots
of arbitrarily deep fleshing, and getting back a set of flat rows with
the fields you need for display/editing/whatever all neatly picked out
as if ready to be displayed in a table or grid-based UI.
FlattenerGrid, which knows how to use this, can potentially replace and avoid
lots of relatively complex (AutoGrid + custom middle layer
methods)-powered interfaces. AutoGrid interfaces that just work with
one fieldmapper class at a time, more or less, can just keep doing what
they're doing. Little or no advantage to switcihing to flattened data
in that case.
FlattenerGrid is CRUD-complete and has lots of the same features as
AutoGrid, where they make sense, such as the line numbers, checkboxes,
the columnpicker, multisort, etc. Sample instance at
Open-ILS/exmpales/flattener_test.tt2 .
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com> Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Dan Scott [Mon, 19 Mar 2012 03:13:12 +0000 (23:13 -0400)]
Add basic schema.org microdata to record details
It's shocking how little we can easily and reliably extract from MARC to
map to schema.org's metadata structure. However, what I could get shows
up relatively nicely on Google's Rich Snippets testing tool.
Signed-off-by: Dan Scott <dan@coffeecode.net> Signed-off-by: Mike Rylander <mrylander@gmail.com>
General idea: If you have the permission you can place holds that will not
fill right now, in general, for any reason.
In TPac, I replaced the previous "check the last failure code" line. The
new permission basically accomplishes the same thing for now, and is less
likely to return different results from placement attempt to placement
attempt. Also, only checking one failure code of potential hundreds didn't
make a lot of sense.
In the event of age protected copies the age protected prompt wins out.
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Bill Erickson [Wed, 28 Mar 2012 19:44:44 +0000 (15:44 -0400)]
Hold targeter cancellation action/trigger repairs
When a hold/reservation is cancelled via the targeter and passed off to
action/trigger for possible event creation, ensure that all fields on
the hold are in sync w/ the master db before the hand-off. Otherwise,
critical values, like cancel_time may be null, which can cause A/T
event creation to fail.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Bill Erickson [Fri, 23 Mar 2012 14:57:59 +0000 (10:57 -0400)]
ACQ provider admin page display improvements
1. Sort providers I have permission to edit to the front.
2. Improved support for viewing all providers the user has access to
view.
3. Enable the grid filter
4. Template cleanup to avoid the unnecessary horizontal scroll that
sometimes occurs along the top.
5. Misc code cleanup
Signed-off-by: Bill Erickson <berick@esilibrary.com>
acq provider layout fixes
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Dan Scott [Thu, 22 Mar 2012 20:04:39 +0000 (16:04 -0400)]
Add Makefile to rebuild targets for generated files
If you rerun ./configure with a different option (such as
--sysconf=foo), the changed Makefile needs to trigger a rebuild of the
generated files. Otherwise, the first generated version of the file is
always newer than its *.in counterpart and a rebuild won't be triggered
on subsequent ./configure runs.
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Dan Scott [Thu, 22 Mar 2012 15:09:44 +0000 (11:09 -0400)]
Move towards build-time configuration of variables
We moved a lot of variable configuration into AC_CONFIG_FILES in
autoconf for the sake of convenience, but that turned out to be
problematic, as James Fournie noted in LP 960552, as the warning in
http://www.gnu.org/software/automake/manual/html_node/Scripts.html
notes: "building scripts this way has one drawback: directory variables
such as $(datadir) are not fully expanded and may refer to other
directory variables".
This was particularly a problem for variables such as @sysconfdir@ in
code that doesn't understand shell syntax - such as Cronscript.pm.
This commit moves towards build-time configuration of those variables.
We still use *.in files, but mark the built versions as dependencies in
build recipes such that we can build and test within the source
directory without having to install the files. We also gain the
advantage of teaching "make clean" to clean up the built versions of the
files.
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Bill Erickson [Thu, 22 Mar 2012 15:56:00 +0000 (11:56 -0400)]
ACQ fund admin UI improvements
* Fund retrieval directly via AutoGrid/pcrud, now that pcrud supports fleshing.
* Sort funds I can edit to the front of the list
* Enable the new improved grid filter dialog
* Leverage onItemReceived for caching funds for balanceInfo getter
* Add some height to the grid to allow more rows to be visible in the page (without scrolling)
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Bill Erickson [Thu, 22 Mar 2012 20:07:34 +0000 (16:07 -0400)]
ACQ Fund retrieval API permission improvements
Allow users with ADMIN_ACQ_FUND (in addition to the deprecated
ADMIN_FUND) permission to retrieve fund year information via
open-ils.acq.fund.org[.years].retrieve
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Bill Erickson [Fri, 23 Mar 2012 16:04:02 +0000 (12:04 -0400)]
AutoGrid onItemReceived support
Adds support for a new call-back, called when a grid row item is
received (via pcrud onresponse). If defined, The call-back is passed
the received item before the it's added to the data store. This allows
users to get a direct handle on received objects.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Mike Rylander [Tue, 20 Mar 2012 16:28:58 +0000 (12:28 -0400)]
Beginning an unwrapped upgrade script
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Jason Etheridge <jason@esilibrary.com> Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Mike Rylander [Mon, 19 Mar 2012 19:58:51 +0000 (15:58 -0400)]
DB layout for recording custom toolbars
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Jason Etheridge <jason@esilibrary.com> Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Jason Etheridge [Thu, 22 Mar 2012 05:54:20 +0000 (01:54 -0400)]
Fix ordinal column with multiple lists
Before this fix, if more than one util.list powered list existed within a given
document/window, they would each intefere with the other's ordinal column.
Signed-off-by: Jason Etheridge <jason@esilibrary.com> Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Dan Scott [Wed, 28 Mar 2012 02:33:31 +0000 (22:33 -0400)]
TPAC: Suppress copy counts for libraries that own zero copies
Rather than slavishly showing the copy counts for libraries even when
the library has no copies to show, avoid wasting the precious display
space and suppress the output.
This was a problem for both search scope libraries and preferred library
in the search results, and for just preferred library in record details.
This commit makes the behaviour consistent, in favour of suppressing the
display of copy counts when there's nothing to display.
Signed-off-by: Dan Scott <dan@coffeecode.net> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Dan Scott [Tue, 27 Mar 2012 19:07:14 +0000 (15:07 -0400)]
Fix NULL interval for action_trigger.event_definition.delay
The delay column in action_trigger.event_definition is defined as NOT
NULL, therefore we should not try to push a NULL into it as that makes
PostgreSQL unhappy.
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Dan Wells [Mon, 26 Mar 2012 20:28:04 +0000 (16:28 -0400)]
Serial Control: Use Dijit-based issuance editor
The serial control interfaces use editors derived from the XUL
copy editor, while the alternate control uses Dijit editors. This
commit takes a small step toward unification by using the Dijit
issuance editor within the serial control interface, with the
following benefits:
1) Both controls will have a very similar editor look and feel
2) Takes advantage of custom holding code wizard widget
3) Future fixes and enhancements to the editors will apply easily
to both controls
4) Begin deprecating XUL serial editors
This commit doesn't yet rip out the old issuance editor code, as
that should wait until the transition is more complete.
Dan Wells [Mon, 26 Mar 2012 20:17:03 +0000 (16:17 -0400)]
Small fix to Holding Code wizard widget
The issuance editor has a wizard widget for the holding code field
which expected a 'grid' as an argument, but then referenced a global
'iss_grid' variable. This hurt reusability of this widget.
Dan Scott [Thu, 22 Mar 2012 02:39:40 +0000 (22:39 -0400)]
LP932540: Fix ISSN indexing
The default config.metabib_field_index_norm_map contains a 'replace'
entry for the ISSN identifier field that replaces spaces with "". That
was meant to handle ISSNs that incorrectly contain a space instead of a
hyphen; it normalizes them from: "1234 1234" to "12341234".
However, that breaks indexing ISSNs if there are multiple ISSNs in the
record, or even if there is an extra character in the same subfield as
the primary ISSN, as all spaces are removed.
This commit removes the 'replace' entry for the ISSN identifier field
and reindexes potentially damaged ISSN index entries.
Signed-off-by: Dan Scott <dan@coffeecode.net> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Mike Rylander [Fri, 23 Mar 2012 16:23:59 +0000 (12:23 -0400)]
Allow fines to accrue during closings
Evergreen skips fines during scheduled closings. With this commit, a new
Org Unit Setting labeled 'Charge fines on overdue circulations when closed'
is available to force fines to accrue during closures. Logic repiars and
out-of-scope (strict) variable repairs from Bill Erickson.
This work is sponsored by the NC Cardinal consortium in North Carolina.
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Bill Erickson <berick@esilibrary.com>
Removed a call to xulG.reload_opac() that was no longer wanted
More debuggable. I think it might still be possbile to get to alt
serial control interfaces in contexts where they don't have
xulG.reload_opac(), but I can't think of any way to do it just now.
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Alt Serial Control interfaces and Batch Receive reload OPAC when possible
Really, since the Alt Serial Control interfaces are built on AutoGrid,
all we have to do there is teach AutoGrid (and its constituent EditPane)
to try for reload_opac on write operations.
This may cause more reloads of the OPAC than are truly necessary, but
mainly in cases when nobody's looking because the OPAC is hidden away
in another tab. That's preferable to the alternative of littering the
codebase with dozens of instances of
try { xulG.reload_opac(); } catch (E) { }
which would just be ugly, bad and unmaintainable.
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com> Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Jason Etheridge [Fri, 9 Mar 2012 09:45:14 +0000 (04:45 -0500)]
updating item out count in patron display
For checkouts (and checkouts converted into renewals), this updates the item out
count in the patron summary sidebar, and under the Items Out navigation button.
It also updates the Items Out sub-interface if that interface has been opened.
However, we are adding an extra network call to update the summary sidebar. We
may want to have the checkout method return that data (the checkout count
summary) instead.
Signed-off-by: Jason Etheridge <jason@esilibrary.com> Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Jason Etheridge [Thu, 8 Mar 2012 19:51:32 +0000 (14:51 -0500)]
Reload the OPAC via Holdings Maintenance
Makes reloading a page wrapped in util.browser more accessible to foreign
window contexts. Gives all the interfaces hanging off the chrome OPAC wrapper
the ability to reload the OPAC frame via xulG.reload_opac(). Have Holdings
Maintenance do this whenever its list is refreshed. And "Add Volumes", whether
invoked from Actions for this Record, or from the click link in the record
summary pane.
Signed-off-by: Jason Etheridge <jason@esilibrary.com> Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Bill Erickson [Thu, 16 Feb 2012 17:50:47 +0000 (12:50 -0500)]
PO Invoice link search by PO instead of Lineitem
The button which allows the user to jump from the PO to linked invoices
now retrieves invoices directly based on the PO ID and instead of
jumping though the lineitem, which only works for POs that have
lineitems (invoiced).
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Acq: improve General Search's ability to find invoices
Invoices in Evergreen have complex relationships with other items. They
can be related to lineitems (and ultimately POs and selection lists) by
invoice *entries*, or to PO items (and ultimately etc etc) by invoice
*items*, or directly to purchase orders by either of the above mentioned
acq.invoice_{entry,item} objects.
This should make general search more able to find invoices related to
other objects whose fields you might search against in Acquistions
General search.
Here's a diagram that I created to help me think about how to write
these joins:
At Bill Erickson's suggestion, I wound up putting the joins into an IDL view
("acqus") rather than trying to express them in JSON query, which was turning
into a real time sink.
To prevent this change from making Acq General Search slower than it
was, I've also added indices on all the foreign keys used in the IDL
view, so that the joins should be as fast as possible.
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com> Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Bill Erickson [Thu, 22 Mar 2012 17:41:29 +0000 (13:41 -0400)]
AutoFieldWidget single-object cache repairs
Caching single objects linked off the context object was failing in most
cases as it was caching under the display name instead of the true value
(pkey) for the linked object. This fixes that by always caching the
linked object by its true value, so that future cache lookups will be
looking in the right place.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Dan Scott [Thu, 22 Mar 2012 00:00:01 +0000 (20:00 -0400)]
TPAC: Show preferred library copies only in consortial scope
A refinement of the preferred library display: only when the user is at
the consortial scope should the preferred library copies float to the
top. At all other scopes, the preferred library copies will appear in
their proper place in the org unit hierarchy (or not at all if outside
of the chosen scope).
Signed-off-by: Dan Scott <dan@coffeecode.net> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Dan Scott [Wed, 21 Mar 2012 04:14:56 +0000 (00:14 -0400)]
TPAC: Sort copies from preferred library first
This commit makes copies from the preferred library (if any) sort first
in the displayed copy list in search results and record details, even
if the search scope would otherwise not include the preferred library's
copies at all.
Signed-off-by: Dan Scott <dan@coffeecode.net> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Dan Scott [Wed, 21 Mar 2012 04:40:42 +0000 (00:40 -0400)]
TPAC: Fix filtering of org units in record details
The syntax for the filtering clause isn't quite right for the
non-opac-visible org units; remove the braces and win.
Signed-off-by: Dan Scott <dan@coffeecode.net> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Dan Scott [Wed, 21 Mar 2012 02:00:11 +0000 (22:00 -0400)]
TPAC / unapi: Overhaul copy and located URI display
In unauthenticated mode, sort returned copies in the following order:
1. Search library proximity
2. Search library name
3. (Search results only) Call number, by most available copy status
4. Call number label
5. Copy status availability
Also return & display the copy counts ("x of y copies are available")
for the search library and each of its parents.
We can also determine "preferred library" as follows, taking the first
match:
1. A new GET param, "plib", specifying the number of the OU
2. If authenticated, the user's "search library" preference setting;
3. If authenticated, the user's home library;
4. Physical location in which the search is being issued (if any)
Given a preferred library:
1. Promote the copies (if any) for the preferred library to the top of
the copy display list.
2. Include the copy count for the preferred library if it is outside of
the scope of the search library;
3. In record details, give users the ability to jump to their preferred
library scope via "Show preferred library" beside the preferred
library copy count, if applicable. If your search library is located
beneath your pref library in the org hierarchy, then you'll get just
the "copy depth" link instead.
Also, untangle the located URIs from physical call numbers in
in-database unapi.
We had been facing the limitation of URIs being limited by the maximum
number of call numbers, with the result that URIs may or may not have
been displayed. Now, we take the bold tack of returning all URIs that
are in scope for both the search library and the preferred library. No
limiting is currently possible, but in the realistic worst case scenario
of both search lib and pref lib being set to an OU at depth 4, we'll get
a maximum of 8 different URIs back to display. (More realistically, it's
unlikely that a different URI will be set for each level of the
hierarchy.)
Some of the more granular code changes are as follows:
* Add attributes to in-db unapi acp, sunit, holdings_xml
This gives us more flexibility in displaying due dates within search
results or other contexts in which holdings are displayed. The
age_protect, copy_id, and vol_id attributes are required by the record
summary display.
* Enable TPAC to display records via HSTORE-based unapi
Now that unapi requires HSTORE-based LIMIT and OFFSET arguments, take
the simplest possible approach to get get_records_and_facets() working
again.
In search results, we want to limit both the number of copies we get
back (defaulting to a maximum of 5 copies per call number) and the
number of call numbers we get back (defaulting to a maximum of 5 call
numbers), so that we don't get 50 call numbers each with 5 copies back
and wind up grinding Evergreen's performance down to a halt.
Rough thought is that the caller can filter through the (maximum) 25
hits that are returned to present their preferred results. For example,
a site could opt to show 5 different call numbers with just one copy per
call number, or 5 different copies for a single call number, or all 25.
* Avoid deleted call numbers, copies, and sunits
The rewrite of unapi removed the filters for deleted call numbers that
were added to master in LP# 893315 / commit hash 47a16f516d. Fix this
to prevent returning pages of results that would show nothing in the
TPAC because all of the call numbers were deleted.
* Display multiple URIs correctly
We weren't clearing the hash each time that we added it to the list of
URIs, and that ended up duplicating the URI rather than adding distinct
URIs.
* Take copy availability into account for copy order
This is most important in the LIMITed list of copies returned to the
TPAC search results page, but also useful on the record details page.
This commit adds "copy status ranking" into the result ordering, such
that more available copies will be returned first in the list (and thus,
in the case of search results where call numbers and copies are
typically limited (currently to 5 of 5), ensuring that the most
available copies are likely to be seen by users).
The "availability" ranking for a copy is defined by a new function,
evergreen.rank_cp_status(), that takes criteria from the
config.copy_status table and ranks it in three tiers, as follows:
1. Most available = opac_visible and copy_active are both TRUE
2. Almost available = holdable and opac_visible are TRUE, but
copy_active is FALSE, or status ID = 1 ("Checked out")
3. Unavailable = anything else.
Thus, changing copy availability ranking (such as demoting "On holds
shelf" from the "most available" status to "almost available"), is
simply a matter of tweaking the evergreen.rank_cp_status() function.
* unapi database functions: mark STABLE
Thomas Berezansky suggested marking one of the new database functions in
the in-database unapi suite as STABLE to help the optimizer, which lead
to us realizing that everything can be marked as stable. This should
enable the planner to generate better plans than if left to the default
pessimistic level of VOLATILE.
Signed-off-by: Dan Scott <dan@coffeecode.net> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Mike Rylander [Wed, 3 Aug 2011 18:23:11 +0000 (14:23 -0400)]
Add per-class limit support to the tag URI parser; correct location/org thinko
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Dan Scott <dan@coffeecode.net> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Mike Rylander [Tue, 2 Aug 2011 18:44:53 +0000 (14:44 -0400)]
Support per-class sub-object limit/offset
Change the signature for in-db unapi functions so that the limit /
offset arguments become HSTORE values, rather than plain INTEGER values.
This gives you the ability to specify limits and offsets at both the
volume and copy level, via the likes of 'acp=>5, acn=>10' to
specify 5 copies and 10 volumes.
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Dan Scott <dan@coffeecode.net> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Bill Erickson [Wed, 29 Feb 2012 15:49:18 +0000 (10:49 -0500)]
Tpac: record detail print and email
Implements Print and Email actions (as links below add-to-list) in the
tpac record detail page.
The existing bib record print/email A/T seed templates were also updated
like so:
* Instead of using the reporter tables, bib data is fetched and
extracted via unapi, which allows access to SVF data (etc) and is more
consistent with the tpac.
* A number of unused A/T evnironment entries for the seed templates were
removed.
* The delay for the email template was explicitly set to 00:00:00
instead of the default 5 minutes to get the emails out quicker.
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Bill Erickson [Fri, 3 Feb 2012 21:32:03 +0000 (16:32 -0500)]
TPac; credit card assumes all xacts if none selected
For consistency with the initial payment form and to preserve backwards
compatibility, if no transactions are selected, assume the user wants to
pay for all transactions.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Bill Erickson [Mon, 21 Nov 2011 20:47:37 +0000 (15:47 -0500)]
TPac; credit card payment "Processing..." page
To prevent impatient patrons from re-submitting credit card payment
request forms, insert a Processing... page between the initial form
submission and the actual payment processing.
Steps 3-5 are new or modified.
1. User selects transactions to pay
2. User fills in payment form and Submits
3. Payment form data is cached in memcache with a temporary token
4. Processing page is displayed with message about how processing the
payment can take time, do not refresh, etc.
5. Page is refreshed via http meta refresh to submit the form using
the temp token. The page is not visibly changed, though, since it
takes time for the form submission to begin returning data.
6. User is directed to the payment results page.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Bill Erickson [Mon, 21 Nov 2011 20:44:40 +0000 (15:44 -0500)]
TPac; support context-genereted refresh content
If the tpac context object contains a "refresh" attribute, it will be
used as the content attribute in a <meta http-equiv="refresh" ...>
element in the page head. If present, it will override the default
refresh content for the authentication timeout.
While we're in there, let's use the more correct form of the content
attribute: content="x; url=foo"
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>