TPAC: Implement a locale picker
authorDan Scott <dscott@laurentian.ca>
Tue, 17 Jul 2012 21:37:54 +0000 (17:37 -0400)
committerDan Scott <dscott@laurentian.ca>
Tue, 24 Jul 2012 12:18:59 +0000 (08:18 -0400)
commit14eda9612aba8c0d685fb5b79564c50b191cc20d
treead15aaa01bb89efdebaa94ed86fec81c02df67a7
parent8f4f548ad2c13ca62e3a8906a701ceb02b4cabfc
TPAC: Implement a locale picker

In situations in which more than a single locale is configured, display
a locale picker in the TPAC header based on the registered locales. We
set the eg_locale cookie if passed a set_eg_locale GET param. Default
the selection to the currently selected locale (if any) and resubmit the
current page request.

Grabs the localized locale names, if available, from the database;
otherwise falls back to the en-US version of the locale names.

The locale picker form resubmits the current page with any variables
that were present in the current page request, so that switching locales
should still maintain state.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
Open-ILS/src/sql/Pg/upgrade/XXXX.function.get_locale_name.sql [new file with mode: 0644]
Open-ILS/src/templates/opac/parts/locale_picker.tt2 [new file with mode: 0644]
Open-ILS/src/templates/opac/parts/topnav.tt2
Open-ILS/web/css/skin/default/opac/style.css