Commit graph

21667 commits

Author SHA1 Message Date
174cd59cea
Bug 35124: Incorrect item groups table markup
This patch corrects the markup of the item groups table which is found
under the "Item groups" tab on the bibliographip detail page in the
staff interface.

The patch also adds the "NoSort" class to the "actions" column to
prevent it from being sortable.

To test, apply the patch and make sure the "EnableItemGroups" system
preference is enabled.

- In the staff interface, locate a record with items and view the detail
  page.
- Under the "Item groups" tab confirm that the table looks correct: The
  heading labels should be centered bold text.
- You should see sorting indicators on the "Display order" and "Description"
  headings but not on the last one.

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-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
Katrin Fischer
e258ab9400
Bug 33916: (QA follow-up) Correct "Label profiles"
... to "Printer profiles"

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 17:38:32 -03:00
2525eb45ab
Bug 33916: (QA follow-up) Remove redundant template code
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 17:38:31 -03:00
3be7ff5679
Bug 33916: Improve translation of title tags: Labels
This patch label creator templates so that title tags can be more easily
translated.

The patch also makes some minor changes to some templates to improve
consistency between page title, breadcrumb navigation, and page heading.

To test, apply the patch and confirm that the following pages have the
correct title tags:

- Cataloging -> Label creator home
  - Manage -> Label batches
    - Edit ->
      - Click the "Add item(s)" button without entering any barcodes or
        item numbers in the form.
        - Test the search form and search results
  - Manage -> Layouts
  - Manage -> Label templates
  - Manage -> Printer profiles
  - New -> Label batch
  - New -> Layout
  - New -> Label template
  - New -> Printer profile
  - New -> Barcode range
- Cataloging -> Barcode image generator
- Cataloging -> Quick spine label creator

Signed-off-by: Salah Ghedda <salah.ghedda@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 17:38:31 -03:00
Laura Escamilla
a0555c0099
Bug 34824: Added missing colon to 'Title'
To test:
0. Add budgets, vendors and baskets to acquisitions, if necessary
1. Go to Acquisitions
2. Click 'Search' next to the vendor search box
3. If you don't already have an open basket, create one by clicking New
   > Basket
4. Click 'Add to basket'
5. Click 'From an external source'
6. Search for a title or author (I searched for Shakespeare in the
   author field on the Library of Congress server)
7. To the right of a record (with a title) Click the arrow next to the
   MARC button and choose Order
   --> Notice that in the 'Catalog details' section, all labels are
       followed by a colon except 'Title'
8. Apply the patch and refresh the page. Notice that ’Title’ now has a
   colon.
9. Sign off and have a great day!

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Kelly <kelly@bywatersolutions.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 17:38:30 -03:00
28a6d14f00
Bug 34422: (follow-up) Add markup comments
This patch adds comments to the template to highlight the markup
structure.

This patch should have no effect on the page's appearance or
functionality.

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 17:38:29 -03:00
6e03835126
Bug 34422: Reindent factets.inc
This patch reindents the staff interface catalog search results facets
template so that it has consistent indentation. These changes should
have no visible effect on the page.

To test, apply the patch and perform a catalog search in the staff
interface.The facets should look the same as always.

Viewing the diff while ignoring whitespace changes should show only
places where a line break was added.

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 17:38:29 -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
Katrin Fischer
a99fa18968
Bug 34227: (QA follow-up) Fix translation issue and add a space
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 17:26:05 -03:00
0a5084eba4
Bug 34227: Add persistent selections and batch operations to item search
This patch modifies the item search results page so that user selections
are stored in local storage. This allows the user to make selections on
one page of search results, move to another, and continue to make
selections.

The patch also adds the option to send selected items to batch item
modification or batch item deletion.

Changes to the patron search results template have been made to make
some CSS classes more generic so they can be used by both pages.

To test, apply the patch and rebuild the staff interface CSS.
- Log in to the staff interface as a user with permission to perform
  batch item modification and batch item deletion.
- Go to item search and perform a search which will return at
  least two pages of results.
  - On the search results page you should see a new search header
    toolbar with some controls: "Select visible rows," "Clear
    selection," "Export all results to" and "Batch operations"
    (disabled).
 - Without making any selections, confirm that the "Export all results
   to" menu items work correctly to export all results to a CSV or a
   barcode file.
 - Confirm that the "Select visible rows" control works as expected,
   selecting all checkboxes on the current page (and on no other pages)
   - After selecting all checkboxes the search header controls should be
     updated:
     - The "Export all..." button should now show the number of
       selections: "Export selected results (X) to..."
     - The batch operations button should be enabled.
     - There should be a new element labeled "Items selected: X" with a
       "Clear" link.
   - If you uncheck any checkboxes the controls should be updated,
     showing the new count of selected records.
   - Move to the next page of results and confirm that making selections
     on this page works to increment all counters
   - Confirm that the "Export selected.." options work and that your CSV
     and barcode files now contain only the items you selected.
   - Test the batch operations menu:
     - Test that the controls correctly reflect the logged-in user's
       permissions:
       - With permission to batch modify items
       - With permission to batch delete items
       - With both; with neither
     - Both menu options should take you to the correct page and the
       list of submitted items should match your selections.
  - Test that clicking the "Clear" button next to "Items selected" hides
    the items selected box and reverts the "Export all" and "Batch
    operations" buttons to their original state.
    - Page through the search results to confirm that no checkboxes are
      checked.
 - Test that your search selections are really persistent:
   - Navigate away from the page, return to item search, and perform
     another search.
     - The "Item selected" box should still show your previous
       selections.
     - Any items you previously selected which are also in this result
       set should have a checked checkbox.
   - Click the "Edit search" button from the item search results page
     and new search with different parameters.
     - The "Items selected" should still show your previous selections.
 - Log out of Koha and back in. When you perform an item search now,
   there should be no "Item selected"

 - Go to Patrons and test patron searching. As you make selections the
   "Patrons selected" box should be updated correctly and look correct,
   matching the one on the item search page.

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-10-20 17:26:04 -03:00
32e301df15
Bug 35110: Authorities editor with JS error when only one tab
Exactly like Bug 34251 for biblios :
When using the an authorities framework with all fields in the same tab, there is thrown a JS error in selectTab( "#tab0XX_panel" );
This is because no nav tabs are build in authorities/authorities.tt as BIG_LOOP has a length(size) of 1

Test plan :
1) Edit an authority framework, for example 'Meeting Name', to set all sufields in tab 0
   You may use SQL : UPDATE auth_subfield_structure SET tab=0 WHERE authtypecode='MEETI_NAME'
   Don't forget to restart memcached
2) Go to 'Authorities'
3) Click on 'New authority' then 'Meeting Name'
4) Check you don't see any JavaScript error
5) Check you can save

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Bug 35110: (follow-up) Fix comment in addbiblio.tt

Change comment in addbiblio.tt since any biblio framework may use only
one tab.
Also fixes indenting using 4 spaces.

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>

Edit: squashed because follow-up fixes code introduced by the same
author.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 17:22:03 -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
Emily-Rose Francoeur
f4b8587782
Bug 35019: Add a CSRF token when deleting news
I add a CSRF token as a parameter in the link for deleting a news
entry, which solves the problem.

TEST PLAN
1) Apply the patch
2) Go to "Tools > News > New entry"
3) "Display location" should be set to "Staff interface"
4) Fill in the fields
5) Return to the homepage
6) Delete the created news entry
7) The "Additional contents" page is displayed, and the deleted news
   entry no longer appears
8) Return to the homepage; the news entry no longer displays

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>
Edit: adapted the template change to latest master inline
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 17:22:02 -03:00
Laura Escamilla
d742f29d77
Bug 34954: Fixed typo to 'dateexpiry'
To test:

1. In KTD use grep -rn --exclude=*.po "datexpiry" *
2. Notice that the four locations below are showing the typo:
    1. git add koha-tmpl/intranet-tmpl/prog/en/modules/tools/import_borrowers.tt
    2. git add misc/release_notes/release_notes_18_05_00.html
    3. git add misc/release_notes/release_notes_18_05_00.md
    4. git add t/db_dependent/Koha/Patrons/Import.t
3. Apply patch. Repeat step 1.
4. Notice that no results show. All instances of the typo have been fixed to dateexpiry.
5. Sign off and have a great day :)

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 17:22:02 -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
648d581b65
Bug 25393: Add new noautorenewalbefore circulation rule
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:17 -03:00
cdf18a0015
Bug 31357: Separate holds history from intranetreadinghistory
Currently the system preference intranetreadinghistory determines visibility of both circulation history and holds history tabs in the patron record.  It would be helpful to allow the option of setting each of those independently.

Specifically, libraries have requested the option of being able to view the holds history in a patron record without having to enable viewing of the circulation history.

Test Plan:
1) Apply this patch
2) Restart all the things!
3) Run updatadatabase.pl
4) Verify the new syspref intranetReadingHistoryHolds has the same value
   as the existing syspref intranetreadinghistory
5) Disable intranetreadinghistory, enable intranetReadingHistoryHolds
6) Verify you can view a patron's holds history but not reading history

Signed-off-by: Sam Lau <samalau@gmail.com>

JD amended patch:
* renamed syspref intranetReadingHistoryHolds => IntranetReadingHistoryHolds
* tidy

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 16:31:16 -03:00
e922ac237c
Bug 14092: Add 'any status' option to acq order search form
Sometimes it's really helpful to see all orders for a basket, a
vendor or a standing order, including the cancelled ones.
Currently this is not possible, as we have search options for
every single status and one for "any except cancelled",
but no "Any status" option.

This patch adds the "Any status" option. The sometimes
appearing empty entry is updated to "Any status except cancelled"
as this is what it does.

Testing data:
* Requires multiple order lines with different order status
* Must include at least one order line with status 'cancelled'

To test:
* Go to acquisitions
* Open the advanced search page from the top search options:
  Order search > config icon > Advanced search link
* Verify the status pull down looks as described above
* Apply patch
* Verify there is now an "Any status" option in the pull down
* Try searches for different status, including "Any status"
* Verify the results are as expected
* Create a new basket
* Create an order line by 'From an existing order (copy)'
* Verify the search form there also works as expected

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 16:31:15 -03:00
4e035ba8ae
Bug 33845: (follow-up) Rename config and add a second configuration section
This patch renames the table in the columns configuration to match the id
used in the templates

It also adds a section for the moremember table to alllow config of each page as we do for issues

Lastly we add the table controls as they exist on the issues tables

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 16:31:12 -03:00
3ed84ea95d
Bug 33845: (follow-up) escape hold notes for display
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:11 -03:00
22685c5abc
Bug 33845: Use table settings and hide note by default
This patch updates the holds table on circulation and moremembers to use
table settings and hides the note column by default to preserve existing views

To test:
 1 - Apply patch
 2 - Enable system preferece 'OpacHoldNotes'
 3 - Place a hold on the opac and enter a note
 4 - Confirm it shows on the patron's page
 5 - View the patron in staff client
 6 - Ensure the holds note does not display on Holds tab in Checkout or Details view
 7 - Go to Admin->Table settings->Circulation
 8 - Under holds_table confirm 'notes' is hidden by default
 9 - Uncheck the box
10 - Refresh patron pages and confirm hold note 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:11 -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
baffe97f3e
Bug 33845: Display hold notes in staff client circulation paes
This patch adds the reservenotes column to svc holds, and ensures they display on
circulation and memeber details

To test:
1 - Enable system preference 'OpacHoldNotes'
2 - Place a hold for a ptron via the OPAC
3 - View the patron in the staff client
4 - Click on the 'Holds' tab
5 - Ensure you can see the hold note
6 - Click on the 'Circulation' tab on the left
7 - Click the 'Holds' tab and confirm you can view the note

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
9ea181d407
Bug 23059: (QA follow-up) Put status strings in a span
No test plan.
Read the patch.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 14:44:07 -03:00
69ed355977
Bug 23059: reserve_stats.pl: Simplify reservestatus
This patch does the following:
[1] Go back to four statuses: Cancelled, Filled, Waiting or Placed.
    Placed is used as collective name for all other statuses: pending
    (placed), processing (found==P) or transit (found==T). Placed before
    anyway.
[2] Allow translation of these statuses in the template. Remove the sub
    reservestatushuman.
[3] The output of changeifreservestatus is considerably shorter and less
    ugly in the constructed sql statement.

Test plan:
[1] Use reservestatus as row, as column and only as filter (clicking few
    statuses).
[2] Verify that the shown statistics meet your expectations.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 14:44:06 -03:00
Caroline Cyr La Rose
8f86dcdce2
Bug 31832: Add reference for EnableItemGroups to EnableItemGroupHolds system preference
This patch adds a note and a link to the EnableItemGroups system
preference from the description of EnableItemGroupHolds.

To test:
1. Apply patch
2. Go to Administration > System preference
3. Search for EnableItemGroup
4. Read the description of EnableItemGroupHolds, make sure the grammar
   and spelling are OK.
5. Click the link, it should bring you to EnableItemGroups

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 14:44:05 -03:00
84368f6d39
Bug 31383: Fix URLs on staff AC detail view
No real need anymore for showing a Default and Current language link.
They could be made with the language parameter (not lang), but just
changing the language allows you to test easily.
Would you really like to see Default when you added content for all
enabled languages? You can still add language=default to the URL.

Test plan:
Test the page URLs. Experiment with changing language in the regular
way and via URL parameter.

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:44:02 -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
474d6c7462
Bug 34831: Add input types "tel", "email" and "url" to vendor edit form
This patch updates the vendor edit form so that phone, email, and url
fields have an input type corresponding to the field's content.

To test, apply the patch and go to Acquisitions.

- Create or edit a vendor.
- In the form, check that each field looks correct:
  - Company details ->
    - Phone
    - Fax
    - Website
  - Contact details
    - Phone
    - Alternative phone
    - Fax
    - Email
  - Interfaces
    - URI
    - Account email

In a desktop browser the inputs won't display any differently, but if
you test the patch in a sandbox you can try it in a mobile device
browser to confirm that the onscreen keyboard changes based on the type
of input.

Signed-off-by: Émily-Rose Francoeur <emily-rose.francoeur@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 11:43:04 -03:00
Laura Escamilla
0566556cb0
Bug 34501: Added Non-public notes to the member purchase suggestion table
Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 11:43:04 -03:00
aa771cf3ec
Bug 34547: (follow-up) add recall cases
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 11:43:02 -03:00
f25fa87198
Bug 34547: Add transfer reason to checkedintable on returns.tt
To test:
1. Apply patch, restart_all
2. Check some items out and prepare some reasons that would initiate a branchtransfer. According the schema it can be any of the following: 'Manual', 'StockrotationAdvance', 'StockrotationRepatriation', 'ReturnToHome', 'ReturnToHolding', 'RotatingCollection', 'Reserve', 'LostReserve', 'CancelReserve', 'TransferCancellation', 'Recall', 'RecallCancellation.
3. CHeck in some the items and notice the 'Transfer reason' column in the table. Make sure the reasons are acurate and make sense.
4. To go Table settings and find the 'checkedintable'. Make sure you can properly hide the column from the display.

Signed-off-by: AndrewA <andrew.auld@ptfs-europe.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 11:43:02 -03:00
31c4ecce6a
Bug 12732: (follow-up) Use data-order instead of data-sort
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 11:03:03 -03:00
bb69f4c384
Bug 12732: Add basket creation date to late orders table for sorting
This patch modifies the late orders page so that the table of
information contains a column for basket creation date. This will allow
administrators to configure the table to sort by default on basket
creation date if they wish.

To test, apply the patch and restart services.

- Go to Acquisitions -> Late orders.
- The table of late orders should include a column labeled "Basket date"
  showing the basket creation date.
- The dates should be formatted correctly and the column should sort
  correctly.
- Go to Administration -> Table settings and navigate to the settings
  for the lateorders page.
- Try changing various settings for the table to confirm that everything
  works correctly, including setting the default sort to use the basket
  date column.

Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 11:03:02 -03:00
4e3b0d6161
Bug 25816: (QA follow-up) Add system preference
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 11:03:02 -03:00
8dc2152e2f
Bug 34014: Add support for advanced cataloging editor
To test:
1 - Enable the advanced cataloging editor
2 - Edit record 369 in the advanced cataloging editor
3 - On load, get a notice that there were issues and to check logs
4 - Save record
5 - Close and reopen in editor
6 - Confirm warning is gone

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 11:02:58 -03:00
66d519ae41
Bug 34014: Allow staff to edit degraded records
This patch adds an eval to the call for the record form metadata

If there is an error we catch it, display it, and attempt to strip bad characters from the record

To test:
1 - In koha testing docker attempt to view record 369 in the staff interface
2 - You see a warning about degraded view
3 - Attempt to edit the record
4 - Internal server error
5 - Apply patch, restart all
6 - Reload the editor
7 - Record successfully loads!
8 - You have a warning about encoding issues!
9 - Save the record
10 - No more warning!
11 - Edit again, no more warning!

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 11:02:58 -03:00
b905bf5d0e
Bug 35098: Fix display of clickable batch name in ILL table
Test plan, k-t-d:
1) Install FreeForm and enable ILLmodule, run:
bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev.sh)
2) Install an ILL availability plugin (e.g. pubmed):
https://github.com/PTFS-Europe/koha-plugin-api-pubmed/releases/tag/1.1.1
3) restart plack:
koha-plack --restart kohadev
4) Create a new ILL batch, visit:
/cgi-bin/koha/ill/ill-requests.pl
5) Click '+New ILL requests batch'
6) Input a name, '42' on the cardnumber and pick a library. Click 'Continue'.
7) On the identifiers textarea, insert '123' and click 'Process identifiers'
8) After the metadata has been retrieved, click the bottom 'Add items to batch' button, click 'Finish and view batch'
10) Go back to ILL requests table, visit:
/cgi-bin/koha/ill/ill-requests.pl
11) On the top right of the table, click 'Columns' and enable Batch
12) Notice the batch column now shows correctly and is clickable

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 11:02:57 -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
Katrin Fischer
5db28348ea
Bug 34300: (QA follow-up) Add permission check and fix missing table cells
* Changes text from "Place a hold on order" to the more common "Place hold"
* Adds permission check on reserveforothers.
* We were missing table cells in the footer rows of the table.

I would have liked to hide the column for someone missing permissions,
but I failed to get the datatable configuration right with the export
and column configuration settings.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 08:15:25 -03:00
c48421e6ff
Bug 32721: (QA follow-up) Drop fields from API response
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Bug 32721: (QA follow-up) Rename fields to opac*

This patch updates the field names to reflect that they're OPAC
related.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Bug 32721: (QA follow-up) Fix rebase errors

We let some superflous template params creep back in during a rebase
somewhere.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-19 16:00:56 -03:00
e75461d6f0
Bug 32721: Highlight the branch specific option from the global syspref
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-19 16:00:55 -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
7e23abcccb
Bug 34531: Fix template logic to not hide patron restrictions
To test:
1. From BorrowerUnwantedFields Hide Gone no address flag (gonenoaddress) and Lost card flag (lost).
2. Got to memberentrygen.tt and see that Patron restrictions is now hidden
3. Apply patch, now the Patron restrictions field should not be hidden.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-19 16:00:51 -03:00
dc9f6f09d8
Bug 35078: Remove invalid HTML from OpacShowSavings system preference
The options defined for the OpacShowSavings system preference contain
HTML: "on patron's checkout history page (the system preference
<em>opacreadinghistory</em> must be enabled)". This text ends up in an
<option> tag, and even though the form is rendered using the
multiple-select plugin the HTML still won't render and should
be removed.

To test, apply the patch and restart all.

- Go to Administration -> System preferences and search for
  "OpacShowSavings"
- Check the dropdown of options on the preference. The system
  preference names referred to should now be single-quoted instead of
  wrapped in visible <em> tags.
- Confirm that the preference still works correctly.

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>
2023-10-19 16:00:51 -03:00
5da1c562a0
Bug 35096: Fix batch accessor in ILL request page
Test plan, k-t-d:
1) Install FreeForm and enable ILLmodule, run:
bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev.sh)
2) Install an ILL availability plugin (e.g. pubmed):
https://github.com/PTFS-Europe/koha-plugin-api-pubmed/releases/tag/1.1.1
3) restart plack:
koha-plack --restart kohadev
4) Create a new ILL batch, visit:
/cgi-bin/koha/ill/ill-requests.pl
5) Click '+New ILL requests batch'
6) Input a name, '42' on the cardnumber and pick a library. Click 'Continue'.
7) On the identifiers textarea, insert '123' and click 'Process identifiers'
8) After the metadata has been retrieved, click the bottom 'Add items to batch' button, click 'Finish and view batch'
9) You should now be seeing 'View ILL requests for batch <batch_name>' with the request you just added.
10) Click the request id (or the 'Manage request' button)
11) Notice you can view the request correctly, the batch it belongs to shows correctly and is clickable

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-19 16:00:49 -03:00
44c16df625
Bug 35094: Update batch to ill_batch accessor in .tt file
Test plan:
1) Install FreeForm and enable ILLmodule, run:
bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev.sh)
2) Visit /cgi-bin/koha/ill/ill-requests.pl
3) Create 'New ILL request'
4) Select the request type, input cardnumber '42' and select a library
5) Hit 'Create'
6) Notice the request now creates successfully

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-19 16:00:48 -03:00