LP#1541559: ebook API integration for TPAC
authorJeff Davis <jdavis@sitka.bclibraries.ca>
Tue, 7 Feb 2017 23:29:39 +0000 (15:29 -0800)
committerJeff Davis <jdavis@sitka.bclibraries.ca>
Fri, 17 Feb 2017 19:14:40 +0000 (11:14 -0800)
commitbd470cc52bc74c6773284fb55e43c39902b487c2
treecec434e28ff4c51fa61c5d0ad6eec1722af96954
parentf1fef03a52a8fdeb9d012c9004ade5f61cf3ebad
LP#1541559: ebook API integration for TPAC

When this feature is enabled, Evergreen will use the open-ils.ebook_api
service to look up title and patron information from specified vendor
APIs and display that information in the TPAC.  (The service should be
configured using org settings before being enabled in config.tt2.)

This frontend is essentially a JS layer over top of the OPAC, with some
light use of Dojo since we're already using it, plus a few additions to
TT2 templates.  The JS layer uses OpenSRF JS bindings to talk to the
backend service, which in turn makes the appropriate calls to the
third-party API.  Session IDs and (if logged in) patron information are
stored in cookies, which are cleared when the patron logs out.

The user will see the following changes:

- On search results and record summary, for any records from a known
  e-book vendor, Evergreen will automatically look up holdings info from
  the vendor API.  If detailed information on formats and available
  "copies" is provided by the API (e.g. for OverDrive), that information
  is displayed in a table within the record; if only basic availability
  info is available (e.g. for OneClickdigital), a line is added to each
  record indicating whether the title is available.  (Eventually, "Place
  Hold" or "Check Out" links will be added to allow patrons to
  checkout/hold titles without leaving the TPAC.)

- When the user is logged in, the dashboard will show a count of e-book
  checkouts and holds for all enabled e-book vendors, as will the
  account summary.  This is separate from the "main" checkouts/holds
  display, since checkouts/holds on titles from third-party vendors are
  unrelated to checkouts/holds in Evergreen.

- When the user is logged in, additional tabs will be available in My
  Account for displaying detailed information on the patron's ebook
  checkouts and holds.  (Eventually, functionality will be added to My
  Account allowing the user to download or renew titles, suspend or
  cancel holds, etc.)

Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca>
24 files changed:
Open-ILS/src/templates/opac/css/style.css.tt2
Open-ILS/src/templates/opac/myopac/circ_history.tt2
Open-ILS/src/templates/opac/myopac/circs.tt2
Open-ILS/src/templates/opac/myopac/ebook_circs.tt2 [new file with mode: 0644]
Open-ILS/src/templates/opac/myopac/ebook_holds.tt2 [new file with mode: 0644]
Open-ILS/src/templates/opac/myopac/ebook_holds_ready.tt2 [new file with mode: 0644]
Open-ILS/src/templates/opac/myopac/hold_history.tt2
Open-ILS/src/templates/opac/myopac/holds.tt2
Open-ILS/src/templates/opac/parts/config.tt2
Open-ILS/src/templates/opac/parts/ebook_api/avail.tt2 [new file with mode: 0644]
Open-ILS/src/templates/opac/parts/ebook_api/avail_js.tt2 [new file with mode: 0644]
Open-ILS/src/templates/opac/parts/ebook_api/base_js.tt2 [new file with mode: 0644]
Open-ILS/src/templates/opac/parts/ebook_api/login_js.tt2 [new file with mode: 0644]
Open-ILS/src/templates/opac/parts/header.tt2
Open-ILS/src/templates/opac/parts/js.tt2
Open-ILS/src/templates/opac/parts/misc_util.tt2
Open-ILS/src/templates/opac/parts/myopac/main_base.tt2
Open-ILS/src/templates/opac/parts/record/summary.tt2
Open-ILS/src/templates/opac/parts/result/table.tt2
Open-ILS/src/templates/opac/parts/topnav.tt2
Open-ILS/web/js/ui/default/opac/ebook_api/ebook.js [new file with mode: 0644]
Open-ILS/web/js/ui/default/opac/ebook_api/loggedin.js [new file with mode: 0644]
Open-ILS/web/js/ui/default/opac/ebook_api/relation.js [new file with mode: 0644]
Open-ILS/web/js/ui/default/opac/ebook_api/session.js [new file with mode: 0644]