Commit graph

17503 commits

Author SHA1 Message Date
a0327fa6bc Bug 26734: (follow-up) Add back 'UPGRADE' type to logviewer
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-27 16:23:49 +02:00
cff7ed4fd3 Bug 26734: Convert printfeercpt/printinvoice to use GetPreparedLetter
This patch updates C4::Letters to allow use of existing koha template
includes from notices, then updates the printfeercpt and printinvoice
slip print option to use GetPreparedLetter rather than calling getletter
directly.

As part of this work, we also add credits and debits handling to the
_parseletter_sth and _get_tt_params routines in C4::Letters to allow for
recognisable variable names in the notice template.

Test plan
1/ Update the ACCOUNT_CREDIT and ACCOUNT_DEBIT notices to use
'accounts.inc' include for account descriptions
1a/ Add `[% PROCESS 'accounts.inc' %]` to the top of the notice
1b/ Replace manual account descriptions with `[% PROCESS
account_type_description account=credit %]`
2/ Print one of each slip and check that descriptions are properly
substituted
3/ Clone the notice to another language
4/ Print the in the other language and note the translated descriptions
are properly substituted.
5/ Signoff

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-27 16:23:49 +02:00
90d8667cf9 Bug 26734: Ratify account slip printing
This patch simplifies the members/print*.pl controller scripts to only
pass around the minimum required data for the templates.

Test plan
Slips should continue to print as they did prior to the patch
1/ Add a manual invoice and manual debit to a patrons account
2/ Print a slip for the manual invoice, compare to a printed slip prior
to the patch.
3/ Print a slip for the manual debit, compare to a printed slip prior to
the patch.
4/ Signoff.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-27 16:23:49 +02:00
dd9e576d55 Bug 27455: (follow-up) Add automatic focus to library name when editing
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-27 16:23:49 +02:00
Katrin Fischer
91ee3a31cd Bug 27455: (follow-up) Switch form JavaScript to focus class
Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-27 16:23:49 +02:00
ava li
64b457925c Bug 27455: Add focus to branch code when a new library is added
TEST PLAN:
From the koha home, go to administration, go to Libraries which is under
Basic parameters. Click +New library the focus should go to the first
field of the form (library/branch code) the patch has worked.

https://bugs.koha-community.org/show_bug.cgi?id=27455

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-27 16:23:49 +02:00
92f69a0193 Bug 28223: Add data elements to negative budgets
To test:
1 - Have a parent fund and a child fund
2 - Order an amount from the child fund that is greater than the amount available
3 - Browse to acquisitions
4 - Confirm the totals look right
5 - Click on the over spent fund to go to 'Funds for main budget'
6 - Note the totals are incorrect
7 - Apply patch
8 - Reload
9 - Totals are now correct

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-27 16:23:49 +02:00
3dc9855b46 Bug 28178: Display the correct image in the image viewer
When there are several images attached to a bibliographic record, one can click
an image and see it in the image viewer. But the first image is always displayed.

Test plan:
0. Turn on LocalCoverImages and AllowMultipleCovers
1. Attach at least two images to a bibliographic record
2. Go to the detail page, click the "Images" tab and click the second
image.
=> With this patch applied you should see the image you selected

Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-27 16:23:49 +02:00
c45d15e231 Bug 28193: (follow-up) Correct OpacLoginInstructions in login modal
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-27 16:23:49 +02:00
ee4755c974 Bug 28193: OpacLoginInstructions news block broken by Bug 20168
This patch fixes a regression which was introduced by Bug 20168, causing
the OpacLoginInstructions template code to revert back to the old system
preference behavior. This patch returns the correct markup.

To test, apply the patch and view the OPAC login page
(/cgi-bin/koha/opac-user.pl)

 - With no news entry for OpacLoginInstructions you should see the
   default: A block of text with two headings, "Don't have a password
   yet?" and "Don't have a library card?"
 - Go to Tools -> News and create an entry for OpacLoginInstructions.
 - Return to the OPAC and confirm that your custom text appears.
 - Try updating/installing another translation and adding a different
   news entry for that language. Confirm that the correct entry appears.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-27 16:23:49 +02:00
1f32b62d1c Bug 24300: (follow-up) Set minimum for amount input
Add a 'min' attribute for validation of the amount field in the payout
modal so that negative amounts cannot be submitted.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-23 11:58:49 +02:00
57212f76b3 Bug 24300: Add payout amount to boraccount page
Test plan
1/ Add some debts and credits to a patrons account, resulting in an
overall credit
2/ Note the appearance of a 'Payout amount' button next to the total due
line.
3/ Try paying out an amount with the button
4/ Signoff

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-23 11:58:49 +02:00
6c10582914 Bug 12362: Cancel transfer with hold cancelation
This patch adds a transfer cancellation when a hold is cancelled.

Test plan
1/ Check an item out from it's homebranch
2/ Place a hold on that item for another user at a different branch
3/ Check the item in at it's homebranch and accept the transfer
4/ Cancel the hold
5/ Change to the second branch and check the item in
6/ Note that a transfer is triggered with the reason 'Transfer was
cancelled whilst in transit'

Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

JD amended patch: remove trailing whitespace

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-23 11:58:49 +02:00
ad45e6c59d Bug 23971: Do not always flag AcquisitionLog as 'not enabled'
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-23 11:58:49 +02:00
7e2679528e Bug 23971: Rename pref with AcquisitionLog
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-23 11:58:49 +02:00
Katrin Fischer
17670bd760 Bug 23971: (QA follow-up) Fix punctuation, doubled up return and syspref order
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-23 11:58:49 +02:00
Andrew Isherwood
79c2999c6e Bug 23971: (follow-up) Add additional basket logging
This patch adds additional basket logging as discussed in comment #14

- Basket reopening
- Basket users (manager) modification
- Basket header modification

Signed-off-by: Holly <hc@interleaf.ie>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-23 11:58:49 +02:00
Andrew Isherwood
565726e556 Bug 23971: Add logging for basket related actions
This patch adds logging for the following Acq actions:

- Basket creation
- Basket editing
- Basket approval (via EDI)
- Basket closure

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Bug 23971: (QA follow-up) New DBrev syntax

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-23 11:58:47 +02:00
bb5f0eea74 Bug 27924: Display number of holds awaiting pickup on check out screens
This patch modifies the checkout page so that waiting holds are
displayed separately depending on whether they are waiting at the
current branch or not. A count of each number of waiting holds is
displayed too.

Unrelated change: A missing </li> has been added for markup validity.

To test, apply the patch and view the checkout screen in these
situations:

 - A patron with no waiting holds.
 - A patron with one or more holds waiting at the current library.
 - A patron with one or more holds waiting at another library.
 - A patron with holds waiting at both the current library and at other
   libraries.

In each case, the display of waiting hold information should be correct,
including the count of holds of each kind.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-23 10:31:39 +02:00
35226bab68 Bug 27814: Compiled CSS
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-23 10:31:32 +02:00
ff317f4e37 Bug 27814: (follow-up) Adjust container padding, button flow
This patch makes minor changes to the SCSS so that the user summary
page's DataTables button flow better at very narrow widths.

Also, the main container should have less padding at narrow widths.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-23 10:29:58 +02:00
0b2fbcb66d Bug 27814: Improve responsive behavior of the user page in the OPAC
This patch makes minor changes to OPAC CSS in order to improve the way
the logged-in user's "your account" page works at narrower browser
widths.

To test, apply the patch and rebuild the OPAC CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

 - Log in to the OPAC as a user who has multiple checkouts.
 - Test the page at various browser widths, from > 1200 pixels wide to <
   300 pixels wide. Your browser's built-in responsive design mode,
   found in developer tools, can make these measurements easier.
 - At "phone-size" width the tabs ("Checked out," "Overdue," etc) should
   start displaying full-width.
 - The DataTable controls at the top of the checkouts table should
    adapt well as the browser width changes.
 - At narrower widths the tables on this page should display much better
   than they did before the patch: They should expand to fit the width
   of the page.

Edit: Tweaked the display property of the table search field at narrower
browser widths; Converted iCal download link to button to match other
elements in the toolbar.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-23 10:29:58 +02:00
aebd3f6a53 Bug 27566: Compiled CSS
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-23 10:29:54 +02:00
4cc224baa7 Bug 27566: (follow-up) Add generic font family to prevent unstyled select tags
This correction fixes the previous patch which was dumb and stupid.

This patch adds a default font family "sans-serif" to the OPAC CSS as a
workaround for this Firefox bug:

font-family isn't honored in `<option>` element within `<select>`
dropdown
https://bugzilla.mozilla.org/show_bug.cgi?id=1536148

To test, apply the patch and rebuild the OPAC CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

 - Open the OPAC main page in Firefox.
 - Click the search type dropdown. The options should be styled using
   your system's default sans-serif font rather than a serif font.
 - Check that other areas of the OPAC are still styled with the correct
   "NotoSans" font. An error with this patch should be obvious when
   looking at a logged-in user's checkouts.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-23 10:03:37 +02:00
Petro Vashchuk
34575f1f1a Bug 28168: leave the field empty if amount variable is empty
Add "if" check to the template so that it uses the value of
"debit_type.default_amount" only if it's true, i.e. not null or 0.

The reason for this patch is there's requirement from librarians -
to have this field completely empty if it's 0, so they could paste the
amount (as they usually do) without the need to clear the field first.
And anyway if you try to save the form with 0.00 value,
it won't accept it saying "Debit amount passed is not positive" so
in my opinion there's no point to preset it with zeroes to begin with.

To reproduce:
    1) head to /cgi-bin/koha/members/maninvoice.pl?borrowernumber=XXXX
    and check that field "Amount" is prefilled with 0.00;
    2) apply patch;
    3) refresh page and ensure that field "Amount" is empty now;
    4) go to /cgi-bin/koha/admin/debit_types.pl and change default
    amount to some decimal amount;
    5) refresh manual invoice page again and ensure that "Amount"
    field is prefilled with that exact decimal number;

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-23 10:03:34 +02:00
e77fa64e31 Bug 28064: (QA follow-up) Remove value from button
To clarify that the value is not used on buttons that are not submit
type we remove the value entirely.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-22 14:50:12 +02:00
ccd7242532 Bug 28064: Add dotransfer field to slip print submission
By changing the code to only do a javascript triggered submission from
the from button we lose the original buttons name and value elements
upon submission.

This patch checks for those fields in the JS capture and triggers the
addition of a new hidden form field to contain the dotransfer data.

Test plan
1/ Set AutomaticItemReturn system preference is set to "Don't"
2/ Check in an item that belongs to another library, a dialog will ask
   you if you want to transfer.
3/ Click 'Yes, print slip'
4/ Look at the item record and note the status is 'Available'.
5/ Apply patch
6/ Follow steps 2 - 4
7/ Note the status is now 'In transit to...'
8/ Signoff

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-22 14:50:12 +02:00
Didier Gautheron
9e5d654c7a Bug 27240: Basket export cleanup.
Remove spaces and irrelevant links.

Test plan:
1 - Create a basket
2 - Export it in excel
3 - There's a lot of spaces in Order column and irrelevant 'Add internal note'
4 - Apply patch
5 - Export file
6 - It's tidier, fewer spaces and no useless Add/edit note links

https://bugs.koha-community.org/show_bug.cgi?id=27240
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-22 14:50:11 +02:00
c9c2416b94 Bug 16787: (follow-up) Add noReservesAllowed to ERROR_MAP
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-22 14:50:11 +02:00
0f23622041 Bug 16787: 'Too many holds' message appears inappropriately and is missing data
This patch alters C4/Reserves.pm to pass back 'noReservesAllowed' when
allowedreserves=0. This allows passing to the user an appropriate
message about the availability of items for holds

This patch also fixes a FIXME about using effective_itemtype to fetch item rules

To test:
1 - Set one itemtype to allow no holds
2 - Set 'Holds per record' to 0 for another itemtype/patron combination
3 - Create or find 2 records, each with items only of the itemtypes above
3 - Attempt to place a hold for a patron on each record above
4 - The message will be 'Too many holds'
5 - Apply patch and repeat
6 - Message should be "Cannot place hold: no item are available to be placed on hold"
7 - Try placing a multihold with either record above and a holdable record,
  message should end "Cannot place hold on some items'
8 - prove -v t/db_dependent/Holds.t

Rebase - Fix test expectation

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-22 14:37:14 +02:00
c3625010bb Bug 27120: (follow-up) also send biblionumber
Like in after_biblio_action hook

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-22 14:37:14 +02:00
3e4d37b031 Bug 27120: Send biblio to Koha plugins hook 'intranet_catalog_biblio_tab'
Koha plugins hook 'intranet_catalog_biblio_tab' should have the datas of the current biblio record.
Koha::Biblio is aleady in template, send it with hooks call.

This will be very usefull to be able to fetch external datas
(wikipedia, youtube, ...) depending on current biblio record.

Test plan :
1) Enable Koha plugins
2) Install plugin attached to this bug
3) Go to staff interface on a biblio record details page
4) Check you see tab 1 containing 'Tab for record {title}'
5) Check you see tab 2 containing 'Tab for record {isbn}'

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-22 14:37:14 +02:00
d0fecf3ff7 Bug 27114: Use Template Toolkit plugin for Koha plugins hook 'intranet_catalog_biblio_tab'
Koha plugins hook 'intranet_catalog_biblio_tab' is for a template,
it will be better it uses Template Toolkit plugin like intranet_js, ...
It will allow using it in other places like MARC details page for example.

Test plan uses a plugin from git.biblibre.com because this hook is not
yet in KitchenSink.

Test plan :
1) Enable Koha plugins
2) Download and install the latest version of this plugin
https://git.biblibre.com/biblibre/koha-plugin-intranet-detail-hook
3) Browse to catalogue/detail.pl for a record
4) Note you see two new tabs with content

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-22 14:37:14 +02:00
253534673b Bug 23207: (QA follow-up) Add new column on item types UI table
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-22 11:11:05 +02:00
cdf324f135 Bug 23207: (QA follow-up) Move option
This patch impliment the changes as suggested by Andrew on the bug
report. I agree that the suggested location fits better in the page and
the updated description is clearer.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-22 11:11:05 +02:00
Agustin Moyano
7439579b8b Bug 23207: Add automatic checkin feature
This patch adds the posibility to set an itemtype with automatic
checkin. It means that when the checkout is due, it will
automatically check in.

To test:
1. apply patches
2. updatedatabase
3. go to koha administration -> item types and edin an item type (from
   now on called itemtype1)
CHECK => there is a checkbox almost at the end called automatic checkin
4. check that checkbox and save
5. checkout 2 items from itemtype1 and one item from another itemtype
   (from now on called itemtype2)
6. go to mysql database console (koha-mysql) and manually set date_due = current_timestamp
   in issues table for the item of itemtype2 and only one of the items of
itemtype1
7. run cronjob at misc/cronjobs/automatic_checkin.pl
8. go to mysql database console again and select * from issues
SUCCESS => All issues are present except for the issue of itemtype1
which had it's date_due set to current_timestamp. That one was
automatically checked in.
9. prove t/db_dependent/Koha/Checkouts.t

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Hasina Akhter <HasinaA@pascolibraries.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-22 11:11:05 +02:00
5f233d930b Bug 26703: (follow-up) fixed some page titles in files
Swapped the order of the page titles to have the unique information
first, i.e. the name of the specific page displays first, and the name
of the website (e.g. Koha) displays at the end.

To test:
1) Apply patch
2) Esnure each othe files auth.tt, admin/transfer_limits.tt and
circ/transfers_to_send.tt have page titles that are swapped around to
display the most unique information first, and the wensite name is at
the end
3) Esnure the pages displayed on the Staff Client that correspond to
these files also display the changes

Sponsored-by: Catalyst IT

JD amended patch: remove dup "IP address change"

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-22 09:09:28 +02:00
feaeff330c Bug 27644: Compiled CSS
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-21 15:25:33 +02:00
1bb9b8b551 Bug 28119: Use full description in layout type selection
This patch changes the template for editing label layout so that a full
description of label types is shown to the user rather than brief names.

To test, apply the patch and go to Tools -> Label creator -> New ->
Layout.

- On the "Choose layout type" line you should see selections with full
  descriptions, e.g. "Only the barcode is printed."
- Choose a layout type and save the layout. Confirm that your choice was
  saved correctly.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Bug 28119: (follow-up) Remove unnecessary punctuation

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-21 15:25:07 +02:00
a01f7fac96 Bug 28086: OpacMaintenance page should use ReplytoDefault if set
This patch changes the OPAC maintenance template so that it checks for a
value in the ReplyToDefault system preference when displaying the
"please contact the site administrator" email link.

Also changed: If neither ReplytoDefault nor KohaAdminEmailAddress is
defined, it won't show the link at all.

To test, apply the patch and set the OpacMaintenance preference to
"Show."

 - In the OPAC you should see the "System Maintenance" page.
 - Test this page with various settings:
   - ReplytoDefault and KohaAdminEmailAddress both populated.
   - Only ReplytoDefault
   - Only KohaAdminEmailAddress
   - Neither.

 Confirm that the correct email address is used in each case.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-21 15:25:07 +02:00
Katrin Fischer
c1c2872440 Bug 27644: (QA follow-up) Remove size=1 from template
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-21 15:25:07 +02:00
983feccf64 Bug 27644: (follow-up) Wrap strings in translation function
This patch updates the in-template JavaScript so that some English
strings which were previously untranslatable. This patch wraps them in
the _() function.

To test, apply the patch and test that the correct strings are
translatable. In this example I'm testing fr-FR:

- Update a translation:

  > gulp po:update
  > 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-staff-prog.po
- Locate strings pulled from reports/guided_reports_start.tt for
  translation, e.g.:

  #: koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt:1324
  #, fuzzy, c-format
  msgid "Authorized value category:"
  msgstr "Catégorie de valeur autorisée&nbsp;: "

- Edit the "msgstr" string if necessary, or remove the "fuzzy," before
  "c-format"
- Install the updated translation:

  > perl translate install fr-FR

In the staff interface, switch to the language you're testing. Confirm
that your translated strings appear. In this case, test in particular:

 - The controls on the modal window when you preview a report's SQL from
   the list of saved reports.
 - The controls and modal dialog for inserting a runtime parameter.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-21 15:25:07 +02:00
c9a15b73f0 Bug 27644: Add button to SQL report editor for inserting runtime parameters
This patch adds a button menu to the SQL report CodeMirror editor for
inserting runtime parameters. Each menu item triggers a modal dialog
where the user can specify a parameter label and any other relevant
option.

To test, apply the patch and rebuild the staff client CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

- Go to Reports -> Use saved.
- Create or edit a report.
- You should see a menu button above the SQL editor field, "Insert
  runtime parameter."
- The menu should contain the options "Authorized value," "Date," "Item
  types," "Libraries," "Patron categories," and "Text field."
- Test each option. Each should trigger the display of a modal dialog
  with a heading which corresponds to your choice.
- In all cases except the "Authorized value" choice you should see a
  single form field for "label."
- Enter text in the label field and click the "Insert parameter" button.
- The correct runtime parameter should be inserted into the SQL editor.
  - If you placed a cursor somewhere in the SQL editor first, your
    parameter should be inserted in that location in the editor.
  - If you selected some text in the editor before selecting a
    parameter, the paramter should replace the selected text.
- In the case of the "Authorized value" selection, the modal dialog
  should include both a label field and a field for choosing an
  authorized value category.
- Try submitting the form without selecting an authorized value. It
  should warn you that the field is required.
- After testing the authorized value selection, try inserting another
  parameter to confirm that the authorized value selection (now hidden)
  is no longer required.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-21 15:25:07 +02:00
08c575f8d6 Bug 23243: (follow-up) Update wording as requested
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-21 15:25:07 +02:00
9ddba2b737 Bug 23243: Adjust previous patch
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-21 15:25:07 +02:00
Maxime Pelletier
eeca29afed Bug 23243: Restore filtering out historic expired subscriptions
The 'Check Expiration' page in Serials is now hardcoded to display all
expired subscriptions before the entered date. This patch restores the
ability to limit the results to just those expiring between 'today'
and the date entered.

Original code taken from bug 6968 autored by Maxime Pelletier, rebased
by Charles Farmer and then moved to a new report and rebased again by
Martin Renvoize.

Test plan:
1) Without the patch any results after a search from this page will
   result in matches both before after todays date (but before the date
   you entered).
2) With the patch you should see a 'Show historic expirations' checkbox
   which will allow you to limit the results to just those that expire
   between the date you enter and today.

Sponsored-by: CCSR
Rescued-by: Charles Farmer <charles.farmer@inlibro.com>
Rescued-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-21 15:25:07 +02:00
572c0981c3 Bug 28127: add transaction timestamp to register details tables
To Test:
-Enable POS and setup some registers
-Make some transactions
-Go to Point of Sale > Register details and look at the two tables, sales and past sales
-No timestamp or transaction date
-Apply patch and look again
-See Tranactions dates in the Transaction column

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-21 15:25:07 +02:00
596e59f2a9 Bug 21883: Show authorized value description for withdrawn in check-in
During check-in (circ/returns.pl) the withdrawn information may be
displayed in a message :
"Item is withdrawn".

Like Bug 21877 we should display the withdrawn authorized value description during check-in.

This patch adds this display.

Text changed in order to look maximum like in checkout :
a57278f39b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (L368)
Uses class 'ci-withdrawn' to ease hidding this new information via CSS.

Test plan :
1) On a catalog with items.withdrawn defined with authorized values
   category WITHDRAWN
2) Define in WITHDRAWN an authorized values 1 with description
  'dropped in trash'
3) Define in WITHDRAWN an authorized values 2 with description
   empty
4) Check-out an item
5) Edit this item with withdrawn=1
6) Check-in this item => You see 'Item has been withdrawn (dropped
   in trash)'
7) Edit this item with withdrawn=2
8) Check-in this item => You see 'Item has been withdrawn'

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-21 15:25:07 +02:00
00dfcfcbe8 Bug 21883: Pass the item to the template
This patch update the controller to pass a full item object to the
template instead of a subset of item fields and updates the template to
utilise the object.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-21 15:25:07 +02:00
cef6bbd660 Bug 27465: Add column visibility to admin/cities.pl
We want admin/cities.pl to be using as much DT features as possible to be used as an example.

Test plan:
Add some cities, go to admin/cities.pl confirm that you can show/hide
column.

Go to the tables settings admin page and confirm that you can set some
default settings from there.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-21 15:25:07 +02:00