Created attachment 33741 [details] [review] Create a link to the last advanced search in search result page (OPAC)
This patch add a link in the search result page to the last advanced search if the last search is a advanced search. If the last search is a simple search, no link is added. Sponsored-by: CCSR ( http://www.ccsr.qc.ca ) Testing: I - Open opac main page and execute a simple search validate no link II - Open opac advanced search page, chose some options and execute a search. validate a link - Click on the link validate the advanced search page and the options. III - Open opac advanced search page, chose some options and execute a search. validate a link - If it got some pages, click on next or a page, then click on the link validate the advanced search page and the options. IV - Open opac advanced search page, click the button "more options", chose some options (add a field to search - bouton [+]) and execute a search. validate a link - Click on the link validate the advanced search page and the options. V - Open opac advanced search page, chose some options and execute a search. validate a link - Execute a simple search validate no link.
This is a nice feature and it seems to be working well. I have some suggestions for ways to make the patch conform better to some existing practices: - <script> blocks should not be added to masthead.inc. In the bootstrap theme JavaScript is placed at the end of the document: opac-bottom.inc - jQuery plugins which are included by OPAC pages should be minified. I think it's helpful to add both the minified and non-minified versions even if we only link to the minified version. But that's not an agreed-upon rule. - The "Return to the last advanced search" link should be added to the DOM (or made visible) using JavaScript since the feature depends on JavaScript. Users without JS should not see the link. I'm curious why you use the jQuery.cookie plugin in some code but not in the changes you made to masthead.inc? Finally: This patch makes changes to .htaccess and it should not.
Created attachment 33801 [details] [review] Create a link to the last advanced search in search result page (OPAC)
Concerning some suggestions/error : - <script> blocks should not be added to masthead.inc. In the bootstrap theme JavaScript is placed at the end of the document: opac-bottom.inc Done - jQuery plugins which are included by OPAC pages should be minified. I think it's helpful to add both the minified and non-minified versions even if we only link to the minified version. But that's not an agreed-upon rule. Done. But I included just the minifieds. - The "Return to the last advanced search" link should be added to the DOM (or made visible) using JavaScript since the feature depends on JavaScript. Users without JS should not see the link. The link is controlled by a cookie, this cookie est created by js, so, without js, no link. I'm curious why you use the jQuery.cookie plugin in some code but not in the changes you made to masthead.inc? Both use jQuery.cookie now. Finally: This patch makes changes to .htaccess and it should not. Corrected.
After clicking "Return to the last advanced search" link, the top portion of the advanced search page, with all search boxes, disappears. Can't edit the original search terms! I will include a screen shot. Christopher
Created attachment 34050 [details] Search boxes disappear when returning to advanced search
Created attachment 34095 [details] [review] Fix Patch- Search boxes disappear when returning to advanced search
I like this feature. However I found the following: 1) Search e.g. for Author = Goethe and Title = Faust 2) The link back to the last advanced search appears as expected. 3) After clicking the link, I get the advanced search page with Keyword = Goethe and Keyword = Faust (instead of Author and Title) Marc PS: Applying patch did a 3-way-merge
Created attachment 34362 [details] [review] Fix jquery.deseriable.min.js
Created attachment 34363 [details] [review] Fix jquery.deseriable.min.js
Error comment 9 fixed
Created attachment 34374 [details] [review] [Signed-off] Create a link to the last advanced search in search result page (OPAC) http://bugs.koha-community.org/show_bug.cgi?id=13307 Followed test plan, works as expected (together with other patches) Signed-off-by: Marc Véron <veron@veron.ch>
Created attachment 34375 [details] [review] [Signed-off] Fix Patch- Search boxes disappear when returning to advanced search http://bugs.koha-community.org/show_bug.cgi?id=13307 Signed-off-by: Marc Véron <veron@veron.ch>
Created attachment 34376 [details] [review] [Signed-off] Fix jquery.deseriable.min.js http://bugs.koha-community.org/show_bug.cgi?id=13307 Signed-off-by: Marc Véron <veron@veron.ch>
Created attachment 34590 [details] [review] [PASSED QA] Create a link to the last advanced search in search result page (OPAC) http://bugs.koha-community.org/show_bug.cgi?id=13307 Followed test plan, works as expected (together with other patches) Signed-off-by: Marc Veron <veron@veron.ch> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> http://bugs.koha-community.org/show_bug.cgi?id=13364
Created attachment 34591 [details] [review] [PASSED QA] Fix Patch- Search boxes disappear when returning to advanced search http://bugs.koha-community.org/show_bug.cgi?id=13307 Signed-off-by: Marc Veron <veron@veron.ch> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> http://bugs.koha-community.org/show_bug.cgi?id=13364
Created attachment 34592 [details] [review] [PASSED QA] Fix jquery.deseriable.min.js http://bugs.koha-community.org/show_bug.cgi?id=13307 Signed-off-by: Marc Veron <veron@veron.ch> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> http://bugs.koha-community.org/show_bug.cgi?id=13364
Created attachment 34593 [details] [review] [PASSED QA] Bug 13307 [QA Followup] Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> http://bugs.koha-community.org/show_bug.cgi?id=13364
Enhancement pushed to master. Thanks Simith! Note: I ammended the commit messages. Please try to include bug number and better descriptions of what the patches are for.
Hm, it looks like a given-when structure slipped in with this. The feature is experimental and should not be used, I filed bug 14351.