Commit graph

4643 commits

Author SHA1 Message Date
181cef50f7
Bug 34438: Add lang field to OPAC patron self registration form
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-11-08 11:41:15 -03:00
fbe06c7d9c
Bug 34557: (follow-up) Make link more like button in staff interface
This patch adds Bootstrap button style to the link and changes the text
from "Load your checkouts" to "Show your checkouts."

The patch adds an anchor to the link so that the browser jumps down the
page a bit making the checkouts more visible.

The patch also corrects the includes for Font Awesome files. No icons
were loading because of incorrect asset links.

To test, follow the previous patch's test plan, checking that the button
looks correctly styled and that the page reloads with the checkout form
at the top.

Confirm that Font Awesome icons are loading throughout the page.

Signed-off-by: AndrewA <andrew.auld@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-11-08 11:41:12 -03:00
8c801ea132
Bug 34557: Add SCOLoadCheckoutsByDefault system preference
This patch adds a enw system preference SCOLoadCheckoutsByDefault

When enabled, a patron's list o fcurrent checkouts will be loaded when the sign in to the SCO
module. If disabled, they will see link to load their checkouts. In either case, a new section
is added to the SCO to show a brief display of the last checked out it

To test:
1 - Enable WebBasedSelfCheck system preference
2 - Browse to:
    http://localhost:8080/cgi-bin/koha/sco/sco-main.pl
3 - Sign in the SCO user (or enable AutoSelfCheck)
4 - Sign in as a user with several items checked out
5 - Confirm you see a list of items checked out
6 - Apply patches, updatedatabase, restart_all
7 - 'Finish' and login patron to SCO again
8 - Confirm you still see the list
9 - 'Finish'
10 - Chenge the system preference
11 - Sign in to SCO, confirm checkouts do not load
12 - Confirm you see 'Load your checkouts' link
13 - Check an item out
14 - Confirm you see the last checkout, but not a list
15 - Attempt to checkout an item that cannot be checked out
16 - Confirm "Return to account summary" does not load checkouts
17 - Click "Load your checkouts"
18 - Confirm they load
19 - Check out another item, confrim they remain and are updated
20 - Checkout an item that cannot be issued
21 - Confirm 'Return to account summary' loads the checkouts again

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: AndrewA <andrew.auld@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-11-08 11:41:11 -03:00
3a027a0da9
Bug 35280: Fix patron attributes "clear" link in OPAC patron entry form
This patch makes a minor correction to the JavaScript controlling the
behavior of the "clear" link which appears on the patron entry form next
to patron attribute <select>s or <textarea>s which are editable in the
OPAC.

To test, apply the patch and create patron attributes
which have both "Display in OPAC" and "Editable in OPAC" checked.

- Create one which is tied to an authorized value, and one which isn't.
- Log in to the OPAC and click the "Personal details" tab.
- In the entry form, find the patron attribute fields under the
  Additional information" heading..
- Select a value in the dropdown, and enter text in the textarea.
- Confirm that clicking the corresponding "Clear" link for each works as
  expected.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-11-08 11:41:10 -03:00
Andreas Jonsson
b5d174c7d9
Bug 34857: Do not enable hidden select element (regression from bug 33233).
Test plan:

Using Chrome as web browser:

* Go to opac advanced search
* Press "more options"
* Search for two keywords using "and" operator (on ktd search for idea AND behind, which matches 1 result)
* Search for two keywords using "or" operator (on ktd search for idea OR behind, which matches 4 results)
* Search for two keywords using "not" operator (on ktd search for idea NOT behind, which matches 2 results)

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-11-08 11:41:09 -03:00
79bf4485c1
Bug 34866: Use template wrapper for breadcrumbs: OPAC part 4
This patch updates several OPAC templates so that they
use a new WRAPPER for displaying breadcrumbs.

Apply the patch and log in to the OPAC. Test each of the following pages
and their variations. Breadcrumbs should look correct, and each link
should be correct:

- Recent comments
- Most popular
- Enable "PatronSelfRegistration" and set "PatronSelfRegistrationVerifyByEmail"
  to "Don't require."
  - In the OPAC, go to "Register here." Fill out the form and submit
    your registration.
  - Check the "Registration complete" page.
- Set "PatronSelfRegistrationVerifyByEmail" to "Require"
  - Submit another registration and check the "Confirm your
    registration" page.
- Visit the registration page passing an invalid token:
  /cgi-bin/koha/opac-registration-verify.pl?token=foo
  Check the "Registration invalid" page.
- Enable the "ArticleRequests" system preference and log in to the
  OPAC.
  - Perform a search which will return results.
    - Check the search results page
    - View the detail page for one of the results.
     - Click "Request article."
    - Return to the detail page and click "Place hold."
      - Complete each step of the hold process.
- Enable the "OpacAllowSharingPrivateLists" system preference.
  - Create a private list if necessary.
  - Click the "Share" link
- Locate a serial record and view the detail page.
  - Click the "More details" link under the "Subscriptions" plan
- Enable the system preference "suggestion."
  - From the logged-in user summary page click "Purchase suggestions"
    - Click the "New purchase suggestion" link
- Enable the "AnonSuggestions" and "OPACViewOthersSuggestions" system
  preferences and log out of the OPAC.
  - View the purchase suggestions page.
- Enable the "OpacCloud" system preference and go to the "Subject cloud"
  page. (the feature doesn't need to be configured to test).
- Populate the "RestrictedPageTitle" and "RestrictedPageContent" system
  preferences and navigate directly to /cgi-bin/koha/opac-restrictedpage.pl
  - Remove the contents of "RestrictedPageTitle" and check the page
    again.
- This patch also updates svc/suggestion.tt but I don't know how to test
  it!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-11-06 11:34:42 -03:00
Katrin Fischer
3c02e599e3
Bug 34855: (QA follow-up) Terminology: "issue note" to "checkout note"
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-11-03 12:04:41 -03:00
0716caf2f8
Bug 34855: Use template wrapper for breadcrumbs: OPAC part 3
This patch updates several OPAC templates so that they
use a new WRAPPER for displaying breadcrumbs.

This patch also updates html_helpers.inc to add some logic for handling
the case where the "Home" link is the only breadcrumb (on the OPAC main
page). The change allows for the link to be disabled in this case.

Apply the patch and log in to the OPAC. Test each of the following pages
and their variations. Breadcrumbs should look correct, and each link
should be correct:

- OPAC main page
- Course reserves
  - Course reserves details
- Libraries
  - Follow the link for a specific library
- View the details of a bibliographic record
- Navigate directly to
  /cgi-bin/koha/opac-downloadshelf.pl?shelfnumber=X where X is the id of
  an existing list. (I don't think this page is ever seen unless the
  user has JavaScript disabled).
- Locate a serial record and click the "More details" link under the
  "Subscriptions" tab.
  - Click the "Full history" tab.
- Log into the OPAC as a user with checkouts. Navigate directly to
  /cgi-bin/koha/opac-issue-note.pl?issue_id=X where X is the id
  (issue_id) of one of the user's checkouts. (Another page which is only
  accessed directly if the user has JS disabled).
- From the logged-in user summary page, click "Change password"
  - Submit a password change.
- With "UseRecalls" enabled, locate a bibliographic record you can place
  a recall request for.
  - Place a recall.
- With "OPACLocalCoverImages" enabled, locate a bibliographic record
  which has a local cover image attached.
  - Under the "Images" tab, click the image thumbnail.
- If you have no custom OPAC pages, go to Tools -> Pages in the staff
  interface anc create one.
  - View the page in the OPAC.
- With "OPACReportProblem" enabled, click the "Report a problem" link at
  the bottom of any OPAC page.
  - Submit a report.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-11-03 12:04:40 -03:00
57f2ff8459
Bug 18203: Rename column
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-11-01 18:01:39 -03:00
13720defdd
Bug 18203: Add per borrower category restrictions on placing ILL requests
Test Plan:
    - Enable ILLModule sys pref and install any backend, or run
    bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev.sh)
    - Verify you can place new ILL requests in OPAC and Intranet
    - Apply patch
    - In borrower categories, verify there's a new column for 'can place ILL in opac' and is set to 'yes' by default
    - Edit your borrower's patron category and set 'can place ILL in opac' to 'No'
    - Verify you can no longer place new ILL requests in OPAC
    - Verify you also cannot place new ILL requests through URL:
    :8080/cgi-bin/koha/opac-illrequests.pl?method=create&backend=FreeForm

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-11-01 18:01:39 -03:00
Aleisha Amohia
f47c5f09f7
Bug 8367: (follow-up) Remove pickup delay message from OPAC
It adds unnecessary complexity and information.

Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kelly <kelly@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kelly <kelly@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-11-01 18:01:32 -03:00
Aleisha Amohia
ffde32e0d7
Bug 8367: (follow-up) Fix pickup delay text on OPAC and other bits
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kelly <kelly@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kelly <kelly@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-11-01 18:01:31 -03:00
Aleisha Amohia
6c0eb32a08
Bug 8367: Add holds_pickup_period circulation rule
So that pickup delay can have a different value per patron category,
   item type or branch.

To test:

1) Update database, restart services
2) Set ReservesMaxPickUpDelay syspref (if not already set)
3) Edit your circulation rules and set a value under 'Holds pickup
period (day) that is DIFFERENT from ReservesMaxPickUpDelay. Set a few
different numbers for different branches as well.
4) Place a hold on a biblio from the staff client.
5) Check in an item from that biblio and confirm the hold as waiting
6) Confirm the expiration date is calculated using the 'Holds pickup
period' value instead of the ReservesMaxPickUpDelay syspref
7) Revert the waiting status and delete the hold
8) Re-place the hold on the biblio on the OPAC. Notice that when you
change the pick up location, the number of days in the pickup message
below the dropdown changes based on the circ rules.
9) Create a holiday with a date that will overlap with the 'Holds pickup
period'
10) Check in an item from that biblio and confirm the hold as waiting
11) Confirm the expiration date is calculated using the 'Holds pickup
period' value AND considers the special holiday
12) Confirm tests pass t/db_dependent/Holds/WaitingReserves.t
13) Test Talking Tech:
13a) Enable TalkingTechItivaPhoneNotification
13b) Go to Tools -> Notices & slips. Add content to the HOLD phone
(itiva) notice.
13c) In your terminal, run perl
/path/to/koha/misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl -o
~/itiva.tmp -w 0 --type=RESERVE

Sponsored-by: Catalyst IT

Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kelly <kelly@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kelly <kelly@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-11-01 18:01:30 -03:00
bbf91c7ef6
Bug 26824: Use confirmation modal when removing titles from a list in the OPAC
This patch changes the process of removing a title from a list so that
it uses a confirmation modal dialog instead of a JavaScript alert.

To test, apply the patch and view the contents of a list in the OPAC.

 - Click the "Remove from this list" link under one of the titles.
 - You should see a modal confirmation message, "Are you sure you want
   to remove this item from the list?" It should show the title of the
   item on the list.
 - Test both the "Yes" and "No" choices.

 - Check the box next to one title on the list, and click the
   "Remove from list" link at the top of the table.
 - You should see a modal confirmation message, "Are you sure you want
   to remove this item from the list?" It should show the title of the
   item on the list.
 - Test boh the "Yes" and "No" choices.

 - Check the box next to multiple titles on the list and click the
   "Remove from list" link at the top of the table.
 - You should see a modal confirmation message, "Are you sure you want
   to remove these items from the list?" It should show the titles of
   all the records you selected.
 - Test both the "Yes" and "No" choices.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-11-01 17:23:23 -03:00
5a188651e4
Bug 33809: Centralize duplicated code
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-30 09:02:24 -03:00
f2538c8365
Bug 33809: (follow-up) Grammar correction
This is somewhat nitpicky but I think "Show fewer..." is more correct
than "Show less..." for strings like "Show fewer authors."

'Generally, fewer is used when the number of things is counted ("fewer
problems") whereas less is used when the number is measured ("less
trouble" or "less time").'
-- https://www.merriam-webster.com/words-at-play/fewer-vs-less

It's not a strict rule but to my ear it sounds more correct. The brief
"Show less" displayed on screen seems fine because the object feels
indeterminate: "Show less information."

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-30 09:02:23 -03:00
b56d54bf7e
Bug 33809: Place hold and Add to cart links need better descriptions
The place hold and add to cart buttons should identify to screen readers which title the button is linked to. This patch adds aria-labels that include the item title to make this more clear

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-30 09:02:23 -03:00
36c41afe9b
Bug 33809: Facet "Show more/less" links don't identify what they are showing
This patch addresses the Show more/less links in the side menu in opac-facets.inc. The links don't identify which facet they are linked to and this is confusing for screen readers.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-30 09:02:22 -03:00
Katrin Fischer
a65c909ebc
Bug 27943: (QA follow-up) Alternate display in result lists
The original display put the equivalent heading right after
the main heading with a = as separator. As the 7xx are repeatable
that could get croweded easily, also if the terms are longer
we might see not so nice breakage.

This puts every 7xx on its own line below the main heading
with some indentation.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-30 09:02:21 -03:00
Katrin Fischer
956ff1ab56
Bug 27943: (QA follow-up) Add missing TT filters
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-30 09:02:20 -03:00
George Veranis
a8b075a4d3
Bug 27943: Add support for 7XX equal terms on authorities marc21 display
Currently when a MARC21 authority has 7XX field they do not display on
authority search result page. 7XX is equal term of 1XX based on LC rules.
Applying this patch will enable that feature, which is important for non latin
catalogues.

Test plan:
1) Add a new authority with 1XX and 7XX fields.
2) Try to search that authority and check if 7XX values are displayed
3) Apply this patch
4) Try to search that authority and you will see that 7XX values are displayed
   like "1XX = 7XX"

Sponsored-by: Keratsini-Drapetsona Municipal Library, Greece
Mentored-by: Andreas Roussos
Signed-off-by: Frank Hansen <frank.hansen@ub.lu.se>

Works for me!

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-30 09:02:19 -03:00
Katrin Fischer
9cea8312a5
Bug 35147: (QA follow-up) Capitalzation: Shibboleth Login
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-30 09:02:16 -03:00
Aleisha Amohia
184299c9c8
Bug 35147: Add classes to Shibboleth text on OPAC login page
This enhancement makes it easier for libraries to change the Shibboleth-related messages on the OPAC login page.

Libraries can employ OPACUserJS to change the text. For e.g., I can replace the message "If you do not have a Shibboleth account, but you do have a local login, then you may login below." by putting the following in OPACUserJS:

$(".shib_local_text").text("If you do not have a staff member account, but are a member of the library, then you may log in below.");

To test:

1. Go to <your-opac-url>/cgi-bin/koha/opac-user.pl , or disable the OpacPublic system preference. Ensure you are logged out of the OPAC.
2. In the staff interface, search for the OPACUserJS system preference under Koha Administration. Add the following JS and Save:

$(".shib_invalid").text("Test changing the invalid Shibboleth login message.");
$(".shib_title").text("Test changing the Shibboleth login heading.");
$(".shib_url").text("Test changing the Shibboleth account link text.");
$(".shib_local_title").text("Test changing the local login heading.");
$(".shib_local_text").text("Test changing the message that shows if you do not have a Shibboleth account.");

3. Refresh the OPAC and confirm the text changes to reflect your JS. Note: The invalid Shibboleth login will be a bit harder to test, so if you can't test, confirm the HTML in the patch looks correct.

Sponsored-by: New Zealand Council for Educational Research
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-30 09:02:15 -03:00
328af73a94
Bug 34020: (QA follow-up) Indentation fix
The middle 'if' block was indented a level deeper than expected.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-25 10:35:34 -03:00
d8420e42b7
Bug 34020: Add spans to subfields
The 260 field has spans for each subfield, we should provide the same
for 264

To test:
1 - Apply patch
2 - Inspect the record 264 display on staff and opac, results and
    details
3 - Confirm spans are constructed correctly and named sensibly

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-25 10:35:33 -03:00
1349fc60da
Bug 34020: Preserve order of subfields in 264 display
When ordered $a$b$a$b$c in the MARC object, 264 subfields are displayed
$a$a$b$b$c.  This goes against the standard.

This patch preserves the order.

1) Edit a record and add/update a 264 fields to have subfields a, b, a,
   b, c in that order
1) Search for record in staff and opac, see subfields displayed in
   order "aabbc" in results
2) View the details page for the record in staff and opac, note same
   order
3) Apply the patch, restart all
4) Confirm staff and opac, results and details now follow the order of
   the subfields in the record's field

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-25 10:35:33 -03:00
3738b00c15
Bug 35007: Configure self checkout tables consistently
This patch makes some updates to the self checkout page so that
checkouts, holds, and account tabs are consistent with each other, with
the same DataTables configuration.

Included in the DataTables configuration are the same options we use on
the OPAC's user summary page to show controls for copy, CSV, and print.

Also changed: Some extra markup is removed from holds-table.inc, markup
which was used to show table information responsively before we started
using the DataTables responsive plugin.

To test, apply the patch and log into the self checkout system as a user
with checkouts, holds, and present or past charges.

Compare the checkouts, holds, and charges tabs to confirm that the
tables look correct and work correctly. Test that the copy, CSV, and
print controls, and the search and clear filter functions. Test that
each table responds correctly at various browser widths.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-25 10:35:27 -03:00
cef4ef4fb1
Bug 31503: (follow-up) Use KohaPlugins.feature_enabled
This patch switches the code from using
Koha.preference('OPACCustomConsentTypes') to using
KohaPlugins.feature_enabled('patron_consent_type').

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-25 10:35:23 -03:00
90604fcfcf
Bug 31503: (follow-up) Styling and pre-selection
This patch restores some of the wording and styling from the original
GDPR/Privacy policy feature including highlighting in a warning box.

I also remove the jQuery approach for pre-selecting already selected
radio options and rely on standard TT processing instead.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-25 10:35:22 -03:00
0a471bfeda
Bug 31503: Make opac-patron-consent more generic
Adds $patron->consent and $consents->available_types.
Incorporates them into script/template.
Provides two unit tests.

Note: A follow-up patch helps you test this with an
example plugin.

Test plan:
Run t/db_dependent/Koha/Patron.t
Run t/db_dependent/Koha/Patron/Consents.t
Toggle the value of pref PrivacyPolicyConsent and look at
OPAC account, tab Consents.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-25 10:35:20 -03:00
5d682d514b
Bug 31503: Change usermenu condition, add preference
Adds preference OPACCustomConsentTypes.

Test plan:
Run dbrev.
Toggle value of OPACCustomConsentTypes / PrivacyPolicyConsent.
Check user page for Consents tab.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-25 10:35:20 -03:00
933c779b7d
Bug 33810: Opac advanced search fields need aria-labels
The OPAC advanced search fields need aria-labels to assist with screen reading. This patch adds labels to both the dropdown selects and the text inputs

Signed-off-by: joubu <xxx@example.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-23 11:33:48 -03:00
0bc2990b00
Bug 31383: (bug 29691 follow-up) Remove get_opac_news_by_id
We can simply use get here

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-23 10:45:34 -03:00
76d522a903
Bug 34946: Remove the use of event attributes from self checkout and check-in
This patch removes the use of event attributes from the self checkout
and self check-in templates. These events are defined now along with the
other in-page JS.

To test you must have SelfCheckInModule and WebBasedSelfCheck
preferences enabled. And SelfCheckoutByLogin = cardnumber.

- Navigate to the self checkout interface
  (/cgi-bin/koha/sco/sco-main.pl).
- When the page loads, cursor focus should be automatically placed in
  the barcode field.
- Test the "munge history" feature from Bug 10016:
  [1] Start a web-based self-check session.
  [2] Enter a patron barcode.
  [3] Allow the self-check session to time out.
  [4] Use the back button.  You should get the patron barcode
      entry form; you should not be prompted to resubmit form input.
  [5] Enter a patron barcode, perform some transactions, then
      use the finish button.
  [6] Next, use the back button.  You should get the patron barcode
      entry form.
- Test the updated checkout_confirm function by submitting the "magic"
  barcode for checkout: __KOHA_NEW_CIRC__. The user's session should be
  ended.

- Navigate to the self check-in interface
  (/cgi-bin/koha/sco/sci-main.pl).
- Test the cursor focus and "munge history" feature on this page too.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 17:38:28 -03:00
cd7a8840d5
Bug 35000: Fix OPACMandatoryHoldDates feature in opac-reserve
Somewhere (perhaps after bug 29012) this feature has been broken
somehow.
The fact that we have two inputs for the date and the active one
is one level deeper, requires a few adjustments in the jquery
selectors etc. (Note that two Required lines were visible too.)
The corrected jquery constructs become a bit complexer now.

Test plan:
Enable AllowHoldDateInFuture + OPACAllowHoldDateInFuture.
Set circ rule for book to test with allows item level holds.
Set OPACMandatoryHoldDates to no hold dates.
Place hold on a book in OPAC. Check that More options is collapsed.
(If you force item level holds, it will open.)
Set OPACMandatoryHoldDates to Hold start date.
Refresh place hold page. More options is expanded now.
Click Place hold. You should see an alert and focus goes to start date.
Set OPACMandatoryHoldDates to Hold end date. Repeat place hold.
Set OPACMandatoryHoldDates to Both hold dates. Fill one. Place hold.
Bonus: Place hold on multiple biblios. Repeat former steps.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 17:22:03 -03:00
9fabc2f0b8
Bug 25393: UI adjustments
This updates the information messages that are displayed in Staff, OPAC and SCO
regarding renewals and if the item is up for automatic renewal or not.

Add issues.auto_renew to svc/checkouts endpoint response

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 16:31:18 -03:00
cb200023a4
Bug 33845: Display hold notes in OPAC
This patch adds the holds notes to the patron's account holds list

1 - Ensure system preference 'OpacHoldNotes' is enabled
2 - Place a hold on the OPAC and add a note
3 - Confirm the note displays on the Summary page Holds tab of 'Your account'
4 - In staff client, disable system preference 'OpacHoldNotes'
5 - View Holds on patron's account in opac
6 - Confirm the note no longer shows

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 16:31:10 -03:00
e1df591870
Bug 15222: Add to cart option/other list options missing from OPAC lists display
This patch adds the option to add titles to the cart or a list from the
view of a list's contents.

To test you should have at least one public list with titles added.
Apply the patch and go to the OPAC.

- View a public list.
- In the toolbar at the top of the table of titles you should see "Add
  to cart" and "Add to list." The controls should be disabled.
- Check checkboxes for one or more titles on the list.
- The controls should now be enabled.
- Clicking the "Add to cart" button should add the selected titles to
  the cart.
- If you are not logged into the OPAC, clicking the "Add to list" button
  should trigger an alert, "You must be logged in..."
- Log in to the OPAC and view the list again.
- Confirm that the "Add to list" control should trigger a popup allowing
  you to add your selected titles to an existing or a new list.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 14:44:07 -03:00
f5ac2916f2
Bug 31383: Create a parent-child DB relation for additional content
In the design of additional contents the idea of a parent-child relation is implicitly present. You have a default page and translations.
But we do this in one table coming from the old news items.

Several reports show that we would be better off creating a parent table listing the main news items, CMS pages or HTML content. And a child table containing the title, content and lang.

Note that this first step is a prelimenary step to clean this area and make it more robust and extensible. More enhancements to come.

What is this patchset doing?
* DB changes
- Rename additional_contents.idnew with id
- Create a new table additional_contents_localizations(id, additional_content_id, title, content, lang) that will contain the translated contents
- Move the content to this new table
- Remove title, content and lang columns from additional_contents
- Replace the notice templates that are using ''<news>" (should only be ISSUESLIP) and remove support for this syntax. Also add a warning in case other occurrences of uses of the old syntax exist.

* CRUD
- We add a new Koha::AdditionalContentsLocalization[s] couple, and move some logic from Koha::AdditionalContent[s] to there. Note that, to prevent too much drastic changes in notice templates, and to make them easy to use, the different attributes of the content object is accessible from the translated content object (ie. Koha::AdditionalContentsLocatlization->library is available and return $self->additional_content->library). I think it's an elegant way to keep things simple.
- No changes expected for "NewsLog" logging
- Little behaviour changes for pages, see tools/page.pl changes. We are now passing the id of the content, and the desired language, instead of the mix of "page_id" or code and lang. Note that here we certainly need to rename "language" query param to not change the full interface language.

Test plan:
0. Preparation steps, use master
  a. Create notice templates that are using "<< additional_contents.code >>". This won't be replaced, but we want the update process to alert us.
  b. Create several news, additional contents, pages. Some with translated contents, some without.
  c. Make sure ISSUESLIP has the "<news>" section. If you are using the sample data there is nothing to do here
  d. Turn on NewsLogs
1. Apply the patches, restart_all, updatedatabase
=> Confirm that the new table is created and filled with the contents you had prior to the update
=> Confirm that additional_contents_localizations.updated_on has been kept to the previous values
=> Confirm that ISSUESLIP has been replaced properly
=> Confirm that you get a warning about the additional_contents
2. Create, update, delete news, html customs, pages
=> Confirm that the additional_contents_localizations.updated_on is only adjusted when required
=> Confirm that the logs are correctly created when NewsLogs is on
3. Check some items out, generate a slip
=> Confirm that the news are displayed at the bottom of the slip, and that the publication date is correctly formatted
4. Have several HTML customizations (like OpacNav, opacheader), in translated in different languages
=> Confirm that the default values is displayed when you are using the interface in a language without translation
=> Confirm that the translated version is picked when it exists

Notes for QA:
* I am not sure we really need the alert during the update DB process about the additional_contents leftover. We should not have them outside of ISSUESLIP.
Shouldn't it hurt?
* There is something ugly in sample_news.yml, the id is hardcoded. But how do we prevent that and keep translatability?

Sponsored-by: Rijksmuseum, Netherlands
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 14:43:56 -03:00
bd30e81f12
Bug 35081: Make it possible to translate catalog concern status messages
The JavaScript in both OPAC and staff interface for submitting catalog
concerns contains English strings which are not properly wrapped with
the __() function to allow for translation. This patch fixes both
affected files.

The patch also modifies the dialog classes used in the staff interface
so that the messages are styled consistently.

To test, apply the patch and update a translation, e.g. fr-FR:
   - perl misc/translator/translate update fr-FR
- Edit the updated po file for the language you chose, e.g.
  misc/translator/po/fr-FR-messages-js.po, to fill in translated
  strings for the two catalog concern entries. For example:

  koha-tmpl/intranet-tmpl/prog/js/modals/add_catalog_concern.js:38
  koha-tmpl/opac-tmpl/bootstrap/js/modals/catalog_concern.js:55
  msgid "Your concern was sucessfully submitted."
  msgstr ""

- Install the updated po file:
   - perl misc/translator/translate install fr-FR
- Enable the translation if necessary under Administration -> System
  preferences -> language.
- Enable the "opaclanguagesdisplay" preference if necessary.
- Enable the " CatalogConcerns" preference if necessary.
- Locate a bibliographic record in the staff interface and view the
  detail page
  - From the toolbar, choose New -> New catalog concern.
  - Test submitting the form. When the form is submitted a message
    should display on the page: "Your concern was sucessfully submitted"

- Perform the same test in the OPAC, where the "Report a concern" link
  is in the right-hand sidebar menu of the bibliographic detail page.

- Perform the same tests, in both OPAC and staff interface, in your
  translated language to confirm that the translations show up
  correctly.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 11:02:53 -03:00
6deab09c13
Bug 32721: (QA follow up) - fix QA issues
This patches addresses issues raised by the QA tests. It also adds a missed import of the Branches file in the document head

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Bug 32721: (QA follow-up) Add missing imports

Missing imports added in three template files
Exec flag added to atomic update file
Tinymce imports removed

A new bug will be created to move codemirror into an inc file at latest
version

Test plan as before

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Bug 32721: Tidy up - duplicate fetching of userjs and css

Currently UserJS and UserCSS is injected into the template as a parameter through Auth.pm but is then fetched using Koha.Preference() in the template. This patch tidies this up by removing the parameters from Auth.pm

Test plan as per first commit

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-19 16:00:54 -03:00
82e2547e1b
Bug 32721: Add branch specific userjs and usercss
This patch allows for branch specific userJS and userCSS to be added through the libraries table. This works in conjunction with the global UserJS and UserCSS functionality and allows for multiple OPACs with different css and js options.

Test plan:
1) Add to apache conf (/etc/apache2/sites-available/kohadev.conf)
    SetEnv OPAC_BRANCH_DEFAULT "FFL"
    RequestHeader add X-Koha-SetEnv "OPAC_BRANCH_DEFAULT FFL"
2) In the container, run restart_all
3) Navigate to the OPACUserJS and OPACUserCSS system preferences and add the following: OPACUserJS - console.log('Hello from global sysprefs');, OPACUserCSS - 'body { background-color: black; }'
4) Refresh the OPAC and the background should be black and the message should be logged to the console in developer tools
5) Navigate to Administration > Libraries
6) On the Fairfield branch (if this does not exist you will need to create a branch with a code matching the code that you added to the apache conf file), click edit
7) At the bottom there should be two fields to add userjs and usercss, complete with Codemirror syntax checking
8) In userjs add console.log('Hello from branch level'); and in usercss add 'body { background-color: blue; } then save
9) Return to the OPAC and refresh
10) If you are logged out of the OPAC it should now be logging both the message from global and from the branch level and the background should be blue (if not you will need to log out)
11) Log back into the OPAC using a user that DOES NOT have a default branch matching the branch you added to the Apache conf
12) The OPAC should now revert to only showing the global message in the console with a black background

Sponsored-by: PTFS Europe

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-19 16:00:52 -03:00
bee2b3d33e
Bug 33949: Fix display of old checkouts if no checkouts exist
If we pass an empty array from the perl controller, we retrieve an empty
string from the template, and the merge does not work.

This patch fixes the following bug:
Pick a patron without checkout history
Check them an item out and check it in
=> The table is empty, whereas it should display the item that has been
checked in.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-18 15:41:27 -03:00
891835895c
Bug 33949: Replace GetAllIssues with Koha::Checkouts - opac
Same as bug 33948 for the OPAC side.
Additionally you will test
* OPACMySummaryHTML
* The different cover images services
* Display of ISBN
* Display of UPC
* Ratings

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-18 15:41:26 -03:00
5dd4043b06
Bug 34980: Remove the use of event attributes from title-actions-menu.inc in OPAC
This patch updates the include file used to show actions with each
search result, removing two instances of "onclick" in favor of an event
handler class which was already in use elsewhere.

To test, apply the patch and log in to the OPAC.

- Perform a catalog search which will return results.
- Test the "Save to lists" link under any search result. The "Save to
  lists" pop-up window should appear.
- View the contents of a list which contains some titles.
- Test the "Save to another list" control. The same pop-up window should
  be triggered.
- Tag at least one title in the catalog and view the "Tag cloud" page.
- Perform the same test with the "Save to lists" button in the table of
  our tags.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-18 15:41:25 -03:00
44aff60fa2
Bug 34852: Use template wrapper for breadcrumbs: OPAC part 2
This patch updates several OPAC templates so that they
use a new WRAPPER for displaying breadcrumbs.

Apply the patch and log in to the OPAC. Test each of the following pages
and their variations. Breadcrumbs should look correct, and each link
should be correct:

- Navigate to /cgi-bin/koha/ilsdi.pl
  - Check a variety of links in the list
- Advanced search
  - Locate a bibliographic record and view the ISBD detail page
  - View the MARC detail page
- Locate a serial record which has a patron notification notice defined
  in its subscription details
  - On the detail view under the "Subscriptions" tab, click the
    "Subscribe to email notification on new issues" button.
    - Confirm the subscription, then when you return to the detail page,
      click "Cancel email notification" to check that view as well.
- Authority search
  - Perform a search which will return results
    - Click the "Details" link on one of the results
      - Also view the "MARC view" tab (note that I didn't address the
        breadcrumb inconsistency between the normal and MARC view in
        this patch).
- Try to view a bibliographic record which is suppressed in the
  OPAC. Requires OpacSuppression enabled and OpacSuppressionRedirect set
  to "An explanatory page"
  - Set the value of 942$n to 1 to suppress it in the OPAC.
- In a system with ElasticSearch enabled, go to "Browse search" (or
  navigate directly to /cgi-bin/koha/opac-browse.pl
- With  OpacBrowser enabled, go to "Browse by hierarchy."

Signed-off-by: Philip Orr <philip.orr@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-18 10:25:58 -03:00
869dc05acc
Bug 34849: Use template wrapper for breadcrumbs: OPAC part 1
This patch updates several OPAC templates so that they
use a new WRAPPER for displaying breadcrumbs.

The patch contains a minor CSS update, so you will have to rebuild the
OPAC CSS for testings.

Apply the patch and log in to the OPAC. Test each of the following pages
and their variations. Breadcrumbs should look correct, and each link
should be correct:

- User summary
- Charges
- Personal details
  - Submit changes
- Consents (with PrivacyPolicyConsent enabled)
- Tags
- Change password
  - Submit password change
- Search history
  - Test when logged in and when not logged in
- Checkout history
- Privacy
- Holds history
- Recalls history
- Messaging (with  EnhancedMessagingPreferences
  and EnhancedMessagingPreferencesOPAC enabled).
- Lists
  - View private list
  - View public list
  - Edit list
  - Share list
    - Submit invitation
  - Create list
  - View list contents
- Routing lists (with RoutingSerials enabled)
- Ask for a discharge (with useDischarge enabled)
- ILL requests
- Curbside pickups
- Error page: Navigate to a non-existent page

Signed-off-by: Philip Orr <philip.orr@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-18 10:25:58 -03:00
06d182bc82
Bug 35006: OPAC holdings table - Fix sort for library columns
This patch updates the holdings table on the OPAC's bibliographic detail
page so that home and current library columns can be sorted correctly by
library name. There have been changes to the way the template shows
these values, but the DataTables "data-sort" attribute on the table cell
had not been updated accordingly.

To test, apply the patch set the OpacLocationBranchToDisplay system
preference to "home and holding libraries."

- Make sure home and holding library columns are not hidden in the
  table settings under Administration -> Table settings -> OPAC ->
  holdingst.
- Locate a bibliographic record in the OPAC which has multiple items
  from different libraries.
- Test that the home and current library columns sort correctly by
  library name.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-18 10:25:53 -03:00
1cabc0ed67
Bug 26314: (QA follow-up) Improve POD and fix links for UseControlNumber off
When UseControlNumber is off, we previously did a search on the title index,
but this was not actually correct. It might work when we have a dependent
title and the title also appears on 245$p, but there is a better way:

The title of the set record will be found in:
* 773$3 for a dependent title
* 800/810/811/830 for an independent title

The search indices to use are host-item and title-series.

As we are not only looking for 773, POD was adjusted to reflect that.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-17 14:45:14 -03:00
cd0a374b93
Bug 26314: Only display volumes link when required
This patch makes C4::XSLT query for volumes the same way it would do
with the generated link (i.e. based on UseControlNumber) and passes
a flag to the XSLT so it displays (or not) the 'Show volumes' link.

To test:
1. Apply the first patch
2. Have a known record without volumes
3. Open the record in the OPAC
=> FAIL: It shows the 'Show volumes' link
4. Have a record known to have volumes
5. Open the record in the OPAC
=> SUCCESS: It shows the 'Show volumes' link
6. Apply this patch and restart_all
7. Reload the above records
=> SUCCESS: It shows the link where it has to, and hides it where it
   shouldn't be displayed.
8. Repeat for Intranet
9. Sign off :-D

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-17 14:45:11 -03:00