Dan Briem [Mon, 10 May 2021 02:27:38 +0000 (22:27 -0400)]
LP#1892435 Splash page catalog searches don't work with spaces
On older versions of Apache's mod_rewrite, splash page catalog
searches are escaped in JavaScript and escaped again during the
redirect to the Angular locale path, so searches with special
characters result in a search that's still encoded.
Test on Ubuntu 16.04.7, Apache 2.4.18, EG 3.6+. A splash page
catalog search for Harry Potter results in a search for
Harry%20Potter.
Add the NE (noescape) flag to the Angular locale path redirect
in /etc/apache2/eg_vhost.conf as indicated in this example file.
A splash page search for Harry Potter then works as expected.
Signed-off-by: Dan Briem <dbriem@wlsmail.org> Signed-off-by: Jason Boyer <JBoyer@EquinoxInitiative.org>
Dan Briem [Wed, 3 Mar 2021 18:21:22 +0000 (13:21 -0500)]
LP#1917495 Angular Catalog: Hold status in View Holds is not saved
To test:
1. Go to a record in the Angular catalog
2. Click the View Holds tab
3. If status col is visible, remove status col, and save grid
4. Add status col and save grid.
5. Refresh page and note status field didn't stay visible
6. Apply patch, repeat steps 1-5, note Status stays visible
Signed-off-by: Dan Briem <dbriem@wlsmail.org> Signed-off-by: Michele Morgan <mmorgan@noblenet.org> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
The Angular catalog item table doesn't check UPDATE_COPY perm
before displaying an edit link. The back-end checks, so this is
a display issue only. This commit grabs a list of org Ids where
the user has UPDATE_COPY perm and checks the copy circ lib or
cn owning lib is in the list before displaying the edit link.
To test:
1. Search for a record with items you don't have perm to edit
2. Note the edit link shows on every item
3. Apply patch
4. Repeat steps 1-2
5. Note edit link displays if you have perm to edit
Signed-off-by: Dan Briem <dbriem@wlsmail.org> Signed-off-by: Michele Morgan <mmorgan@noblenet.org> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Jeff Davis [Mon, 9 Nov 2020 21:59:59 +0000 (13:59 -0800)]
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>
Jeff Davis [Mon, 9 Nov 2020 23:17:07 +0000 (15:17 -0800)]
LP#1902965: change format type in XML transform to avoid XSS in SuperCat
Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca> Signed-off-by: Jason Boyer <JBoyer@equinoxinitiative.org> Signed-off-by: Jason Stephenson <jason@sigio.com> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org> Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Jeff Davis [Mon, 9 Nov 2020 23:45:24 +0000 (15:45 -0800)]
LP#1902965: HTML filter on Bootstrap OPAC search results and record display
Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca> Signed-off-by: Jason Boyer <JBoyer@equinoxinitiative.org> Signed-off-by: Jason Stephenson <jason@sigio.com> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org> Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Jane Sandberg [Wed, 10 Feb 2021 19:51:55 +0000 (11:51 -0800)]
LP1873322: Angular Admin Pages default to workstation OU
To test:
1) Apply this patch.
2) Log in using a workstation at a particular org unit.
3) Open some of the following admin pages:
Local Admin > Address Alerts
Local Admin > Carousels
Local Admin > Group Penalty Thresholds
Local Admin > Course Reserves List > Terms Tab
Server Admin > Billing Types
Server Admin > Call Number/Volume Suffixes
Server Admin > Copy Tags
Server Admin > Hard Due Date Configuration
Acquisitions Admin > Cancel Reason Configuration
Acquisitions Admin > Claim Policies
Booking Admin > Resource Types
Booking Admin > Resource Attribute Values
4) Verify that these pages automatically open to your
workstation's org unit.
Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu> Signed-off-by: Michele Morgan <mmorgan@noblenet.org> Signed-off-by: Jason Stephenson <jason@sigio.com>
- 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.
- 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
Dan Briem [Tue, 8 Dec 2020 20:42:48 +0000 (15:42 -0500)]
LP#705693 Check Number in Bill History
Adds the check number field to the Bill History payment grids
(hidden by default).
To test:
1. Bill patron and apply a check payment with a check number
2. Go to Bills->History->Payments and note check number is not
an option (drop-down on top-right of grid shows the list)
3. Right-click the payment line->Full Details->Details and note
check number is not an option on the bottom payments grid
4. Apply patch (may need to clear cache especially on Firefox)
5. Repeat steps 2-3 and note check number is an available option
Jason Boyer [Thu, 3 Sep 2020 17:15:51 +0000 (13:15 -0400)]
LP1174498: Add Release Note
Signed-off-by: Jason Boyer <JBoyer@equinoxinitiative.org> Signed-off-by: Katie Greenleaf Martin <bcl@blaircountylibraries.org> Signed-off-by: Elizabeth Davis <edavis@albright.org> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
LP1174498: IDL changes for Payments by Billing Type
Add the mmpbbt class to make use of the new view.
Signed-off-by: blake <blake@mobiusconsortium.org> Signed-off-by: Jason Boyer <JBoyer@equinoxinitiative.org> Signed-off-by: Katie Greenleaf Martin <bcl@blaircountylibraries.org> Signed-off-by: Elizabeth Davis <edavis@albright.org> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
LP1174498: Add a Payments by Billing Type Reporting View
This is an updated version of the initial concept by Mike
Rylander with input from Jeff Godin. This view connects
payments to specific billings and allows reports to be
written to determine how accepted payments were distributed
by billing type.
Signed-off-by: blake <blake@mobiusconsortium.org> Signed-off-by: Jason Boyer <JBoyer@equinoxinitiative.org> Signed-off-by: Katie Greenleaf Martin <bcl@blaircountylibraries.org> Signed-off-by: Elizabeth Davis <edavis@albright.org> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Galen Charlton [Mon, 15 Mar 2021 15:51:22 +0000 (11:51 -0400)]
LP#1830960: update release notes to account for Bootstrap
Now that the Bootstrap skin is the default, this patch is
mostly of interest to current users of TPAC, including consortia
that may add new members before switching to the Bootstrap
skin.
Mike Rylander [Thu, 24 Sep 2020 16:48:41 +0000 (12:48 -0400)]
LP#1893997: Did you mean? Single word, single class
This commit embodies the first stage of a larger search suggestion
project. The bulk of the code is dedicated to providing an
implementation of the SymSpell[1] algorithm as the basis for very fast
word similarity testing for spelling suggestions as well as alternate
search suggestions.
The native in-memory algorithm specifies a hash table lookup using a
runtime-created dictionary. As it is untenable to create and maintain a
separate in-memory data structure in the distributed environment that
OpenSRF provides, and adds significantly to the administrative complexity
of such a configuration, we instead maintain a dictionary in the
authoritative Postgres database used by Evergreen. This dictionary is
based directly on indexed terms used for general search, and aims to
avoid zero-hit suggestions wherever possible while imposing as little
performance impact as can be managed.
In addition to the core SymSpell similarity metric, Damerau-Levenshtein
edit distance, we provide Soundex, Trigram, and QWERTY Keyboard
similarity measures. The importance of these can be adjusted relative
to one another, or turned off individually.
Global term frequncey data is captured for each of the Evergreen search
classes and is used to help decide when to use specific terms, and which
terms to use as suggestions.
Suggestions are provide in the OPAC, including the staff-embedded OPAC
view, the KPAC, and the Angular catalog.
Later development will add the ability to perform mult-word and
phrase-oriented suggestions, to suggest searching requested terms in
other search classes, and provide local thesaurus values and exclusion
term lists.
Jane Sandberg [Fri, 18 Dec 2020 16:57:04 +0000 (08:57 -0800)]
LP1907979: Fix Search by Instructor setting lookup in OPAC
Previously, the Search Courses screen in the OPAC relied on a locg
param in the URL to determine whether or not to display the "Search
by Instructor option", defaulting to location id 1 if no such param
exists. However, we can also consult physical_loc and other settings
to get a more accurate idea of which library's setting we need here.
To test:
1) In the Library settings editor, set Course Materials Module Opt In
to true for BR1.
2) In the Library settings editor, set Search by Instructor to true
for BR1.
3) In eg.conf, add the line:
SetEnv physical_loc 4
4) Restart httpd
5) Go to your OPAC. Note that the OPAC is at the BR1 level, and that
course search and browse options are available.
6) Click Search courses.
7) Note that only two values are available in the qtype dropdown: Course
Name and Course Number.
8) Apply this patch.
9) Repeat steps 5-6.
10) Note that the screen now appropriately consults the value for the
"Search by Instructor" setting at the BR1 level, with an "Instructor"
value now available in the qtype dropdown.
Jason Boyer [Fri, 12 Mar 2021 19:02:19 +0000 (14:02 -0500)]
Revert the effects of both LP1687545 and LP1914116
Revert "LP1687545: Force TT CGI plugin to use ampersands in query strings"
and "LP1914116: Apply html filter to mkurl() output"
until a fix for LP1918470 is available.
Signed-off-by: Jason Boyer <JBoyer@EquinoxInitiative.org>
Jason Etheridge [Fri, 19 Feb 2021 05:29:13 +0000 (00:29 -0500)]
lp1863252 fix Get Coordinates button in org admin
The underlying method can now handle org objects or org id's, and the UI
will also alert the user with any non-catastrophic error such as the location
not being found.
Signed-off-by: Jason Etheridge <jason@EquinoxInitiative.org> Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Jason Etheridge [Tue, 9 Feb 2021 16:38:22 +0000 (11:38 -0500)]
lp1863252 make Geo::Coder::Free optional
Restore Geo::Coder::Google to the CPAN module list and remove the Googlev3 package.
Geo::Coder::Google requires an API key, and Geo::Coder::Googlev3 purports not to
but is currently giving a REQUEST_DENIED to requests and is a known issue.
Signed-off-by: Jason Etheridge <jason@EquinoxInitiative.org> Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Galen Charlton [Wed, 16 Dec 2020 16:10:20 +0000 (11:10 -0500)]
lp1863252 fix unrelated issue that was breaking display of the copy_table
Without this, lack of a 'loc' CGI parameter breaks the page. This
was introduced in the course materials work and just appears to be wrong,
but should be double-checked.
Galen Charlton [Tue, 15 Dec 2020 23:07:00 +0000 (18:07 -0500)]
lp1863252 toward geosort
* fix swap of lat/lon that broke Math::Trig-based distance calculations
TODO: might want to drop that entirely in favor of delegating to a DB
call that uses earthdistance
* first pass at implementing display of distance in the OPAC
* include "Distance" label on mobile view of copy table
* display warning if address input is not translated to coordinates
* add distance column to TPAC copy table
* add default item sort button to both TPAC and Bootstrap
* changes to open-ils.geo registration
- don't register with the public router
- add to param redaction list
* add temporary caching of address => coordinates results
By default, coordinates are cached in memcached for 5 minutes. The
cache key is derived from a SHA-2 hash of the input address.
* implement query parameter log redaction as a PerLogHandler
* Don't need perl-script for a PerlLogHandler
Jason Etheridge [Thu, 3 Dec 2020 15:08:44 +0000 (10:08 -0500)]
lp1863252 toward geosort
From the release notes:
Sort Holdings by Geographical Proximity
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This functionality integrates 3rd party geographic lookup services to allow patrons
to enter an address on the record details page in the OPAC and sort the holdings
for that record based on proximity of their circulating libraries to the entered
address. To support this, latitude and longitude coordinates may be associated with
each org unit. Care is given to not log or leak patron provided addresses or the
context in which they are used.
squashed commits:
* actor.org_address
* config.geolocation_service
* config.global_flag
* opac.holdings_sort_by_geographic_proximity OUS
* opac.geographic_proximity_in_miles OUS
* opac.geographic_location_service_for_address
* permission.perm_list
* Geo.pm, opensrf*.xml, ils_events.xml
* Org Unit Configuration
* OPAC Record Details
* release notes
* remove base_url
* provide an open-ils.actor wrapper for open-ils.geo.retrieve_coordinates
* some error trapping
This will throw the GEOCODING_LOCATION_NOT_FOUND event for a wider range of problems.
With the Google service, you can test by providing a bad API key or sending the
copyright symbol as an address to lookup.
* distribute permissions to stock perm groups
* prerequisite cpan modules
* live_t/ tests
Signed-off-by: Jason Etheridge <jason@EquinoxInitiative.org>
This commit causes the record detail copy table to be restricted to
lasso orgs of the user-selected lasso. The copy and hold summary
information is still making use of the last context org selected, but
it's unclear how to adjust those because they are (currently) strictly
hierarchical via the org tree.