From 433a791b547feace365430a54a011addeb4499e3 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Wed, 3 Jul 2024 14:19:31 +0100 Subject: [PATCH] Bug 19037: Update to use PQA api endpoint and modern styling This patch updates the test tool to use the recently introduced API endpoint. TODO: This works nicely with 'Categorycode', 'Itemtype' and 'Library' selection right now, but does not yet work for the other select options in the tester. --- .../prog/en/modules/admin/smart-rules.tt | 298 +++++++++--------- 1 file changed, 149 insertions(+), 149 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt index abadba18b4d..4e9279f9180 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt @@ -73,6 +73,154 @@

The circulation and fine rules are applied based on the CircControl system preference which is set to [% Koha.Preference('CircControl') | html %] and the HomeOrHoldingBranch system preference which is set to [% Koha.Preference('HomeOrHoldingBranch') | html %].

+
+ Circulation and fine rules test tool +
+

Circulation and fine rules test tool

+

This test tool lets you search a row of circulation and fine rules for a specific patron, item and library.

+

Dropdown value for Library is determined via system preference CircControl. If the preference is set to item's library, then system preference HomeOrHoldingBranch defines the branch to use. You can test with any library by selecting the last option Library.

+ + + + + + + + + + + + + + + + + +
PatronItemLibraryActions
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
LibraryPatron categoryItem typeCurrent checkouts allowedCurrent on-site checkouts allowedLoan periodUnitHard due dateFine amountFine charging intervalWhen to chargeFine grace periodOverdue fines cap (amount)Cap fine at replacement priceSuspension in days (day)Max. suspension duration (day)Renewals allowed (count)Renewal periodNo renewal beforeAutomatic renewalNo automatic renewal afterNo automatic renewal after (hard limit)Holds allowed (count)Holds per record (count)On shelf holds allowedItem level holdsArticle requestsRental discount (%)
+
+
+
+
[% UNLESS restricted_to_own_library %]
@@ -612,153 +760,6 @@
-
- Circulation and fine rules test tool -
-

Circulation and fine rules test tool

-

This test tool lets you search a row of circulation and fine rules for a specific patron, item and library.

-

Dropdown value for Library is determined via system preference CircControl. If the preference is set to item's library, then system preference HomeOrHoldingBranch defines the branch to use. You can test with any library by selecting the last option Library.

- - - - - - - - - - - - - - - - - -
PatronItemLibraryActions
- - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
LibraryPatron categoryItem typeCurrent checkouts allowedCurrent on-site checkouts allowedLoan periodUnitHard due dateFine amountFine charging intervalWhen to chargeFine grace periodOverdue fines cap (amount)Cap fine at replacement priceSuspension in days (day)Max. suspension duration (day)Renewals allowed (count)Renewal periodNo renewal beforeAutomatic renewalNo automatic renewal afterNo automatic renewal after (hard limit)Holds allowed (count)Holds per record (count)On shelf holds allowedItem level holdsArticle requestsRental discount (%)
-
-
-

Default checkout, hold and return policy[% IF humanbranch %] for [% Branches.GetName( humanbranch ) | html %][% END %]

@@ -1628,7 +1629,6 @@ } function tester_submit() { - var url = "/api/v1/issuingrules/effective"; var query_params = {}; $.each($("input[name^=tester_input_], select[name^=tester_input_]"), function () { if ($(this).parent().css("display") === "none") { @@ -1640,7 +1640,7 @@ } }); $.ajax({ - url: "/api/v1/issuingrules/effective?"+$.param(query_params), + url: "/api/v1/circulation_rules?"+$.param(query_params), method: "GET", statusCode: { 200: function(response) { -- 2.45.2