LP#1541559: ebook API integration for TPAC
authorJeff Davis <jdavis@sitka.bclibraries.ca>
Tue, 7 Feb 2017 23:29:39 +0000 (15:29 -0800)
committerKathy Lussier <klussier@masslnc.org>
Mon, 20 Feb 2017 23:54:38 +0000 (18:54 -0500)
commitaddf3ab0c80685394c3d9f476c8af25a26c51a0e
treecc0e978912c70cd2923c8ff8d03db884d74b2d8d
parent556d1ceb81ff25ce9aa6c0938de1b6ff84a36871
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>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
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]