KPAC changes in preparation for upgrade:
authorTerran McCanna <tmccanna@georgialibraries.org>
Wed, 30 Dec 2015 18:51:21 +0000 (13:51 -0500)
committerChris Sharp <csharp@georgialibraries.org>
Mon, 4 Jan 2016 15:10:04 +0000 (10:10 -0500)
1. Biggest change was to move the library selector box to the main
search panel instead of on the side - had to modify quite a few files
in order to make this work and pass the values correctly.

2. Also changed the feature icons to use links instead of search terms
to allow more control over search limits and sorting and to see if
caching the searches would improve response speed.

3. A number of smaller UI changes.

Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Open-ILS/examples/kpac.xml
Open-ILS/src/templates/kpac/home.tt2
Open-ILS/src/templates/kpac/parts/breadcrumb.tt2
Open-ILS/src/templates/kpac/parts/header.tt2
Open-ILS/src/templates/kpac/parts/org_selector.tt2
Open-ILS/src/templates/kpac/parts/searchlimits.tt2
Open-ILS/src/templates/kpac/parts/subpage.tt2
Open-ILS/web/css/skin/default/kpac/style.css
Open-ILS/web/images/kpac/cat-newyear.png [new file with mode: 0644]

index 7fefb60..f19ab24 100644 (file)
 
         <page id="1" columns="4" name="Home" img="/images/home.jpg">
         <!-- Use type="topic" for top-level categories, type="maintopic" for searches, or type="link" for page links --> 
-            
+               <!-- Switching to use links instead of searches to see if it caches better -->
+                       
+                       <!-- ONLY SHOW CURRENT HOLIDAYS -->
             <!--
-            <cell name="Martin Luther King, Jr." 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="President's Day" img="cat-history-us.png" type="maintopic">keyword:presidents' 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 || keyword:hanukkah) || keyword: chanukah)</cell>
-            <cell name="Kwanzaa" img="cat-kwanzaa.png" type="maintopic">keyword:kwanzaa</cell>
-            <cell name="Happy New Year!" img="cat-newyear.png" type="maintopic">keyword:new year's day</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>
+            <cell name="Martin Luther King, Jr." img="cat-mlk.png" type="link">http://bit.ly/1YOlOj0</cell>
+            -->
+                       <cell name="Valentine's Day" img="cat-valentines.png" type="link">http://bit.ly/1IDKRy9</cell> 
+            <cell name="President's Day" img="cat-history-us.png" type="link">http://bit.ly/1JJ6F6t</cell>
+            <!--
+            <cell name="St. Patrick's Day" img="cat-stpatricks.png" type="link">http://bit.ly/1R87r34</cell> 
+            <cell name="Easter" img="cat-easter.png" type="link">http://bit.ly/1Tpti5o</cell>
+            <cell name="4th of July" img="cat-independence.png" type="link">http://bit.ly/1OZGslR</cell> 
+            <cell name="Back to School" img="cat-school.png" type="link">http://bit.ly/1MGU3wl</cell>
+                       <cell name="Halloween" img="cat-halloween.png" type="link">http://bit.ly/1R893tC</cell>
+            <cell name="Thanksgiving" img="cat-thanksgiving.png" type="link">http://bit.ly/1IDOFiK</cell>
+            <cell name="Christmas" img="cat-christmas.png" type="link">http://bit.ly/1YOpmlh</cell>
+            <cell name="Hannukah" img="cat-hannukah.png" type="link">http://bit.ly/1YOqwNB</cell>
+            <cell name="Kwanzaa" img="cat-kwanzaa.png" type="link">http://bit.ly/1ZBJtAg</cell>
+            <cell name="Happy New Year!" img="cat-newyear.png" type="link">http://bit.ly/1JfFfdq</cell> 
+            -->
+            <cell type="topic">20</cell>
+            <cell type="topic">30</cell>
+            <cell type="topic">40</cell>
+            <cell name="Dinosaurs" img="cat-dinosaur.png" type="link">http://bit.ly/1ktf1Iw</cell>
+            <cell name="Princesses" img="cat-princess.png" type="link">http://bit.ly/1JJbf4z</cell>
             <cell name="Dewey Categories" img="cat-dewey.png" type="link">homedewey</cell>
         </page>
 
-
-
         <!-- 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="simplesearch">((keyword:car || keyword:truck) || keyword: automobile)</cell>
-            <cell name="Planes" img="cat-plane.png" type="simplesearch">(keyword:airplane || keyword:aeroplane)</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:military tank || keyword:submarine) || keyword:aircraft carrier) || keyword:military aircraft)</cell>
-        </page> 
-
-        <page id="11" columns="2" name="Award-Winners" img="cat-caldecott.png" >
+        <page id="20" columns="2" name="Early Learning" img="cat-123.png">
+             <cell name="ABCs" img="cat-abc.png" type="link">http://bit.ly/1QZqUEx</cell>
+             <cell name="Counting" img="cat-123.png" type="link">http://bit.ly/1OxJTpu</cell>
+             <cell name="Colors" img="cat-colors.png" type="link">http://bit.ly/1mpI4Os</cell>
+             <cell name="Nutrition" img="cat-nutrition.png" type="link">http://bit.ly/1RRz9CH</cell>
+             <cell name="Shapes" img="cat-shapes.png" type="link">http://bit.ly/1PxDdVq</cell>
+             <cell name="Telling Time" img="cat-time.png" type="link">http://bit.ly/1mRw1Ki</cell>
+             <cell name="Seasons" img="cat-seasons.png" type="link">http://bit.ly/1OxMKP5</cell>
+               </page>
+        <page id="30" 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;locg=1;trail=11</cell>
              <cell name="Coretta Scott King" img="cat-king.png" type="link">https://gapines.org/eg/kpac/results?bookbag=153204;locg=1;trail=11</cell>
              <cell name="Geisel Award" img="cat-geisel.png" type="link">https://gapines.org/eg/kpac/results?bookbag=153203;locg=1;trail=11</cell>
              <cell name="Picture Book Winners" img="cat-gcba.png" type="link">https://gapines.org/eg/kpac/results?bookbag=153205;locg=1;trail=11</cell>
              <cell name="Picture Book Nominees" img="cat-gcba.png" type="link">https://gapines.org/eg/kpac/results?bookbag=154171;locg=1;trail=11</cell>
              <cell name="For Young Georgians" img="cat-center.png" type="link">https://gapines.org/eg/kpac/results?bookbag=379799;locg=1;trail=11</cell>
-
-        </page>
-
-        <page id="12" columns="2" name="Early Learning" img="cat-123.png">
-             <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="Nutrition" img="cat-nutrition.png" type="simplesearch">((keyword:nutrition || keyword:vitamins) || keyword:healthy food)</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 || keyword:clock)</cell>
-             <cell name="Seasons" img="cat-seasons.png" type="simplesearch">((((keyword:seasons || keyword:spring) || keyword:summer) || keyword:fall) || keyword:winter)</cell>
-        </page>
-
-        <page id="20" columns="2" name="Fizz! Boom! Read!" img="2014srp-main.jpg"> 
-             <cell name="Science Experiments" img="2014srp-experiment.jpg" type="simplesearch">keyword:science experiment</cell>
-             <cell name="Backyard Bugs" img="2014srp-bugs.jpg" type="simplesearch">(keyword:bug || keyword:insect)</cell>
-             <cell name="Dinosaurs" img="2014srp-dino.jpg" type="simplesearch">keyword:dinosaur sort(pubdate)%23descending</cell>
-             <cell name="Computer Science" img="2014srp-computers.jpg" type="simplesearch">keyword:computer sort(pubdate)%23descending</cell>
-             <cell name="Lizards &amp; Frogs" img="2014srp-snakes.jpg" type="simplesearch">(((keyword:snake || keyword:lizard) || keyword:reptile) || keyword:amphibian)</cell>
-             <cell name="Biology" img="2014srp-biology.jpg" type="simplesearch">(keyword:biology || keyword:living things)</cell>
-             <cell name="Volcanoes" img="2014srp-volcano.jpg" type="simplesearch">keyword:volcano</cell>
-             <cell name="Space &amp; Planets" img="2014srp-space.jpg" type="simplesearch">((keyword:astronomy || keyword:planet) || keyword:space)</cell>
-             <cell name="Motion &amp; Energy" img="2014srp-motion.jpg" type="simplesearch">((keyword:motion || keyword:physics) || keyword:energy)</cell>
-             <cell name="Ocean Life" img="2014srp-ocean.jpg" type="simplesearch">((((keyword:ocean || keyword:octopus) || keyword:beach) || keyword:whale) || keyword:shark)</cell>
-             <cell name="Weather" img="2014srp-weather.jpg" type="simplesearch">(keyword:weather || keyword:meteorology)</cell>
-        </page>
+        </page>                
+        <page id="40" columns="2" name="Transportation" img="cat-truck.png" >
+                       <cell name="Cars &amp; Trucks" img="cat-car.png" type="link">http://bit.ly/1mpCqvR</cell>
+            <cell name="Planes" img="cat-plane.png" type="link">http://bit.ly/1mpCzPP</cell>
+            <cell name="Trains" img="cat-train.png" type="link">http://bit.ly/1OZLjDp</cell>
+            <cell name="Tractors &amp; Machines" img="cat-tractor.png" type="link">http://bit.ly/1Tpx8v8</cell>
+            <cell name="Boats" img="cat-boat.png" type="link">http://bit.ly/1PwYZdD</cell>
+            <cell name="Military" img="cat-military.png" type="link">http://bit.ly/1VpCY11</cell>      
+        </page> 
     </pages>
 
     <layout owner="1" page="1"/>
index d97b6d1..6af8def 100644 (file)
@@ -1,6 +1,7 @@
 [%  
     PROCESS "opac/parts/header.tt2";
     PROCESS "kpac/parts/grid.tt2";
+       PROCESS "opac/parts/org_selector.tt2";
     WRAPPER "kpac/parts/base.tt2";
     ctx.page_title = l("Home") 
 %]
@@ -9,7 +10,7 @@
                 <h1>[% l('Search the Libraries') %]</h1>
                 <form action="[% ctx.kpac_root _ '/results' %]">
                     [% qtype = CGI.param('qtype') %]
-                    <table cellpadding="0" cellspacing="0" border="0" align="center" class="search_box_wrapper">
+                    <table cellpadding="0" cellspacing="0" border="0" align="center" class="search_box_wrapper" style="margin-top:0px;">
                         <tr>
                             <td class="st_radio_btn"><input type="radio" name="qtype" value="keyword" id="st_word" class="st_word" 
                                 [% IF !qtype OR qtype == 'keyword' %]checked="checked"[% END %]/></td>
                             <td class="st_label st_author_box"><label for="st_author">[% l('Author') %]</label></td>
 
                             <td><input type="text" class="search_box" name="query" 
-                                value="[% CGI.param('nosprop') ? '' : CGI.param('query') | html  %]"/></td>
-                            <td><input type="image" src="[% ctx.media_prefix %]/images/kpac/search_btn.png" alt="[% l('search') %]" /></td>
+                                value=""/></td>
+                                                       <td></td>
                         </tr>
+                                               <tr>
+                                                   <td colspan="6" align="right" class="st_label st_author_box"><label>Search Location:</label></td>
+                                                       <td align="left">[% INCLUDE build_org_selector show_loc_groups=1 %]</td>                                                
+                            <td><input type="image" src="[% ctx.media_prefix %]/images/kpac/search_btn.png" alt="[% l('search') %]" style="margin-top:4px;" /></td>
+                                               </tr>
                     </table>
                 </form>
             </div>
index 15abce0..c49c69e 100644 (file)
@@ -2,7 +2,7 @@
     [% clear_params = ['action', 'hold', 'pickup_lib', 'ac', 'copy_limit', 'copy_offset', 'list'] %]
 
     <!-- home page -->
-    <a href="[%- ctx.kpac_root -%]/home
+    <a href="[%- mkurl(ctx.kpac_root _ '/home', {}, clear_params) -%]
         class="bread_home"><img alt="[% l('Home') %]" 
         src="[% ctx.media_prefix %]/images/kpac/home_icon.png" /></a>
 
index b7e0df5..027477d 100644 (file)
@@ -1,6 +1,6 @@
 <div class="main_header_wrapper">
     <div class="logo_wrapper">
-        <a href="/eg/kpac/home">
+        <a href="[%- mkurl(ctx.kpac_root _ '/home') -%]">
             <span class="logo_left">&nbsp;</span>
             <span class="logo_middle"><img src="[% ctx.media_prefix %]/images/kpac/PINES_logo.gif" width="170" alt="[% l('Logo') %]" /></span>
             <span class="logo_right">&nbsp;</span><br />
index 82e5c33..b9ad4a0 100644 (file)
@@ -1,3 +1,5 @@
+<!-- THIS CUSTOM FILE NO LONGER IN USE AS OF 2.9.1 UPGRADE -->
+
 [%
 # Org Unit Selector Widget :
 #   INCLUDE build_org_selector id='selector-id' name='selector-name' 
@@ -8,8 +10,7 @@
 
 # 
 # This is a modified version of opac/parts/org_selector.tt2 - there was a naming conflict with the 'org_unit' variable
-
-
+# that I couldn't figure out at the time I was first trying it out
 
 
 PROCESS get_library;
@@ -26,15 +27,10 @@ BLOCK build_org_selector;
     END;
     %]
     
-    [% urla = CGI.request_uri %]
-    [% urlb = urla %]
-
-    [% IF (matches = urla.match('locg='));
-          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
+       <select [% IF id %] id='[% id %]' [% END -%]
+            title='[% arialabel || l("Select Library") %]' 
+            name='[% name %]' class="org_selector_dropdown">
     [% 
         WHILE node_stack.size > 0; 
             node = node_stack.pop();
@@ -122,3 +118,4 @@ BLOCK build_org_selector;
 
 
 [% END %]
+
index a5c3c51..fae4294 100644 (file)
      [% END %]
      </ul>
 
-
-<h3>Showing Results For:</h3>
-
-[% PROCESS "kpac/parts/org_selector.tt2" %]
-
-<form>
-     [% INCLUDE build_org_selector show_loc_groups=1 %]
-</form>
-
-
 [% END %]
\ No newline at end of file
index f33e80b..4131822 100644 (file)
@@ -1,4 +1,6 @@
-[% PROCESS 'kpac/parts/util.tt2'; WRAPPER "kpac/parts/base.tt2" %]
+[% PROCESS 'kpac/parts/util.tt2'; 
+   PROCESS "opac/parts/org_selector.tt2";
+   WRAPPER "kpac/parts/base.tt2" %]
 
 <!-- subpage is the main wrapper page for everything except 'home' -->
 
 
                             <td><input type="text" class="search_box" name="query" 
                                 value="[% CGI.param('nosprop') ? '' : CGI.param('query') | html  %]"/></td>
-                            <td><input type="image" src="[% ctx.media_prefix %]/images/kpac/search_btn.png" alt="search" /></td>
+                            <td></td>
                         </tr>
+                                               <tr>
+                                                   <td colspan="6" align="right" class="st_label st_author_box"><label>Search Location:</label></td>
+                                                       <td align="left">[% INCLUDE build_org_selector show_loc_groups=1 %]</td>                                                
+                            <td><input type="image" src="[% ctx.media_prefix %]/images/kpac/search_btn.png" alt="[% l('search') %]"  style="margin-top:4px;"  /></td>
+                                               </tr>
                     </table>
                 </form>
             </div>
index 31ca8b2..a896b28 100755 (executable)
@@ -298,6 +298,16 @@ input[type=text], input[type=password], textarea {
        margin-right:6px !important;
 }
 
+.org_selector_dropdown {
+       margin-top:4px;
+       padding:5px;
+       width:326px;
+       font-size:14px;
+       font-weight:bold;
+       margin-right:6px !important;
+       height:39px;
+}
+
 .st_author_box {
        padding-right:15px !important;
 }
@@ -344,7 +354,7 @@ input[type=text], input[type=password], textarea {
        width:100%; */
        width: 936px;
        margin:auto;
-       height:60px;
+       height:100px;
        background:#000;
        font-size:13px;
        color:#fff;
@@ -1101,7 +1111,8 @@ div.hr {
     margin:0px;
     height:50px;
 }
-    
-.branchpicker select {
-    width:215px;
+
+#main-content, .content-wrapper-library {
+    font-size: 16px;
+       margin-left: 20px;
 }
diff --git a/Open-ILS/web/images/kpac/cat-newyear.png b/Open-ILS/web/images/kpac/cat-newyear.png
new file mode 100644 (file)
index 0000000..fcff72e
Binary files /dev/null and b/Open-ILS/web/images/kpac/cat-newyear.png differ