~denials/evergreen/master

  • Committer: Bill Erickson
  • Author(s): Galen Charlton
  • Date: 2018-08-15 18:08:42 UTC
  • Revision ID: git-v1:deab49ceef1b036c7918c3103282e0be13710980
LP#1721575: Batch Actions In the Public Catalog

The public catalog now displays checkboxes on the bibliographic and
metarecord constituents results pages. Selecting one or more titles
by using the checkboxes will dynamically add those title to the
temporary list, which is now renamed the basket.

Above the results lists there is now a bar with a select-all checkbox,
a link to the basket management page that also indicates the number of
of titles in the basket, and a link to remove from the basket titles that
are selected on the currently displayed results page.

The search bar now includes an icon of a basket and displays the number
of titles currently in the basket. Next to that icon is a menu of basket
actions.

The basket actions available are Place Hold, Print Title Details,
Email Title Details, Add Cart to Saved List, and Clear Cart. In the
web staff client, the basket actions also include Add Cart to Bucket.
When an action is selected from this menu, the user is given an
opportunity to confirm the action and to optionally empty the basket
when the action is complete. The action is applied to all titles
in the basket.

Clicking on the basket icon brings the user to a page listing the
titles in the basket. From there, the user can select specific records
to request, print, email, add to a list, or remove from the basket.

The list of actions on the record details page now provides separate
links for adding the title to a basket or to a permanent list.

The permanent list management page in the public catalog now also
includes batch print and email actions.

Additional information
++++++++++++++++++++++
* The checkboxes do not display on the metarecord results page, as
  metarecords currently cannot be put into baskets or lists.
* The checkboxes are displayed only if Javascript is enabled. However,
  users can still add items to the basket and perform batch actions on
  the basket and on lists.
* A template `config.tt2` setting, `ctx.max_basket_size`, can be used to
  set a soft limit on the number of titles that can be added to the
  basket. If this limit is reached, checkboxes to add more records to the
  basket are disabled unless existing titles in the basket are removed
  first. The default value for this setting is 500.

Developer notes
+++++++++++++++

This patch adds the the public catalog two routes that return JSON
rather than HTML:

* `GET /eg/opac/api/mylist/add?record=45`
* `GET /eg/opac/api/mylist/delete?record=45`

The JSON response is a hash containing a mylist key pointing to the list
of bib IDs of contents of the basket.

The record parameter can be repeated to allow adding or removing
records as an atomic operation. Note that this change also now available
to `/eg/opac/mylist/{add,delete}`

More generally, this adds a way for EGWeb context loaders to specify that
a response should be emitted as JSON rather than rendering an HTML
page using `Template::Toolkit`.

Specifically, if the context as munged by the context loader contains
a `json_response` key, the contents of that key will to provide a
JSON reponse. The `json_response_cookie` key, if present, can be used
to set a cookie as part of the response.

Template Toolkit processing is bypassed entirely when emitting a JSON
response, so the context loader would be entirely reponsible for
localization of strings in the response meant for direct human
consumption.

Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Filename Latest Rev Last Changed Committer Comment Size
..
build 7698 16 years ago dbs First step towards a saner translation framework f Diff
docs 11469 14 years ago kgs Moving styleguide folder into 1.6 docs repository. Diff
Open-ILS 2 19 years ago phasefx Initial revision git-svn-id: svn://svn.open-ils. Diff
.gitignore 21717 6 years ago Mike Rylander LP#1642086 TPAC Jquery path repair, .gitignore, ka 14.5 KB Diff Download File
.mailmap 20633 8 years ago Jason Stephenson Add entries to .mailmap. Signed-off-by: Jason Ste 1.7 KB Diff Download File
AUTHORS 16659 12 years ago Galen Charlton AUTHORS, NEWS, and INSTALL files should actually h 199 bytes Diff Download File
ChangeLog 16662 12 years ago Galen Charlton tweak wording - ChangeLogs are generated during re 210 bytes Diff Download File
configure.ac 21215 7 years ago Galen Charlton LP#1669868: fix regression that broke building sta 14.9 KB Diff Download File
COPYING 13383 14 years ago gmc update GPL 2.0 text in the staff client license st 749 bytes Diff Download File
DCO-1.1.txt 8485 16 years ago miker add a copy of the DCO for convenience git-svn-id: 1.1 KB Diff Download File
HACKING 16694 12 years ago Dan Scott Consensus was reached to remove editor-specific gl 2.3 KB Diff Download File
Symlink INSTALL 16659 12 years ago Galen Charlton AUTHORS, NEWS, and INSTALL files should actually h .
LICENSE.txt 13382 14 years ago gmc updated license text with current GPL 2.0 text NO 17.6 KB Diff Download File
Makefile.am 21200 7 years ago Galen Charlton LP#1638377: Allow perl to be installed in non-stan 1.1 KB Diff Download File
NEWS 16659 12 years ago Galen Charlton AUTHORS, NEWS, and INSTALL files should actually h 71 bytes Diff Download File
Symlink README 21285 7 years ago Jeff Godin LP#1682447 Fix README symlink for server_installat .