From c933a5fc15cc069cdeab5b0c2547d4314d3c8872 Mon Sep 17 00:00:00 2001 From: David Cook Date: Thu, 16 Nov 2023 05:58:53 +0000 Subject: [PATCH] Bug 33646: Better organize availability in cataloging search Content-Type: text/plain; charset=utf-8 This change adds "Available", "Unavailable", and "Not for loan" categories in the availability cell of the "cataloging search" found at /cgi-bin/koha/cataloguing/addbooks.pl This change also adds missing location information for the "Not for loan" items. Test plan: 0. Apply the patch 1. Add available, checked out, and not for loan items for a test record (like "Gairm" in koha-testing-docker) 2. Go to the cataloging search, http://localhost:8081/cgi-bin/koha/cataloguing/addbooks.pl?q=test 3. Note that the items in the "Location" column now have labels to differentiate which items are available, unavailable, and not for loan. 4. Note that the "Not for loan" data is similar to the "Available" data Signed-off-by: David Nind --- .../prog/en/modules/cataloguing/addbooks.tt | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt index 1c68a871ac..7cd6b78567 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt @@ -138,8 +138,9 @@

[% END %] - + [% IF ( resultsloo.available_items_loop ) %] +
Available:
[% FOREACH items_loo IN resultsloo.available_items_loop %] [% items_loo.count | html %] [% items_loo.branchname | html %] @@ -155,6 +156,9 @@ [% END %] + [% IF ( resultsloo.onloancount || resultsloo.withdrawncount || resultsloo.itemlostcount || resultsloo.recalledcount || resultsloo.onholdcount ) %] +
Unavailable:
+ [% END %] [% IF ( resultsloo.onloancount ) %] Checked out ([% resultsloo.onloancount | html %]),
[% END %] [% IF ( resultsloo.withdrawncount ) %] Withdrawn ([% resultsloo.withdrawncount | html %]),
[% END %] [% IF ( resultsloo.itemlostcount ) %] Lost ([% resultsloo.itemlostcount | html %])
[% END %] @@ -162,9 +166,16 @@ [% IF ( resultsloo.onholdcount ) %] Waiting on hold ([% resultsloo.onholdcount | html %])[% END %]
- [% IF ( resultsloo.other_items_loop ) %] + [% IF ( resultsloo.other_items_loop.size ) %] +
Not for loan:
[% FOREACH items_loo IN resultsloo.other_items_loop %] - [% IF ( items_loo.notforloan ) %][% items_loo.notforloan | html %] ([% items_loo.count | html %])
[% END %] + [% IF ( items_loo.notforloan ) %] + [% items_loo.count | html %] [% items_loo.branchname | html %] + [% IF ( items_loo.location ) %][% items_loo.location | html %][% END %] + [% IF ( items_loo.itemcallnumber ) %][% items_loo.itemcallnumber | html %][% END %] + ([% items_loo.notforloan | html %]) +
+ [% END %] [% END %] [% END %]
-- 2.30.2