Bugzilla – Attachment 181835 Details for
Bug 33646
"Cataloging search" missing important data for not for loan items
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33646: Better organize availability in cataloging search
Bug-33646-Better-organize-availability-in-catalogi.patch (text/plain), 8.14 KB, created by
Hammat wele
on 2025-05-01 19:08:49 UTC
(
hide
)
Description:
Bug 33646: Better organize availability in cataloging search
Filename:
MIME Type:
Creator:
Hammat wele
Created:
2025-05-01 19:08:49 UTC
Size:
8.14 KB
patch
obsolete
>From 2639f84e8347e3990306960dca82e5fb201b1bef Mon Sep 17 00:00:00 2001 >From: Hammat Wele <hammat.wele@inlibro.com> >Date: Thu, 1 May 2025 19:08:16 +0000 >Subject: [PATCH] Bug 33646: Better organize availability in cataloging search > >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 >--- > .../prog/en/modules/cataloguing/addbooks.tt | 61 +++++++++++++++---- > 1 file changed, 48 insertions(+), 13 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 0e61ec2d8b..a4e5f46b4f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt >@@ -4,6 +4,7 @@ > [% USE TablesSettings %] > [% PROCESS 'i18n.inc' %] > [% SET footerjs = 1 %] >+[% USE AuthorisedValues %] > [% INCLUDE 'doc-head-open.inc' %] > <title > >[% FILTER collapse %] >@@ -137,8 +138,9 @@ > </p> > [% END %] > </td> >- <td> >- [% IF ( resultsloo.available_items_loop ) %] >+ <td class="availability"> >+ [% IF resultsloo.availablecount > 0 %] >+ <div class="results_available_count">Available:</div> > <span class="available"> > [% FOREACH items_loo IN resultsloo.available_items_loop %] > [% items_loo.count | html %] >@@ -152,20 +154,53 @@ > [% END %] > </span> > [% END %] >- <span class="unavailable"> >- [% IF ( resultsloo.onloancount ) %]<span>Checked out ([% resultsloo.onloancount | html %])</span>,<br />[% END %] >- [% IF ( resultsloo.withdrawncount ) %]<span>Withdrawn ([% resultsloo.withdrawncount | html %])</span>,<br />[% END %] >- [% IF ( resultsloo.itemlostcount ) %]<span>Lost ([% resultsloo.itemlostcount | html %])</span><br />[% END %] >- [% IF ( resultsloo.recalledcount ) %]<span>Waiting to fill recall ([% resultsloo.recalled | html %])</span>[% END %] >- [% IF ( resultsloo.onholdcount ) %]<span>Waiting on hold ([% resultsloo.onholdcount | html %])</span>[% END %] >- </span> >- <span class="notforloan"> >- [% IF ( resultsloo.other_items_loop ) %] >+ <!--unavailable--> >+ [% IF resultsloo.onloancount > 0 || resultsloo.othercount > 0 && !( resultsloo.notforloancount || resultsloo.orderedcount) %] >+ <div class="results_unavailable">Unavailable:</div> >+ <span class="unavailable"> >+ <!-- Checked out --> >+ [% IF ( resultsloo.onloancount ) %]<span>Checked out ( >+ [% FOREACH items_loo IN resultsloo.onloan_items_loop %] >+ [% IF (!items_loo.notforloan ) %] >+ [% items_loo.count | html %] >+ [% IF ( items_loo.branchname ) %][% items_loo.branchname | html %][% END %] >+ [% IF ( items_loo.location ) %]<span class="shelvingloc">[% items_loo.location | html %]</span>[% END %] >+ [% IF ( items_loo.itemcallnumber ) %][% items_loo.itemcallnumber | html %][% END %] >+ <br /> >+ [% END %] >+ [% END %])</span>,<br /> >+ [%END%] > [% FOREACH items_loo IN resultsloo.other_items_loop %] >- [% IF ( items_loo.notforloan ) %][% items_loo.notforloan | html %] ([% items_loo.count | html %])<br />[% END %] >+ [% IF (!items_loo.notforloan ) %] >+ [% items_loo.count | html %] >+ [% IF ( items_loo.branchname ) %][% items_loo.branchname | html %][% END %] >+ [% IF ( items_loo.location ) %]<span class="shelvingloc">[% items_loo.location | html %]</span>[% END %] >+ [% IF ( items_loo.itemcallnumber ) %][% items_loo.itemcallnumber | html %][% END %] >+ [% IF ( items_loo.withdrawn ) %]([% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.withdrawn', authorised_value => items_loo.withdrawn ) | html %])[% END %] >+ [% IF ( items_loo.itemlost ) %]([% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.itemlost', authorised_value => items_loo.itemlost ) | html %])[% END %] >+ [% IF ( items_loo.damaged ) %]([% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.damaged', authorised_value => items_loo.damaged ) | html %])[% END %] >+ [% IF ( items_loo.intransit ) %](<span>In transit</span>)<br />[% END %] >+ [% IF ( items_loo.onhold ) %](<span>On hold</span>)<br />[% END %] >+ <br /> >+ [% END %] > [% END %] >+ </span> >+ [% END %] >+ <!--Not for loan--> >+ [% IF ( resultsloo.notforloancount || resultsloo.orderedcount) %] >+ <div class="results_not_for_loan">Not for loan:</div> >+ <span class="notforloan"> >+ [% FOREACH items_loo IN resultsloo.other_items_loop %] >+ [% IF ( items_loo.notforloan ) %] >+ [% items_loo.count | html %] [% items_loo.branchname | html %] >+ [% IF ( items_loo.location ) %]<span class="shelvingloc">[% items_loo.location | html %]</span>[% END %] >+ [% IF ( items_loo.itemcallnumber ) %][% items_loo.itemcallnumber | html %][% END %] >+ ([% items_loo.notforloan | html %]) >+ <br /> >+ [% END %] >+ [% END %] >+ </span> > [% END %] >- </span> > </td> > <td> > <div class="btn-group dropup"> >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 33646
:
159020
|
159246
|
159437
|
159438
|
181834
| 181835