Renaming survey template file for clarity.
authorChris Sharp <csharp@georgialibraries.org>
Wed, 6 Apr 2016 17:35:39 +0000 (13:35 -0400)
committerChris Sharp <csharp@georgialibraries.org>
Wed, 6 Apr 2016 17:35:39 +0000 (13:35 -0400)
pines-survey/searchbar.tt2 [deleted file]
pines-survey/searchbar_survey.tt2 [new file with mode: 0644]

diff --git a/pines-survey/searchbar.tt2 b/pines-survey/searchbar.tt2
deleted file mode 100644 (file)
index 9c4096c..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-<h3 class="sr-only">[% l('Catalog Search') %]</h3>
-[% PROCESS "opac/parts/org_selector.tt2" %]
-<div id="search-wrapper">
-    [% UNLESS took_care_of_form -%]
-    <form action="[% ctx.opac_root %]/results" method="get">
-    [%- END %]
-    <div id="search-box">
-        <span class="search_catalog_lbl mobile_hide">[% l('Basic Search') %]</span>
-        <span class="adv_search_catalog_lbl"><a href="[% mkurl(ctx.opac_root _ '/advanced', {},  expert_search_parms.merge(browse_search_parms, facet_search_parms)) %]"
-            id="home_adv_search_link">[% l('Advanced Search') %]</a></span>
-        <span class="browse_the_catalog_lbl"><a href="[% mkurl(ctx.opac_root _ '/browse', {}, expert_search_parms.merge(general_search_parms, facet_search_parms, ['fi:has_browse_entry'])) %]">[% l('Browse the Catalog') %]</a></span>
-        <a href="https://www.surveymonkey.com/s/pines2015" id="surveylink">[% l('Click Here to Take the PINES Annual Survey') %]</a>
-    </div>
-    <div class="searchbar">
-        <span class='search_box_wrapper'>
-            [%- # autosuggest breaks accessibility, as the aria-label
-                # attribute is removed when the Dijit is created. :(  %]
-            <label id="search_box_label" for="search_box">[% l('Search for: ') %]
-            <input type="text" id="search_box" name="query" style="width:90%;max-width:600px;height:20px;padding:3px;" aria-label="[%
-                    l('Enter search query:');
-                %]" value="[% is_advanced ? ctx.naive_query_scrub(ctx.processed_search_query) : CGI.param('query') | html %]"
-                [%- IF use_autosuggest.enabled == "t" %]
-                dojoType="openils.widget.AutoSuggest" type_selector="'qtype'"
-                submitter="this.textbox.form.submit();"
-                [%-     IF use_autosuggest.value.search('opac_visible') %]
-                store_args='{"org_unit_getter": function() { return [% ctx.search_ou %]; }}'
-                [%-     END # opac_visible -%]
-                [%- ELSE -%]
-                    [% IF basic_search != "f" %] autofocus [% END %] x-webkit-speech
-                [%- END # autosuggest enabled %] />
-            </label>
-        </span>
-               <br/>
-        <label id="search_qtype_label" for="qtype">
-        [%- 
-            l('Search by:&nbsp;');
-            INCLUDE "opac/parts/qtype_selector.tt2" id="qtype";
-        -%]
-        </label> &nbsp; &nbsp; 
-        <label id="search_itype_label" for="search_itype_selector">
-        [%-
-            l('Limit to: ');
-            IF search.basic_config.type == 'attr';
-                INCLUDE "opac/parts/coded_value_selector.tt2"
-                    attr=search.basic_config.group none_ok=1 
-                    id='search_itype_selector'
-                    none_label=search.basic_config.none_label;
-            ELSIF search.basic_config.type == 'filter';
-                INCLUDE "opac/parts/filter_group_selector.tt2"
-                    filter_group=search.basic_config.group none_ok=1 
-                    id='search_itype_selector'
-                    none_label=search.basic_config.none_label;
-            END;
-        -%]
-        </label> &nbsp; &nbsp;
-        <label id="search_locg_label" for="search_org_selector">
-        [%- 
-            l('Search within: ');
-            select_lib_label = l("Select search library");
-            INCLUDE build_org_selector arialabel=select_lib_label 
-              id='search_org_selector' show_loc_groups=1
-        -%]
-        </label>
-    <span>
-        <input id='search-submit-go' type="submit" value="[% l('Search') %]" class="opac-button"
-            onclick='setTimeout(function(){$("search-submit-spinner").className=""; $("search-submit-go").className="hidden"}, 2000)'/>
-        <img id='search-submit-spinner' src='/opac/images/progressbar_green.gif' style='height:16px;width:16px;' class='hidden' alt='[% l("Search In Progress") %]'/>
-    </span>
-    </div>
-    [% IF ctx.bookbag %]
-    <div id="search-only-bookbag-container">
-        <input type="checkbox" id="search-only-bookbag" name="bookbag"
-            value="[% ctx.bookbag.id | html %]" checked="checked" />
-        <label for="search-only-bookbag">
-            [% l('Search only within the chosen list') %]
-        </label>
-    </div>
-    [% END %]
-    [% IF is_advanced || is_special %]
-    <div>
-        <input type="hidden" name="_adv" value="1" />
-        [% IF ctx.processed_search_query OR (NOT is_advanced AND NOT is_special) %]
-        <input name='page' type='hidden' value="0" />
-        [% END %]
-        [% IF is_special %]
-            <input type="hidden" name="_special" value="1" /> [%
-            number_of_expert_rows = CGI.param('tag').list.size;
-            index = 0;
-            WHILE index < number_of_expert_rows %]
-                <input type="hidden" name="tag" value="[% CGI.param('tag').list.$index %]" />
-                <input type="hidden" name="subfield" value="[% CGI.param('subfield').list.$index %]" />
-                <input type="hidden" name="term" value="[% CGI.param('term').list.$index %]" />
-                [% index = index + 1; %]
-            [% END %]
-        [% END %]
-    </div>
-    [%- END %]
-    [% UNLESS took_care_of_form %]</form>[% END %]
-    [% IF (is_advanced AND NOT is_special) AND CGI.param('qtype') %]
-    <div class="opac-auto-102">
-        [ <a href="[% mkurl(ctx.opac_root _ '/advanced') %]">[%
-            l('Refine My Original Search')
-        %]</a> ]
-    </div>
-    [% END %]
-    <!--
-    <div id="breadcrumb">
-        <a href="[% ctx.opac_root %]/home">[% l('Catalog Home') %]</a> &gt;
-    </div>
-    -->
-    <div class="clear-both"></div>
-</div>
diff --git a/pines-survey/searchbar_survey.tt2 b/pines-survey/searchbar_survey.tt2
new file mode 100644 (file)
index 0000000..9c4096c
--- /dev/null
@@ -0,0 +1,112 @@
+<h3 class="sr-only">[% l('Catalog Search') %]</h3>
+[% PROCESS "opac/parts/org_selector.tt2" %]
+<div id="search-wrapper">
+    [% UNLESS took_care_of_form -%]
+    <form action="[% ctx.opac_root %]/results" method="get">
+    [%- END %]
+    <div id="search-box">
+        <span class="search_catalog_lbl mobile_hide">[% l('Basic Search') %]</span>
+        <span class="adv_search_catalog_lbl"><a href="[% mkurl(ctx.opac_root _ '/advanced', {},  expert_search_parms.merge(browse_search_parms, facet_search_parms)) %]"
+            id="home_adv_search_link">[% l('Advanced Search') %]</a></span>
+        <span class="browse_the_catalog_lbl"><a href="[% mkurl(ctx.opac_root _ '/browse', {}, expert_search_parms.merge(general_search_parms, facet_search_parms, ['fi:has_browse_entry'])) %]">[% l('Browse the Catalog') %]</a></span>
+        <a href="https://www.surveymonkey.com/s/pines2015" id="surveylink">[% l('Click Here to Take the PINES Annual Survey') %]</a>
+    </div>
+    <div class="searchbar">
+        <span class='search_box_wrapper'>
+            [%- # autosuggest breaks accessibility, as the aria-label
+                # attribute is removed when the Dijit is created. :(  %]
+            <label id="search_box_label" for="search_box">[% l('Search for: ') %]
+            <input type="text" id="search_box" name="query" style="width:90%;max-width:600px;height:20px;padding:3px;" aria-label="[%
+                    l('Enter search query:');
+                %]" value="[% is_advanced ? ctx.naive_query_scrub(ctx.processed_search_query) : CGI.param('query') | html %]"
+                [%- IF use_autosuggest.enabled == "t" %]
+                dojoType="openils.widget.AutoSuggest" type_selector="'qtype'"
+                submitter="this.textbox.form.submit();"
+                [%-     IF use_autosuggest.value.search('opac_visible') %]
+                store_args='{"org_unit_getter": function() { return [% ctx.search_ou %]; }}'
+                [%-     END # opac_visible -%]
+                [%- ELSE -%]
+                    [% IF basic_search != "f" %] autofocus [% END %] x-webkit-speech
+                [%- END # autosuggest enabled %] />
+            </label>
+        </span>
+               <br/>
+        <label id="search_qtype_label" for="qtype">
+        [%- 
+            l('Search by:&nbsp;');
+            INCLUDE "opac/parts/qtype_selector.tt2" id="qtype";
+        -%]
+        </label> &nbsp; &nbsp; 
+        <label id="search_itype_label" for="search_itype_selector">
+        [%-
+            l('Limit to: ');
+            IF search.basic_config.type == 'attr';
+                INCLUDE "opac/parts/coded_value_selector.tt2"
+                    attr=search.basic_config.group none_ok=1 
+                    id='search_itype_selector'
+                    none_label=search.basic_config.none_label;
+            ELSIF search.basic_config.type == 'filter';
+                INCLUDE "opac/parts/filter_group_selector.tt2"
+                    filter_group=search.basic_config.group none_ok=1 
+                    id='search_itype_selector'
+                    none_label=search.basic_config.none_label;
+            END;
+        -%]
+        </label> &nbsp; &nbsp;
+        <label id="search_locg_label" for="search_org_selector">
+        [%- 
+            l('Search within: ');
+            select_lib_label = l("Select search library");
+            INCLUDE build_org_selector arialabel=select_lib_label 
+              id='search_org_selector' show_loc_groups=1
+        -%]
+        </label>
+    <span>
+        <input id='search-submit-go' type="submit" value="[% l('Search') %]" class="opac-button"
+            onclick='setTimeout(function(){$("search-submit-spinner").className=""; $("search-submit-go").className="hidden"}, 2000)'/>
+        <img id='search-submit-spinner' src='/opac/images/progressbar_green.gif' style='height:16px;width:16px;' class='hidden' alt='[% l("Search In Progress") %]'/>
+    </span>
+    </div>
+    [% IF ctx.bookbag %]
+    <div id="search-only-bookbag-container">
+        <input type="checkbox" id="search-only-bookbag" name="bookbag"
+            value="[% ctx.bookbag.id | html %]" checked="checked" />
+        <label for="search-only-bookbag">
+            [% l('Search only within the chosen list') %]
+        </label>
+    </div>
+    [% END %]
+    [% IF is_advanced || is_special %]
+    <div>
+        <input type="hidden" name="_adv" value="1" />
+        [% IF ctx.processed_search_query OR (NOT is_advanced AND NOT is_special) %]
+        <input name='page' type='hidden' value="0" />
+        [% END %]
+        [% IF is_special %]
+            <input type="hidden" name="_special" value="1" /> [%
+            number_of_expert_rows = CGI.param('tag').list.size;
+            index = 0;
+            WHILE index < number_of_expert_rows %]
+                <input type="hidden" name="tag" value="[% CGI.param('tag').list.$index %]" />
+                <input type="hidden" name="subfield" value="[% CGI.param('subfield').list.$index %]" />
+                <input type="hidden" name="term" value="[% CGI.param('term').list.$index %]" />
+                [% index = index + 1; %]
+            [% END %]
+        [% END %]
+    </div>
+    [%- END %]
+    [% UNLESS took_care_of_form %]</form>[% END %]
+    [% IF (is_advanced AND NOT is_special) AND CGI.param('qtype') %]
+    <div class="opac-auto-102">
+        [ <a href="[% mkurl(ctx.opac_root _ '/advanced') %]">[%
+            l('Refine My Original Search')
+        %]</a> ]
+    </div>
+    [% END %]
+    <!--
+    <div id="breadcrumb">
+        <a href="[% ctx.opac_root %]/home">[% l('Catalog Home') %]</a> &gt;
+    </div>
+    -->
+    <div class="clear-both"></div>
+</div>