From b2bc97fcaeb3cfe4de58d0b3f168f3bfdf9e4c94 Mon Sep 17 00:00:00 2001
From: Katrin Fischer <katrin.fischer.83@web.de>
Date: Sat, 18 Feb 2023 11:15:35 +0000
Subject: [PATCH] Bug 32960: Add option "not checked out" to item search

This enhances the availability search option on item search
to have a third option: ignore, checked out and not checked out.
I chose 'not checked out' as available could be misleading,
the item might still be lost or withdrawn and not on the shelf.

To test:
* Apply patch
* Make sure some items are checked out
* Search with 'ignore' - note number of results
* Search with 'checked out' - note number of results
* Search with 'not checked out' - number of results should
  match ignore minus checked out
---
 koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt
index 08249b1756..b5e11dbb0c 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt
@@ -213,6 +213,8 @@
                 <label for="onloan_indifferent">Ignore</label>
                 <input type="radio" name="onloan" id="onloan_yes" value="IS NOT NULL" />
                 <label for="onloan_yes">Checked out</label>
+                <input type="radio" name="onloan" id="onloan_no" value="IS NULL" />
+                <label for="onloan_no">Not checked out</label>
             </div>
           </fieldset>
           <fieldset>
-- 
2.30.2