LP1582720: Ignore Duplicate Scoped URIs - TPAC When displaying scoped URI call numbers (subfield 9's), ignore duplicate URIs that can be caused by multiple subfield 9's on the same link. Signed-off-by: Jason Boyer <JBoyer@equinoxOLI.org> Signed-off-by: Jane Sandberg <js7389@princeton.edu>
LP#1992827: Improve OPAC URI display Currently, the web staff client displays URIs in a slightly different (and arguably better/more complete) way than the OPAC. In particular, the staff client includes any 856 with an ind2 value of 0, 1, or 2, and provides a label indicating the purpose of the URI based on the ind2 value. The OPAC, on the other hand, only displays 856s with an ind2 of 0 or 1, and does not distinguish the purpose. This commit both implements the "purpose" labeling and allows ind2=2 URIs to be displayed. Both BooPAC and TPAC templates are adjusted. This does not change the way Located URIs are excluded from OPAC display, they are still filtered out based on the existence of subfield 9. Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Christine Morgan <cmorgan@noblenet.org> Signed-off-by: Jane Sandberg <js7389@princeton.edu>
LP#2033067 The "prev" and "next" navigation buttons in carousels are not translated. Quick change to the lines specified by the ticket. Signed-off-by: Steven Mayo <smayo@georgialibraries.org> Signed-off-by: Jane Sandberg <js7389@princeton.edu> Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
LP1940962: Improve stock carousel display Allow carousels to take up 80% of the home page width and raise the default size to 5 titles so it doesn't look silly. Signed-off-by: Jason Boyer <JBoyer@equinoxOLI.org> Signed-off-by: Josh Stompro <stompro@stompro.org> Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
LP#1923225: fix handling of untruncated display fields in accordion A previous commit used the TT2 "html" filter to escape strings to which the accordion macro is applied, but which don't get truncated. But that's incompatible with display fields, which contain embedded HTML and therefore shouldn't be escaped in that way. This commit uses HTML::Defang on untruncated accordion input instead (which is consistent with how truncated strings are handled by the same macro). Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
LP#1902965: HTML filter on OPAC search results and record display, with accordion Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca> Conflicts: Open-ILS/src/templates/opac/parts/record/contents.tt2 Open-ILS/src/templates/opac/parts/record/summary.tt2 Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org> Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
LP#1424815: 'Read more' accordion in record view - Introduce custom accordion.JS to handle expand/truncation of node information. - Expansion/Truncation of individual nodes based on configurable length. - Refactor content.tt2 to properly display multiple notes with both Read More and Highlighting features. - Create accordion() macro in summary.tt2 to handle accordion-izing a string when also supplied with a length, display field string, and an optional highlighting boolean. - Implementation of config.tt2 variables to handle enabling and length requirements for truncation. - Apply Read More to record Title as well as item details and graphics text on record and search results. - Teach Accordion functionality to understand blocks of HTML - Add release notes for Read More functionality. Signed-off-by: Kyle Huckins <khuckins@catalyte.io> Signed-off-by: Ruth Fraser <rfrasur@gmail.com> Signed-off-by: Michele Morgan <mmorgan@noblenet.org> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Revert "LP#1424815: 'Read more' accordion in record view" This reverts commit 9561b5736eadfa9325015676bc64e628d9f72be4. Pushed by accident.
LP#1424815: 'Read more' accordion in record view - Introduce custom accordion.JS to handle expand/truncation of node information. - Expansion/Truncation of individual nodes based on configurable length. - Refactor content.tt2 to properly display multiple notes with both Read More and Highlighting features. - Create accordion() macro in summary.tt2 to handle accordion-izing a string when also supplied with a length, display field string, and an optional highlighting boolean. - Implementation of config.tt2 variables to handle enabling and length requirements for truncation. - Apply Read More to record Title as well as item details and graphics text on record and search results. - Teach Accordion functionality to understand blocks of HTML - Add release notes for Read More functionality. Signed-off-by: Kyle Huckins <khuckins@catalyte.io> Changes to be committed: modified: Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm modified: Open-ILS/src/templates/opac/css/style.css.tt2 modified: Open-ILS/src/templates/opac/i18n_strings.tt2 modified: Open-ILS/src/templates/opac/parts/config.tt2 modified: Open-ILS/src/templates/opac/parts/js.tt2 modified: Open-ILS/src/templates/opac/parts/misc_util.tt2 modified: Open-ILS/src/templates/opac/parts/record/authors.tt2 modified: Open-ILS/src/templates/opac/parts/record/contents.tt2 modified: Open-ILS/src/templates/opac/parts/record/summary.tt2 modified: Open-ILS/src/templates/opac/parts/result/table.tt2 new file: Open-ILS/web/js/ui/default/opac/accordion.js new file: docs/RELEASE_NOTES_NEXT/OPAC/read-more-feature.adoc Signed-off-by: Ruth Fraser <rfrasur@gmail.com> Signed-off-by: Michele <mmorgan@noblenet.org> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
LP1868147-Titles in carousel run together in mobile display. This patch uses the breakpoint option available in glide.js to limit the number of images in the carousel that display. Files for both the tpac and the bootstrap opac have been updated. There are two new variables based on bootstrap sizing, sm_width which defaults to 3, and xs_width which defaults to 2. If a screen's width is set between 768-992 pixels, 3 images display in the carousel, if the width is below 768 pixels, only 2 images display in the carousel. The reduction of images helps with titles overlapping each other. To test: Apply the patch to an instance of Evergreen that displays carousels. Reduce the screen size of the browser. Eventually the carousel will display 3 and then 2 images. Signed-off-by: Garry Collum <gcollum@gmail.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
LP#1832897: add public catalog display of carousels Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org> Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
LP#1752434: Use display fields even when not highlighting Always retrieve display field data, and decide whether to use the highlighted version of each based on the configuration and user option rather than falling back to template-side MARC extraction when not highlighting. Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Remington Steed <rjs7@calvin.edu> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
LP#1744385: Parallelize highlight gathering with XML feed retrieval Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Kathy Lussier <klussier@masslnc.org> Signed-off-by: Dan Wells <dbw2@calvin.edu>
LP#1744385: Speed up highlighting This commit removes a layer of opensrf-perl indirection and uses cstore instead of storage for retrieval. This trims seconds off the render time of results and a bit off record detail. Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Kathy Lussier <klussier@masslnc.org> Signed-off-by: Dan Wells <dbw2@calvin.edu>
LP#1744385: Allow highlight disabling globally via config.tt2 Also, add CC0 highlighter icon from https://pixabay.com/en/highlight-highlighter-highlighting-2022407/ and provide highlight en/dis-able. Signed-off-by: Mike Rylander <miker@esilibrary.com> Signed-off-by: Kathy Lussier <klussier@masslnc.org> Signed-off-by: Dan Wells <dbw2@calvin.edu>
LP#1744385: Search and Result Display improvements == Virtual Index Definitions The practical purpose of Virtual Index Definitions is to supply an Evergreen administrator with the ability to control the weighting and field inclusion of values in the general keyword index, commonly referred to as "the blob," without requiring tricky configuration that has subtle semantics, an over-abundance of index definitions which can slow search generally, or the need to reingest all records on a regular basis as experiments are performed and the configuration refined. Significant results of recasting keyword indexes as a set of one or more Virtual Index Definitions will be simpler search configuration management, faster search speed overall, and more practical reconfiguration and adjustment as needed. Previous to this commit, in order to provide field-specific weighting to keyword matches against titles or authors, an administrator must duplicate many other index definitions and supply overriding weights to those duplicates. This not only complicates configuration, but slows down record ingest as well as search. It is also fairly ineffective at achieving the goal of weighted keyword fields. Virtual Index Definitions will substantially alleviate the need for these workarounds and their consequences. * A Virtual Index Definition is not required supply any configuration for extracting bibliographic data from records, but instead can become a sink for data collected by other index definitions which is then colocated together to supply a search target made up of the separately extracted data. Virtual Index Definitions are effectively treated as aggregate definitions, matching across all values extracted from constituent non-virtual index definitions. They can further make use of the Combined class functionality to colocate all values in a class together for matching even across virtual fields. * Configuration allows for weighting of constituent index definitions that participate in a Virtual Index Definition. This weighting is separate from the weighting supplied when the index definition itself is a search target. * The Evergreen QueryParser driver returns the list of fields actually searched using every user-supplied term set, including constituent expansion when a Virtual Index Definition is searched. In particular, this will facilitate Search Term Highlighting described below. * Stock configuration changes make use of pre-existing, non-virtual index definitions mapped to new a Virtual Index Definition that implements the functionality provided by the keyword|keyword index definition. The keyword|keyword definition is left in place for the time being, until more data can be gathered about the real-world effect of removing it entirely and replacing it with Virtual Index Definition mappings. * New system administration functions will be created to facilitate modification of Virtual Index Definition mapping, avoiding the need for a full reingest when existing index definitions are added or removed from a virtual field. == Increased use of Metabib Display Fields In extention of changes proposed in other available branches, we here use Metabib Display Fields to render catalog search results, intermediate metarecord results, and record detail pages. This will requires the addition of several new Metabib Display Field definitions, as well as Perl services to gather and render the data. == Search Term Highlighting This commit enables Search Term Highlighting in the OPAC on the main search results page, the record detail page, and intermediate pages such as metarecord grouped results page. Highlighting search terms will help the user determine why a particular record (or set of records) was retrieved. Highlighting of matched terms uses the same stemming used to accomplish the search, as configured per field and class. This feature will help the user more quickly determine the relevance of a particular record by calling their attention to search terms in context. Lastly, it will help familiarize the user with how records are searched, including which fields are searched as well as exposing concepts like stemming. == Interfaces A new AngularJS "MARC Search/Facet Fields" interface has been created to replace the Dojo version, and both have been extended to support Virtual Index Definition data supplier mapping and weighting. == Settings & Permissions The new Virtual Index Definition data supplier mapping table, config.metabib_field_virtual_map, requires the same permissions as the MARC Search/Facet Fields interface: CREATE_METABIB_FIELD, UPDATE_METABIB_FIELD, DELETE_METABIB_FIELD, or ADMIN_METABIB_FIELD for all actions There is a new template-level global configuration variable in config.tt2 called search.no_highlight which disables highlighting for users of that config.tt2 instance. == Public Catalog The public and staff catalog will make use of new APIs to identify and display highlight-augmented values for those Display Fields used to render the search result pages, intermediate metarecord constituent pages, and record detail pages. Highlighting of terms will be performed using the application of Template::Toolkit-driven CSS. A generic CSS class identifying a highlighted term, along with CSS classes identifying the search class and each search field will be available for use for customization of the highlighting. A stock CSS template is provided as a baseline upon which sites may expand. When highlighting is generally enabled, it may be turned on or off on a per-page basis through the use of a UI component which will request the page again without highlighting. == Backend There now exist several new database tables and functions primarily in support of search highlighting. Additionally, the QueryParser driver for Evergreen has been augmented to be able to return a data structure describing how the search was performed, in a way that allows a separate support API to gather a highlighted version of the Display Field data for a given record. == Re-ingest or Indexing Dependencies With the addition and modification of many Index Definitions, a full reingest is recommended. However, search will continue to work as it did before the changes in this commit for those records that have not yet been reingested during that process. Therefore a slow, rolling reingest is recommended. == Performance Implications or Concerns Because the Metabib Display Fields infrastructure will eventually replace functionality that is significantly more CPU-intensive in the various forms of XML parsing, XSLT transformation, XPath calculation, and Metabib Virtual Record construction, it is expected that the overall CPU load will be reduced by this development, and ideally the overall time required to perform and render a search will likewise drop. It is unlikely that the speed increase will be visible to users on a per-search basis, but that search in aggregate will become a smaller consumer of resources. Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Kathy Lussier <klussier@masslnc.org> Signed-off-by: Dan Wells <dbw2@calvin.edu>
LP#1673870: process ebook variable in misc_util.tt2 Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org> Signed-off-by: Bill Erickson <berickxx@gmail.com>
LP#1681095 Browser cache-busting key for longer expires Extend the support for cache-busting that we added with autogen's generation of ctx.eg_cache_hash for core JavaScript assets to other assets such as images, stylesheets, and additional JavaScript. This will enable us to set very long cache times for our assets, which can then be controlled explicitly by setting eg.cache_key in config.tt2, or by default any time you run autogen. Addresses TPAC and KPAC Signed-off-by: Dan Scott <dan@coffeecode.net> Signed-off-by: Josh Stompro <stomproj@larl.org> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
LP#1208875: follow-up to standardize extract fields This patch removes the proposed custom methods for extracting title, author, and record format in favor of tweaking ->fetch_user_circ_history to invoke unapi.bre and adjusting the template to use get_marc_attrs. Also, nowadays ->fetch_user_circ_history can flesh what we need it to without having to rely on the existance of an action.circulation row, which won't be present if the circ was aged but was otherwise retained in the user circ history. The result is slower than the previous approach, but still retains the core idea of getting A/T out of the equation, and remains much faster than the A/T approach. Dropping use of unapi.bre would speed things up a bit more, as it was added only to match the addition of the record format column in the CSV output. Drop the column, and we no longer need to worry about MVFs. There would also be opportunities to improve caching further. Bib display fields, when it comes, will likely help even more, as it would mean being able to drop a lot of the XML parsing currently used. This patch also adjusts misc_util.tt2 so that including it doesn't result in an unwanted blank line. Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org> Signed-off-by: Jason Etheridge <jason@equinoxinitiative.org> Signed-off-by: Jason Stephenson <jason@sigio.com>
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>