minor fix.. this was working, but not in the same vein of other 'render' elements

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
TPAC added content integration

https://bugs.launchpad.net/evergreen/+bug/984963

This adds a new tab on the detail page called Additional Content
(suggestions welcome).  When the tab is expanded, available content is
presented to the user via a series of sub-tabs.

At the start of loading the record detail page, kick off a series of
asynchronous HTTP HEAD requests, one per type of added content.  At the
end of context loading, read the results of the HTTP requests for any
that have completed.  If the status for a type is 200, the type is
marked as available.  If it's not 200 (usually 404) it's marked as not
available.  Otherwise, it's marked as unknown.

In the template, available content produces a link the user can click
to view the content.  Non-available content produces no links.  Unknown
content produces a link that may lead to content or no content when
JS/dojo is disabled.  When dojo is enabled, unknown content sends a
series of JS queries to determine the state of the content
asynchronously and results in displayed links for any type that is later
determined to have content.

TODO: when the user expands the Additional Content tab, no type is
chosen by default.  A default (available) type needs to be selected on
initial display.

TODO: better styling, particularly in the sub-tabs.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
TPAC added content improvements

* Style the sub-tabs to indicate which is selected
* If the template knows there is no content, hide the main tab
* cleanup

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
TPAC added content shows default tab

Use the first available content as the default tab to show when the main
added content tab is expanded.

Note, if no content is known to exist until after JS has run, it's still
possible to expand the main tab and have no content selected by default.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
TPAC added content data retrieval sanity check

On the backend, avoid fetching added content data when initial request
returns 404.  This prevents edge case where a specific type may be
selected (e.g. via bookmark) even though no data exists for the type.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
tpac added content default type improvements

* In the pre-JS state, only choose a default display type when the type
is known to have data.

* If no default type is chosen for the main tab link, because no data
was available to the template, set the default from the first added
content type determined to be available via JS.

* Move added content JS to separate template file for easier override.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
tpac : uri escape added content key

The added content key may have spaces, etc.  URI escape the key to
prevent Net::HTTP from croaking in the URL.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
New pull list interface taking advantage of flattener for speed,

and advanced sorting.  For now, access it by the "Simplifed Pull List"
button along the bottom edge of the existing holds pull list interface
(but I think when/if this thing is widely accepted, it should replace
the existing interface outright).

With thanks to Mike Peters for testing an early version.  Now including
some updates requested by Thomas Berezansky.  Specifically, the
queue_position column and its relatives fthat come from the same
calculation were removed, as they're [very] expensive in computing time to
produce and generally useless to pull lists.

One exception to the characterization of those fields as "useless" is the
"number of potential copies" column, which we should add back later
assuming we can find a fast way to do it rather than the previous ways,
which were slow.

Thanks to Bill Erickson for helping fix my issues in making auto-generated
columns coöperate with the column picker (his changes are squashed into
this).  I think it's finally right.

Now with release notes.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Stamping upgrade script for the flattener-based pull list

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Allow more granular overrides

This adds a new parameter to backend override functions. In most cases the
system will act like a hash with all set to 1 was passed in when nothing was
passed in by the caller.

The new parameter should be a hash containing zero or more of the following
options:

all - If true (1) override all events
events - Should be an array of event textcodes to override

For hold placement the "all" option is ignored for possibility checks, but
is checked for other events like HOLD_EXISTS.

Also included for hold placement is to always run possibility checks for
the test and create batch method.

Overall, the default is to act like things did previously.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
TPAC auto-override permissable patron hold fail events

This adds a new org unit setting which tells the tpac to automatically
override hold placement failure events in cases where the patron has the
permission to do so.  The goal is to skip the confirmation step
currently required by patrons when overridding a tpac hold.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Stamping upgrade script for TPAC hold override setting

Signed-off-by: Mike Rylander <mrylander@gmail.com>
menu entry Circulation->Clear Shelf-Expired Holds

This spawns the Browse Hold Shelf interface but automatically triggers the View
Shelf-Expired Holds and Clear these Holds options.

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Michael Peters <mrpeters@library.in.gov>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Acq: Use scope to constrain choice of lineitem alerts

This commit addresses this launchpad bug:
https://bugs.launchpad.net/evergreen/+bug/996033

The controlled vocabulary of acq lineitem alert text is set up in an
interface labeled "Line Item Alerts" in the staff client admin menu. In
the PO and selection list interfaces (where alerts can be applied), we
will limit the user to selecting alerts from those owned at the user's
workstation org unit (or its ancestors).

When we display applied alerts, we can also display the shortname of the
org unit at which the alert text is defined (the owning_lib column).
This should help clarify what's going on with alerts that have already
been applied using alert text from another org unit.

[Amended since original reference on Launchpad to also show the
owning_lib's shortname when confirming alerts at receive time.]

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Repair tpac QueryParser bookbag/container filter

The container() filter SQL now JOINs on m.source instead of mrd.id,
since mrd is not yet defined in the query (and m.source == mrd.id).

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Group acquisition OU settings in a new "Acquisitions" group

As seen in LP867465, the current grouping of acquisition OU settings
under the generic "lib" group leads to confusion about which
context "default shelf location" and the like apply to. Creating a new
"Acquisitions" group will help clarify that current ambiguity.

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Stamping upgrade for ACQ org setting group

Signed-off-by: Bill Erickson <berick@esilibrary.com>
DOC: fix a couple typos

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
trivial whitespace change

(for testing post-receive hook after Gitolite upgrade)

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
LP#856708 - Scrolling/div size issues in action trigger interface

The event definition content pane does not properly accommodate its contents.
In the Event Definitions tab, the list of event definitions exceeds the height of the
pane, but you can't scroll all the way down to the bottom of the list -- some of the
content gets cut off. Likewise, when editing an event definition, you can't scroll
all the way to the bottom of the page; the Cancel and Save buttons are cut off, and
you have to use the Tab key to move the focus down to those buttons, which forces
the pane to scroll to the bottom so that they're visible.

Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca>
Signed-off-by: Michael Peters <mrpeters@library.in.gov>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>