[Bug 12296] New: OPAC search box should be customisable
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12296 Bug ID: 12296 Summary: OPAC search box should be customisable Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: robin@catalyst.net.nz QA Contact: testopia@bugs.koha-community.org It should be possible to swap out the search box with custom HTML if that's a thing you need to do, e.g. to integrate other search options. Ideally this'd be able to happen without a template change, just by putting HTML into a system preference. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12296 Robin Sheat <robin@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|oleonard@myacpl.org |robin@catalyst.net.nz -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12296 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I think it would be nice :) 2 problems that I think need to be taken care of would be translations and selecting the right index after a search was performed - we keem the search term in the search box and the pull down should also be the one you selected before. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12296 --- Comment #2 from Robin Sheat <robin@catalyst.net.nz> --- These would be problems, however they're not easy to solve. If they affect your use case, then you'll need to improve on this method :) (once I get my patch together to be submitted.) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12296 Robin Sheat <robin@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12296 --- Comment #3 from Robin Sheat <robin@catalyst.net.nz> --- Created attachment 28416 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=28416&action=edit Bug 12296 - make search box customisable with OpacCustomSearch This allows the search box to be replaced by some custom HTML, useful when you're needing to integrate with some other search system, and don't want to maintain a template change across upgrades. Test plan: * Install patch * Look at the OPAC, see that nothing has changed. * Change the OpacCustomSearch syspref to something like <h1>Zuul</h1> * Look at the OPAC again, you can no longer search, there is only Zuul. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12296 Eugene Espinoza <eugenegf@yahoo.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |eugenegf@yahoo.com --- Comment #4 from Eugene Espinoza <eugenegf@yahoo.com> --- Hi! This seems related to my post: http://koha.1045719.n5.nabble.com/koha-item-types-dropdown-instead-of-librar... If it is, then I would be glad for this. :) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12296 --- Comment #5 from Robin Sheat <robin@catalyst.net.nz> --- (In reply to Eugene Espinoza from comment #4)
Hi! This seems related to my post: http://koha.1045719.n5.nabble.com/koha-item-types-dropdown-instead-of- library-dropdown-td5798062.html If it is, then I would be glad for this. :)
While it could, it probably wouldn't be the best way. It seems that some jQuery is more likely to be problem-free. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12296 Magnus Enger <magnus@enger.priv.no> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=10968 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12296 Magnus Enger <magnus@enger.priv.no> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |magnus@enger.priv.no --- Comment #6 from Magnus Enger <magnus@enger.priv.no> --- (In reply to Katrin Fischer from comment #1)
translations
I did some testing on that a while back, can't remember where I commented on it. But if we do a TT-eval on the contents of the syspref: [% OpacCustomSearch | eval %] we can have TT code and logic based on languages in the contents of the syspref: [% IF ( lang == 'de' ) %] Der alte Zuul [% ELSE %] Ye olde Zuul [% END %] (I have not tested this again now so please regard this as pseudocode.) Arguments against: 1. We might not want to do eval on a syspref 2. People would need to know TT to edit the (logic of the) syspref. (If we didn't invent some easier syntax that could be translated to TT.) Just my NOK 0,02... -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12296 --- Comment #7 from Robin Sheat <robin@catalyst.net.nz> --- (In reply to Magnus Enger from comment #6)
1. We might not want to do eval on a syspref
I would be hugely wary about letting people do that. It's pretty much opening the system up to them, which is not good for hosted situations. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12296 Robin Sheat <robin@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #28416|0 |1 is obsolete| | --- Comment #8 from Robin Sheat <robin@catalyst.net.nz> --- Comment on attachment 28416 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=28416 Bug 12296 - make search box customisable with OpacCustomSearch Found some things I missed: making it show up on a few other pages that don't seem to use the masthead, and forgetting the bootstrap theme. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12296 --- Comment #9 from Robin Sheat <robin@catalyst.net.nz> --- Created attachment 28476 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=28476&action=edit Bug 12296 - make search box customisable with OpacCustomSearch This allows the search box to be replaced by some custom HTML, useful when you're needing to integrate with some other search system, and don't want to maintain a template change across upgrades. Test plan: * Install patch * Look at the OPAC, see that nothing has changed. * Change the OpacCustomSearch syspref to something like <h1>Zuul</h1> * Look at the OPAC again, you can no longer search, there is only Zuul. Note: * should work on both prog and bootstrap -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12296 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |veron@veron.ch --- Comment #10 from Marc Véron <veron@veron.ch> --- Does not apply: Applying: Bug 12296 - make search box customisable with OpacCustomSearch Using index info to reconstruct a base tree... Falling back to patching base and 3-way merge... Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref Auto-merging installer/data/mysql/updatedatabase.pl CONFLICT (content): Merge conflict in installer/data/mysql/updatedatabase.pl Auto-merging installer/data/mysql/sysprefs.sql Failed to merge in the changes. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12296 Koha Team Lyon 3 <koha@univ-lyon3.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply CC| |koha@univ-lyon3.fr -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12296 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12296 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #28476|0 |1 is obsolete| | --- Comment #11 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 28928 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=28928&action=edit Bug 12296 - make search box customisable with OpacCustomSearch This allows the search box to be replaced by some custom HTML, useful when you're needing to integrate with some other search system, and don't want to maintain a template change across upgrades. Test plan: * Install patch * Look at the OPAC, see that nothing has changed. * Change the OpacCustomSearch syspref to something like <h1>Zuul</h1> * Look at the OPAC again, you can no longer search, there is only Zuul. Note: * should work on both prog and bootstrap -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12296 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12296 --- Comment #12 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 28942 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=28942&action=edit [SIGNED-OFF] Bug 12296 - make search box customisable with OpacCustomSearch This allows the search box to be replaced by some custom HTML, useful when you're needing to integrate with some other search system, and don't want to maintain a template change across upgrades. Test plan: * Install patch * Look at the OPAC, see that nothing has changed. * Change the OpacCustomSearch syspref to something like <h1>Zuul</h1> * Look at the OPAC again, you can no longer search, there is only Zuul. Note: * should work on both prog and bootstrap Signed-off-by: Owen Leonard <oleonard@myacpl.org> Works as advertised. Seems like it would be really easy to screw up your OPAC with this feature, but since we already offer other easy ways to screw up your OPAC I guess this fits in. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12296 --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Owen, please remember to obsolete the original patch :) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12296 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #28928|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12296 --- Comment #14 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- There are some small things with this patch: - It includes lots of whitespace changes that would be better in a separate patch. - It puts the new pref at the end of the alphabetized syspref file in its own SQL statement. - It includes changes to the prog theme. I think it would also be nice to include some kind of example code somewhere to give people an idea about how to use the pref and the limitations it has, but that's not a blocker. Robin, could you please provide a patch with nicer syspref.sql and without prog? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12296 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12296 --- Comment #15 from Owen Leonard <oleonard@myacpl.org> --- (In reply to Katrin Fischer from comment #13)
Hi Owen, please remember to obsolete the original patch :)
Sorry, git-bz has made me lazy by usually doing this for me. Now when it doesn't I'm in trouble. (In reply to Katrin Fischer from comment #14)
- It includes lots of whitespace changes that would be better in a separate patch.
After doing by best to create the Bootstrap templates with consistent indentation I appreciate that this patch continues it. I think that with options in git for ignoring whitespace during diff and blame it's time to let whitespace changes happen more freely. Maybe that's a discussion for a dev meeting instead of on this bug. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12296 --- Comment #16 from Robin Sheat <robin@catalyst.net.nz> --- (In reply to Katrin Fischer from comment #14)
There are some small things with this patch: - It includes lots of whitespace changes that would be better in a separate patch.
All it is is ensuring that the indentation remains consistent. Adding -w to the git commands (e.g. diff and show) will cause the things that are only whitespace changes to be hidden.
- It puts the new pref at the end of the alphabetized syspref file in its own SQL statement. - It includes changes to the prog theme.
These I'll sort. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12296 Robin Sheat <robin@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12296 Robin Sheat <robin@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #28942|0 |1 is obsolete| | --- Comment #17 from Robin Sheat <robin@catalyst.net.nz> --- Created attachment 29203 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29203&action=edit Bug 12296 - make search box customisable with OpacCustomSearch This allows the search box to be replaced by some custom HTML, useful when you're needing to integrate with some other search system, and don't want to maintain a template change across upgrades. Test plan: * Install patch * Look at the OPAC, see that nothing has changed. * Change the OpacCustomSearch syspref to something like <h1>Zuul</h1> * Look at the OPAC again, you can no longer search, there is only Zuul. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Works as advertised. Seems like it would be really easy to screw up your OPAC with this feature, but since we already offer other easy ways to screw up your OPAC I guess this fits in. New patch changes: removed the bootstrap code, changed the entry in syspref.sql -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12296 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12296 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #29203|0 |1 is obsolete| | --- Comment #18 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 29341 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29341&action=edit [PASSED QA] Bug 12296 - make search box customisable with OpacCustomSearch This allows the search box to be replaced by some custom HTML, useful when you're needing to integrate with some other search system, and don't want to maintain a template change across upgrades. Test plan: * Install patch * Look at the OPAC, see that nothing has changed. * Change the OpacCustomSearch syspref to something like <h1>Zuul</h1> * Look at the OPAC again, you can no longer search, there is only Zuul. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Works as advertised. Seems like it would be really easy to screw up your OPAC with this feature, but since we already offer other easy ways to screw up your OPAC I guess this fits in. New patch changes: removed the bootstrap code, changed the entry in syspref.sql Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Works as described, passes QA script and tests. The feature has some limitations, described on the bug. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12296 --- Comment #19 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 32520 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=32520&action=edit Bug 12296: (QA followup) remove rebasing leftover Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12296 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |tomascohen@gmail.com --- Comment #20 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patch pushed to master. Thanks Robin! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org