PINES Survey Link - TPAC Edition
authorChris Sharp <csharp@georgialibraries.org>
Sat, 4 May 2013 14:33:34 +0000 (10:33 -0400)
committerChris Sharp <csharp@georgialibraries.org>
Sat, 9 Dec 2017 19:33:32 +0000 (14:33 -0500)
PINES does an online survey that runs for a week every Spring. These
changes create a red link to the survey above the search bar on the
OPAC home page.

Open-ILS/src/templates/opac/css/style.css.tt2
Open-ILS/src/templates/opac/parts/searchbar_survey.tt2 [new file with mode: 0644]

index 1ac02cb..ae7ccef 100644 (file)
@@ -33,6 +33,11 @@ img {
     width: 50%;
 }
 
+#surveylink {
+    padding:1em;
+    color:red;
+}
+
 a {
     color: [% css_colors.primary %];
 }
diff --git a/Open-ILS/src/templates/opac/parts/searchbar_survey.tt2 b/Open-ILS/src/templates/opac/parts/searchbar_survey.tt2
new file mode 100644 (file)
index 0000000..e77508e
--- /dev/null
@@ -0,0 +1,77 @@
+[% PROCESS "opac/parts/org_selector.tt2" %]
+<div id="search-box">    
+    [% UNLESS took_care_of_form -%]
+    <form action="[% ctx.opac_root %]/results" method="GET">
+    [%- END %]
+    <div>
+        <span class="search_catalog_lbl">[% l('Search the Catalog') %]</span>
+        <a href="[% mkurl(ctx.opac_root _ '/advanced') %]"
+            id="home_adv_search_link"><span
+            class="adv_search_font">[% l('Advanced Search') %]</span></a>
+       <a href="http://www.example.com/PINESSurvey"
+            id="surveylink">[% l('Click Here to Take the PINES Annual Survey') %]</a>
+    </div>
+    <div class="searchbar">[%- l('Search ');
+        IF search.basic_config.type == 'attr';
+            INCLUDE "opac/parts/coded_value_selector.tt2"
+                attr=search.basic_config.group none_ok=1 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 none_label=search.basic_config.none_label;
+        END;
+            l(' for ');
+        %]
+        <span class='search_box_wrapper'>
+            <input type="text" id="search_box" name="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 %] />
+        </span>
+        [%- INCLUDE "opac/parts/qtype_selector.tt2" id="qtype";
+            l(' in '); INCLUDE build_org_selector show_loc_groups=1
+    %]
+    <span>
+        <input id='search-submit-go' type="submit" value="[% l('Search') %]" alt="[% 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=''/>
+    </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 %]
+    </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('Click to Refine Your 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>