adding PINES survey files
authorChris Sharp <csharp@georgialibraries.org>
Tue, 14 Apr 2015 18:20:27 +0000 (14:20 -0400)
committerChris Sharp <csharp@georgialibraries.org>
Tue, 14 Apr 2015 18:20:27 +0000 (14:20 -0400)
pines-survey/searchbar.tt2 [new file with mode: 0644]
pines-survey/survey-down.sh [new file with mode: 0755]
pines-survey/survey-up.sh [new file with mode: 0755]

diff --git a/pines-survey/searchbar.tt2 b/pines-survey/searchbar.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>
diff --git a/pines-survey/survey-down.sh b/pines-survey/survey-down.sh
new file mode 100755 (executable)
index 0000000..f0fe1c3
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+EG_DIR=/openils/var/templates/opac/parts
+FILE=$EG_DIR/searchbar.tt2
+ORIG=$EG_DIR/searchbar.tt2.orig
+SURVEY=$EG_DIR/searchbar_survey.tt2
+
+cp $ORIG $FILE
diff --git a/pines-survey/survey-up.sh b/pines-survey/survey-up.sh
new file mode 100755 (executable)
index 0000000..980b4c1
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+EG_DIR=/openils/var/templates/opac/parts
+FILE=$EG_DIR/searchbar.tt2
+ORIG=$EG_DIR/searchbar.tt2.orig
+SURVEY=$EG_DIR/searchbar_survey.tt2
+
+cp $FILE $ORIG
+cp $SURVEY $FILE