From: Bill Erickson <berick@esilibrary.com> Date: Mon, 9 Apr 2012 19:45:49 +0000 (-0400) Subject: kpac : search link cgi improvements X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=b5ac5a6d54dfd0f010269f66526f27d7f31e27b5;p=evergreen%2Fmasslnc.git kpac : search link cgi improvements 1. avoid showing the search terms from canned searches in the simple search box. Patrons, kids especially, probably don't want to see potentially complicated canned search queries in the search box when the whole point is that they are accessible by clicking on images. 2. Avoid propagating the search qtype param to canned searches. Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com> --- diff --git a/Open-ILS/src/templates/kpac/parts/grid.tt2 b/Open-ILS/src/templates/kpac/parts/grid.tt2 index 2e1b459f6a..3d9722c469 100644 --- a/Open-ILS/src/templates/kpac/parts/grid.tt2 +++ b/Open-ILS/src/templates/kpac/parts/grid.tt2 @@ -27,7 +27,8 @@ MACRO render_kpac_grid(page_id) BLOCK; [% ELSIF cell.type == 'search'; %] - <td width="[% width %]%"><a href="[% mkurl(ctx.kpac_root _ '/results', {query => cell.content}, ['page']) %]"><img + <td width="[% width %]%"><a href="[% + mkurl(ctx.kpac_root _ '/results', {query => cell.content, nosprop => 1}, ['page', 'qtype']) %]"><img src="[% kpac_img_path(cell.img) %]" alt="" /><span>[% cell.name %]</span></a></td> [% ELSIF cell.type == 'link'; %] diff --git a/Open-ILS/src/templates/kpac/parts/searchbox.tt2 b/Open-ILS/src/templates/kpac/parts/searchbox.tt2 index 1d6e39e6ff..8f598d5bc5 100644 --- a/Open-ILS/src/templates/kpac/parts/searchbox.tt2 +++ b/Open-ILS/src/templates/kpac/parts/searchbox.tt2 @@ -1,7 +1,8 @@ <div class="sub_sidebar_header">[% l('New Search') %]</div> <form action="[% ctx.kpac_root _ '/results' %]"> <div class="sub_sidebar_search_wrapper"> - <input type="text" name='query' value="[% CGI.param('query') | html %]" + <input type="text" name='query' + value="[% CGI.param('nosprop') ? '' : CGI.param('query') | html %]" [% seed = l(' Enter Text... ') | html %] class="sub_sidebar_search_box" style="color:#aaa;" value="[% seed %]" onfocus="if(this.value=='[% seed %]'){this.value='';this.style.color='#424242';}"