From: erickson Date: Mon, 20 Oct 2008 17:32:35 +0000 (+0000) Subject: Merged revisions 10868-10869,10873 via svnmerge from X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=a4da047f8c64a7cdf4512f9220e1ab92d5a0c023;p=Evergreen.git Merged revisions 10868-10869,10873 via svnmerge from svn://svn.open-ils.org/ILS/trunk ........ r10868 | dbs | 2008-10-19 16:50:06 -0400 (Sun, 19 Oct 2008) | 1 line Add new string for staff client ........ r10869 | dbs | 2008-10-19 17:21:21 -0400 (Sun, 19 Oct 2008) | 1 line Basic install README for Evergreen - still needs fleshing out with more specifics ........ r10873 | erickson | 2008-10-20 12:37:49 -0400 (Mon, 20 Oct 2008) | 1 line added a global default locale configuration setting (for when no org setting exists). created an org-locale finder as an addition to the user locale finder. using default locale info as preferred language in opac searches where not provided by the client ........ git-svn-id: svn://svn.open-ils.org/ILS/branches/acq-experiment@10874 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/examples/opensrf.xml.example b/Open-ILS/examples/opensrf.xml.example index 09e7a8a8b0..1d728872e2 100644 --- a/Open-ILS/examples/opensrf.xml.example +++ b/Open-ILS/examples/opensrf.xml.example @@ -9,6 +9,9 @@ vim:et:ts=4:sw=4: + + en-US + LOCALSTATEDIR/log LOCALSTATEDIR/lock diff --git a/Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm b/Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm index 759c670c84..4e5acf6ccc 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm @@ -12,6 +12,7 @@ use Data::Dumper; use OpenILS::Utils::CStoreEditor; use OpenILS::Const qw/:const/; use Unicode::Normalize; +use OpenSRF::Utils::SettingsClient; # --------------------------------------------------------------------------- # Pile of utilty methods used accross applications. @@ -1463,7 +1464,7 @@ sub get_org_full_path { # returns the user's configured locale as a string. Defaults to en-US if none is configured. sub get_user_locale { my($self, $user_id, $e) = @_; - $e ||=OpenILS::Utils::CStoreEditor->new; + $e ||= OpenILS::Utils::CStoreEditor->new; # first, see if the user has an explicit locale set my $setting = $e->search_actor_user_setting( @@ -1471,8 +1472,23 @@ sub get_user_locale { return OpenSRF::Utils::JSON->JSON2perl($setting->value) if $setting; my $user = $e->retrieve_actor_user($user_id) or return $e->event; + return $self->get_org_locale($user->home_ou, $e); +} + +# returns org locale setting +sub get_org_locale { + my($self, $org_id, $e) = @_; + $e ||= OpenILS::Utils::CStoreEditor->new; + + my $locale; + if(defined $org_id) { + $locale = $self->ou_ancestor_setting_value($org_id, 'global.default_locale', $e); + return $locale if $locale; + } - my $locale = $self->ou_ancestor_setting_value($user->home_ou, 'global.default_locale', $e); + # system-wide default + my $sclient = OpenSRF::Utils::SettingsClient->new; + $locale = $sclient->config_value('default_locale'); return $locale if $locale; # if nothing else, fallback to locale=cowboy diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm b/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm index 13432e3647..aa5824cbf4 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm @@ -538,6 +538,8 @@ sub multiclass_query { if $sclient->config_value(apps => 'open-ils.search', app_settings => 'use_staged_search') =~ /true/i; + $arghash->{preferred_language} = $U->get_org_locale($arghash->{org_unit}) + unless $arghash->{preferred_language}; $method = $self->method_lookup($method); my ($data) = $method->run($arghash, $docache); diff --git a/README b/README index 24e5d005ad..82fd2aad85 100644 --- a/README +++ b/README @@ -1 +1,125 @@ -#README +README for Evergreen 1.4 RC + +Installing prerequisites: +======================== +Evergreen has a number of prerequisite packages that must be installed +before you can successfully configure, compile, and install Evergreen. + +1. Begin by installing the most recent version of OpenSRF (1.0 or later). +You can download OpenSRF 1.0.0 from +http://evergreen-ils.org/downloads/OpenSRF-1.0.0.tar.gz + +2. On Debian and Ubuntu, the easiest way to install the rest of the +prerequisites for Evergreen is to use the Makefile.install prerequisite +installer. + +Issue the following commands as the root user to install prerequisites +using the Makefile.install prerequisite installer, substituting "debian" +or "ubuntu" for below: + +make -f Open-ILS/src/extras/Makefile.install + +Note: You may also be able to use "centos" to install the Evergreen +prerequisites for CentOS 5 and RHEL 5, or "gentoo" for Gentoo - but +these are less tested distributions. Your patches and suggestions for +improvement are welcome! + +Configuration and compilation instructions: +========================================== + +For the time being, we are still installing everything in the /openils/ +directory (with the exception of the Perl modules, which are installed +into system directories). Issue the following commands to configure and +build Evergreen: + +./configure --prefix=/openils --sysconfdir=/openils/conf +make + +Installation instructions: +========================= + +Once you have configured and compiled Evergreen, issue the following +command as the root user to install Evergreen: + +make STAFF_CLIENT_BUILD_ID=rel_1_4_0_0 install + +This will install Evergreen, including example configuration files in +/openils/conf/ that you can use as templates for your own configuration files. +The STAFF_CLIENT_BUILD_ID variable stamps the server-side and client-side files +for the staff client to ensure that they match. + +Change ownership of the Evergreen files: +======================================= + +All files in the /openils/ directory and subdirectories must be owned by the +"opensrf" user. Issue the following command as the root user to change the +ownership on the files: + +chown -R opensrf:opensrf /openils + +Configure the Apache Web server: +=============================== + +Use the example configuration files in Open-ILS/examples/apache/ to configure +your Web server for the Evergreen catalog, staff client, Web services, and +administration interfaces. + +Configure OpenSRF for the Evergreen application: +=============================================== + +There are a number of example OpenSRF configuration files in /openils/conf/ that +you can use as a template for your Evergreen installation. + +cp /openils/conf/opensrf.xml.example /openils/conf/opensrf.xml +cp /openils/conf/opensrf_core.xml.example /openils/conf/opensrf_core.xml + +Note that eg_db_config.pl will set the database connection information in +opensrf.xml for you. + +Creating the Evergreen database: +=============================== + +PostgreSQL 8.2 will be installed on your system by the Makefile.install +prerequisite installer, but you will need to create the database and add the +appropriate languages and extensions to support Evergreen. Issue the following +commands as the "postgres" user to set up a database called "evergreen". Note +that the location of the PostgreSQL "contrib" packages may vary depending on +your distribution: + +createdb -E UNICODE evergreen +createlang plperl evergreen +createlang plperlu evergreen +createlang plpgsql evergreen +psql -f /usr/share/postgresql/8.2/contrib/tablefunc.sql +psql -f /usr/share/postgresql/8.2/contrib/tsearch2.sql +psql -f /usr/share/postgresql/8.2/contrib/pgxml.sql + +Once you have created the Evergreen database, you need to create a PostgreSQL +user to access the database. Issue the following command as the "postgres" +user to create a new PostgreSQL user named "evergreen". When prompted, enter +the new user's password and answer "yes" to make the new role a superuser: + +createuser -P evergreen + +Once you have created the Evergreen database, you also need to create the +database schema and configure your configuration files to point at the +database server. Issue the following command as root from inside the Evergreen +source directory, replacing , , , , and +with the appropriate values for your PostgreSQL database: + +perl Open-ILS/src/support-scripts/eg_db_config.pl --update-config \ + --service all --create-schema --create-bootstrap --user \ + --password --hostname --port \ + --database + +This will create the database schema and configure all of the services in +your /openils/conf/opensrf.xml configuration file to point to that database. +It also creates the configuration file required by the Evergreen cgi-bin +administration scripts. + +Getting help: +============ + +Need help installing or using Evergreen? Join the mailing lists at +http://evergreen-ils.org/listserv.php or contact us on the Freenode +IRC network on the #evergreen channel. diff --git a/build/i18n/po/en-US/auth.properties.pot b/build/i18n/po/en-US/auth.properties.pot index 971bd305ff..b807c5e4ef 100644 --- a/build/i18n/po/en-US/auth.properties.pot +++ b/build/i18n/po/en-US/auth.properties.pot @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-10-14 00:34-0400\n" +"POT-Creation-Date: 2008-10-19 16:48-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -70,3 +70,7 @@ msgstr "" #: staff.auth.session.init_false msgid "open-ils.auth.authenticate.init returned false" msgstr "" + +#: staff.auth.titlebar.label +msgid "Evergreen Staff Client - %1$s" +msgstr ""