Integrate language picker into SlimPAC start/advanced search forms
authordbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 7 Oct 2008 02:20:50 +0000 (02:20 +0000)
committerdbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 7 Oct 2008 02:20:50 +0000 (02:20 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@10771 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/examples/apache/eg_vhost.conf
Open-ILS/src/extras/locale_html_options.pl
Open-ILS/web/opac/extras/slimpac/advanced.html
Open-ILS/web/opac/extras/slimpac/start.html

index b529f32..f14d3d7 100644 (file)
@@ -83,10 +83,13 @@ RewriteRule ^/opac/extras/ac/jacket/(small|medium|large)/$ \
     AddType application/xhtml+xml .xml
 </LocationMatch>
 
-<LocationMatch /opac/.*/extras/slimpac/>
+RewriteEngine ON
+RewriteCond %{QUERY_STRING} locale=([^&]*)
+RewriteRule ^/opac/[^/]+/extras/slimpac/(.*)$ /opac/%1/extras/slimpac/$1? [redirect]
+<LocationMatch /opac/[^/]+/extras/slimpac/>
     AddOutputFilter INCLUDES;XMLENT .html
 </LocationMatch>
-       
+
 # ----------------------------------------------------------------------------------
 # Run server-side XUL and XHTML through xmlent to load the correct XML entities
 # ----------------------------------------------------------------------------------
index 705ee3e..0c1405e 100755 (executable)
@@ -27,18 +27,10 @@ close FILE;
 
 sub print_option {
        my $locales = shift;
-       my $count = 0;
-       my $class;
        foreach my $locale (@$locales) {
                my $code = OpenILS::Application::AppUtils->entityize($locale->code);
                my $name = OpenILS::Application::AppUtils->entityize($locale->name);
-               if ($count % 2) {
-                       $class = 'greenrow';
-               } else {
-                       $class = 'bluerow';
-               }
-               print FILE "<p class='$class'><a href='/opac/$code/extras/slimpac/start.html'>$name</a></p>\n";
-               $count++;
+               print FILE "<option value='$code'>$name</option>\n";
        }
 }
 
index 6843361..40cc62e 100644 (file)
                                border: 3px solid #A7EA9D;
                                -moz-border-radius: 6px;
                                padding: 6px;
-                               margin-top: 65px;'
+                               margin-top: 65px;
                        }
                        
                        .greenrow {
                                border: 1px solid #D0D0D0;
                                background: #A7EA9D;
+                               height: 20px;
                        }
 
                        .bluerow {
                                border: 1px solid #D0D0D0;
                                background: #E0F6E0;
+                               height: 20px;
+                       }
+
+                       .search_field {
+                               width: 100%;
+                               text-align: center;
                        }
 
                        .rowpad {
        <body>
                <center>
 
-               <form method="GET" action="/opac/extras/opensearch/1.1/-/html-full">
 
                <table class="maintable">
                        <tbody>
                                <tr><td colspan="2" align="center"><b>&opac.navigate.advanced;</b></td></tr>
                                <tr class="rowpad"><td></td></tr>
+                               <form method="GET" action="/opac/extras/opensearch/1.1/-/html-full">
                                <tr class="bluerow">
                                        <th>&slimpac.start.nowSearching;</th>
                                        <td>
                                </tr>
                                -->
                                <tr class="rowpad"><td align="center" colspan="2"><input type="submit" value="&button.go;"/></td></tr>
+                               </form>
+                               <tr class="greenrow"><td colspan="2"></td></tr>
+                               <form method="GET">
+                               <tr class="bluerow">
+                                       <td colspan="2">
+                                               <div class='search_field'>
+                                                               <!--#include file="locales.inc"-->
+                                                               <input type="submit" value="&slimpac.language.select;"/>
+                                               </div>
+                                       </td>
+                               </tr>
+                               </form>
+
                        </tbody>
                </table>
 
-               </form>
-
                <div class="footer">
                        <center>
                        <div class="footer_links">
                                <span> | </span>
 
                                <span class='footer_link'>
-                                       <a class='classic_link' href='language.html'>&slimpac.language.select;</a>
-                               </span> 
-
-                               <span> | </span>
-
-                               <span class='footer_link'>
                                        <a target='_blank' class='classic_link' href='&footer.find.url;'>&footer.find.library;</a>
                                </span> 
 
index 2e6abc6..12cc610 100644 (file)
                        .greenrow {
                                border: 1px solid #D0D0D0;
                                background: #A7EA9D;
+                               height: 20px;
                        }
 
                        .bluerow {
                                border: 1px solid #D0D0D0;
                                background: #E0F6E0;
+                               height: 20px;
                        }
 
                        .rowpad {
@@ -81,7 +83,6 @@
        <body>
                <center>
 
-               <form method="GET" action="/opac/extras/opensearch/1.1/-/html-full">
 
                <table class="maintable">
                        <tbody>
@@ -93,6 +94,7 @@
                                        </td>
                                </tr>
                                <tr class="rowpad"><td></td></tr>
+                               <form method="GET" action="/opac/extras/opensearch/1.1/-/html-full">
                                <tr class="bluerow">
                                        <td>
                                                <div class='search_field'>
                                                </div>
                                        </td>
                                </tr>
+                               </form>
+                               <tr class="bluerow"><td></td></tr>
+                               <form method="GET">
+                               <tr class="greenrow">
+                                       <td>
+                                               <div class='search_field'>
+                                                               <!--#include file="locales.inc"-->
+                                                               <input type="submit" value="&slimpac.language.select;"/>
+                                               </div>
+                                       </td>
+                               </tr>
+                               </form>
                                <tr class="rowpad"><td></td></tr>
                        </tbody>
                </table>
 
-               </form>
 
                <div class="footer">
                        <center>
                                <span> | </span>
 
                                <span class='footer_link'>
-                                       <a class='classic_link' href='language.html'>&slimpac.language.select;</a>
-                               </span> 
-
-                               <span> | </span>
-
-                               <span class='footer_link'>
                                        <a target='_blank' class='classic_link' href='&footer.find.url;'>&footer.find.library;</a>
                                </span>