Commit graph

17851 commits

Author SHA1 Message Date
d1d9a33535 Bug 34310: Input prompt in datatables column search boxes untranslatable
This patch corrects the internationalization function wrapped around the
"% search" string in datatables.js. It should be the double-underscore
function instead of the single-underscore.

To test, apply the patch and test that the placeholder string is
translatable. In this example I'm testing fr-FR:

- Update a translation:

  > cd misc/translator
  > perl translate update fr-FR

- Open the corresponding .po file for the strings pulled from
  JavaScript  e.g.  misc/translator/po/fr-FR-messages-js.po
  - Locate strings pulled from prog/js/datatables.js for
    translation, e.g.:

    \#: koha-tmpl/intranet-tmpl/prog/js/datatables.js:894
    \#, javascript-format
    msgid "%s search"
    msgstr "%s recherche"

  - Install the updated translation:

    > perl translate install fr-FR

In the staff interface, test a page that has column header filters, e.g.
patron search. Confirm that the table of search results shows the
translated string in the column header placeholders.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c23f36b812)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-09-08 09:52:44 -10:00
f558474af3 Bug 34038: Fix incorrect use of __() in .tt and .inc files
This patch corrects instances of the double-underscore function being
used in .tt and .inc files where the single-underscore function should
be used instead.

To test, apply the patch and update a translation, e.g. fr-FR:

  > cd misc/translator
  > perl translate update fr-FR

- Open the corresponding .po file for JavaScript strings, in this case
  misc/translator/po/fr-FR-staff-prog.po
- Confirm that the strings are now in the .po file for translation. You
  should find these lines:

- koha-tmpl/intranet-tmpl/prog/en/includes/js-biblio-format.inc: "No
  title."
- koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt:
  "Check in and add to bundle"
  "Ignore holds and add to bundle"
- koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step1.tt:
  "Please enter only a barcode, or only a biblionumber."
- koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/batch_add_items.tt:
  "Please enter only barcodes, or only biblionumbers."
- koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt:
  "Please specify a content for 'Default'"

- Check fr-FR-opac-bootstrap.po for these lines:

- koha-tmpl/opac-tmpl/bootstrap/en/includes/calendar.inc:
  "Please enter a valid date (should match %s)."
- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt:
  "No item was selected"
- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt,
  koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt,
  koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt:
  "No item was selected"

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d1d9f4698e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-09-08 09:33:19 -10:00
Aleisha Amohia
5043a65c2b Bug 34036: Reload 'already received' table when edit modal closed
Bug 33784 introduced a fix that prevents the 'already received' table from reloading completely if the modal is hidden and there is only one order in the table. This appears to assume that the 'hidden modal' event is only triggered if the receive form is cancelled, but the 'hidden modal' event is also triggered when the receive form is submitted. This means that the table isn't redrawn when the form is submitted and there's one order already received, so the next order does not show in the table when the page reloads.

To test:
1. Set up a vendor, budget, fund, and create a new basket.
2. Add two orders (two different records) to this basket.
3. Close the basket and go to receive the orders.
4. Once on the 'Receive orders' page, use the checkboxes in the Pending orders table to receive both orders at once. Choose the 'Receive selected' button
5. Click Edit for the first order, receive the item and click 'Next order'. Receive the next item and click 'Save changes'. Then Confirm
6. Both orders should now show under Already received. Click Cancel receipt for one of the orders. It should go back to Pending orders.
7. Click Receive for the now pending order. Receive the item and Confirm.
8. Notice that the page appears to reload but the order doesn't show under Already received with the other order. The order also no longer shows under Pending orders.

9. Apply the patch and restart services. Reload the page. Cancel receipt of the order again.
10. Click Receive for the now pending order. Receive the item and Confirm.
11. The Already received table should reload so that both orders now show under Already received.
12. Click Cancel receipt for the order.
13. Click Receive for the now pending order, then Cancel without receiving the item.
14. Confirm the page loads as expected with one pending order and one already received order.

Sponsored-by: Toi Ohomai Institute of Technology
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit aea3ad0b7b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-09-08 09:15:55 -10:00
ebd986ad3e Bug 34109: Check mandatory item fields when creating during recipt
This patch adds a check of mandatory item fields before saving during order receipt.
We check both when adding the item initially, and when submitting the order, as it will use
the values from the open form.

To test:
* Go to administration > frameworks > ACQ > MARC structure > 952
* Set callnumber (o) or barcode (p) to mandatory
* In acquisition:
* Create a basket with "create items on order" and "is standing"
  "standing" helps as you can do multiple receives testing different things,
  but is optional
* Add an order line
* Receive shipment
* Verify the mandatory fields show in the item form
* Set itemtype = Music
* Save with the fields blank
* Item row is added, no warning
* Edit the item, change the item type to blank
* Click 'Confirm' for the order without closing the item edit form
* Verify the item was added with itemtype Books (on sample data) and empty mandatory field
* Apply patch
* Repeat above, however, you should not be able to submit the item or order until mandatory fields are filled

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit eaab32eb0e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-09-08 09:11:07 -10:00
702356084a Bug 34625: Fix search engine configuration tables header problem
This patch corrects the JavaScript which allows DataTables to be created
and destroyed based on which tab is clicked on the search engine
configuration page. When you click from one tab to the other, the
original tab's DataTable should be destroyed and the new tab's DataTable
initialized.

To test, apply the patch and go to Administration -> Search engine
configuration (Elasticsearch)

- The page should load with the "Search fields" tab enabled and the
  DataTable initialized: Sorting and filtering should work. If you
  scroll down the page the floating table header should be correct.
- Switch to the "Bibliographic records" tab. This table should have
  filtering enabled, and the floating table header should work when you
  scroll down the page.
- The same should be true for the "Authorities" tab.
- Return to the "Search fields" tab to confirm that the DataTable is
  still working as expected.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit cac122b611)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-09-07 20:16:48 -10:00
0594b63bae Bug 34634: Show expirationdate of expired holds on reserve/request.pl
To test:
1. Place some holds and go to /reserve/request.pl for that bib.
2. If the reserves.expirationdate is set to today or some date in the past the date does not display in the Flatpickr instance.
3. Change the reserves.expirationdate to sometime in the future, the date displays.
4. Aply patch, restart_all
5. Try steps 2-3 again.
6. This time if the expiration date is in the past you should see it displayed. However it will be uneditable.
7. Make sure holds with a expiration date in the future can still be properly edited.

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Christine <chlee@pascolibraries.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0710ccb606)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-09-07 20:13:21 -10:00
e486548409 Bug 33744: Fix cloning (sub)fields with framework plugins
This patch is meant as a temporary measure for fixing the problem.
Bug 30975 may resolve it further, but this is good for now.

Note: The original commit message referred to removing a deprecated internal
structure. But this patch actually still uses the structure which has been
moved to _data in jQuery now.

Test plan:
1) Apply patch
2) Repeat steps in the original bug description
3) This time clicking on the Upload button for a cloned field should launch the uploads pop up.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2fa6105779)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-09-07 14:44:46 -10:00
0c4fe03c23 Bug 34650: Convert list toolbar delete into form POST
This patch adds a HTML form with a CSRF token to POST the list delete,
which is triggered by a click handler on the A element. The A element
is still needed for existing style reasons.

Test plan:
0. Apply patch
1. koha-plack --reload kohadev
2. In the staff interface, add a list
3. Go into that list (e.g. virtualshelves/shelves.pl?op=view&shelfnumber=X)
4. From the toolbar click the "Edit" dropdown
5. From the dropdown try either "Edit list" or "Delete list"
6. Note no CSRF error and operation completes as expected

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5d3b7cf089)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-09-07 14:37:02 -10:00
e81e765d7d Bug 34650: Remove unnecessary CSRF check on edit_form
The op "edit_form" doesn't change state. It just renders the edit
form. Therefore, it doesn't need a CSRF token/check.

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit caf962fbaa)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-09-07 14:37:02 -10:00
0645519faf Bug 34466: Add listener to enable or disable clear filter button on KohaTable.vue
Test plan:
Apply only the cypress test patch
Run KohaTable_spec.ts
Notice it fails

Apply this patch, repeat

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5316b4c9cc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-09-07 14:33:53 -10:00
078324d151 Bug 34616: Move default server info outside the <fieldset>
Also DRY current default information dialog block

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fb47d04efd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-09-07 14:29:56 -10:00
dcdb047b03 Bug 34616: Add native bootstrap behaviour to default server dialog
Test plan:
Create a new SMTP server
Tick the 'default server' checkbox
Verify it now has a backdrop, closes if u click the backdrop or press 'esc'
The Yes and No buttons are now styled properly

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b9d3997063)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-09-07 14:29:56 -10:00
12969850e8 Bug 34066: Datatable options don't fully translate on list of saved reports
This patch corrects the DataTable option for defining an alternate
language string when no records are returned by a table filter. An
obsolete version of the option name was breaking the existing custom
option supplied by our datatables.js

To test, apply the patch and go to Reports -> Use saved..

 - In the DataTable of existing reports, all the DataTable controls
   should look correct.
 - In the filter field at the top of the table, enter a string which
   will not be found. You should see a message, "No matching reports
   found."
 - Install another language if necessary, and switch to that language.
 - The labels on all the DataTable controls should show the terms which
   have been translated for that language.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e26d7c783e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-08-30 10:24:12 -10:00
3fa6983a53 Bug 34465: Make KohaTable.vue actions column not sortable
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 60cf53cf79)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-08-30 10:22:55 -10:00
8237fdd32a Bug 34571: Remove use of "onclick" for ExpandField in cataloguing editors
This change replaces the onclick HTML attribute with a Javascript binding
to make it more in line with Koha conventions and make it CSP compatible.

Test plan:
0. Apply patch
1. Go to http://localhost:8081/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=#
2. Try hiding/unhiding fields
3. Try cloning fields and hiding/unhiding those too
4. Note that everything works as expected
5. Do the same thing for authorities by going to
http://localhost:8081/cgi-bin/koha/authorities/authorities.pl?authtypecode=#

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8341ffe13d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-08-30 10:20:50 -10:00
19c940c287 Bug 34570: Remove use of "onclick" for PopupMARCFieldDoc()
This change removes the "onclick" attribute for the MARC doc
link in the cataloguing editor.

Test plan:
0. Apply patch
1. Go to http://localhost:8081/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=#
2. Click on the question mark (?) next to any of the MARC fields
3. Press the "Repeat this tag" button
4. Click on the question mark (?) on the cloned MARC field
5. Note that both times it worked

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0b992dd12e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-08-30 10:19:18 -10:00
Michael Hafen
e24304ccd5 Bug 34592: Patron Search filter fields needs to be at least an empty array
If buildPatronSearchQuery() doesn't return an empty array when it exits
early, then the code that adds the sort fields to the filters will fail.

Test plan:

- If there is not all ready a patron with a sort1 or sort2 value from
  the bSort1 or bSort2 authorized values, add an authorized value if
  necessary.
- Add a patron if necessary, and set the patrons sort field to the added
  value.
- In Tools -> Patron card creator start a new card batch.
- Click on Add Patron(s) to open the patron search window.
- Pick the value in either the sort1 or sort2 drop down.
- Submit the page.  The page will reload and there won't be results.
- Apply the patch, close the patron search window, clear the browser
  cache, reload the "New patron card batch" page, and open the patron
  search window again.
- Repeat the search. There will be results.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 275197f405)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-08-30 10:18:11 -10:00
72364bb34c Bug 34115: Use a global tab select function for activating Bootstrap tabs based on location hash
This patch fixes automatic tab selection by location.hash in the MARC
subfield editor. This allows links which target a specific subfield to
open the page with the subfield tab selected.

I've put this into a global function since it can be reused in multiple
places: The about page and the checkout page have variations of this
functionality which can be replaced with this function.

The patch also corrects two links in Koha pointing to the About
page which included the wrong location hash (changed in the switch to
Bootstrap tab wrappers).

To test, apply the patch and go to Adminstration -> Bibliographic
frameworks.

- View the MARC structure for any framework.
  - In the "Search for tag" input field, submit a tag and subfield which
    will be found in that framework, e.g. "245$a"
  - When you submit the form you should be sent to the MARC subfield
   structure page for that tag with the subfield tab automatically
   selected.
- View the MARC subfield structure for any framework.
  - In the table of subfields, click the subfield link in the first
    column. You should be taken to the edit form with the corresponding
    tab selected.
- Go to Circulation and check out to a patron. Append a tab anchor to
  the URL, e.g. "#holds_panel" and submit. You may have to shift-reload
  the page to see the change. (As far as I know no links in Koha take
  advantage of this)
- Perform the same test on the patron detail page
- Go to the About page and perform the same test with a tab anchor like
  "#team_panel" or "#sysinfo_panel"

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>
(cherry picked from commit cb6dd4e82b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-08-30 10:16:42 -10:00
Laura Escamilla
f5e151c1f8 Bug 34095: Adjust logic so that shipment cost is empty if the receiving shipment cost is blank.
Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a5cadff482)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-08-30 10:15:46 -10:00
e0098b4b58 Bug 34307: (follow-up) Use template wrapper for title tag
This patch updates the title tag to use a wrapper too, since Bug 33906
is in the process of getting fixed.

The patch also removes an extra <span> tag: Only the translatable string
needs the span, not the entire line.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 62a757acd1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-08-30 10:12:41 -10:00
d3e44a2e5e Bug 34307: (QA follow-up) add <span> to have cleaner strings for i18n
Cleaner strings are extracted this way.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a6ec493647)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-08-30 10:12:41 -10:00
65a0d63860 Bug 34307: Update plugin template to match master conventions
This change uses WRAPPER to build the breadcrumbs and
updates the plugin template to follow some other master conventions
like differentiating between Administration and Tools for plugins.

Test plan:
0. Apply patch
1. Upload koha-plugin-test-wrapper
2. Enable the plugin
3. Click "Actions" and click "Run tool"
4. Note how the plugin page looks like a perfect Koha Tools page
5. Note that the plugin only contains 6 lines of template code
to achieve this effect

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e8a4805435)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-08-30 10:12:41 -10:00
8e473cb69a Bug 34567: Correct colors for advanced cataloging editor status bar
This patch updates the advanced cataloging editor CSS so that the
"status bar" footer below the editor has colors consistent with the
staff interface redesign.

To test, apply the patch and clear your browser cache if necessary.

- Enable the EnableAdvancedCatalogingEditor preference if necessary.
- Go to Cataloging -> Advanced editor.
- At the bottom of the screen below the editor the "status bar" should
  have a green border that matches color in the header search bar.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3ed9168315)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-08-30 09:57:55 -10:00
0903deca22 Bug 34601: Fix wrong quote
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1e9d4dfdd5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-08-30 09:52:56 -10:00
Katrin Fischer
3ef289dcc6 Bug 34601: (QA follow-up) Fix edit/delete links in toolbar
We also need to fix the links in the toolbar visible when
'viewing' the suggestion.

1) Create a suggestion
2) Click on the title
3) Click edit > CSRF error
4) Click delete link in toolbar > CSRF error
5) Apply patch and repeat

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3b9de04b89)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-08-30 09:52:29 -10:00
770dd3bde1 Bug 34601: Fix edit/delete links on suggestion.tt
1. Make a suggestion
2. Try to edit, delete the suggestion.
3. Error:
4. Apply patch and restart_all
5. Try again and you should not get the error anymore.

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>
(cherry picked from commit b630dfcb08)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-08-30 09:51:33 -10:00
80cc0c03aa Bug 34356: Make sort order always default to correct column
To test:
1- Check out an item to a patron
2- View checkout history, default sort is on 'Date due'
3- Enable RecordStaffUserOnCheckout
4- View checkout history, default sort is on 'Checked out by'
5- Apply patch
6- Table should sort to 'Date due' no matter what the sys pref is set to

Signed-off-by: Jason <jrobb@sekls.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit edad82662c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-08-29 21:07:24 -10:00
2fb195eedf Bug 34386: Fix inconsistencies in Cities and tows page titles, breadcrumbs, and header
This patch updates the cities administration page so that page title,
breadcrumb navigation, and headings are consistent with each other and
with other parts of Koha.

To test, apply the patch and go to Administration -> Cities and towns.
Check each variation of the page to confirm that page title, breadcrumb
navigation, and heading are correct.

- Main page (listing cities)
- New city
- Edit city
- Delete city

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>
(cherry picked from commit 8460158f6b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-08-29 21:02:56 -10:00
e67e3bdf73 Bug 34379: Fix label of new library group button
This patch corrects the label on the button for creating a new library
group, changing it from "Add group" to "New group" for consistency.

To test, apply the patch and go to Administration -> Library groups.
Confirm that the button is now labeled "New group" and that it
still works to trigger the library group creation modal.

Signed-off-by: Andrew <andrew.auld@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 879f7db9e8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-08-29 21:00:02 -10:00
9c54bee813 Bug 34385: Correct page heading of transport cost matrix page
This patch corrects the main heading on the transport cost matrix page
so that it matches the page title and breadcrumb navigation.

To test, apply the patch and go to Administration -> Transport cost
matrix. Confirm that the page heading reads "Transport cost matrix."

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c7daaa901b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-08-29 20:58:13 -10:00
b72c5e9465 Bug 25023: Claims returned dates not formatted according to dateformat preference
This patch updates the code for rendering the claims returned table on
the checkout and patron detail pages. Now the dates are formatted using
the global js-date-format.inc code.

To test, apply the patch and make sure the claims returned feature is
enabled by setting a value in the ClaimReturnedLostValue system
preference.

- Check out some items to a patron.
- Under the checkouts tab, mark several checkouts as "Claim returned."
- Open the claims tab.
- The dates in the "Created on" column should be formatted according to
  your dateformat system preference.
  - Change the dateformat preference and return to the checkouts page.
    Confirm that the claims tab shows dates formatted correctly.
- The "created on" and "updated on" columns should sort correctly with
  any dateformat setting. You may have to directly modify the dates in
  the database in order to have the right data for testing this.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1156b3683b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-08-29 20:52:28 -10:00
6f9dd5e449 Bug 34219: Allow getAll to receive additional URL parameters
It's not possible to pass additional URL parameters. We need it at least for bug 32474.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f1078daf8f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-08-29 20:51:27 -10:00
a6e5504aff Bug 34341: Revert Bug 34072: Holds queue search interface hidden on small screens
This patch undoes the changes made by 34072 because they have had a more
far-reaching effect than was expected. I have never been able to
reproduce Bug 34072 before the patch.

To test, apply the patch and rebuild the staff interface CSS.

- Go to Circulation -> Holds queue
- Try adjusting the width of the browser window to confirm that it is
  responsive at various widths.
- When the viewport width is below 768 the page layout will adjust, and
  the contents of the sidebar will drop below the table of holds. This
  is consistent with other pages in the staff interface.
- Check that the corrected CSS has resulted in a correction to the
  layout of submit buttons in forms:
  - For example, in Administration -> Cities and towns -> New city.
  - Before the patch there was no padding between the submit button and
    the white fieldset containing the form fields.
  - After the patch the correct padding has been restored.

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>
(cherry picked from commit 8d78ba7ff2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-08-29 20:48:02 -10:00
13bc2848a1 Bug 34533: jsdiff library missing from guided reports page
This patch restores the inclusion of the jsdiff JS library on the guided
reports page when displaying saved SQL reports. This fixes a JS error in
the browser console when the user tries to use our automatic update on
SQL reports which use an older syntax.

The patch also corrects a problem with svc/convert_report which was
causing an error when trying to display the diff information.

To test, apply the patch and restart services.

- Go to Reports -> Create from SQL.
- Add a report which is based on an older db structure. The example I
  found was:

  SELECT biblionumber,
  ExtractValue(marcxml,'//datafield/@tag/text()[substring(.,1,1) = "5"]') as 'notes'
  FROM biblioitems
  HAVING notes <> ''

- Save the report and go to the list of saved reports. There should be
  an "Update" column in the table, with a message about your newly-added
  report:

  "This report seems obsolete, it uses biblioitems.marcxml field."

- Clicking the "Update SQL" button should trigger a modal window that
  shows the before an after versions of the report. There should be
  no error in the browser console. Unfortunately the diff will not
  display because of a separate bug in svc/convert_report

Signed.off-by: Jessie Zairo <jzairo@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f2be2cedc5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-08-29 20:46:54 -10:00
ae8937fb8d Bug 34565: Label mismatch in MARC21 006 and 008 cataloging plugins
This patch modifies the JS which builds the table of options for
populating MARC21 fields 006 and 008 when using the cataloging plugin.

To test, apply the patch and go to Cataloging -> New record.

- Click the plugin trigger link next to the 006 input field (you may
  need to click the tag to expand it.
- In the table of input fields, test that clicking the label, e.g. "Type
  of material", "00 - Form of material," etc,  moves focus to the
  corresponding form field.
- Perform the same test on the plugin-popup for field 008.

Signed-off-by: Andrew <andrew.auld@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fb48155cc4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-08-29 20:45:31 -10:00
Andreas Roussos
f98e4faee2 Bug 29578: Upgrade the jQuery highlighter plugin
Under certain conditions, the jQuery term highlighter
can break and in the process make the "Highlight" /
"Unhighlight" button disappear altogether. This affects
catalog searches in both the OPAC and the Staff Client,
with UNIMARC-based instances affected the most as the
"Highlight" / "Unhighlight" button disappears if you
perform a specific OPAC search (see Test plan below).

This patch fixes that by upgrading the highlighter
plugin to its latest version for both the OPAC and
the Staff interface. Then, the changes from commit
2e4b574074 (Bug 5844) are applied to the plugin code.
Also, Koha uses "term" instead of "highlight" as the
class name for the <span> highlighting elements, so
the plugin code is modified for that aspect, too.
Finally, the plugin file is renamed to reflect the
version change (v3 -> v5) and all references to the
old filename in the Template files are updated.

Test plan:

0) In a UNIMARC instance, catalogue two books using
   the titles given below (Title subfield = 200$a):

   Book 1: Συλλογής των εν επιτομή τοῖς πάλαι γεωγραφηθέντων
   Book 2: Επιτομή της ιστορίας των Βαλκανικών Πολέμων (1912-1913)

1) OpacHighlightedWords and StaffHighlightedWords
   should both be set to "Highlight".

2) Search the OPAC for "επιτομή των" (without the
   quotes). In the results page, notice that:

   a) You get an Uncaught DOMException error in the
      web browswer's JavaScript Console (press F12):
      "Failed to execute 'splitText' on 'Text': The
      offset 3 is larger than the Text node's length."
   b) the "Highlight" / "Unhighlight" button vanishes
   c) some search terms matches are not highlighted
      (for example "των" in the 2nd Book)

3) Repeat the same search in the Staff interface.
   In the results page, notice that:

   a) You get an Uncaught DOMException error in the
      web browswer's JavaScript Console (press F12):
      "Failed to execute 'splitText' on 'Text': The
      offset 3 is larger than the Text node's length."
   b) Even though some terms are highlighted, the
      button still says "Highlight"
   c) some search terms matches are not highlighted
      (for example "των" in the 2nd Book)

4) Apply this patch.

5) Repeat the searches (you may have to press CTRL-F5
   to reload the JavaScript code). This time the
   "Highlight" / "Unhighlight" button is displayed
   in the OPAC, and all your search terms should be
   highlighted in yellow. Toggling the highlight
   should cause no problems, and there shouldn't be
   any errors logged in your browser's Console.

Signed-off-by: Christian Nelson <christian.nelson@uwasa.fi>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bee56606a6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-08-29 20:35:35 -10:00
f9cd9cca6a Bug 34509: Use select2 to load vendors on basket creation
This patch moves the dropdown to use select2 and avoids loading all
vendors at page load.

To test:
 1 - Create some extra vendors in your system, ideally over 20
 2 - Search for a vendor in acquisitions
 3 - Click 'New->basket'
 4 - Note the dropdown of all vendors
 5 - Choose a vendor and create a basket
 6 - Apply patch
 7 - Repeat
 8 - Note only a partial list of vendors is loaded
 9 - Search in the dropdown and confirm vendors are returned
10 - Select a vendor and create the basket

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>
(cherry picked from commit 77ee1ca743)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-08-29 11:43:05 -10:00
25cead0d67 Bug 34434: Terminology: Biblio should be bibliographic
This patch corrects several more instances where the templates use the
term "biblio" where it should use "bibliographic."

To test, apply the patch and confirm that these instances read
correctly:

- About -> Special thanks... -> Mines Paristech: "bibliographic
  frameworks"
- Acquisitions -> Vendor -> Receive shipments: "Record count" in the
  table of shipments.
- Catalogue -> Bibliographic record details -> Labeled MARC: "Labeled
  MARC record" heading.
- Circulation -> Holds to pull: Error message, "hold has been placed at
  the bibliographic record level."
  * I'm not sure how one can trigger this error message.
- Tools -> Log viewer -> Filter by "Catalog" and "Add": "Bibliographic
  record..." link in the "Object" column.

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>
(cherry picked from commit 5749df1e3a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-08-29 11:36:00 -10:00
Katrin Fischer
a2ee4312cb Bug 34436: (QA follow-up) Move spans to surround full text
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ad41643d5a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-08-29 11:35:04 -10:00
edaf57c73e Bug 34436: Some breadcrumbs lack <span> for translatability
This patch modifies several templates which were updated recently so
that breadcrumbs markup could be built using template wrappers. The
patch wraps strings in <span> in cases where it is necessary to make
them translatable.

To test, apply the patch and view the following pages to confirm that
the breadcrumbs still show up correctly:

- Administration -> MARC bibliographic framework
  - Add framework
  - Edit framework
  - Delete framework
- Administration -> Share content with Mana KB
- Administration -> Circulation and fine rules
- Authorities ->
  - Add authority
  - Edit authority
- Catalog -> Advanced search
  - Bibliographic detail page
    - Must have EasyAnalyticalRecords enabled.
    - Edit -> Link to host record
- Patrons
- Reports -> Average loan time
- Serials -> Serials home

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>
(cherry picked from commit 8933036742)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-08-29 11:35:04 -10:00
Katrin Fischer
876e970f4e Bug 34345: (QA follow-up) Fix some more occurrences
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 19f9240759)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-08-29 11:33:52 -10:00
5c878a6430 Bug 34345: 'Circulation and fine rules' vs 'Circulation and fines rules'
This patch corrects two instances of the phrase "Circulation and fines
rules" in favor of the more common "Circulation and fine rules" for
consistency's sake.

To test, apply the patch and go to Administration.

- In the description under the "Circulation and fine rules" link it
  should read, "Define circulation and fine rules..."
- Open the Circulation and fine rules page and confirm that the link in
  the sidebar menu is correct.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 452ac93b92)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-08-29 11:33:52 -10:00
dd39b95a36 Bug 34364: Fix progress bar progress update
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1403fd847a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-08-21 20:26:30 -10:00
7651c42b6d Bug 34028: Show the secret when registering from the auth screen
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3cb77a590b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-08-17 10:53:10 -10:00
79e8d787a8 Bug 34343: Update style of fixed footer navbar in Z39.50 searches
We use a Bootstrap fixed navbar in the footer of two pages: the popup
Z39.50 searches in cataloging and authorities. The style of these
footers needs to be udpated for the new staff interface design.

This patch also changes the style of the "cancel" controls in these
footers from links to buttons. The popup window in cataloging has been
adjusted to be the same size as the one in authorities.

To test, apply the batch and rebuild the staff interface CSS.

- Go to Cataloging -> New from Z39.50/SRU.
  - In the popup window, the form should fit comfortably in the window.
  - The footer should be white with a grey border at the top, with
    Bootstrap-styled buttons aligned to the right.
- Perform the same test in Authorities -> New from Z39.50/SRU
- Install and enable an additional translation so that you can confirm
  that the language-selection footer still has the correct style.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3ac122f47d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-08-17 10:22:58 -10:00
c74d7351b5 Bug 31667: Merge 'tip' and 'hint' classes
This patch corrects a few instances of the use of the "tip" class and
replaces them with "hint." The patch also removes the class from the
staff interface CSS.

To test, apply the patch and rebuild the staff interface CSS.

- View a patron account and click the "Routing lists" link in the
  left-hand sidebar.
  - On the subscription routing lists page the "Search subscriptions"
    page label should look correct.
- Go to Reports -> Catalog by item type.
  - The "Select none..." hint should be styled correctly.
- The third instance, in the installer, is only visible if you try to
  install Koha using a MySQL user who doesn't have the correct
  privileges, so may be too much trouble to really test. A check of the
  patch should be adequate.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d8054e30fc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-08-17 10:20:12 -10:00
Andreas Jonsson
75b0912620 Bug 33140: Use facet label value for mouseover text on facet removal link
This patch updates the facets includes in both the staff interface and
OPAC so that the title attribute on "remove" links uses the full name
rather than the code of the facet. So, library name instead of
branchcode, collection code description instead of authorized value
code.

To test, apply the patch and perform a search in the staff interface.

- Click a facet in the left-hand sidebar which will return more than one
  result.
  - On the reloaded page there should be a link next to that facet: [X].
    Hovering your mouse over it should show "Remove facet [facet name]"
    e.g. "Remove facet Centerville" instead of "Remove facet CPL"
- Test on library facets, item type facets, and collection code facets.
- Perform the same test in the OPAC.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 01a6b2b63b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-08-17 10:18:43 -10:00
cc21197125 Bug 34305: Account for negative prices on acq details tab
The acquisition detail tab shows the estimated cost while
the order is still pending and the actual price, once received.
At least the tool tip on the table header row says so. This
was not working correctly.

To test:
* Create a basket
* Create a new order line with a negative list price (credit)
* Close the basket
* Verify that the price shows correctly in the acquisition details
  tab on the record
* Receive the order and enter a different negative actual price.
* Reload detail view, verify it still shows the estimated price
* Apply patch, restart_all
* Verify now the correct actual price displays
* Create another basket and order line
* Verify while not yet received, it still shows the estimated price

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 758712dc01)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-08-17 10:16:28 -10:00
50dfe2be55 Bug 34447: Do not export "Actions" columns
In the KohaTable Vue component we should add the noExport class to the actions columns to not export them.

Test plan:
Go to the ERM module, create at least one agreement.
Go to the agreement list view and click "export" to export the table
=> Without this patch the "Actions" column was exported
=> With this patch is no longer there

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 585138f13f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-08-17 10:14:39 -10:00
57ca63cd00 Bug 34354: Fix progess typo
Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2234ecb8c9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-08-17 09:56:31 -10:00