Modifications to quick search functions and stylesheet.
authorTerran McCanna <tmccanna@georgialibraries.org>
Thu, 17 Oct 2013 20:51:38 +0000 (16:51 -0400)
committerTerran McCanna <tmccanna@georgialibraries.org>
Thu, 17 Oct 2013 20:51:38 +0000 (16:51 -0400)
Open-ILS/examples/kpac.xml
Open-ILS/src/templates/kpac/parts/grid.tt2
Open-ILS/src/templates/kpac/parts/org_selector.tt2
Open-ILS/web/css/skin/default/kpac/style.css

index 8135ab8..ff2c3c4 100644 (file)
@@ -9,21 +9,36 @@
 
  
     <pages>
+        <!-- Use one of the following formats for cell names and contents:
+             For keyword:         keyword:dog
+             For multiple words:  keyword:dog beagle
+             For phrase:          keyword:"fourth of july"
+             For boolean:         (keyword:dog || keyword:puppy)
+             For 'link':          http://www.evergreen.org
+        -->
+
         <!-- top-level layout pages -->
+
         <page id="1" columns="4" name="Home" img="/images/home.jpg">
-            <!-- <cell name="Martin Luther King, Jr. Day" img="cat-mlk.png" type="maintopic">kw:King Martin Luther</cell>
-            <cell name="Valentine's Day" img="cat-valentines.png" type="maintopic">kw:Valentine's Day</cell>
-            <cell name="St. Patrick's Day" img="cat-stpatricks.png" type="maintopic">kw:St. Patrick's Day</cell>
-            <cell name="Easter" img="cat-easter.png" type="maintopic">kw:easter</cell>
-            <cell name="4th of July" img="cat-independence.png" type="maintopic">kw:independence day || kw:fourth of july</cell>
-            <cell name="Back to School" img="cat-school.png" type="maintopic">kw:back to school || kw:goes to school</cell> -->
-            <cell name="Halloween" img="cat-halloween.png" type="maintopic">kw:halloween</cell> 
-            <!-- <cell name="Thanksgiving" img="cat-thanksgiving.png" type="maintopic">kw:thanksgiving</cell>
-            <cell name="Christmas" img="cat-christmas.png" type="maintopic">kw:christmas</cell>
-            <cell name="Hannukah" img="cat-hannukah.png" type="maintopic">kw:hannukah</cell>
-            <cell name="Kwanzaa" img="cat-kwanzaa.png" type="maintopic">kw:kwanzaa</cell> -->
-            <cell name="Dinosaurs" img="cat-dinosaur.png" type="maintopic">kw:dinosaur</cell>
-            <cell name="Princesses" img="cat-princess.png" type="maintopic">kw:princess</cell>
+        <!-- Use type="topic" for top-level categories, type="maintopic" for searches, or type="link" for page links -->
+
+            <!-- 
+            <cell name="Martin Luther King, Jr. Day" img="cat-mlk.png" type="maintopic">keyword:king martin luther</cell>
+            <cell name="Valentine's Day" img="cat-valentines.png" type="maintopic">keyword:valentine's day</cell>
+            <cell name="St. Patrick's Day" img="cat-stpatricks.png" type="maintopic">keyword:st. patrick's day</cell>
+            <cell name="Easter" img="cat-easter.png" type="maintopic">keyword:easter</cell>
+            <cell name="4th of July" img="cat-independence.png" type="maintopic">(keyword:independence day || keyword:fourth of july)</cell>
+            <cell name="Back to School" img="cat-school.png" type="maintopic">(keyword:back to school || keyword:goes to school)</cell>
+            -->
+            <cell name="Halloween" img="cat-halloween.png" type="maintopic">keyword:halloween</cell> 
+            <!--  
+            <cell name="Thanksgiving" img="cat-thanksgiving.png" type="maintopic">keyword:thanksgiving</cell>
+            <cell name="Christmas" img="cat-christmas.png" type="maintopic">keyword:christmas</cell>
+            <cell name="Hannukah" img="cat-hannukah.png" type="maintopic">keyword:hannukah</cell>
+            <cell name="Kwanzaa" img="cat-kwanzaa.png" type="maintopic">keyword:kwanzaa</cell>
+            -->
+            <cell name="Dinosaurs" img="cat-dinosaur.png" type="maintopic">keyword:dinosaur</cell>
+            <cell name="Princesses" img="cat-princess.png" type="maintopic">keyword:princess</cell>
             <cell type="topic">10</cell>
             <cell type="topic">12</cell>
             <cell type="topic">11</cell>
 
 
         <!-- topic pages -->
+        <!-- use type="simplesearch" for searches, type="link" for web page links -->
 
         <page id="10" columns="2" name="Transportation" img="cat-truck.png" >
-            <cell name="Cars &amp; Trucks" img="cat-car.png" type="search">kw:car || kw:truck || kw:automobile</cell>
-            <cell name="Planes" img="cat-plane.png" type="search">kw:airplane</cell>
-            <cell name="Trains" img="cat-train.png" type="search">kw:train</cell>
-            <cell name="Tractors &amp; Construction" img="cat-tractor.png" type="search">kw:tractor || kw:construction</cell>
-            <cell name="Boats" img="cat-boat.png" type="search">kw:boat || kw:ship</cell>
-            <cell name="Military" img="cat-military.png" type="search">kw:tank || kw:submarine || kw:aircraft carrier</cell>
+            <cell name="Cars &amp; Trucks" img="cat-car.png" type="simplesearch">(keyword:car || keyword:truck || keyword: automobile)</cell>
+            <cell name="Planes" img="cat-plane.png" type="simplesearch">keyword:airplane</cell>
+            <cell name="Trains" img="cat-train.png" type="simplesearch">(keyword:train || keyword:locomotive)</cell>
+            <cell name="Tractors &amp; Construction" img="cat-tractor.png" type="simplesearch">(keyword:tractor || keyword:construction)</cell>
+            <cell name="Boats" img="cat-boat.png" type="simplesearch">(keyword:boat || keyword:ship)</cell>
+            <cell name="Military" img="cat-military.png" type="simplesearch">(keyword:tank || keyword:submarine || keyword:aircraft carrier)</cell>
         </page> 
 
         <page id="11" columns="2" name="Award-Winners" img="cat-caldecott.png" >
-             <cell name="Caldecott Medal" img="cat-caldecott.png" type="link">https://gapines.org/eg/kpac/results?bookbag=153202;page=0;locg=1;depth=0</cell>
-             <cell name="Coretta Scott King" img="cat-king.png" type="link">https://gapines.org/eg/kpac/results?bookbag=153204;page=0;locg=1;depth=0</cell>
-             <cell name="Geisel Award" img="cat-geisel.png" type="link">https://gapines.org/eg/kpac/results?bookbag=153203;page=0;locg=1;depth=0</cell>
-             <cell name="Newbery Medal" img="cat-newbery.png" type="link">https://gapines.org/eg/kpac/results?bookbag=153201;page=0;locg=1;depth=0</cell>
-             <cell name="Georgia Children's Book" img="cat-gcba.png" type="link">https://gapines.org/eg/kpac/results?bookbag=153206;page=0;locg=1;depth=0</cell>
-             <cell name="2014 GCBA Nominees" img="cat-gcba.png" type="link">https://gapines.org/eg/kpac/results?bookbag=154170;page=0;locg=1;depth=0</cell>
-             <cell name="Georgia Picture Book" img="cat-gcba.png" type="link">https://gapines.org/eg/kpac/results?bookbag=153205;page=0;locg=1;depth=0</cell>
-             <cell name="2014 GPBA Nominees" img="cat-gcba.png" type="link">https://gapines.org/eg/kpac/results?bookbag=154171;page=0;locg=1;depth=0</cell>
+             <cell name="Caldecott Medal" img="cat-caldecott.png" type="link">https://test.gapines.org/eg/kpac/results?bookbag=153202;page=0;locg=1;depth=0</cell>
+             <cell name="Coretta Scott King" img="cat-king.png" type="link">https://test.gapines.org/eg/kpac/results?bookbag=153204;page=0;locg=1;depth=0</cell>
+             <cell name="Geisel Award" img="cat-geisel.png" type="link">https://test.gapines.org/eg/kpac/results?bookbag=153203;page=0;locg=1;depth=0</cell>
+             <cell name="Newbery Medal" img="cat-newbery.png" type="link">https://test.gapines.org/eg/kpac/results?bookbag=153201;page=0;locg=1;depth=0</cell>
+             <cell name="Georgia Children's Book" img="cat-gcba.png" type="link">https://test.gapines.org/eg/kpac/results?bookbag=153206;page=0;locg=1;depth=0</cell>
+             <cell name="2014 GCBA Nominees" img="cat-gcba.png" type="link">https://test.gapines.org/eg/kpac/results?bookbag=154170;page=0;locg=1;depth=0</cell>
+             <cell name="Georgia Picture Book" img="cat-gcba.png" type="link">https://test.gapines.org/eg/kpac/results?bookbag=153205;page=0;locg=1;depth=0</cell>
+             <cell name="2014 GPBA Nominees" img="cat-gcba.png" type="link">https://test.gapines.org/eg/kpac/results?bookbag=154171;page=0;locg=1;depth=0</cell>
 
         </page>
 
         <page id="12" columns="2" name="Early Learning" img="cat-123.png">
-             <cell name="ABCs" img="cat-abc.png" type="link">?</cell>
-             <cell name="Counting" img="cat-123.png" type="link">?</cell>
-             <cell name="Colors" img="cat-colors.png" type="link">?</cell>
-             <cell name="Shapes" img="cat-shapes.png" type="link">?</cell>
-             <cell name="Telling Time" img="cat-time.png" type="link">?</cell>
-             <cell name="Seasons" img="cat-seasons.png" type="link">?</cell>
+             <cell name="ABCs" img="cat-abc.png" type="simplesearch">(keyword:abc || keyword:alphabet)</cell>
+             <cell name="Counting" img="cat-123.png" type="simplesearch">(keyword:number || keyword:123 || keyword:counting)</cell>
+             <cell name="Colors" img="cat-colors.png" type="simplesearch">keyword:colors</cell>
+             <cell name="Shapes" img="cat-shapes.png" type="simplesearch">(keyword:shapes || keyword:circle || keyword:square || keyword:triangle)</cell>
+             <cell name="Telling Time" img="cat-time.png" type="simplesearch">keyword:telling time</cell>
+             <cell name="Seasons" img="cat-seasons.png" type="simplesearch">(keyword:seasons || keyword:winter || keyword:spring || keyword:summer || keyword:fall)</cell>
         </page>
     </pages>
 
index bec7750..803ead5 100644 (file)
@@ -30,7 +30,7 @@ MACRO render_kpac_grid(page_id) BLOCK;
         <td width="[% width %]%"><a href="[%- ctx.kpac_root -%]/results?query=[%- cell.content -%];nosprop=1"><img 
             src="[% kpac_img_path(cell.img) %]" alt="" /><span>[% cell.name %]</span></a></td>
 
-        [% ELSIF cell.type == 'search'; %]
+        [% ELSIF cell.type == 'simplesearch'; %]
 
         <td width="[% width %]%"><a href="[% 
             mkurl(ctx.kpac_root _ '/results', {query => cell.content, nosprop => 1}, ['page', 'qtype']) %]"><img 
index aaaf616..09dd0f5 100644 (file)
@@ -33,7 +33,7 @@ BLOCK build_org_selector;
           urlb = urlb.remove(';locg=' _ CGI.url_param('locg'));
      END %]
 
-
+    <div class="branchpicker">
     <select id='branchpicker' name='branch' onchange="window.location.href='[%- urlb -%];locg=' + this.value;"> #replace current url with new url specifying location id
     [% 
         WHILE node_stack.size > 0; 
@@ -114,7 +114,7 @@ BLOCK build_org_selector;
 
         [% END %]
     </select>
-
+    </div>
 
 
 [% END %]
index e67cbe3..2375cdb 100755 (executable)
@@ -78,7 +78,7 @@ input[type=text], input[type=password], textarea {
 .main_center {
        width:956px;
        margin:auto;
-       padding-bottom:20px;
+       padding-bottom:0px;
        padding-top:17px;
 }
 
@@ -337,9 +337,11 @@ input[type=text], input[type=password], textarea {
 }
 
 .footer_wrapper {
-       position:absolute;
+       /* position:absolute;
        bottom:-50;
-       width:100%;
+       width:100%; */
+       width: 936px;
+       margin:auto;
        height:60px;
        background:#000;
        font-size:13px;
@@ -1069,17 +1071,21 @@ div.hr {
 .deweytenstitle {
     font-weight:bold;
     font-size:x-large;
-    background-color:#0098f9;
-    color:#fff;
+    color:#000;
+    background-color:#ddd;
     margin:0px;
+    border-top:3px solid #000;
 }
 
 .deweytensdescription {
     font-weight:bold;
     font-size:large;
-    background-color:#0098f9;
-    color:#fff;
+    color:#000;
+    background-color:#ddd;
     margin:0px;
     height:50px;
 }
     
+.branchpicker select {
+    width:215px;
+}
\ No newline at end of file