Bug 19706: (QA follow-up) Hide the collection code selector if no value is defined...
authorJosef Moravec <josef.moravec@gmail.com>
Sun, 17 Dec 2017 07:24:53 +0000 (07:24 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 18 Dec 2017 15:16:25 +0000 (12:16 -0300)
Test plan:
0) Go to item search
1) Do have some authorized values in CCODE category -> selector of
collection is visible
2) Don't have any authorized value in CCODE category -> selector of
collection is not visible

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt

index 5b9edbe..e052169 100644 (file)
           </fieldset>
           <fieldset>
             [% INCLUDE form_field_select name="itype" options = itemtypes empty_option = "All item types" %]
-            [% INCLUDE form_field_select name="ccode" options = ccodes empty_option = "All collection codes" %]
+            [% IF ccodes.size %]
+                [% INCLUDE form_field_select name="ccode" options = ccodes empty_option = "All collection codes" %]
+            [% END %]
             [% IF notforloans.size %]
                 [% INCLUDE form_field_select name="notforloan" options = notforloans empty_option = "All statuses" %]
             [% END %]