Commit graph

47794 commits

Author SHA1 Message Date
8165aa1d73
Bug 32096: Consistent classes for primary buttons: Tools
This patch makes changes the button markup in various tool
templates so that all submit buttons and any buttons that should should
be styled as primary buttons have the Bootstrap class "btn btn-primary."

To test, apply the patch and view pages in the tools section to confirm
that everything looks correct. In most cases there are no visible
changes.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-14 09:32:53 -03:00
fc08868976
Bug 32094: Consistent classes for primary buttons: Serials
This patch makes changes the button markup in serials templates so that
all submit buttons and any buttons that should should be styled as
primary buttons have the Bootstrap class "btn btn-primary."

To test, apply the patch and view serials pages to confirm that
everything looks correct. In most cases there are no visible
changes.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-14 09:30:49 -03:00
d4aceae4af
Bug 32086: Consistent classes for primary buttons: Patrons
This patch makes changes the button markup in patron
module templates so that all submit buttons and any buttons that should
should be styled as primary buttons have the Bootstrap class "btn
btn-primary."

To test, apply the patch and view patron module pages to confirm
that everything looks correct. In most cases there are no visible
changes.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-14 09:29:25 -03:00
Emmi Takkinen
c7a995d28f
Bug 31447: Add unit tests
To test prove t/db_dependent/Circulation.t

Sponsored-by: Koha-Suomi Oy

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>
2022-11-14 09:25:10 -03:00
Emmi Takkinen
a02813fb5b
Bug 31447: Use holds pick up branch in "Please confirm checkout" message
When one tries to check out item which has hold in it,
"Please confirm checkout" message uses patrons home library
instead of holds pick up library. It would be more logical
to use latter here.

To test:
1. Find record with holds.
2. For first priority hold, change it's pick up library to differ from patrons homebranch if needed.
3. Check out records item for a different patron.
=> Note that notice reads: "Item ... has been on hold for ... at [patrons homebranch] since ...".
4. Apply this patch.
5. Repeat steps 2 and 3.
=> Notice should now read: "Item ... has been on hold for ... at [holds pick up branch] since ...".

Sponsored-by: Koha-Suomi Oy

Signed-off-by: Axelle Clarisse <axelle.clarisse@univ-amu.fr>

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

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>
2022-11-14 09:25:10 -03:00
Katrin Fischer
499ae7077d
Bug 20207: Don't show search options when no suggestions show
When you are not logged in and OPACViewOthersSuggestions is
deactivated, you don't see any suggestions.

When we see no suggestions, we should also not show the option
to serach in suggestions.

To test:
* as a logged in user and logged out, try various combinations of:
  * OPACViewOthersSuggestions
  * AnonSuggestions
* Verify display matches expectations (new button, shown suggestions,
  search input)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-14 09:21:14 -03:00
Mark Hofstetter
4e7b570fdb
Bug 20207: Don't show anyones's suggestions when OPACViewOthersSuggestions is deactivated
When you enable AnonSuggestions and ALLOW patrons that aren't logged
in to make purchase suggestions, once a suggestion has successfully
been submitted, anonymous purchase suggestions will show on OPAC even
when system preference OPACViewOthersSuggestions, is set to Don't show.

The suggestions will show on opac-suggestions.pl. However, if you search
for the title you suggested, you will get a message saying
"You are not authorized to see pending purchase suggestions."

This patch fixes the error, ie if OPACViewOthersSuggestions is set to
false not other suggestions are shown (if you are not logged in and AnonSuggestions)
OR ONLY your own suggestions if you are logged in

To test:
1) activate AnonSuggestions
2) create an anon suggestion
3) create a suggestion with a logged in user
4) toggle OPACViewOthersSuggestions Show/Don't show
5) all suggestions are shown cgi-bin/koha/opac-suggestions.pl in either case
6) apply patch
7) OPACViewOthersSuggestions is now respected ie suggestions from other users are only shown if activated
8) Please sign off

Sponsored-by: Library of the Natural History Museum Vienna

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>
2022-11-14 09:21:14 -03:00
Katrin Fischer
36aa2b4e08
Bug 32185: Fix template typo in opac-reserve.pl
This removes the %] showing for not for loan items disappear.

To test:
* Create a record with multiple items, mark one 'not for loan'
* Place an item level request on this record in the OPAC
* Make sure you 'Show nonholdable items'
* Verify the %] shows in the column with the not for loan status
* Apply patch
* Verify display is now improved

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-14 09:18:19 -03:00
20294f52bf
Bug 31261: Introduce flatpickr-futureinclusive
That let us use future + today, and it's working perfectly for our use
case :)

Sponsored-by: Association KohaLa - https://koha-fr.org/

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>
2022-11-14 09:15:51 -03:00
614b0a5033
Bug 31261: Disable dates in the past for curbside pickups
When creating a new pickup the dates in the past won't display any
available slots. It would be better to disable them in the date picker.

Test plan:
Setup curbside pickups for your library (see bug 30650 test plan if
needed)
Create a new pickup (staff and OPAC) and confirm that the date picker widget
has the dates in the past disabled.

QA note: More work would be needed to sync calendar.inc code between
OPAC and staff. Also note that the "clear date" code wasn't needed
(please confirm).

Sponsored-by: Association KohaLa - https://koha-fr.org/

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>
2022-11-14 09:15:51 -03:00
6df74598eb
Bug 31782: Remove js/autocomplete/patrons.js
On 30578 we replace circ/ysearch.pl with a call to the /api/v1/patrons
route. A new patron_autocomplete JS function has been written
(js/patron-autocomplete.js) for that purpose.

However 3 occurrences were using an existing patron_autocomplete
function, and 30578 didn't take care of adjusting correctly the call to
the REST API route.

On this patchset I am suggesting to copy/paste the JS functions defined
in js/autocomplete/patrons.js, because we are very close of the 22.11
release. But ideally we should improve js/patron-autocomplete.js to add
a new 'on-select-add-to' option that will take care of add/remove/hide
behaviour. IMO that must be done on a separate bug, and after 22.11 is
released (to not need to retest the other occurrences of the patron
autocomplete)

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>
2022-11-14 09:13:49 -03:00
9800cfbca2
Bug 31782: Fix autocomplete when duplicating orders
Test plan:
Add a new order to a basket from an existing order
Search for the order to duplicate using the "Basket created by" field

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>
2022-11-14 09:13:48 -03:00
2360443df6
Bug 31782: Fix patron autocomplete on order search
Test plan:
Search for order using the "Basket created by" field

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>
2022-11-14 09:13:48 -03:00
40c052f20e
Bug 31782: Fix patron autocomplete on patron list
Test plan:
Add new patrons to a patron 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>
2022-11-14 09:13:48 -03:00
950fa218d4
Bug 32179: Add page-sections as appropraite to the ERM module
We missed the page-section addition when ERM was updated for the new UI
prior to push.

Test plan
1) Start a koha-testing-docker
2) Build the ERM module with 'kshell > yarn install > yarn build_js'
3) Enable the ERM module via the system preferences
4) Enable both 'EBSCO' and 'Local' as providers
4) Check the following pages
   * ERM > Agreements
   * ERM > Licenses
   * ERM > eHoldings > Local > Packages
   * ERM > eHoldings > Local > Titles
   * ERM > eHoldings > Local > Titles > Add from a list
   * ERM > eHoldings > EBSCO > Packages
   * ERM > eHoldings > EBSCO > Titles
5) Apply this patch
6) Build the app again 'yarn build_js'
7) Confirm page-sections appear as expected on the pages mentioned in
   step 4.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-14 09:12:51 -03:00
9749aef9c2
Bug 32072: Consistent classes for primary buttons: Cataloging
This patch makes changes the button markup in Cataloging templates
so that all submit buttons and any buttons that should should be styled
as primary buttons have the Bootstrap class "btn btn-primary."

To test, apply the patch and view pages in Cataloging to confirm
that everything looks correct. In most cases there are no visible
changes.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-11 16:52:33 -03:00
2e7da3ce14 Bug 24606: (QA follow-up) Remove duplicate include 2022-11-11 15:47:36 -03:00
8bc4409773
Bug 24606: Fix encoding issues on decoded content
This patch makes the `decoded_contents` method UTF-8 encode the data
before calling the relevant decode_json, as expected by the JSON library
[1].

To test:
1. Apply the regression tests patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Item/Template.t
=> FAIL: Tests fail!
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!

[1] `Any decoding or encoding (e.g. to UTF-8 or UTF-16) needs to be done
yourself, e.g. using the Encode module.` https://metacpan.org/pod/JSON

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-11 15:38:18 -03:00
1d65a71cf6
Bug 24606: Regression tests
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-11 15:38:08 -03:00
cc1502033c
Bug 32151: Resolve uninitialized warn in numeric ne in C4::Ris
We should not write:
    if ($kwfield != undef) {

Test plan:
Pick record with UTF8 chars.
Download via cart or shelf in RIS format.
Check your logs.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-11 14:27:59 -03:00
90fd906e87
Bug 32158: Compiled CSS
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-11 09:01:00 -03:00
e0b58ac205
Bug 32158: Specify due date field is very long now
This patch adds a reasonable width to the "specify due date" date field
on the circulation page.

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

Check out to a patron and click the "setting" icon on the "Enter item
barcode" field.

In the checkout setting panel, confirm that the date field isn't
unreasonably wide.

Signed-off-by: Barbara Johnson  <barbara.johnson@swbell.net>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-11 08:59:50 -03:00
e216df769e
Bug 32163: (bug 32030 follow-up) Fix koha_object[s]_class for ErmUserRole
Test plan:
run t/db_dependent/TestBuilder.t and confirm that the error related to
this module is gone. Another one may still fail however

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>
2022-11-11 08:59:06 -03:00
8b4ea0beaa
Bug 32161: (bug 32030 follow-up) Fix koha_object[s]_class for ErmEholdingsPackagesAgreement
Test plan:
run t/db_dependent/TestBuilder.t and confirm that the error related to
this module is gone. Another one may still fail however

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>
2022-11-11 08:58:28 -03:00
9d68cae0d2
Bug 32154: DBRev 22.06.00.085
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-11 08:56:05 -03:00
22e78b5ffa
Bug 32154: Missing primary key on erm_user_roles table
The aforementioned TestBuilder should display "Koha::ERM::UserRole", not be empty.

This patch adds a primary key to the erm_user_roles table and fixes that.

Also includes atomicupdate file to update database schema as well as updates to
kohastructure.sql provided by Jonathan Druart.

Looked into the vue files but didn't find anywhere or a need to include the new
primary key in any of the requests as there is no request of users by role_user_id
being made.

Erm users are being created/updated as a relationship through licenceses/agreements.

Furthermore, when editing a role of an existing user, this new primary key is already
being supplied embeded in the license/agreement.

Test plan:
Add users to license and agreement
Run the cypress tests
Confirm that the change fix the test that was failing in TestBuilder.t
(another one may still fail however)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-11 08:54:34 -03:00
b3be8b1314
Bug 32162: DBRev 22.06.00.084
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-11 08:53:43 -03:00
80813bab15
Bug 32162: DBIC schema
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-11 08:52:41 -03:00
f9bcee4be8
Bug 32162: Add primar key to erm_eholdings_packages_agreements
Test plan:
Confirm that this change fixes the related TestBuilder.t failure
Confirm that it does not break the eRM app, try to attach an agreement
to a package.

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>
2022-11-11 08:51:03 -03:00
e16003e19e
Bug 32130: Add a test to ensure vue files will be kept tidy
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-11 08:49:30 -03:00
8174b15494
Bug 31759: Compiled CSS
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-10 14:53:38 -03:00
5763d02227
Bug 37159: Updated tab style
To test, apply the patch and rebuild the staff interface CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

Test plan
1) Confirm the styling change for top level tabs on patron details or catalog
   details pages.
2) Confirm the styling change is ok for a nested set of tabs (catalog
   holds page is a good example).

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

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-10 14:52:41 -03:00
Katrin Fischer
f43a38940e
Bug 31819: (QA follow-up) Add page section to list of items
In order to test, you need to add items on order and add
at least one to make the list appear above the item section

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-10 14:50:38 -03:00
Katrin Fischer
02017fb3ec
Bug 31819: (QA follow-up) Fix alignment of Statistic fields at end of form
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-10 14:50:34 -03:00
7d5d88aae0
Bug 31819: Formatting of item form in acq when ordering is broken
I propose that we add CSS to the page to fix this since it's fairly
specific to the way this page is broken.

To test, apply the patch and view a basket in Acquisitions.

- Click "Add to basket" and choose "From a new (empty) record."
- Confirm that the item form layout looks correct.
- Perform the same test when adding to a basket from an existing record.

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>
2022-11-10 14:50:10 -03:00
431b49dc86
Bug 32145: Compiled CSS
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-10 14:49:06 -03:00
d6f1ca6255
Bug 32145: Fix style of buttons with class .btn-danger
This patch adds style to the staff client's global SCSS which adds
correct styling to buttons classed with .btn-danger.

This isn't the correct way to fix this, but it's the fast way.
Rebuilding Bootstrap with custom colors is the correct way, but
Bootstrap 3.x doesn't use SCSS. I consider this is a FIXME for an
upgrade of Bootstrap in the staff interface.

To test, apply the patch and rebuild the staff interface CSS. Test
instances where the .btn-danger class is used. Two examples:

Holds:

- Locate a bibliographic records with holds and view the holds.
- Click the "trash" icon to delete one of the holds.
- In the confirmation modal, check that the "Confirm cancellation"
  button looks correct in its default, hover, and active ("clicked")
  state.

Cataloging:

- Open a new blank record in the basic MARC editor.
- Click "Save" without filling any mandatory fields.
- You should see a warning about the empty fields.
- Scroll down until the warning is offscreen. An "Errors" button should
  appear in the toolbar.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-10 14:47:42 -03:00
Katrin Fischer
d2cbcc2053
Bug 32073: (QA follow-up) Fix capitalization: Cancel and Transfer all
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-10 14:47:07 -03:00
b2d13db5ab
Bug 32073: Consistent classes for primary buttons: Circulation
This patch makes changes the button markup in Circulation templates --
including offline circulation -- so that all submit buttons and any
buttons that should should be styled as primary buttons have the
Bootstrap class "btn btn-primary."

To test, apply the patch and view pages in Circulation to confirm
that everything looks correct. In most cases there are no visible
changes.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-10 14:47:02 -03:00
Katrin Fischer
81b9e1f466
Bug 32165: (QA follow-up) Fix tabs in ISBD details
The QA test tools complained about tabs in 2 lines, this is fixed here.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-10 14:45:49 -03:00
f50214c79a
Bug 32165: Add page-section to issuehistory
Test plan
1) Confirm the issue history view now uses page-section appropriately

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-10 14:45:45 -03:00
c745b855fe
Bug 32165: Add page-section to ISBDdetail
We fix some whitespace and move the toolbar above the H1 too.

Test plan
1) Confirm the headings and page-sections now look correct on the ISBD
   details view

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-10 14:45:41 -03:00
cff0b3ed08
Bug 32165: Add page-section to labeledMARCdetail
Test plan
1) Confirm that page-sections now appear as expected on the labeled marc
   view.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-10 14:45:36 -03:00
fe85f9d257
Bug 24606: DBIC schema
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-10 14:44:59 -03:00
af92782c97
Bug 24606: DBRev 22.06.00.083
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-10 14:41:40 -03:00
2a79e3a00c
Bug 24606: (QA follow-up) borrowernumber => patron_id
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-10 14:39:35 -03:00
f31b4c48fc
Bug 24606: (QA follow-up) Fix up save form a bit
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-10 14:26:01 -03:00
Katrin Fischer
2d8723b3de
Bug 24606: (QA follow-up) Remove string variable
This string is no longer needed as the __() is used
in the .js file directly.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-10 14:25:57 -03:00
1e0fe4af21
Bug 24606: (QA follow-up) Disable 'Apply template' button if no template is selected
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-10 14:25:53 -03:00
02dd772290
Bug 24606: (QA follow-up) Hide button when using multi-add
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-10 14:25:42 -03:00