[Koha] koha item types dropdown instead of library dropdown

Kallinen Pasi Pasi.Kallinen at pttk.fi
Wed May 21 18:05:28 NZST 2014


Changing the huge grid of item type limits into a drop-down selection is a small change - and one of the first
changes I did to our system. For example:


diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt
index c982eb4..7f0afb0 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt
@@ -113,14 +113,11 @@
     [% FOREACH advsearchloo IN advancedsearchesloop %]
     <div id="advsearch-[% advsearchloo.advanced_search_type %]" class="advsearch">
     <h4>Limit to any of the following:</h4>
-    <table>
-        <tr>
-    [% FOREACH itemtypeloo IN advsearchloo.code_loop %]
-        <td><input type="checkbox" id="[% itemtypeloo.ccl FILTER remove(',') %]-[% itemtypeloo.number %]" name="limit" value="mc-[% itemtypeloo.ccl %]:[% itemtypeloo.code %]"/><label for="[% itemtypeloo.ccl FILTE
-        [% itemtypeloo.description %]</label></td>
-        [% IF ( loop.last ) %]</tr>[% ELSE %][% UNLESS ( loop.count % 5 ) %]</tr><tr>[% END %][% END %]
-    [% END %]
-    </table>
+      <select name="limit" size="10" multiple>
+        [% FOREACH itemtypeloo IN advsearchloo.code_loop %]
+        <option value="mc-[% itemtypeloo.ccl %]:[% itemtypeloo.code %]">[% itemtypeloo.description %]</option>
+        [% END %]
+      </select>
     </div>
     [% END %]
 <!-- /MC-TYPE LIMIT -->



--
Ystävällisin terveisin

Pasi Kallinen
ICT-asiantuntija

p. 0400-139747
pasi.kallinen at pttk.fi


Pohjois-Karjalan Tietotekniikkakeskus Oy - www.pttk.fi

________________________________________
From: Koha [koha-bounces at lists.katipo.co.nz] on behalf of schnydszch [eugenegf at yahoo.com]
Sent: Saturday, May 17, 2014 19:09
To: koha at lists.katipo.co.nz
Subject: Re: [Koha] koha item types dropdown instead of library dropdown

I forgot that the library pulldown for libraries can be hidden through global
system preference OpacAddMastheadLibraryPulldown. However, the project I'm
working with would like to add a dropdown for item types, will that be
possible? Thanks in advance and cheers!



--
View this message in context: http://koha.1045719.n5.nabble.com/koha-item-types-dropdown-instead-of-library-dropdown-tp5798062p5798247.html
Sent from the Koha-general mailing list archive at Nabble.com.
_______________________________________________
Koha mailing list  http://koha-community.org
Koha at lists.katipo.co.nz
http://lists.katipo.co.nz/mailman/listinfo/koha


More information about the Koha mailing list