[open-ils-commits] r10765 - in trunk/Open-ILS: src src/extras
web/opac/extras/slimpac web/opac/locale/en-US
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Oct 6 16:49:35 EDT 2008
Author: dbs
Date: 2008-10-06 16:49:31 -0400 (Mon, 06 Oct 2008)
New Revision: 10765
Added:
trunk/Open-ILS/src/extras/locale_html_options.pl
trunk/Open-ILS/web/opac/extras/slimpac/language.html
Modified:
trunk/Open-ILS/src/Makefile.am
trunk/Open-ILS/web/opac/extras/slimpac/advanced.html
trunk/Open-ILS/web/opac/extras/slimpac/start.html
trunk/Open-ILS/web/opac/locale/en-US/opac.dtd
Log:
Add a basic, ugly language picker to the SlimPAC (another part of #1)
Modified: trunk/Open-ILS/src/Makefile.am
===================================================================
--- trunk/Open-ILS/src/Makefile.am 2008-10-06 17:27:57 UTC (rev 10764)
+++ trunk/Open-ILS/src/Makefile.am 2008-10-06 20:49:31 UTC (rev 10765)
@@ -41,6 +41,7 @@
# Collect files to be used by multiple targets
autojsbinscripts = @srcdir@/extras/fieldmapper.pl \
+ @srcdir@/extras/locale_html_options.pl \
@srcdir@/extras/org_tree_js.pl \
@srcdir@/extras/org_lasso_js.pl \
@srcdir@/extras/org_tree_html_options.pl \
@@ -240,6 +241,7 @@
ln -sf $(DESTDIR)$(WEBDIR)/opac/skin/default/xml/index.xml $(DESTDIR)$(WEBDIR)/opac/skin/default/xml/advanced.xml
ln -sf $(DESTDIR)$(WEBDIR)/opac/skin/default/xml/index.xml $(DESTDIR)$(WEBDIR)/opac/skin/default/xml/myopac.xml
ln -sf $(DESTDIR)$(WEBDIR)/opac/skin/default/xml/index.xml $(DESTDIR)$(WEBDIR)/opac/skin/default/xml/cnbrowse.xml
+ rm $(DESTDIR)$(WEBDIR)/reports/fm_IDL.xml
cp $(DESTDIR)@sysconfdir@/fm_IDL.xml $(DESTDIR)$(WEBDIR)/reports/
Added: trunk/Open-ILS/src/extras/locale_html_options.pl
===================================================================
--- trunk/Open-ILS/src/extras/locale_html_options.pl (rev 0)
+++ trunk/Open-ILS/src/extras/locale_html_options.pl 2008-10-06 20:49:31 UTC (rev 10765)
@@ -0,0 +1,44 @@
+#!/usr/bin/perl
+use strict;
+use warnings;
+# Turns supported locales into a static HTML option list
+
+use OpenSRF::AppSession;
+use OpenSRF::System;
+use OpenILS::Utils::Fieldmapper;
+use OpenSRF::Utils::SettingsClient;
+use OpenILS::Application::AppUtils;
+
+die "usage: perl locale_html_options.pl <bootstrap_config> <output_file>" unless $ARGV[1];
+OpenSRF::System->bootstrap_client(config_file => $ARGV[0]);
+
+open FILE, ">$ARGV[1]";
+
+Fieldmapper->import(IDL => OpenSRF::Utils::SettingsClient->new->config_value("IDL"));
+
+my $ses = OpenSRF::AppSession->create("open-ils.cstore");
+my $locales = $ses->request("open-ils.cstore.direct.config.i18n_locale.search.atomic", {"code" => {"!=" => undef}}, {"order_by" => {"i18n_l" => "name"}})->gather();
+
+print_option($locales);
+
+$ses->disconnect();
+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++;
+ }
+}
+
Property changes on: trunk/Open-ILS/src/extras/locale_html_options.pl
___________________________________________________________________
Name: svn:executable
+ *
Modified: trunk/Open-ILS/web/opac/extras/slimpac/advanced.html
===================================================================
--- trunk/Open-ILS/web/opac/extras/slimpac/advanced.html 2008-10-06 17:27:57 UTC (rev 10764)
+++ trunk/Open-ILS/web/opac/extras/slimpac/advanced.html 2008-10-06 20:49:31 UTC (rev 10765)
@@ -185,6 +185,12 @@
<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>
Added: trunk/Open-ILS/web/opac/extras/slimpac/language.html
===================================================================
--- trunk/Open-ILS/web/opac/extras/slimpac/language.html (rev 0)
+++ trunk/Open-ILS/web/opac/extras/slimpac/language.html 2008-10-06 20:49:31 UTC (rev 10765)
@@ -0,0 +1,140 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE html PUBLIC
+ "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" [
+ <!--#include virtual="/opac/locale/${locale}/opac.dtd"-->
+]>
+
+<html>
+ <head>
+ <title>&slimpac.language.select;</title>
+ <style type="text/css">
+ .title {
+ text-align: center;
+ border: 3px solid #A7EA9D;
+ padding-bottom: 0px;
+ margin-bottom: 0px;
+ padding-right: 5em;
+ padding-left: 5em;
+ margin-right: 5em;
+ margin-left: 5em;
+ border-collapse: collapse;
+ border-collapse: collapse;
+ }
+ .switcher {
+ padding-top: 0px;
+ margin-top: 0px;
+ text-align: center;
+ padding-right: 5em;
+ padding-left: 5em;
+ margin-right: 5em;
+ margin-left: 5em;
+ }
+
+ .greenrow {
+ border: 1px solid #D0D0D0;
+ background: #A7EA9D;
+ margin-top: .5em;
+ margin-bottom: .5em;
+ }
+
+ .bluerow {
+ border: 1px solid #D0D0D0;
+ background: #E0F6E0;
+ margin-top: .5em;
+ margin-bottom: .5em;
+ }
+
+ .bluerow a {
+ background: white;
+ }
+
+ .greenrow a {
+ background: white;
+ }
+
+ .rowpad {
+ height: 20px;
+ }
+
+ .footer {
+ width: 100%;
+ text-align: center;
+ vertical-align: bottom;
+ margin: auto;
+ margin-top: 20px;
+ }
+
+ .footer_links {
+ width: 60%;
+ text-align: center;
+ padding: 10px;
+ font-size: 8pt;
+ margin: auto;
+ }
+
+ .footer_link {
+ margin-left: 10px;
+ margin-right: 10px;
+ }
+
+ .copyright {
+ margin-top: 4px;
+ font-size: 7pt;
+ }
+
+ </style>
+ </head>
+ <body>
+
+ <h1 class="title">&slimpac.language.select;</h1>
+ <div class="switcher">
+ <!--#include virtual="locales.inc"-->
+ </div>
+
+ <div class="footer">
+ <div class="footer_links">
+
+ <span class='footer_link'>
+ <a class='classic_link' href='/'>&slimpac.start.dynamic;</a>
+ </span>
+
+ <span> | </span>
+
+ <span class='footer_link'>
+ <a class='classic_link' href='advanced.html'>&opac.navigate.advanced;</a>
+ </span>
+
+ <span> | </span>
+
+ <span class='footer_link'>
+ <a target='_blank' class='classic_link' href='&footer.find.url;'>&footer.find.library;</a>
+ </span>
+
+ <span> | </span>
+
+ <span class='footer_link'>
+ <a target='_blank' class='classic_link' href='&footer.help.url;'>&footer.help;</a>
+ </span>
+
+ <span> | </span>
+
+ <span class='footer_link'>
+ <a target='_blank' class='classic_link' href='&footer.library.url;'>&footer.library.about;</a>
+ </span>
+
+ <span> | </span>
+
+ <span class='footer_link'>
+ <a target='' class='classic_link' id='eg_gal_link' href='&footer.union.url;'>&footer.union;</a>
+ </span>
+ <br/>
+ <div class="copyright">
+ <span>&footer.copyright;</span>
+ </div>
+ </div>
+ </div>
+
+ </body>
+</html>
Modified: trunk/Open-ILS/web/opac/extras/slimpac/start.html
===================================================================
--- trunk/Open-ILS/web/opac/extras/slimpac/start.html 2008-10-06 17:27:57 UTC (rev 10764)
+++ trunk/Open-ILS/web/opac/extras/slimpac/start.html 2008-10-06 20:49:31 UTC (rev 10765)
@@ -145,6 +145,12 @@
<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>
Modified: trunk/Open-ILS/web/opac/locale/en-US/opac.dtd
===================================================================
--- trunk/Open-ILS/web/opac/locale/en-US/opac.dtd 2008-10-06 17:27:57 UTC (rev 10764)
+++ trunk/Open-ILS/web/opac/locale/en-US/opac.dtd 2008-10-06 20:49:31 UTC (rev 10765)
@@ -628,6 +628,8 @@
<!-- =================================================================
Slimpac Simple Search
================================================================= -->
+<!ENTITY slimpac.language.select "Select language">
+
<!ENTITY slimpac.start.title "Simple Search">
<!ENTITY slimpac.start.nowSearching "Now searching: ">
<!ENTITY slimpac.start.dynamic "Dynamic Catalog">
@@ -643,8 +645,6 @@
<!ENTITY vendor.name "Amazon">
<!ENTITY vendor.base_link "http://amazon.com/dp/">
-
-
<!-- =================================================================
Selfcheck
================================================================= -->
More information about the open-ils-commits
mailing list