Re: [Koha] koha item types dropdown instead of library dropdown
Hi all! I just can't seem to add item types in the drop down for Library Catalog, Title, Call Number, etc. but I was able to add them in the library masthead, which was actually the title of my query. After some readings on jquery, and deciding to put it instead in the library masthead, I was able to come up with the one below:$(#select_library option[value='']).hide();$(#select_library option[value='branch:TheOnlyBranch']).hide();$(#select_library option[value='branch:TheOnlyBranch']).after(Books);$(#select_library option[value='mc-itype,phr:BK']).attr(selected,selected); $(#select_library option[value='mc-itype,phr:BK']).after(Himig);$(#select_library option[value='mc-itype,phr:HIMIG']);When I search the catalog, I was able to search what I need. And please comment or correct on the jquery script provided, I'm still novice, and just read up the koha forum and other koha customization sites as well as the world wide web for Koha customizations. So that so if another Koha user needs a jquery script for such, they will find answers on what they need. And also if I could add it in Koha jquery Library wiki. Thanks and more power! Cheers! -- View this message in context: http://koha.1045719.n5.nabble.com/koha-item-types-dropdown-instead-of-library-dropdown-tp5798062p5799160.html Sent from the Koha-general mailing list archive at Nabble.com. ___ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha
Re: [Koha] koha item types dropdown instead of library dropdown
Hi! Still novice with jquery, but I'm trying it out, I'm at my wit's end reading on jquery. I have came up with this: $(select#masthead_search).append(option value=\mc-itype\Item type-books/option); $(input[name='q']).val('BK'); What this one do, is the text 'BK' is in the search box, But still got Item type - Books in the dropdown menu. Now, how do I hide 'BK'? And to actually select Item type books, put the any title in the search box, and be able to search books with the title in the search box. Thanks and cheers! -- View this message in context: http://koha.1045719.n5.nabble.com/koha-item-types-dropdown-instead-of-library-dropdown-tp5798062p5799151.html Sent from the Koha-general mailing list archive at Nabble.com. ___ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha
Re: [Koha] koha item types dropdown instead of library dropdown
You have to add those lines using Javascript (JQuery) into systempreference opacuserjs. Le 21/05/2014 17:22, schnydszch a écrit : Hi! Where can I edit this lines? THanks! On Wednesday, May 21, 2014 8:11 AM, Fridolin SOMERS [via Koha] ml-node+s1045719n5798837...@n5.nabble.com wrote: Hie, You can add, next to input[name='q'], a dropdown list with the values/descriptions of your item types : select name=limit option value=All/option option value=mc-itemtype,phr:BOOKBook/option option value=mc-itemtype,phr:DVDDVD/option ... /select Best regards, Le 17/05/2014 18:09, schnydszch a écrit : 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 [hidden email] http://lists.katipo.co.nz/mailman/listinfo/koha -- Fridolin SOMERS Biblibre - Pôles support et système fridolin.som...@biblibre.com ___ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha
Re: [Koha] koha item types dropdown instead of library dropdown
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 h4Limit to any of the following:/h4 -table -tr -[% FOREACH itemtypeloo IN advsearchloo.code_loop %] -tdinput 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 ) %]/trtr[% 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.kalli...@pttk.fi Pohjois-Karjalan Tietotekniikkakeskus Oy - www.pttk.fi From: Koha [koha-boun...@lists.katipo.co.nz] on behalf of schnydszch [eugen...@yahoo.com] Sent: Saturday, May 17, 2014 19:09 To: koha@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@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha ___ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha
Re: [Koha] koha item types dropdown instead of library dropdown
It would be quite possible. The following code that Fridolin Somers posted on march 19 could serve as an inspiration. $(document).ready(function() { $(select#masthead_search).append(option value=\yr\Publication year/option); }) What it does is that you paste it into the system preference ”opacuserjs” and it adds a field ”Publication year” to the drop down menu. Koha doesn’t care that this field was custom made as long as it adheres to standard querys that could just as well have come from advanced search. What you need to do is to compile a list of all the codes for the item types you have (look in admin or get it from the html of advanced search that has the item types). Then create a little jquery snippet that inserts a drop down with these options at the appropriate place. You could probably have someone help you with that last part as long as you have a list of the values that should go into the drop down. Kind regards/Viktor Viktor Sarge Utvecklingsledare Regionbibliotek Halland Regionkontoret TFN: 035-17 98 73 MOBIL: E-POST: viktor.sa...@regionhalland.semailto:viktor.sa...@regionhalland.se BESÖKSADRESS: Södra vägen 9, 30180 Halmstad www.regionhalland.sehttp://www.regionhalland.se/ 17 maj 2014 kl. 18:09 skrev schnydszch eugen...@yahoo.commailto:eugen...@yahoo.com: 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.comhttp://Nabble.com. ___ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nzmailto:Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha ___ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha
Re: [Koha] koha item types dropdown instead of library dropdown
Hie, You can add, next to input[name='q'], a dropdown list with the values/descriptions of your item types : select name=limit option value=All/option option value=mc-itemtype,phr:BOOKBook/option option value=mc-itemtype,phr:DVDDVD/option ... /select Best regards, Le 17/05/2014 18:09, schnydszch a écrit : 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@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha -- Fridolin SOMERS Biblibre - Pôles support et système fridolin.som...@biblibre.com ___ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha
Re: [Koha] koha item types dropdown instead of library dropdown
Thanks Viktor! I'll try this. Cheers! On Wednesday, May 21, 2014 3:52 AM, viktor.sa...@regionhalland.se viktor.sa...@regionhalland.se wrote: It would be quite possible. The following code that Fridolin Somers posted on march 19 could serve as an inspiration. $(document).ready(function() { $(select#masthead_search).append(option value=\yr\Publication year/option); }) What it does is that you paste it into the system preference ”opacuserjs” and it adds a field ”Publication year” to the drop down menu. Koha doesn’t care that this field was custom made as long as it adheres to standard querys that could just as well have come from advanced search. What you need to do is to compile a list of all the codes for the item types you have (look in admin or get it from the html of advanced search that has the item types). Then create a little jquery snippet that inserts a drop down with these options at the appropriate place. You could probably have someone help you with that last part as long as you have a list of the values that should go into the drop down. Kind regards/Viktor Viktor Sarge Utvecklingsledare Regionbibliotek Halland Regionkontoret TFN: 035-17 98 73 MOBIL: E-POST: viktor.sa...@regionhalland.se BESÖKSADRESS: Södra vägen 9, 30180 Halmstad www.regionhalland.se 17 maj 2014 kl. 18:09 skrev schnydszch eugen...@yahoo.com: 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@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha ___ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha
Re: [Koha] koha item types dropdown instead of library dropdown
Hi! Where can I edit this lines? THanks! On Wednesday, May 21, 2014 8:11 AM, Fridolin SOMERS [via Koha] ml-node+s1045719n5798837...@n5.nabble.com wrote: Hie, You can add, next to input[name='q'], a dropdown list with the values/descriptions of your item types : select name=limit option value=All/option option value=mc-itemtype,phr:BOOKBook/option option value=mc-itemtype,phr:DVDDVD/option ... /select Best regards, Le 17/05/2014 18:09, schnydszch a écrit : 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 [hidden email] http://lists.katipo.co.nz/mailman/listinfo/koha -- Fridolin SOMERS Biblibre - Pôles support et système [hidden email] ___ Koha mailing list http://koha-community.org [hidden email] http://lists.katipo.co.nz/mailman/listinfo/koha If you reply to this email, your message will be added to the discussion below:http://koha.1045719.n5.nabble.com/koha-item-types-dropdown-instead-of-library-dropdown-tp5798062p5798837.html To unsubscribe from koha item types dropdown instead of library dropdown, click here. NAML -- View this message in context: http://koha.1045719.n5.nabble.com/koha-item-types-dropdown-instead-of-library-dropdown-tp5798062p5798845.html Sent from the Koha-general mailing list archive at Nabble.com. ___ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha
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@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha