]> git.evergreen-ils.org Git - Evergreen.git/blob - docs/RELEASE_NOTES_NEXT/OPAC/Batch_Actions.adoc
cba31b6ea370c67da821b59d4eb70ec3f888cd03
[Evergreen.git] / docs / RELEASE_NOTES_NEXT / OPAC / Batch_Actions.adoc
1 Batch Actions In the Public Catalog
2 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3 The public catalog now displays checkboxes on the bibliographic and
4 metarecord constituents results pages. Selecting one or more titles
5 by using the checkboxes will dynamically add those title to the
6 temporary list, which is now renamed the cart.
7
8 Above the results lists there is now a bar with a select-all checkbox,
9 a link to the cart management page that also indicates the number of
10 of titles in the cart, and a link to remove from the cart titles that
11 are selected on the currently displayed results page.
12
13 The search bar now includes an icon of a cart and displays the number
14 of titles currently in the cart. Next to that icon is a menu of cart
15 actions.
16
17 The cart actions available are Place Hold, Print Title Details,
18 Email Title Details, Add Cart to Saved List, and Clear Cart. In the
19 web staff client, the cart actions also include Add Cart to Bucket.
20 When an action is selected from this menu, the user is given an
21 opportunity to confirm the action and to optionally empty the cart
22 when the action is complete. The action is applied to all titles
23 in the cart.
24
25 Clicking on the cart icon brings the user to a page listing the
26 titles in the cart. From there, the user can select specific records
27 to request, print, email, add to a list, or remove from the cart.
28
29 The list of actions on the record details page now provides separate
30 links for adding the title to a cart or to a permanent list.
31
32 The permanent list management page in the public catalog now also
33 includes batch print and email actions.
34
35 Additional information
36 ++++++++++++++++++++++
37 * The checkboxes do not display on the metarecord results page, as
38   metarecords currently cannot be put into carts or lists.
39 * The checkboxes are displayed only if Javascript is enabled. However,
40   users can still add items to the cart and perform batch actions on
41   the cart and on lists.
42 * A template `config.tt2` setting, `ctx.max_cart_size`, can be used to
43   set a soft limit on the number of titles that can be added to the
44   cart. If this limit is reached, checkboxes to add more records to the
45   cart are disabled unless existing titles in the cart are removed
46   first. The default value for this setting is 500.
47
48 Developer notes
49 +++++++++++++++
50
51 This patch adds the the public catalog two routes that return JSON
52 rather than HTML:
53
54 * `GET /eg/opac/api/mylist/add?record=45`
55 * `GET /eg/opac/api/mylist/delete?record=45`
56
57 The JSON response is a hash containing a mylist key pointing to the list
58 of bib IDs of contents of the cart.
59
60 The record parameter can be repeated to allow adding or removing
61 records as an atomic operation. Note that this change also now available
62 to `/eg/opac/mylist/{add,delete}`
63
64 More generally, this adds a way for EGWeb context loaders to specify that
65 a response should be emitted as JSON rather than rendering an HTML
66 page using `Template::Toolkit`.
67
68 Specifically, if the context as munged by the context loader contains
69 a `json_response` key, the contents of that key will to provide a
70 JSON reponse. The `json_response_cookie` key, if present, can be used
71 to set a cookie as part of the response.
72
73 Template Toolkit processing is bypassed entirely when emitting a JSON
74 response, so the context loader would be entirely reponsible for
75 localization of strings in the response meant for direct human
76 consumption.