working/Evergreen.git
8 years agoMerge branch 'new_toolbar_icons'
Jason Etheridge [Mon, 2 Apr 2012 15:23:52 +0000 (11:23 -0400)]
Merge branch 'new_toolbar_icons'

Functional, but a bit mismatched with existing icons in my opinion

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
8 years agoMerge branch 'master' of git.evergreen-ils.org:Evergreen
Jason Etheridge [Mon, 2 Apr 2012 15:11:35 +0000 (11:11 -0400)]
Merge branch 'master' of git.evergreen-ils.org:Evergreen

8 years agomissing comma. tsbere++
Jason Etheridge [Mon, 2 Apr 2012 15:11:25 +0000 (11:11 -0400)]
missing comma. tsbere++

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
8 years agoFlattenerGrid (re)honors IDL column labels as default
Bill Erickson [Mon, 2 Apr 2012 14:19:02 +0000 (10:19 -0400)]
FlattenerGrid (re)honors IDL column labels as default

Linking the GridColumnPicker to FlattenerGrid killed the ability for the
FlattenerGrid to fall back to the IDL column label when no label was
defined in the markup.  This change adds a reloadStructure operation to
GridColumnPicker.  FlattenerGrid uses this to pass the updated column
labels (and any other changes) to gridcolumnpicker, which then updates
the grid display to match.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
8 years agoStamping upgrade script for serials holdings display improvements
Mike Rylander [Mon, 2 Apr 2012 14:21:32 +0000 (10:21 -0400)]
Stamping upgrade script for serials holdings display improvements

Signed-off-by: Mike Rylander <mrylander@gmail.com>
8 years agoholding_type on serial.issuance not quite dead
Dan Wells [Fri, 30 Mar 2012 20:17:47 +0000 (16:17 -0400)]
holding_type on serial.issuance not quite dead

The holding_type field was removed from the serial control editor
prematurely, and this missing data was a source of mild friction.
We'll put it back for now.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
8 years agoSimplify serial.materialized_holding_code
Dan Wells [Fri, 30 Mar 2012 19:55:19 +0000 (15:55 -0400)]
Simplify serial.materialized_holding_code

Attempting to materialize holding_type and ind1/ind2 for less than
perfect data causes problems.  Since we aren't actually using this
data, let's get rid of these fields.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
8 years agoOnly load "new" serials display if we have data
Dan Wells [Thu, 29 Mar 2012 21:07:23 +0000 (17:07 -0400)]
Only load "new" serials display if we have data

If we try to load the "new" serials display template, but have no
data (for instance, if "Use fully compressed serial holdings" is
false), we get a server error.

Rather than wrap the whole template in an 'if', let's just not
load it.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
8 years agoTPAC: ROWS 1 not appropriate here.
Lebbeous Fogle-Weekley [Mon, 19 Mar 2012 15:17:38 +0000 (11:17 -0400)]
TPAC: ROWS 1 not appropriate here.

I must have thrown this in as a misguided afterthought without testing
it.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
8 years agoTPAC: follow-up to serials holdings paging fix
Lebbeous Fogle-Weekley [Fri, 9 Mar 2012 23:07:19 +0000 (18:07 -0500)]
TPAC: follow-up to serials holdings paging fix

Some how I didn't notice it before, but my last commit broke things.
This unbreaks them.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
8 years agoTPAC: serials display paging bugfix
Lebbeous Fogle-Weekley [Thu, 8 Mar 2012 19:14:01 +0000 (14:14 -0500)]
TPAC: serials display paging bugfix

In the previous commit, paging at the deepest level of an expanded tree
was broken.  This fixes that, and improves pager labeling a little bit.

This also makes the default page size for holdings 12 instead of 10,
since monthlies are a pretty common case, and why not show them all on
one page.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
8 years agoTPAC: Improvement to serials display (under the "issues held" label)
Lebbeous Fogle-Weekley [Mon, 2 Apr 2012 11:20:33 +0000 (07:20 -0400)]
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.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Conflicts:

Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
Open-ILS/web/css/skin/default/opac/style.css

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
8 years agoStamping upgrade script for Copy Editor Field Hiding
Mike Rylander [Mon, 2 Apr 2012 11:50:40 +0000 (07:50 -0400)]
Stamping upgrade script for Copy Editor Field Hiding

Signed-off-by: Mike Rylander <mrylander@gmail.com>
8 years agoprevent templates from changing unsafe fields
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>
8 years agowire up util.hide in the item attribute editor
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>
8 years agoutil.hide library
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>
8 years agomove .hideme css to global.css
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>
8 years agoliberate this perm-cognizant lib menu generator
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>
8 years agoAutoGrid retains external search filters
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>
8 years agoTPAC: Centralized preferred library indicator
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>
8 years agoRemove block on mark-receive from non-PO UI
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>
8 years agoACQ: allow recv actions on copies from non-PO interface
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>
8 years agoMake ACQ Lineitem actions more readily accessible
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>
8 years agoACQ Upload import-copy option
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>
8 years agoFlattened searching: generalized data retrieval via public service
Lebbeous Fogle-Weekley [Tue, 20 Mar 2012 22:44:42 +0000 (18:44 -0400)]
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>
8 years agoStamping default pickup library upgrade script
Thomas Berezansky [Fri, 30 Mar 2012 18:07:03 +0000 (14:07 -0400)]
Stamping default pickup library upgrade script

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
8 years agoTeach loading of settings inside of patron window
Thomas Berezansky [Thu, 22 Mar 2012 18:26:32 +0000 (14:26 -0400)]
Teach loading of settings inside of patron window

By passing through get_barcode_and_settings (and get_barcode, why not).

Once there we can, on load of place hold screens, load the target user's
preferences instead of having to teach TPac to do so in the background.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
8 years agoTPac: Include day phone default_phone backup
Thomas Berezansky [Fri, 16 Mar 2012 18:46:19 +0000 (14:46 -0400)]
TPac: Include day phone default_phone backup

Like JSPac.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
8 years agoHook up default phone/pickup in JSPac
Thomas Berezansky [Thu, 26 Jan 2012 18:05:16 +0000 (13:05 -0500)]
Hook up default phone/pickup in JSPac

Because why not? Note that you can't set them with JSPac.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
8 years agoTPac: Load user's hold prefs
Thomas Berezansky [Thu, 26 Jan 2012 17:44:21 +0000 (12:44 -0500)]
TPac: Load user's hold prefs

When staff place holds attempt to load the user's hold preferences.

This also hooks up the barcode completion code to the TPac hold placement
interface.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
8 years agoTPac: Add Default Hold Pickup Location
Thomas Berezansky [Thu, 26 Jan 2012 02:22:56 +0000 (21:22 -0500)]
TPac: Add Default Hold Pickup Location

And add it (plus other user settings) to the patron editor.

And fix a bug where notice prefs were saving without POST.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
8 years agoMinor cleanup of TT2 vs closing tag user/dbs/schema.org
Mike Rylander [Fri, 30 Mar 2012 14:40:15 +0000 (10:40 -0400)]
Minor cleanup of TT2 vs closing tag

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
8 years agoAdd basic schema.org microdata to record details
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>
8 years agoFirst inklings of schema.org support
Dan Scott [Sun, 18 Mar 2012 02:52:07 +0000 (22:52 -0400)]
First inklings of schema.org support

Just get the itemscope and very rudimentary mapping for the primary
itemtype into record details.

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
8 years agoNew toolbar button icons user/tsbere/new_toolbar_icons
Thomas Berezansky [Fri, 30 Mar 2012 00:12:53 +0000 (20:12 -0400)]
New toolbar button icons

Courtesy of NOBLE.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
8 years agoLP#520632 Fix for-loop over orgArraySearcher to preserve order
Michael Peters [Thu, 29 Mar 2012 18:59:20 +0000 (14:59 -0400)]
LP#520632 Fix for-loop over orgArraySearcher to preserve order

Authored by Remington Steed

This commit fixes the sort order in IE, Google Chrome of the
org unit's when choosing a search depth.

Signed-off-by: Remington Steed <rjs7@calvin.edu>
Signed-off-by: Michael Peters <mrpeters@library.in.gov>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
8 years agoStamping upgrade script for currently unfillable holds
Mike Rylander [Thu, 29 Mar 2012 17:36:46 +0000 (13:36 -0400)]
Stamping upgrade script for currently unfillable holds

Signed-off-by: Mike Rylander <mrylander@gmail.com>
8 years agoAdd PLACE_UNFILLABLE_HOLD permission
Thomas Berezansky [Sat, 14 Jan 2012 14:58:33 +0000 (09:58 -0500)]
Add PLACE_UNFILLABLE_HOLD permission

And hook it up in JSPac and TPac.

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>
8 years agoHold targeter cancellation action/trigger repairs
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>
8 years agoACQ provider admin page display improvements
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>
8 years agotrivial fix for Copy Buckets toolbar button
Jason Etheridge [Thu, 29 Mar 2012 15:19:28 +0000 (11:19 -0400)]
trivial fix for Copy Buckets toolbar button

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
8 years agoAdd Makefile to rebuild targets for generated files collab/dyrcona/lp960552_autoconf_subvars
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>
8 years agoMove towards build-time configuration of variables
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>
8 years agoStamping No plperl Upgrade Script
Thomas Berezansky [Thu, 29 Mar 2012 14:15:30 +0000 (10:15 -0400)]
Stamping No plperl Upgrade Script

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
8 years agoWe use plperlu, not plperl. So don't load both!
Thomas Berezansky [Tue, 27 Mar 2012 16:48:31 +0000 (12:48 -0400)]
We use plperlu, not plperl. So don't load both!

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
8 years agoACQ fund admin UI improvements
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>
8 years agoACQ Fund retrieval API permission improvements
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>
8 years agoACQ fund summary object fleshing in IDL
Bill Erickson [Thu, 22 Mar 2012 15:53:40 +0000 (11:53 -0400)]
ACQ fund summary object fleshing in IDL

Add links for fund summary classes in the IDL to allow for direct
fleshing of summary objects via pcrud.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
8 years agoAutoGrid onItemReceived support
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>
8 years agoremove XXXX script
Jason Etheridge [Wed, 28 Mar 2012 20:43:15 +0000 (16:43 -0400)]
remove XXXX script

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
8 years agoStamping upgrade script for custom toolbars
Thomas Berezansky [Wed, 28 Mar 2012 19:52:21 +0000 (15:52 -0400)]
Stamping upgrade script for custom toolbars

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
8 years agofix a Down action bug in Configure Toolbars
Jason Etheridge [Wed, 28 Mar 2012 19:19:42 +0000 (15:19 -0400)]
fix a Down action bug in Configure Toolbars

where the list selection index could be set to an invalid value, which could
cause errors for actions acting upon that index

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
8 years agofix editing of multiple toolbarseparators
Jason Etheridge [Wed, 28 Mar 2012 15:37:12 +0000 (11:37 -0400)]
fix editing of multiple toolbarseparators

and toolbarspacers.  Also beef up the hardcoded toolbar to match the stock circ
toolbar.

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
8 years agoreworked toolbars for dynamism
Jason Etheridge [Tue, 20 Mar 2012 20:52:13 +0000 (16:52 -0400)]
reworked toolbars for dynamism

uses the data from action.toolbar

also a Toolbar Configuration UI

also added more toolbar buttons, though they need icons

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
8 years agofix constraint syntax
Jason Etheridge [Tue, 20 Mar 2012 17:03:21 +0000 (13:03 -0400)]
fix constraint syntax

and add in toolbar related permissions, plus a missing and unrelated perm: IMPORT_AUTHORITY_MARC

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
8 years agoBeginning an unwrapped upgrade script
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>
8 years agoDB layout for recording custom toolbars
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>
8 years agoutility functions for Javascript Shell
Jason Etheridge [Thu, 22 Mar 2012 04:12:34 +0000 (00:12 -0400)]
utility functions for Javascript Shell

win_list() returns an array of "eg_main" chrome windows

get_tab() takes two forms:

    get_tab(chrome_window,tab_index)
    get_tab(tab_index)

The latter invocation assumes the first chrome window returned by win_list().

get_tab returns an object with the keys 'name' and 'content', pointing to the
tab label and the tab panel -> iframe -> contentWindow, respectively.

So let's say you had a patron account open in tab 1, and the Javascript Shell
open in tab 2.  In the shell, you could do:

    var o = get_tab(1);

o.name might contain something like

    1 Patron: Circulator, Ima

and you could do this to refresh that interface:

    o.content.g.patron.refresh_all()

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
8 years agoFix ordinal column with multiple lists
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>
8 years agomore workstation related options for ses()
Jason Etheridge [Thu, 22 Mar 2012 03:05:52 +0000 (23:05 -0400)]
more workstation related options for ses()

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
8 years agoTPAC: Suppress copy counts for libraries that own zero copies collab/dyrcona/tpac-suppress-preferred-library-count-with-0
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>
8 years agoFix NULL interval for action_trigger.event_definition.delay
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>
8 years agoFix seed data script syntax errors
Dan Scott [Tue, 27 Mar 2012 18:40:49 +0000 (14:40 -0400)]
Fix seed data script syntax errors

Commas were missing at the end of some lines. Fix that so that the
database can be created relatively cleanly again.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
8 years agoTemplate processor always falls back to en_us
Bill Erickson [Tue, 27 Mar 2012 14:25:36 +0000 (10:25 -0400)]
Template processor always falls back to en_us

When no locales are registered and/or when a given locale is missing
a translation, fall back to en_us as the default locale.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
8 years agolp965651: add missing commas
Galen Charlton [Mon, 26 Mar 2012 20:11:34 +0000 (16:11 -0400)]
lp965651: add missing commas

Patch by Jason Stephenson, Comma Hunter

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
8 years agolp965637: add missing comma to fix syntax error
Galen Charlton [Mon, 26 Mar 2012 20:07:09 +0000 (16:07 -0400)]
lp965637: add missing comma to fix syntax error

Patch from Jason Stephenson

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
8 years agoAdd patron prefix upgrade to the version upgrade script
Mike Rylander [Mon, 26 Mar 2012 17:53:19 +0000 (13:53 -0400)]
Add patron prefix upgrade to the version upgrade script

Signed-off-by: Mike Rylander <mrylander@gmail.com>
8 years agoStamping patron prefix upgrade script
Mike Rylander [Mon, 26 Mar 2012 17:52:25 +0000 (13:52 -0400)]
Stamping patron prefix upgrade script

Signed-off-by: Mike Rylander <mrylander@gmail.com>
8 years agoAdd a prefix field to patron registration interface
Michael Peters [Mon, 30 Jan 2012 16:55:23 +0000 (11:55 -0500)]
Add a prefix field to patron registration interface

Signed-off-by: Michael Peters <mrpeters@library.in.gov>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
8 years agoversion fix for 0692/0693
Jason Etheridge [Mon, 26 Mar 2012 16:27:38 +0000 (12:27 -0400)]
version fix for 0692/0693

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
8 years agoAdd ISSN fix to the version upgrade script
Mike Rylander [Mon, 26 Mar 2012 15:11:18 +0000 (11:11 -0400)]
Add ISSN fix to the version upgrade script

Signed-off-by: Mike Rylander <mrylander@gmail.com>
8 years agoStamping upgrade script for ISSN normalization fix
Mike Rylander [Mon, 26 Mar 2012 14:57:52 +0000 (10:57 -0400)]
Stamping upgrade script for ISSN normalization fix

Signed-off-by: Mike Rylander <mrylander@gmail.com>
8 years agoLP932540: Fix ISSN indexing
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>
8 years agoStamped upgrade for 'allow fines during closings'
Bill Erickson [Fri, 23 Mar 2012 21:03:47 +0000 (17:03 -0400)]
Stamped upgrade for 'allow fines during closings'

Signed-off-by: Bill Erickson <berick@esilibrary.com>
8 years agoAllow fines to accrue during closings
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>
8 years agoAlt serials opac reloading cleanup
Lebbeous Fogle-Weekley [Mon, 19 Mar 2012 18:39:09 +0000 (14:39 -0400)]
Alt serials opac reloading cleanup

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>
8 years agoAlt serials reload opac after changes
Bill Erickson [Mon, 19 Mar 2012 15:12:06 +0000 (11:12 -0400)]
Alt serials reload opac after changes

Using the new onPostSubmit handler for AutoGrid.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
8 years agoAutoGrid generic onPostSubmit handler
Bill Erickson [Mon, 19 Mar 2012 15:10:55 +0000 (11:10 -0400)]
AutoGrid generic onPostSubmit handler

Called w/ no arguments after any CRUD actions occur.  This includes
EditPane / EditDialog actions as well as deleteSelected.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
8 years agoFollowup fix to teaching AutoGrid to reload_opac()
Lebbeous Fogle-Weekley [Fri, 9 Mar 2012 17:54:37 +0000 (12:54 -0500)]
Followup fix to teaching AutoGrid to reload_opac()

For deleting a list of selected items, only reload_opac() once at the
end, not once for each item deleted.

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>
8 years agoAlt Serial Control interfaces and Batch Receive reload OPAC when possible
Lebbeous Fogle-Weekley [Fri, 9 Mar 2012 17:10:20 +0000 (12:10 -0500)]
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>
8 years agoupdating item out count in patron display
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>
8 years agoReload the OPAC via Holdings Maintenance
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>
8 years agoStamping upgrade script for ACQ search improvements
Mike Rylander [Fri, 23 Mar 2012 20:23:32 +0000 (16:23 -0400)]
Stamping upgrade script for ACQ search improvements

Signed-off-by: Mike Rylander <mrylander@gmail.com>
8 years agoPO Invoice link search by PO instead of Lineitem
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>
8 years agoAcq: improve General Search's ability to find invoices
Lebbeous Fogle-Weekley [Tue, 14 Feb 2012 22:49:54 +0000 (17:49 -0500)]
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:

https://docs.google.com/drawings/d/15ExkiYvq0skfobbocvPWxwdZkb7aykEZpLGfbP9PL04/edit

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>
8 years agoAutoFieldWidget single-object cache repairs
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>
8 years agoPermaCrud.js flesh support
Bill Erickson [Thu, 22 Mar 2012 15:53:55 +0000 (11:53 -0400)]
PermaCrud.js flesh support

Now that open-ils.pcrud supports fleshing, allow flesh params to pass
through PermaCrud.js

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
8 years agoStamping upgrade script for in-db unAPI + TPAC cleanup from Dan Scott
Mike Rylander [Fri, 23 Mar 2012 16:45:38 +0000 (12:45 -0400)]
Stamping upgrade script for in-db unAPI + TPAC cleanup from Dan Scott

Signed-off-by: Mike Rylander <mrylander@gmail.com>
8 years agoTPAC: Show preferred library copies only in consortial scope
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>
8 years agoTPAC: Sort copies from preferred library first
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>
8 years agoTPAC: Fix filtering of org units in record details
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>
8 years agoTPAC / unapi: Overhaul copy and located URI display
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>
8 years agoAdd per-class limit support to the tag URI parser; correct location/org thinko
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>
8 years agoSupport per-class sub-object limit/offset
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>
8 years agoWrap upgrade script for bib record email / print actions
Dan Scott [Thu, 22 Mar 2012 21:07:10 +0000 (17:07 -0400)]
Wrap upgrade script for bib record email / print actions

Thanks again to Bill Erickson for another nice piece o' functionality.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
8 years agoTpac: record detail print and email
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>
8 years agoWrap upgrade script for CSV circ history export
Dan Scott [Thu, 22 Mar 2012 16:53:13 +0000 (12:53 -0400)]
Wrap upgrade script for CSV circ history export

Thanks, Bill!

Signed-off-by: Dan Scott <dscott@laurentian.ca>
8 years agoTPac: Circulation history CSV export
Bill Erickson [Wed, 22 Feb 2012 18:14:13 +0000 (13:14 -0500)]
TPac: Circulation history CSV export

This adds a new "Download CSV" button to the TPac circulation history
interface.  The CSV is generated from a new Action/Trigger event
definition.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Conflicts:

Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
Open-ILS/src/sql/Pg/950.data.seed-values.sql

Signed-off-by: Dan Scott <dan@coffeecode.net>
8 years ago.gitignore update - ignore more built files
Dan Scott [Thu, 22 Mar 2012 04:15:28 +0000 (00:15 -0400)]
.gitignore update - ignore more built files

Signed-off-by: Dan Scott <dan@coffeecode.net>
8 years agoTPAC: Tiny fix for + instead of _ string cat operator
Dan Scott [Thu, 22 Mar 2012 04:08:45 +0000 (00:08 -0400)]
TPAC: Tiny fix for + instead of _ string cat operator

Quiet down, Apache logs.

Signed-off-by: Dan Scott <dan@coffeecode.net>