# ----------------------------------------------------------------------------------
-# OPTIONAL: Set up image caching - some of these options only work with apache2.2
-# ----------------------------------------------------------------------------------
-# XXX This is no longer needed with built-in added content image caching
-#CacheRoot "/opt/cache/"
-#CacheEnable disk /opac/extras/jacket/
-#CacheMaxFileSize 1073741824
-#CacheIgnoreCacheControl On
-#CacheStorePrivate On
-#CacheStoreNoStore On
-#CacheIgnoreNoLastMod On
-#CacheMaxExpire 86400
-#CacheLastModifiedFactor 0.5
-#CacheDefaultExpire 604800
-
-
-# ----------------------------------------------------------------------------------
# OPTIONAL: Set how long the client will cache our content. Change to suit
# ----------------------------------------------------------------------------------
ExpiresActive On
<field name="holdable" oils_obj:array_position="3" oils_persist:virtual="false" reporter:datatype="bool"/>
<field name="id" oils_obj:array_position="4" oils_persist:virtual="false" reporter:selector="name" reporter:datatype="id"/>
<field name="name" oils_obj:array_position="5" oils_persist:virtual="false" reporter:datatype="text" oils_persist:i18n="true"/>
+ <field name="opac_visible" oils_obj:array_position="6" oils_persist:virtual="false" reporter:datatype="bool"/>
</fields>
<links/>
<permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
<link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
</links>
</class>
+ <class id="combcirc" controller="open-ils.cstore" oils_obj:fieldmapper="action::all_circulation" oils_persist:tablename="action.all_circulation" reporter:core="true" reporter:label="Combined Aged and Active Circulations" oils_persist:readonly="true">
+ <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
+ <field name="isnew" oils_obj:array_position="0" oils_persist:virtual="true" />
+ <field name="ischanged" oils_obj:array_position="1" oils_persist:virtual="true" />
+ <field name="isdeleted" oils_obj:array_position="2" oils_persist:virtual="true" />
+ <field reporter:label="Check In Library" name="checkin_lib" oils_obj:array_position="3" oils_persist:virtual="false" reporter:datatype="org_unit"/>
+ <field reporter:label="Check In Staff" name="checkin_staff" oils_obj:array_position="4" oils_persist:virtual="false" reporter:datatype="link"/>
+ <field reporter:label="Check In Date/Time" name="checkin_time" oils_obj:array_position="5" oils_persist:virtual="false" reporter:datatype="timestamp"/>
+ <field reporter:label="Circulating Library" name="circ_lib" oils_obj:array_position="6" oils_persist:virtual="false" reporter:datatype="org_unit"/>
+ <field reporter:label="Circulating Staff" name="circ_staff" oils_obj:array_position="7" oils_persist:virtual="false" reporter:datatype="link"/>
+ <field reporter:label="Desk Renewal" name="desk_renewal" oils_obj:array_position="8" oils_persist:virtual="false" reporter:datatype="bool"/>
+ <field reporter:label="Due Date/Time" name="due_date" oils_obj:array_position="9" oils_persist:virtual="false" reporter:datatype="timestamp"/>
+ <field reporter:label="Circulation Duration" name="duration" oils_obj:array_position="10" oils_persist:virtual="false" reporter:datatype="interval"/>
+ <field reporter:label="Circ Duration Rule" name="duration_rule" oils_obj:array_position="11" oils_persist:virtual="false" reporter:datatype="link"/>
+ <field reporter:label="Fine Interval" name="fine_interval" oils_obj:array_position="12" oils_persist:virtual="false" reporter:datatype="interval"/>
+ <field reporter:label="Circ ID" name="id" oils_obj:array_position="13" oils_persist:virtual="false" reporter:datatype="id" />
+ <field reporter:label="Max Fine Amount" name="max_fine" oils_obj:array_position="14" oils_persist:virtual="false" reporter:datatype="money" />
+ <field reporter:label="Max Fine Rule" name="max_fine_rule" oils_obj:array_position="15" oils_persist:virtual="false" reporter:datatype="link"/>
+ <field reporter:label="OPAC Renewal" name="opac_renewal" oils_obj:array_position="16" oils_persist:virtual="false" reporter:datatype="bool"/>
+ <field reporter:label="Phone Renewal" name="phone_renewal" oils_obj:array_position="17" oils_persist:virtual="false" reporter:datatype="bool"/>
+ <field reporter:label="Recurring Fine Amount" name="recuring_fine" oils_obj:array_position="18" oils_persist:virtual="false" reporter:datatype="money" />
+ <field reporter:label="Recurring Fine Rule" name="recuring_fine_rule" oils_obj:array_position="19" oils_persist:virtual="false" reporter:datatype="link"/>
+ <field reporter:label="Remaining Renewals" name="renewal_remaining" oils_obj:array_position="20" oils_persist:virtual="false" reporter:datatype="int" />
+ <field reporter:label="Fine Stop Reason" name="stop_fines" oils_obj:array_position="21" oils_persist:virtual="false" reporter:datatype="text"/>
+ <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" oils_obj:array_position="22" oils_persist:virtual="false" reporter:datatype="timestamp"/>
+ <field reporter:label="Circulating Item" name="target_copy" oils_obj:array_position="23" oils_persist:virtual="false" reporter:datatype="link"/>
+ <field reporter:label="Patron ZIP" name="usr_post_code" oils_obj:array_position="24" oils_persist:virtual="false" reporter:datatype="text"/>
+ <field reporter:label="Transaction Finish Date/Time" name="xact_finish" oils_obj:array_position="25" oils_persist:virtual="false" reporter:datatype="timestamp" />
+ <field reporter:label="Check Out Date/Time" name="xact_start" oils_obj:array_position="26" oils_persist:virtual="false" reporter:datatype="timestamp" />
+ <field reporter:label="Record Creation Date/Time" name="create_time" oils_obj:array_position="27" oils_persist:virtual="false" reporter:datatype="timestamp" />
+ <field reporter:label="Transaction Billings" name="billings" oils_obj:array_position="28" oils_persist:virtual="true" reporter:datatype="link"/>
+ <field reporter:label="Transaction Payments" name="payments" oils_obj:array_position="29" oils_persist:virtual="true" reporter:datatype="link"/>
+ <field reporter:label="Base Transaction" name="billable_transaction" oils_obj:array_position="30" oils_persist:virtual="true" reporter:datatype="link"/>
+ <field reporter:label="Circulation Type" name="circ_type" oils_obj:array_position="31" oils_persist:virtual="true" reporter:datatype="text"/>
+ <field reporter:label="Billing Totals" name="billing_total" oils_obj:array_position="32" oils_persist:virtual="true" reporter:datatype="money"/>
+ <field reporter:label="Payment Totals" name="payment_total" oils_obj:array_position="33" oils_persist:virtual="true" reporter:datatype="money"/>
+ <field reporter:label="Patron Home Library" name="usr_home_ou" oils_obj:array_position="34" oils_persist:virtual="false" reporter:datatype="link"/>
+ <field reporter:label="Patron Profile Group" name="usr_profile" oils_obj:array_position="35" oils_persist:virtual="false" reporter:datatype="link"/>
+ <field reporter:label="Patron Birth Year" name="usr_birth_year" oils_obj:array_position="36" oils_persist:virtual="false" reporter:datatype="int"/>
+ <field reporter:label="Call Number" name="copy_call_number" oils_obj:array_position="37" oils_persist:virtual="false" reporter:datatype="link"/>
+ <field reporter:label="Shelving Location" name="copy_location" oils_obj:array_position="38" oils_persist:virtual="false" reporter:datatype="link"/>
+ <field reporter:label="Copy Owning Library" name="copy_owning_lib" oils_obj:array_position="39" oils_persist:virtual="false" reporter:datatype="link"/>
+ <field reporter:label="Copy Circulating Library" name="copy_circ_lib" oils_obj:array_position="40" oils_persist:virtual="false" reporter:datatype="link"/>
+ <field reporter:label="Bib Record" name="copy_bib_record" oils_obj:array_position="41" oils_persist:virtual="false" reporter:datatype="link"/>
+ </fields>
+ <links>
+ <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
+ <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
+ <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
+ <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
+ <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
+ <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
+ <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
+ <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
+ <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
+ <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
+ <link field="recuring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
+ <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
+ <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
+ <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
+ <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
+ <link field="copy_location" reltype="has_a" key="id" map="" class="acl"/>
+ <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
+ <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
+ <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
+ </links>
+ </class>
+ <class id="acirc" controller="open-ils.cstore" oils_obj:fieldmapper="action::aged_circulation" oils_persist:tablename="action.aged_circulation" reporter:core="true" reporter:label="Aged (patronless) Circulation">
+ <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
+ <field name="isnew" oils_obj:array_position="0" oils_persist:virtual="true" />
+ <field name="ischanged" oils_obj:array_position="1" oils_persist:virtual="true" />
+ <field name="isdeleted" oils_obj:array_position="2" oils_persist:virtual="true" />
+ <field reporter:label="Check In Library" name="checkin_lib" oils_obj:array_position="3" oils_persist:virtual="false" reporter:datatype="org_unit"/>
+ <field reporter:label="Check In Staff" name="checkin_staff" oils_obj:array_position="4" oils_persist:virtual="false" reporter:datatype="link"/>
+ <field reporter:label="Check In Date/Time" name="checkin_time" oils_obj:array_position="5" oils_persist:virtual="false" reporter:datatype="timestamp"/>
+ <field reporter:label="Circulating Library" name="circ_lib" oils_obj:array_position="6" oils_persist:virtual="false" reporter:datatype="org_unit"/>
+ <field reporter:label="Circulating Staff" name="circ_staff" oils_obj:array_position="7" oils_persist:virtual="false" reporter:datatype="link"/>
+ <field reporter:label="Desk Renewal" name="desk_renewal" oils_obj:array_position="8" oils_persist:virtual="false" reporter:datatype="bool"/>
+ <field reporter:label="Due Date/Time" name="due_date" oils_obj:array_position="9" oils_persist:virtual="false" reporter:datatype="timestamp"/>
+ <field reporter:label="Circulation Duration" name="duration" oils_obj:array_position="10" oils_persist:virtual="false" reporter:datatype="interval"/>
+ <field reporter:label="Circ Duration Rule" name="duration_rule" oils_obj:array_position="11" oils_persist:virtual="false" reporter:datatype="link"/>
+ <field reporter:label="Fine Interval" name="fine_interval" oils_obj:array_position="12" oils_persist:virtual="false" reporter:datatype="interval"/>
+ <field reporter:label="Circ ID" name="id" oils_obj:array_position="13" oils_persist:virtual="false" reporter:datatype="id" />
+ <field reporter:label="Max Fine Amount" name="max_fine" oils_obj:array_position="14" oils_persist:virtual="false" reporter:datatype="money" />
+ <field reporter:label="Max Fine Rule" name="max_fine_rule" oils_obj:array_position="15" oils_persist:virtual="false" reporter:datatype="link"/>
+ <field reporter:label="OPAC Renewal" name="opac_renewal" oils_obj:array_position="16" oils_persist:virtual="false" reporter:datatype="bool"/>
+ <field reporter:label="Phone Renewal" name="phone_renewal" oils_obj:array_position="17" oils_persist:virtual="false" reporter:datatype="bool"/>
+ <field reporter:label="Recurring Fine Amount" name="recuring_fine" oils_obj:array_position="18" oils_persist:virtual="false" reporter:datatype="money" />
+ <field reporter:label="Recurring Fine Rule" name="recuring_fine_rule" oils_obj:array_position="19" oils_persist:virtual="false" reporter:datatype="link"/>
+ <field reporter:label="Remaining Renewals" name="renewal_remaining" oils_obj:array_position="20" oils_persist:virtual="false" reporter:datatype="int" />
+ <field reporter:label="Fine Stop Reason" name="stop_fines" oils_obj:array_position="21" oils_persist:virtual="false" reporter:datatype="text"/>
+ <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" oils_obj:array_position="22" oils_persist:virtual="false" reporter:datatype="timestamp"/>
+ <field reporter:label="Circulating Item" name="target_copy" oils_obj:array_position="23" oils_persist:virtual="false" reporter:datatype="link"/>
+ <field reporter:label="Patron ZIP" name="usr_post_code" oils_obj:array_position="24" oils_persist:virtual="false" reporter:datatype="text"/>
+ <field reporter:label="Transaction Finish Date/Time" name="xact_finish" oils_obj:array_position="25" oils_persist:virtual="false" reporter:datatype="timestamp" />
+ <field reporter:label="Check Out Date/Time" name="xact_start" oils_obj:array_position="26" oils_persist:virtual="false" reporter:datatype="timestamp" />
+ <field reporter:label="Record Creation Date/Time" name="create_time" oils_obj:array_position="27" oils_persist:virtual="false" reporter:datatype="timestamp" />
+ <field reporter:label="Transaction Billings" name="billings" oils_obj:array_position="28" oils_persist:virtual="true" reporter:datatype="link"/>
+ <field reporter:label="Transaction Payments" name="payments" oils_obj:array_position="29" oils_persist:virtual="true" reporter:datatype="link"/>
+ <field reporter:label="Base Transaction" name="billable_transaction" oils_obj:array_position="30" oils_persist:virtual="true" reporter:datatype="link"/>
+ <field reporter:label="Circulation Type" name="circ_type" oils_obj:array_position="31" oils_persist:virtual="true" reporter:datatype="text"/>
+ <field reporter:label="Billing Totals" name="billing_total" oils_obj:array_position="32" oils_persist:virtual="true" reporter:datatype="money"/>
+ <field reporter:label="Payment Totals" name="payment_total" oils_obj:array_position="33" oils_persist:virtual="true" reporter:datatype="money"/>
+ <field reporter:label="Patron Home Library" name="usr_home_ou" oils_obj:array_position="34" oils_persist:virtual="false" reporter:datatype="link"/>
+ <field reporter:label="Patron Profile Group" name="usr_profile" oils_obj:array_position="35" oils_persist:virtual="false" reporter:datatype="link"/>
+ <field reporter:label="Patron Birth Year" name="usr_birth_year" oils_obj:array_position="36" oils_persist:virtual="false" reporter:datatype="int"/>
+ <field reporter:label="Call Number" name="copy_call_number" oils_obj:array_position="37" oils_persist:virtual="false" reporter:datatype="link"/>
+ <field reporter:label="Shelving Location" name="copy_location" oils_obj:array_position="38" oils_persist:virtual="false" reporter:datatype="link"/>
+ <field reporter:label="Copy Owning Library" name="copy_owning_lib" oils_obj:array_position="39" oils_persist:virtual="false" reporter:datatype="link"/>
+ <field reporter:label="Copy Circulating Library" name="copy_circ_lib" oils_obj:array_position="40" oils_persist:virtual="false" reporter:datatype="link"/>
+ <field reporter:label="Bib Record" name="copy_bib_record" oils_obj:array_position="41" oils_persist:virtual="false" reporter:datatype="link"/>
+ </fields>
+ <links>
+ <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
+ <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
+ <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
+ <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
+ <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
+ <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
+ <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
+ <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
+ <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
+ <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
+ <link field="recuring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
+ <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
+ <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
+ <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
+ <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
+ <link field="copy_location" reltype="has_a" key="id" map="" class="acl"/>
+ <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
+ <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
+ <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
+ </links>
+ </class>
<class id="ccnbi" controller="open-ils.cstore" oils_obj:fieldmapper="container::call_number_bucket_item" oils_persist:tablename="container.call_number_bucket_item">
<fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
<field name="isnew" oils_obj:array_position="0" oils_persist:virtual="true" />
<field reporter:label="Copy Notes" name="notes" oils_obj:array_position="31" oils_persist:virtual="true" reporter:datatype="link"/>
<field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_obj:array_position="32" oils_persist:virtual="true" reporter:datatype="link"/>
<field reporter:label="Circulations" name="circulations" oils_obj:array_position="33" oils_persist:virtual="true" reporter:datatype="link"/>
- <field reporter:label="Holds" name="holds" oils_obj:array_position="34" oils_persist:virtual="true" reporter:datatype="link"/>
+ <field reporter:label="Total Circulations" name="total_circ_count" oils_obj:array_position="34" oils_persist:virtual="true" reporter:datatype="link"/>
+ <field reporter:label="Holds" name="holds" oils_obj:array_position="35" oils_persist:virtual="true" reporter:datatype="link"/>
</fields>
<links>
<link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
<link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
<link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
<link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
+ <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
</links>
<permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
<actions>
</links>
</class>
+ <class id="erfcc" controller="open-ils.reporter-store" oils_obj:fieldmapper="extend_reporter::full_circ_count" oils_persist:tablename="extend_reporter.full_circ_count" reporter:label="Total Circulation Count, Including Legacy">
+ <fields oils_persist:primary="id">
+ <field name="isnew" oils_obj:array_position="0" oils_persist:virtual="true" />
+ <field name="ischanged" oils_obj:array_position="1" oils_persist:virtual="true" />
+ <field name="isdeleted" oils_obj:array_position="2" oils_persist:virtual="true" />
+ <field reporter:label="Copy ID" name="id" oils_obj:array_position="3" oils_persist:virtual="false" reporter:datatype="int" />
+ <field reporter:label="Total Circulation Count" name="circ_count" oils_obj:array_position="4" oils_persist:virtual="false" reporter:datatype="int" />
+ </fields>
+ <links>
+ <link field="id" reltype="has_a" key="id" map="" class="acp"/>
+ </links>
+ </class>
+
<!-- ********************************************************************************************************************* -->
<!-- What follows is a set of example extensions that are useful for PINES. Comment out or remove if you don't want them. -->
<!-- ********************************************************************************************************************* -->
<item name='renew' value='true'/>
<item name='renew all' value='false'/>
</supports>
-
+ <options>
+ <!-- msg64, the patron information request can be
+ made to return item barcodes by setting
+ the option 'msg64_summary_datatype' to 'barcode'
+ as below. Any other value, or no value at all
+ will cause OpenILS::SIP to return the title
+ in response to a message 64 request, which was the
+ default behaviour in previous versions of Evergreen.
+ -->
+ <option name='msg64_summary_datatype' value='barcode' />
+ </option>
<scripts>
<path>/openils/var/</path>
<path>/openils/var/catalog/</path>
#
# Makefile to install prerequisites for OpenSRF and Evergreen
#
-# Currently supports Debian (etch), Ubuntu (gutsy) and Gentoo. Installs Perl prereqs,
-# libjs with Perl wrapper, libdbi, libdbi-drivers, and libyaz
+# Currently supports Debian (etch), Ubuntu (gutsy), and Gentoo.
+# Working towards support of CentOS 5 / RHEL 5.
+# Installs Perl prereqs, libjs with Perl wrapper, libdbi, libdbi-drivers, and libyaz
#
# usage:
# make -f Makefile.install debian
# - or -
# make -f Makefile.install ubuntu
# - or -
+# make -f Makefile.install centos
+# - or -
+# make -f Makefile.install rhel
+# - or -
# make -f Makefile.install gentoo
#
# Notes:
#
-# This makefile has been tested much more with Debian than Gentoo.
+# This makefile has been tested much more with Debian than CentOS, Gentoo, or RHEL.
#
# Gentoo (especially amd64) requires a good bit of masked package
# mangling for some packages. These are not documented here because
YAZ=yaz-2.1.56
YAZ_HOST=http://ftp.indexdata.dk/pub/yaz
+# ejabberd is not packaged on CentOS/RHEL, so we have to
+# download the installable package from the source
+EJABBERD_VER=2.0.1
+EJABBERD_PKG=ejabberd-2.0.1_2-linux-x86-installer.bin
+EJABBERD_HOST=http://www.process-one.net/downloads/ejabberd
+
+# Business::OnlinePayment is not packaged on CentOS/RHEL
+PAY_ONLINE=Business-OnlinePayment-3.00_08.tar.gz
+PAY_ONLINE_HOST=http://ftp.perl.org/pub/CPAN/authors/id/I/IV/IVAN/
+
+
+# XML::LibXSLT fails due to old libxslt
+XSLT=libxslt-1.1.22
+XSLT_HOST=ftp://ftp.gnome.org/pub/GNOME/sources/libxslt/1.1
+
+# libxslt depends on a newer version of libxml2:
+XML2=libxml2-2.6.30.tar.gz
+XML2_HOST=ftp://ftp.gnome.org/pub/GNOME/sources/libxml2/2.6
+
+APT_TOOL=aptitude
+
# Debian dependencies
DEBS = \
build-essential\
libbusiness-onlinepayment-perl\
libbusiness-onlinepayment-authorizenet-perl
+CENTOS = \
+ apr-util-devel \
+ aspell \
+ aspell-devel \
+ aspell-en \
+ autoconf \
+ automake \
+ gcc \
+ gd-devel \
+ gdbm-devel \
+ httpd-devel \
+ less \
+ libtool \
+ libxml2-devel \
+ libxslt-devel \
+ make \
+ mod_perl \
+ mod_ssl \
+ ntp \
+ perl-DBD-Pg \
+ perl-DBI \
+ perl-XML-LibXML \
+ perl-XML-Simple \
+ perl-libwww-perl \
+ psmisc \
+ python-devel \
+ readline-devel \
+ wget
+
+PGSQL_CENTOS = \
+ postgresql \
+ postgresql-contrib \
+ postgresql-devel \
+ postgresql-pl \
+ postgresql-server
+
+# Some of these packages have stupid bugs in their test suites
+# that are simply too painful to workaround
+CENTOS_PERL_NOTEST = \
+ Business::OnlinePayment::AuthorizeNet \
+ DateTime::Format::Strptime \
+ RPC::XML
+
+# This is a developer's version, but B:OP:AuthorizeNet depends on it
+CENTOS_PERL_VERSION = \
+ IVAN/Business-OnlinePayment-3.00_08.tar.gz
+
+CENTOS_PERL_LOCAL = \
+ XML-LibXSLT
+
+CENTOS_PERL = \
+ Business::CreditCard \
+ Cache::Memcached \
+ Class::DBI::AbstractSearch \
+ Class::DBI::Pg \
+ Class::DBI::SQLite \
+ DateTime \
+ DateTime::TimeZone \
+ DateTime::Format::Builder \
+ Error \
+ File::Find::Rule \
+ FreezeThaw \
+ GD::Graph3d \
+ Log::Log4perl \
+ MARC::Record \
+ Net::Jabber \
+ Net::Z3950::ZOOM \
+ Spreadsheet::WriteExcel \
+ Template \
+ Test::Pod \
+ Text::Aspell \
+ Text::CSV \
+ Tie::IxHash \
+ Unix::Syslog \
+ UNIVERSAL::require \
+ XML::LibXSLT
PGSQL_DEBIAN = \
postgresql-8.1\
DateTime::Format::ISO8601 \
TMTM/Class-DBI-0.96.tar.gz \
RHANDOM/Net-Server-0.90.tar.gz \
- MARC::Charset MARC::File::XML\
- JSON::XS\
+ MARC::Charset MARC::File::XML \
+ JSON::XS \
SRU \
Net::Z3950::ZOOM \
Business::CreditCard::Object \
# these should be the same for any distro
install: install_yaz install_cpan install_js_sm install_libdbi
+centos: install_centos_pgsql install_centos_rpms install_ejabberd install install_libxml2 install_libxslt install_centos_perl
debian: install_pgsql_debian install_debs install debian_sys_config
gentoo: install_gentoos install_gentoo_rc install_gentoo_perl install
+rhel: centos
+
ubuntu: install_pgsql_ubuntu install_debs install debian_sys_config
install_cpan:
for m in $(CPAN_MODULES); do perl -MCPAN -e "install \"$$m\";"; done
-
+# Install ejabberd from official project installer binary
+install_ejabberd:
+ if [ ! -f $(EJABBERD_PKG).gz ]; then wget $(EJABBERD_HOST)/$(EJABBERD_VER)/$(EJABBERD_PKG).gz; fi;
+ gunzip $(EJABBERD_PKG).gz
+ chmod u+x $(EJABBERD_PKG).gz
+ ./$(EJABBERD_PKG) --mode unattended --prefix /opt/ejabberd --adminpw evergreen
+
+# Install a newer version of libxslt
+install_libxslt:
+ if [ ! -d $(XSLT) ]; then wget $(XSLT_HOST)/$(XSLT).tar.gz; fi;
+ tar xzf $(XSLT).tar.gz
+ cd $(XSLT) && ./configure --with-libxml-prefix=/usr/local && make && make install
+
+# Install a newer version of libxml2
+install_libxml2:
+ if [ ! -d $(XML2) ]; then wget $(XML2_HOST)/$(XML2).tar.gz; fi;
+ tar xzf $(XML2).tar.gz
+ cd $(XML2) && ./configure && make && make install
+
+# Install a known working version of YAZ
install_yaz:
if [ ! -d $(YAZ) ]; then wget $(YAZ_HOST)/$(YAZ).tar.gz; fi;
tar xzf $(YAZ).tar.gz
make -C $(LIBDBI) clean
make -C $(LIBDBI_DRIVERS) clean
make -C $(LIBJS_PERL) clean
+ make -C $(XML2) clean
+ make -C $(XSLT) clean
make -f Makefile.ref -C js/src/ clean
# Install the debian-specific dependencies
install_debs:
- apt-get install $(DEBS)
+ $(APT_TOOL) install $(DEBS)
install_pgsql_debian:
- apt-get install $(PGSQL_DEBIAN)
+ $(APT_TOOL) install $(PGSQL_DEBIAN)
install_pgsql_ubuntu:
- apt-get install $(PGSQL_UBUNTU)
+ $(APT_TOOL) install $(PGSQL_UBUNTU)
# ------------------------------------------------------------------
# - GENTOO ---------------------------------------------------------
# ------------------------------------------------------------------
+# CENTOS
+install_centos_rpms:
+ yum -y install $(CENTOS)
+
+install_centos_pgsql:
+ yum -y install $(PGSQL_CENTOS)
+
+install_centos_perl:
+ for m in $(CENTOS_PERL); do perl -MCPAN -e "install \"$$m\";"; done
+ for m in $(CENTOS_PERL_VERSION); do perl -MCPAN -e "CPAN::Shell->install \"$$m\";"; done
+ for m in $(CENTOS_PERL_NOTEST); do perl -MCPAN -e "CPAN::Shell->notest('install', \"$$m\";"; done
+ for m in $(CENTOS_PERL_LOCAL); do LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/lib perl -MCPAN -e "install \"$$m\";"; done
+
/* this will set defaults even if no one asked for them */
log_debug("Calling getItemConfig() to force defaults..");
-getItemConfig();
+result.item_config = getItemConfig();
function getItemConfig() {
use base qw/OpenILS::Application/;
use strict; use warnings;
use OpenILS::Application::AppUtils;
+use DateTime;
use Data::Dumper;
use OpenSRF::EX qw(:try);
use OpenILS::Perm;
use OpenILS::Event;
+use OpenSRF::Utils;
use OpenSRF::Utils::Logger qw(:logger);
use OpenILS::Utils::CStoreEditor q/:funcs/;
use OpenILS::Utils::PermitHold;
+
__PACKAGE__->register_method(
method => "create_hold",
api_name => "open-ils.circ.holds.create",
}
}
+ # set the configured expire time
+ my $interval = $U->ou_ancestor_setting_value($recipient->home_ou, OILS_SETTING_HOLD_EXPIRE);
+ if($interval) {
+ my $date = DateTime->now->add(seconds => OpenSRF::Utils::interval_to_seconds($interval));
+ $hold->expire_time($U->epoch2ISO8601($date->epoch));
+ }
+
$hold->requestor($e->requestor->id);
$hold->request_lib($e->requestor->ws_ou);
$hold->selection_ou($hold->pickup_lib) unless $hold->selection_ou;
);
# ... and test for location and status visibility
- return [ map { ($U->is_true($_->location->opac_visible) && $U->is_true($_->status->holdable)) ? ($_->id) : () } @$copies ];
+ return [ map { ($U->is_true($_->location->opac_visible) && $U->is_true($_->status->opac_visible)) ? ($_->id) : () } @$copies ];
}
use base qw/config/;
__PACKAGE__->table('config_copy_status');
__PACKAGE__->columns(Primary => 'id');
-__PACKAGE__->columns(Essential => qw/name holdable/);
+__PACKAGE__->columns(Essential => qw/name holdable opac_visible/);
#-------------------------------------------------------------------------------
package config::net_access_level;
WHERE ou.id = ?
AND h.capture_time IS NULL
AND h.cancel_time IS NULL
+ AND (h.expire_time IS NULL OR h.expire_time > NOW())
ORDER BY h.request_time
SQL
AND (AGE(NOW(),h.request_time) >= CAST(? AS INTERVAL) OR p.prox = 0)
AND h.capture_time IS NULL
AND h.cancel_time IS NULL
+ AND (h.expire_time IS NULL OR h.expire_time > NOW())
AND h.frozen IS FALSE
ORDER BY
p.prox,
WHERE a.circ_lib = ?
AND h.capture_time IS NULL
AND h.cancel_time IS NULL
+ AND (h.expire_time IS NULL OR h.expire_time > NOW())
$status_filter
ORDER BY h.request_time ASC
LIMIT $limit
$client->respond( "Error processing overdue circulation [".$c->id."]:\n\n$e\n" );
$log->error("Error processing overdue circulation [".$c->id."]:\n$e\n");
$self->method_lookup('open-ils.storage.transaction.rollback')->run;
- throw $e ifif ($e =~ /IS NOT CONNECTED TO THE NETWORK/o);
+ throw $e if ($e =~ /IS NOT CONNECTED TO THE NETWORK/o);
};
}
}
#first, re-fetch the hold, to make sure it's not captured already
$hold->remove_from_object_index();
$hold = action::hold_request->retrieve( $hold->id );
- die "OK\n" if (!$hold or $hold->capture_time);
# remove old auto-targeting maps
my @oldmaps = action::hold_copy_map->search( hold => $hold->id );
$_->delete for (@oldmaps);
-
+ if ($hold->expire_time) {
+ my $ex_time = $parser->parse_datetime( clense_ISO8601( $hold->expire_time ) );
+ $hold->update( { cancel_time => 'now' } ) if ( DateTime->compare($ex_time, DateTime->now) < 0 );
+ $self->method_lookup('open-ils.storage.transaction.commit')->run;
+ }
+
+ die "OK\n" if (!$hold or $hold->capture_time or $hold->cancel_time);
+
my $all_copies = [];
# find filters for MR holds
$ancestors = "(select org_unit as id from actor.org_lasso_map where lasso = ?) u CROSS JOIN (SELECT -1 AS depth) t";
}
- my $visible = 'AND a.opac_visible = TRUE AND st.holdable = TRUE AND loc.opac_visible = TRUE AND cp.opac_visible = TRUE';
+ my $visible = 'AND a.opac_visible = TRUE AND st.opac_visible = TRUE AND loc.opac_visible = TRUE AND cp.opac_visible = TRUE';
if ($self->api_name =~ /staff/o) {
$visible = ''
}
$visible
AND cn.deleted IS FALSE
AND cp.deleted IS FALSE
- AND cp.status IN (0,7))
+ AND cp.status IN (0,7,12))
) AS available,
sum(
(SELECT count(cp.id)
JOIN $st_table st ON (cp.status = st.id)
JOIN $loc_table loc ON (cp.location = loc.id)
WHERE cn.record = ?
- AND st.holdable = TRUE
+ AND st.opac_visible = TRUE
AND loc.opac_visible = TRUE
AND cp.opac_visible = TRUE
AND cn.deleted IS FALSE
my $cl_table = asset::copy_location->table;
my $cs_table = config::copy_status->table;
- my $copies_visible = 'AND cp.opac_visible IS TRUE AND cs.holdable IS TRUE AND cl.opac_visible IS TRUE';
+ my $copies_visible = 'AND cp.opac_visible IS TRUE AND cs.opac_visible IS TRUE AND cl.opac_visible IS TRUE';
$copies_visible = '' if ($self->api_name =~ /staff/o);
my $sql = <<" SQL";
JOIN $cs_table cs ON (cs.id = cp.status)
JOIN $cl_table cl ON (cl.id = cp.location)
WHERE cn.record = ?
- AND cp.status IN (0,7)
+ AND cp.status IN (0,7,12)
$copies_visible
GROUP BY 1
UNION
AND cl.opac_visible IS TRUE
AND cp.opac_visible IS TRUE
AND cp.deleted IS FALSE
- AND cs.holdable
+ AND cs.opac_visible IS TRUE
GROUP BY 1,2,3;
SQL
"actor.org_unit_descendants($org)" ;
- my $copies_visible = 'AND d.opac_visible IS TRUE AND cp.opac_visible IS TRUE AND cs.holdable IS TRUE AND cl.opac_visible IS TRUE';
+ my $copies_visible = 'AND d.opac_visible IS TRUE AND cp.opac_visible IS TRUE AND cs.opac_visible IS TRUE AND cl.opac_visible IS TRUE';
$copies_visible = '' if ($self->api_name =~ /staff/o);
my $sm_table = metabib::metarecord_source_map->table;
$ancestors = "(select org_unit as id from actor.org_lasso_map where lasso = ?) u CROSS JOIN (SELECT -1 AS depth) t";
}
- my $copies_visible = 'AND a.opac_visible IS TRUE AND cp.opac_visible IS TRUE AND cs.holdable IS TRUE AND cl.opac_visible IS TRUE';
+ my $copies_visible = 'AND a.opac_visible IS TRUE AND cp.opac_visible IS TRUE AND cs.opac_visible IS TRUE AND cl.opac_visible IS TRUE';
$copies_visible = '' if ($self->api_name =~ /staff/o);
my (@types,@forms,@blvl);
JOIN $cl_table cl ON (cp.location = cl.id)
JOIN $descendants a ON (cp.circ_lib = a.id)
WHERE r.metarecord = ?
- AND cp.status IN (0,7)
+ AND cp.status IN (0,7,12)
AND cn.deleted IS FALSE
AND cp.deleted IS FALSE
$copies_visible
AND cn.deleted IS FALSE
AND cp.deleted IS FALSE
AND cp.opac_visible IS TRUE
- AND cs.holdable IS TRUE
+ AND cs.opac_visible IS TRUE
AND cl.opac_visible IS TRUE
$t_filter
$f_filter
my $has_vols = 'AND cn.owning_lib = d.id';
my $has_copies = 'AND cp.call_number = cn.id';
- my $copies_visible = 'AND d.opac_visible IS TRUE AND cp.opac_visible IS TRUE AND cs.holdable IS TRUE AND cl.opac_visible IS TRUE';
+ my $copies_visible = 'AND d.opac_visible IS TRUE AND cp.opac_visible IS TRUE AND cs.opac_visible IS TRUE AND cl.opac_visible IS TRUE';
if ($self->api_name =~ /staff/o) {
$copies_visible = '';
my $has_vols = 'AND cn.owning_lib = d.id';
my $has_copies = 'AND cp.call_number = cn.id';
- my $copies_visible = 'AND d.opac_visible IS TRUE AND cp.opac_visible IS TRUE AND cs.holdable IS TRUE AND cl.opac_visible IS TRUE';
+ my $copies_visible = 'AND d.opac_visible IS TRUE AND cp.opac_visible IS TRUE AND cs.opac_visible IS TRUE AND cl.opac_visible IS TRUE';
my $visible_count = ', count(DISTINCT cp.id)';
my $visible_count_test = 'HAVING count(DISTINCT cp.id) > 0';
my $has_vols = 'AND cn.owning_lib = d.id';
my $has_copies = 'AND cp.call_number = cn.id';
- my $copies_visible = 'AND d.opac_visible IS TRUE AND cp.opac_visible IS TRUE AND cs.holdable IS TRUE AND cl.opac_visible IS TRUE';
+ my $copies_visible = 'AND d.opac_visible IS TRUE AND cp.opac_visible IS TRUE AND cs.opac_visible IS TRUE AND cl.opac_visible IS TRUE';
if ($self->api_name =~ /staff/o) {
$copies_visible = '';
$has_vols = '' if ($ou_type == 0);
AND cn.owning_lib = d.id
AND cp.call_number = cn.id
AND cp.opac_visible IS TRUE
- AND cs.holdable IS TRUE
+ AND cs.opac_visible IS TRUE
AND cl.opac_visible IS TRUE
AND d.opac_visible IS TRUE
AND br.active IS TRUE
AND cp.circ_lib = d.id
AND cp.call_number = cn.id
AND cp.opac_visible IS TRUE
- AND cs.holdable IS TRUE
+ AND cs.opac_visible IS TRUE
AND cl.opac_visible IS TRUE
AND d.opac_visible IS TRUE
AND br.active IS TRUE
my ($oa_filter, $ol_filter, $olf_filter) = ('','','');
if ($args{available}) {
- $avail_filter = ' AND cp.status IN (0,7)';
+ $avail_filter = ' AND cp.status IN (0,7,12)';
}
if (my $a = $args{audience}) {
AND cp.circ_lib = d.id
AND cp.call_number = cn.id
AND cp.opac_visible IS TRUE
- AND cs.holdable IS TRUE
+ AND cs.opac_visible IS TRUE
AND cl.opac_visible IS TRUE
AND d.opac_visible IS TRUE
AND br.active IS TRUE
my ($oa_filter, $ol_filter, $olf_filter) = ('','','');
if ($args{available}) {
- $avail_filter = ' AND cp.status IN (0,7)';
+ $avail_filter = ' AND cp.status IN (0,7,12)';
}
if (my $a = $args{audience}) {
AND cp.location = cl.id
AND cp.call_number = cn.id
AND cp.opac_visible IS TRUE
- AND cs.holdable IS TRUE
+ AND cs.opac_visible IS TRUE
AND cl.opac_visible IS TRUE
AND d.opac_visible IS TRUE
AND cp.deleted IS FALSE
die "No search arguments were passed to ".$self->api_name;
}
- my (@statuses,@types,@forms,@lang,@aud,@lit_form,@vformats,@bib_level);
+ my (@statuses,@locations,@types,@forms,@lang,@aud,@lit_form,@vformats,@bib_level);
if ($args{available}) {
- @statuses = (0,7);
+ @statuses = (0,7,12);
+ }
+
+ if (my $s = $args{locations}) {
+ $s = [$s] if (!ref($s));
+ @locations = @$s;
}
if (my $s = $args{statuses}) {
my $param_depth = $args{depth}; $param_depth = 'NULL' unless (defined($param_depth) and length($param_depth) > 0 );
my $param_searches = OpenSRF::Utils::JSON->perl2JSON( \%stored_proc_search_args ); $param_searches =~ s/\$//go; $param_searches = '$$'.$param_searches.'$$';
my $param_statuses = '$${' . join(',', map { s/\$//go; "\"$_\""} @statuses) . '}$$';
+ my $param_locations = '$${' . join(',', map { s/\$//go; "\"$_\""} @locations) . '}$$';
my $param_audience = '$${' . join(',', map { s/\$//go; "\"$_\"" } @aud) . '}$$';
my $param_language = '$${' . join(',', map { s/\$//go; "\"$_\""} @lang) . '}$$';
my $param_lit_form = '$${' . join(',', map { s/\$//go; "\"$_\"" } @lit_form) . '}$$';
$param_depth,
$param_searches,
$param_statuses,
+ $param_locations,
$param_audience,
$param_language,
$param_lit_form,
return $self->{_sql} if ($self->{_sql});
- my $sql;
+ my $sql = '';
my $rel = $self->find_relation();
if ($rel && $rel->is_nullable) {
- $sql = "(". $self->SUPER::toSQL ." IS NULL OR ";
+ $sql = "((". $self->SUPER::toSQL .") IS NULL OR ";
}
$sql .= $self->SUPER::toSQL;
if (lc($op) eq 'in') {
$sql .= " IN (". join(",", map { $_->toSQL } @$val).")";
+
} elsif (lc($op) eq 'not in') {
$sql .= " NOT IN (". join(",", map { $_->toSQL } @$val).")";
+
+ } elsif (lc($op) eq 'is blank') {
+ $sql = '('. $self->SUPER::toSQL ." IS NULL OR ". $self->SUPER::toSQL ." = '')";
+
+ } elsif (lc($op) eq 'is not blank') {
+ $sql = '('. $self->SUPER::toSQL ." IS NOT NULL AND ". $self->SUPER::toSQL ." <> '')";
+
} elsif (lc($op) eq 'between') {
$sql .= " BETWEEN ". join(" AND ", map { $_->toSQL } @$val);
+
} elsif (lc($op) eq 'not between') {
$sql .= " NOT BETWEEN ". join(" AND ", map { $_->toSQL } @$val);
+
} elsif (lc($op) eq 'like') {
$val = $$val[0] if (ref($val) eq 'ARRAY');
$val = $val->toSQL;
$val =~ s/%/\\\\%/o;
$val =~ s/_/\\\\_/o;
$sql .= " LIKE '\%$val\%'";
+
} elsif (lc($op) eq 'ilike') {
$val = $$val[0] if (ref($val) eq 'ARRAY');
$val = $val->toSQL;
$val =~ s/%/\\\\%/o;
$val =~ s/_/\\\\_/o;
$sql .= " ILIKE '\%$val\%'";
+
} else {
$val = $$val[0] if (ref($val) eq 'ARRAY');
$sql .= " $op " . $val->toSQL;
sub magnetic {
my $self = shift;
return 0 unless $self->run_attr_script;
- my $mag = $self->{item_config_result}->{magneticMedia};
+ my $mag = $self->{item_config_result}->{item_config}->{magneticMedia};
syslog('LOG_DEBUG', "OILS: magnetic = $mag");
return ($mag and $mag eq 't') ? 1 : 0;
}
sub sip_media_type {
my $self = shift;
return 0 unless $self->run_attr_script;
- my $media = $self->{item_config_result}->{SIPMediaType};
+ my $media = $self->{item_config_result}->{item_config}->{SIPMediaType};
syslog('LOG_DEBUG', "OILS: media type = $media");
return ($media) ? $media : '001';
}
my @o;
syslog('LOG_DEBUG', "OILS: overdue_items() fleshing circs @overdues");
+
+
+ my @return_datatype = grep { $_->{name} eq 'msg64_summary_datatype' } @{$self->{config}->{implementation_config}->{options}->{option}};
+
for my $circid (@overdues) {
next unless $circid;
- push( @o, __circ_to_title($self->{editor}, $circid) );
+ if(@return_datatype and $return_datatype[0]->{value} eq 'barcode') {
+ push( @o, __circ_to_barcode($self->{editor}, $circid));
+ } else {
+ push( @o, __circ_to_title($self->{editor}, $circid));
+ }
}
@overdues = @o;
[ $overdues[($start-1)..($end-1)] ] : \@overdues;
}
+sub __circ_to_barcode {
+ my ($e, $circ) = @_;
+ return unless $circ;
+ $circ = $e->retrieve_action_circulation($circ);
+ my $copy = $e->retrieve_asset_copy($circ->target_copy);
+ return $copy->barcode;
+}
+
sub __circ_to_title {
my( $e, $circ ) = @_;
return unless $circ;
my @c;
syslog('LOG_DEBUG', "OILS: charged_items() fleshing circs @charges");
+
+ my @return_datatype = grep { $_->{name} eq 'msg64_summary_datatype' } @{$self->{config}->{implementation_config}->{options}->{option}};
+
for my $circid (@charges) {
next unless $circid;
- push( @c, __circ_to_title($self->{editor}, $circid) );
+ if(@return_datatype and $return_datatype[0]->{value} eq 'barcode') {
+ push( @c, __circ_to_barcode($self->{editor}, $circid));
+ } else {
+ push( @c, __circ_to_title($self->{editor}, $circid));
+ }
}
+
@charges = @c;
return (defined $start and defined $end) ?
+/*
+ * Copyright (C) 2004-2008 Georgia Public Library Service
+ * Copyright (C) 2008 Equinox Software, Inc.
+ * Mike Rylander <miker@esilibrary.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
BEGIN;
+/*
+ * Copyright (C) 2004-2008 Georgia Public Library Service
+ * Copyright (C) 2008 Equinox Software, Inc.
+ * Mike Rylander <miker@esilibrary.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
BEGIN;
+/*
+ * Copyright (C) 2004-2008 Georgia Public Library Service
+ * Copyright (C) 2008 Equinox Software, Inc.
+ * Mike Rylander <miker@esilibrary.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
BEGIN;
+/*
+ * Copyright (C) 2004-2008 Georgia Public Library Service
+ * Copyright (C) 2008 Equinox Software, Inc.
+ * Mike Rylander <miker@esilibrary.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
DROP SCHEMA offline CASCADE;
+/*
+ * Copyright (C) 2004-2008 Georgia Public Library Service
+ * Copyright (C) 2008 Equinox Software, Inc.
+ * Mike Rylander <miker@esilibrary.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+
BEGIN;
/*
+/*
+ * Copyright (C) 2004-2008 Georgia Public Library Service
+ * Copyright (C) 2008 Equinox Software, Inc.
+ * Mike Rylander <miker@esilibrary.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+
DROP SCHEMA stats CASCADE;
DROP SCHEMA config CASCADE;
CREATE TABLE config.copy_status (
id SERIAL PRIMARY KEY,
name TEXT NOT NULL UNIQUE,
- holdable BOOL NOT NULL DEFAULT FALSE
+ holdable BOOL NOT NULL DEFAULT FALSE,
+ opac_visible BOOL NOT NULL DEFAULT FALSE
);
COMMENT ON TABLE config.copy_status IS $$
/*
+/*
+ * Copyright (C) 2004-2008 Georgia Public Library Service
+ * Copyright (C) 2008 Equinox Software, Inc.
+ * Mike Rylander <miker@esilibrary.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+
DROP SCHEMA permission CASCADE;
BEGIN;
+/*
+ * Copyright (C) 2004-2008 Georgia Public Library Service
+ * Copyright (C) 2008 Equinox Software, Inc.
+ * Mike Rylander <miker@esilibrary.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
DROP SCHEMA biblio CASCADE;
BEGIN;
+/*
+ * Copyright (C) 2004-2008 Georgia Public Library Service
+ * Copyright (C) 2008 Equinox Software, Inc.
+ * Mike Rylander <miker@esilibrary.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
DROP SCHEMA authority CASCADE;
BEGIN;
+/*
+ * Copyright (C) 2004-2008 Georgia Public Library Service
+ * Copyright (C) 2007-2008 Equinox Software, Inc.
+ * Mike Rylander <miker@esilibrary.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
CREATE OR REPLACE FUNCTION public.non_filing_normalize ( TEXT, "char" ) RETURNS TEXT AS $$
SELECT SUBSTRING(
REGEXP_REPLACE(
+/*
+ * Copyright (C) 2004-2008 Georgia Public Library Service
+ * Copyright (C) 2007-2008 Equinox Software, Inc.
+ * Mike Rylander <miker@esilibrary.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
DROP SCHEMA metabib CASCADE;
BEGIN;
+/*
+ * Copyright (C) 2004-2008 Georgia Public Library Service
+ * Copyright (C) 2007-2008 Equinox Software, Inc.
+ * Mike Rylander <miker@esilibrary.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
DROP SCHEMA asset CASCADE;
BEGIN;
+/*
+ * Copyright (C) 2004-2008 Georgia Public Library Service
+ * Copyright (C) 2007-2008 Equinox Software, Inc.
+ * Mike Rylander <miker@esilibrary.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
DROP SCHEMA container CASCADE;
BEGIN;
+/*
+ * Copyright (C) 2004-2008 Georgia Public Library Service
+ * Copyright (C) 2007-2008 Equinox Software, Inc.
+ * Mike Rylander <miker@esilibrary.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
DROP SCHEMA money CASCADE;
BEGIN;
+/*
+ * Copyright (C) 2004-2008 Georgia Public Library Service
+ * Copyright (C) 2007-2008 Equinox Software, Inc.
+ * Mike Rylander <miker@esilibrary.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
DROP SCHEMA action CASCADE;
BEGIN;
CREATE INDEX circ_circ_lib_idx ON "action".circulation (circ_lib);
CREATE INDEX circ_open_date_idx ON "action".circulation (xact_start) WHERE xact_finish IS NULL;
+CREATE TABLE action.aged_circulation (
+ usr_post_code TEXT,
+ usr_home_ou INT NOT NULL,
+ usr_profile INT NOT NULL,
+ usr_birth_year INT,
+ copy_call_number INT NOT NULL,
+ copy_location INT NOT NULL,
+ copy_owning_lib INT NOT NULL,
+ copy_circ_lib INT NOT NULL,
+ copy_bib_record BIGINT NOT NULL,
+ LIKE action.circulation
+
+);
+ALTER TABLE action.aged_circulation ADD PRIMARY KEY (id);
+ALTER TABLE action.aged_circulation DROP COLUMN usr;
+CREATE INDEX aged_circ_circ_lib_idx ON "action".aged_circulation (circ_lib);
+CREATE INDEX aged_circ_start_idx ON "action".aged_circulation (xact_start);
+CREATE INDEX aged_circ_copy_circ_lib_idx ON "action".aged_circulation (copy_circ_lib);
+CREATE INDEX aged_circ_copy_owning_lib_idx ON "action".aged_circulation (copy_owning_lib);
+CREATE INDEX aged_circ_copy_location_idx ON "action".aged_circulation (copy_location);
+
+CREATE OR REPLACE VIEW action.all_circulation AS
+ SELECT id,usr_post_code, usr_home_ou, usr_profile, usr_birth_year, copy_call_number, copy_location,
+ copy_owning_lib, copy_circ_lib, copy_bib_record, xact_start, xact_finish, target_copy,
+ circ_lib, circ_staff, checkin_staff, checkin_lib, renewal_remaining, due_date,
+ stop_fines_time, checkin_time, create_time, duration, fine_interval, recuring_fine,
+ max_fine, phone_renewal, desk_renewal, opac_renewal, duration_rule, recuring_fine_rule,
+ max_fine_rule, stop_fines
+ FROM action.aged_circulation
+ UNION ALL
+ SELECT circ.id,COALESCE(a.post_code,b.post_code) AS usr_post_code, p.home_ou AS usr_home_ou, p.profile AS usr_profile, EXTRACT(YEAR FROM p.dob)::INT AS usr_birth_year,
+ cp.call_number AS copy_call_number, cp.location AS copy_location, cn.owning_lib AS copy_owning_lib, cp.circ_lib AS copy_circ_lib,
+ cn.record AS copy_bib_record, circ.xact_start, circ.xact_finish, circ.target_copy, circ.circ_lib, circ.circ_staff, circ.checkin_staff,
+ circ.checkin_lib, circ.renewal_remaining, circ.due_date, circ.stop_fines_time, circ.checkin_time, circ.create_time, circ.duration,
+ circ.fine_interval, circ.recuring_fine, circ.max_fine, circ.phone_renewal, circ.desk_renewal, circ.opac_renewal, circ.duration_rule,
+ circ.recuring_fine_rule, circ.max_fine_rule, circ.stop_fines
+ FROM action.circulation circ
+ JOIN asset.copy cp ON (circ.target_copy = cp.id)
+ JOIN asset.call_number cn ON (cp.call_number = cn.id)
+ JOIN actor.usr p ON (circ.usr = p.id)
+ LEFT JOIN actor.usr_address a ON (p.mailing_address = a.id)
+ LEFT JOIN actor.usr_address b ON (p.billing_address = a.id);
+
+CREATE OR REPLACE FUNCTION action.age_circ_on_delete () RETURNS TRIGGER AS $$
+BEGIN
+ INSERT INTO action.aged_circulation
+ (id,usr_post_code, usr_home_ou, usr_profile, usr_birth_year, copy_call_number, copy_location,
+ copy_owning_lib, copy_circ_lib, copy_bib_record, xact_start, xact_finish, target_copy,
+ circ_lib, circ_staff, checkin_staff, checkin_lib, renewal_remaining, due_date,
+ stop_fines_time, checkin_time, create_time, duration, fine_interval, recuring_fine,
+ max_fine, phone_renewal, desk_renewal, opac_renewal, duration_rule, recuring_fine_rule,
+ max_fine_rule, stop_fines)
+ SELECT
+ id,usr_post_code, usr_home_ou, usr_profile, usr_birth_year, copy_call_number, copy_location,
+ copy_owning_lib, copy_circ_lib, copy_bib_record, xact_start, xact_finish, target_copy,
+ circ_lib, circ_staff, checkin_staff, checkin_lib, renewal_remaining, due_date,
+ stop_fines_time, checkin_time, create_time, duration, fine_interval, recuring_fine,
+ max_fine, phone_renewal, desk_renewal, opac_renewal, duration_rule, recuring_fine_rule,
+ max_fine_rule, stop_fines
+ FROM action.all_circulation WHERE id = OLD.id;
+
+ RETURN OLD;
+END;
+$$ LANGUAGE 'plpgsql';
+
+CREATE TRIGGER action_circulation_aging_tgr
+ BEFORE DELETE ON action.circulation
+ FOR EACH ROW
+ EXECUTE PROCEDURE action.age_circ_on_delete ();
+
CREATE OR REPLACE VIEW action.open_circulation AS
SELECT *
--- /dev/null
+/*
+ * Copyright (C) 2008 Equinox Software, Inc.
+ * Mike Rylander <miker@esilibrary.com.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+BEGIN;
+
+CREATE SCHEMA extend_reporter;
+
+CREATE TABLE extend_reporter.legcay_circ_count (
+ id BIGSERIAL PRIMARY KEY REFERENCES asset.copy (id)
+ circ_count INT NOT NULL DEFAULT 0
+);
+
+CREATE VIEW extend_reporter.full_circ_count AS
+ SELECT cp.id, COALESCE(sum(c.circ_count), 0::bigint) + COALESCE(count(circ.id), 0::bigint) AS circ_count
+ FROM asset."copy" cp
+ LEFT JOIN extend_reporter.legcay_circ_count c USING (id)
+ LEFT JOIN "action".circulation circ ON circ.target_copy = c.id
+ GROUP BY cp.id;
+
+COMMIT;
+
+/*
+ * Copyright (C) 2007-2008 Equinox Software, Inc.
+ * Mike Rylander <miker@esilibrary.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
DROP SCHEMA search CASCADE;
param_depth INT,
param_searches TEXT, -- JSON hash, to be turned into a resultset via search.parse_search_args
param_statuses INT[],
+ param_locations INT[],
param_audience TEXT[],
param_language TEXT[],
param_lit_form TEXT[],
END IF;
+ IF param_locations IS NOT NULL AND array_upper(param_locations, 1) > 0 THEN
+
+ PERFORM 1
+ FROM asset.call_number cn
+ JOIN asset.copy cp ON (cp.call_number = cn.id)
+ WHERE NOT cn.deleted
+ AND NOT cp.deleted
+ AND cp.location IN ( SELECT * FROM search.explode_array( param_locations ) )
+ AND cn.record IN ( SELECT * FROM search.explode_array( core_result.records ) )
+ AND cp.circ_lib IN ( SELECT * FROM search.explode_array( search_org_list ) )
+ LIMIT 1;
+
+ IF NOT FOUND THEN
+ -- RAISE NOTICE ' % were all copy_location-excluded ... ', core_result.records;
+ excluded_count := excluded_count + 1;
+ CONTINUE;
+ END IF;
+
+ END IF;
+
IF staff IS NULL OR NOT staff THEN
PERFORM 1
JOIN config.copy_status cs ON (cp.status = cs.id)
WHERE NOT cn.deleted
AND NOT cp.deleted
- AND cs.holdable
+ AND cs.opac_visible
AND cl.opac_visible
AND cp.opac_visible
AND a.opac_visible
JOIN asset.copy cp ON (cp.call_number = cn.id)
JOIN actor.org_unit a ON (cp.circ_lib = a.id)
JOIN asset.copy_location cl ON (cp.location = cl.id)
- JOIN config.copy_status cs ON (cp.status = cs.id)
WHERE NOT cn.deleted
AND NOT cp.deleted
AND cp.circ_lib IN ( SELECT * FROM search.explode_array( search_org_list ) )
+/*
+ * Copyright (C) 2004-2008 Georgia Public Library Service
+ * Copyright (C) 2007-2008 Equinox Software, Inc.
+ * Mike Rylander <miker@esilibrary.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
BEGIN;
CREATE OR REPLACE VIEW money.open_billable_xact_summary AS
+/*
+ * Copyright (C) 2004-2008 Georgia Public Library Service
+ * Copyright (C) 2007-2008 Equinox Software, Inc.
+ * Copyright (C) 2008 Laurentian University
+ * Mike Rylander <miker@esilibrary.com>
+ * Dan Scott <denials@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
BEGIN;
ALTER TABLE actor.usr ADD CONSTRAINT actor_usr_mailing_address_fkey FOREIGN KEY (mailing_address) REFERENCES actor.usr_address (id) DEFERRABLE INITIALLY DEFERRED;
+/*
+ * Copyright (C) 2004-2008 Georgia Public Library Service
+ * Copyright (C) 2007-2008 Equinox Software, Inc.
+ * Mike Rylander <miker@esilibrary.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
DROP SCHEMA auditor CASCADE;
BEGIN;
+/*
+ * Copyright (C) 2004-2008 Georgia Public Library Service
+ * Copyright (C) 2007-2008 Equinox Software, Inc.
+ * Mike Rylander <miker@esilibrary.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
BEGIN;
SELECT auditor.create_auditor ( 'actor', 'usr' );
INSERT INTO config.rule_age_hold_protect VALUES (DEFAULT, oils_i18n_gettext('3month'), '3 months', 0);
INSERT INTO config.rule_age_hold_protect VALUES (DEFAULT, oils_i18n_gettext('6month'), '6 months', 2);
-INSERT INTO config.copy_status (id,name,holdable) VALUES (0,oils_i18n_gettext('Available'),'t');
+INSERT INTO config.copy_status (id,name,holdable,opac_visible) VALUES (0,oils_i18n_gettext('Available'),'t','t');
-INSERT INTO config.copy_status (id,name,holdable) VALUES (1,oils_i18n_gettext('Checked out'),'t');
+INSERT INTO config.copy_status (id,name,holdable,opac_visible) VALUES (1,oils_i18n_gettext('Checked out'),'t','t');
INSERT INTO config.copy_status (id,name) VALUES (2,oils_i18n_gettext('Bindery'));
INSERT INTO config.copy_status (id,name) VALUES (3,oils_i18n_gettext('Lost'));
INSERT INTO config.copy_status (id,name) VALUES (4,oils_i18n_gettext('Missing'));
-INSERT INTO config.copy_status (id,name,holdable) VALUES (5,oils_i18n_gettext('In process'),'t');
-INSERT INTO config.copy_status (id,name,holdable) VALUES (6,oils_i18n_gettext('In transit'),'t');
-INSERT INTO config.copy_status (id,name,holdable) VALUES (7,oils_i18n_gettext('Reshelving'),'t');
-INSERT INTO config.copy_status (id,name,holdable) VALUES (8,oils_i18n_gettext('On holds shelf'),'t');
-INSERT INTO config.copy_status (id,name,holdable) VALUES (9,oils_i18n_gettext('On order'),'t');
+INSERT INTO config.copy_status (id,name,holdable,opac_visible) VALUES (5,oils_i18n_gettext('In process'),'t','t');
+INSERT INTO config.copy_status (id,name,holdable,opac_visible) VALUES (6,oils_i18n_gettext('In transit'),'t','t');
+INSERT INTO config.copy_status (id,name,holdable,opac_visible) VALUES (7,oils_i18n_gettext('Reshelving'),'t','t');
+INSERT INTO config.copy_status (id,name,holdable,opac_visible) VALUES (8,oils_i18n_gettext('On holds shelf'),'t','t');
+INSERT INTO config.copy_status (id,name,holdable,opac_visible) VALUES (9,oils_i18n_gettext('On order'),'t','t');
INSERT INTO config.copy_status (id,name) VALUES (10,oils_i18n_gettext('ILL'));
INSERT INTO config.copy_status (id,name) VALUES (11,oils_i18n_gettext('Cataloging'));
-INSERT INTO config.copy_status (id,name) VALUES (12,oils_i18n_gettext('Reserves'));
+INSERT INTO config.copy_status (id,name,opac_visible) VALUES (12,oils_i18n_gettext('Reserves'),'t');
INSERT INTO config.copy_status (id,name) VALUES (13,oils_i18n_gettext('Discard/Weed'));
INSERT INTO config.copy_status (id,name) VALUES (14,oils_i18n_gettext('Damaged'));
PGPASSWORD=$5 PGUSER=$4 PGHOST=$1 PGPORT=$2 PGDATABASE=$3 psql -f 953.data.MODS32-xsl.sql
PGPASSWORD=$5 PGUSER=$4 PGHOST=$1 PGPORT=$2 PGDATABASE=$3 psql -f reporter-schema.sql
+PGPASSWORD=$5 PGUSER=$4 PGHOST=$1 PGPORT=$2 PGDATABASE=$3 psql -f extend-reporter.sql
+/*
+ * Copyright (C) 2004-2008 Georgia Public Library Service
+ * Copyright (C) 2007-2008 Equinox Software, Inc.
+ * Mike Rylander <miker@esilibrary.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
BEGIN;
CREATE OR REPLACE VIEW reporter.classic_current_circ AS
--- /dev/null
+/*
+ * Copyright (C) 2008 Equinox Software, Inc.
+ * Mike Rylander <miker@esilibrary.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+DROP SCHEMA extend_reporter CASCADE;
+
+BEGIN;
+
+CREATE SCHEMA extend_reporter;
+
+CREATE TABLE extend_reporter.legacy_circ_count (
+ id BIGSERIAL PRIMARY KEY REFERENCES asset.copy (id),
+ circ_count INT NOT NULL DEFAULT 0
+);
+
+CREATE VIEW extend_reporter.full_circ_count AS
+ SELECT cp.id, COALESCE(sum(c.circ_count), 0::bigint) + COALESCE(count(circ.id), 0::bigint) AS circ_count
+ FROM asset."copy" cp
+ LEFT JOIN extend_reporter.legacy_circ_count c USING (id)
+ LEFT JOIN "action".all_circulation circ ON circ.target_copy = c.id
+ GROUP BY cp.id;
+
+COMMIT;
+
+/*
+ * Copyright (C) 2004-2008 Georgia Public Library Service
+ * Copyright (C) 2007-2008 Equinox Software, Inc.
+ * Mike Rylander <miker@esilibrary.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
DROP SCHEMA reporter CASCADE;
BEGIN;
if (attr == 'holdable' && typeof n != 'string')
this.setValue(item, 'holdable', n ? 't' : 'f');
+ if (attr == 'opac_visible' && typeof n != 'string')
+ this.setValue(item, 'opac_visible', n ? 't' : 'f');
+
};
dojo.addOnUnload( function (event) {
{ name : "Holdable",
field : "holdable",
editor : dojox.grid.editors.bool,
- get : function (row) {
- var r = window.status_data_model.getRow(row);
+ get : function (row) {
+ var r = window.status_data_model.getRow(row);
if (r) {
- var h = r.holdable;
- if (h == 't' || h === true) return true;
- return false;
+ var h = r.holdable;
+ if (h == 't' || h === true) return true;
+ return false;
}
- }
+ }
+ },
+ { name : "OPAC Visible",
+ field : "opac_visible",
+ editor : dojox.grid.editors.bool,
+ get : function (row) {
+ var r = window.status_data_model.getRow(row);
+ if (r) {
+ var h = r.opac_visible;
+ if (h == 't' || h === true) return true;
+ return false;
+ }
+ }
}
]
]
var PARAM_RDEPTH = 'rd';
var PARAM_REDIR = 're'; /* true if we have been redirected by IP (we're at a real lib) */
var PARAM_AVAIL = 'av'; /* limit search results to available items */
+var PARAM_COPYLOCS = 'cl'; // copy (shelving) locations
/* URL param values (see comments above) */
var TERM;
var TFORM;
var RDEPTH;
var AVAIL;
+var COPYLOCS;
/* cookie values */
var SBEXTRAS;
TFORM = cgi.param(PARAM_TFORM);
RDEPTH = cgi.param(PARAM_RDEPTH);
AVAIL = cgi.param(PARAM_AVAIL);
+ COPYLOCS = cgi.param(PARAM_COPYLOCS);
+
/* set up some sane defaults */
//if(isNaN(DEPTH)) DEPTH = 0;
LANGUAGE = null;
RDEPTH = null;
AVAIL = null;
+ COPYLOCS = null;
}
function getLanguage() { return LANGUAGE; }
function getRdepth() { return RDEPTH; }
function getAvail() { return AVAIL; }
+function getCopyLocs() { return COPYLOCS; }
function findBasePath() {
string += _appendParam(SORT_DIR, PARAM_SORT_DIR, args, getSortDir, string);
if(getAvail())
string += _appendParam(AVAIL, PARAM_AVAIL, args, getAvail, string);
+ if(getCopyLocs())
+ string += _appendParam(COPYLOCS, PARAM_COPYLOCS, args, getCopyLocs, string);
return string.replace(/\&$/,'').replace(/\?\&/,"?");
}
<!ENTITY staff.main.menu.cat.retrieve_last_record.label "Retrieve Last Record">
<!ENTITY staff.main.menu.cat.search_tcn.accesskey "T">
<!ENTITY staff.main.menu.cat.search_tcn.label "Retrieve record by TCN">
+<!ENTITY staff.main.menu.cat.search_bib_id.accesskey "D">
+<!ENTITY staff.main.menu.cat.search_bib_id.label "Retrieve record by Record ID">
<!ENTITY staff.main.menu.cat.volume_status.key "V">
<!ENTITY staff.main.menu.cat.volume_status.label "Display Volume">
<!ENTITY staff.main.menu.cat.z39_50_import.accesskey "Z">
<!ENTITY staff.main.menu.search.patrons_barcode.label "for patron by Barcode">
<!ENTITY staff.main.menu.search.record.accesskey "T">
<!ENTITY staff.main.menu.search.record.label "for record by TCN">
+<!ENTITY staff.main.menu.search.record_via_id.accesskey "D">
+<!ENTITY staff.main.menu.search.record_via_id.label "for record by Record ID">
<!ENTITY staff.main.menu.serials.key "l">
<!ENTITY staff.main.menu.serials.label "Serials">
<!ENTITY staff.main.menu.tabs.close "Close All Tabs">
<!ENTITY staff.cat.opac.menuitem.refreshinterfaces.label "Refresh All Interfaces">
<!ENTITY staff.cat.opac.menuitem.dupnewtab.label "Duplicate in New Tab">
<!ENTITY staff.cat.opac.menuitem.removeframe.label "Remove this Frame">
+<!ENTITY staff.cat.record_buckets_overlay.record_query_tab.label "Record Query">
+<!ENTITY staff.cat.record_buckets_overlay.record_query_tab.accesskey "Q">
+<!ENTITY staff.cat.record_buckets_overlay.pending_records_tab.label "Pending Records">
+<!ENTITY staff.cat.record_buckets_overlay.pending_records_tab.accesskey "P">
+<!ENTITY staff.cat.record_buckets_overlay.bucket_view_tab.label "Bucket View">
+<!ENTITY staff.cat.record_buckets_overlay.bucket_view_tab.accesskey "V">
+<!ENTITY staff.cat.record_buckets_overlay.bucket_view_panel.label "Bucket Actions">
+<!ENTITY staff.cat.record_buckets_overlay.new_bucket.label "New Bucket">
+<!ENTITY staff.cat.record_buckets_overlay.delete_bucket.label "Delete Bucket">
+<!ENTITY staff.cat.record_buckets_overlay.refresh_bucket.label "Refresh">
+<!ENTITY staff.cat.record_buckets_overlay.record_query_label.value "Query">
+<!ENTITY staff.cat.record_buckets_overlay.record_query_label.accesskey "y">
+<!ENTITY staff.cat.record_buckets_overlay.cmd_submit_query.button.label "Submit">
+<!ENTITY staff.cat.record_buckets_overlay.cmd_submit_query.button.accesskey "S">
+<!ENTITY staff.cat.record_buckets_overlay.query_help.button.label "Help">
+<!ENTITY staff.cat.record_buckets_overlay.query_help.button.accesskey "H">
+<!ENTITY staff.cat.record_buckets_overlay.query_list_actions.label "List Actions">
+<!ENTITY staff.cat.record_buckets_overlay.menuitem.sel_clip0.label "Copy Field from selected row to Clipboard">
+<!ENTITY staff.cat.record_buckets_overlay.menuitem.query_csv_to_printer.label "Print List CSV">
+<!ENTITY staff.cat.record_buckets_overlay.menuitem.query_csv_to_clipboard.label "Copy List CSV to Clipboard">
+<!ENTITY staff.cat.record_buckets_overlay.menuitem.query_csv_to_file.label "Save List CSV to File">
+<!ENTITY staff.cat.record_buckets_overlay.menuitem.save_columns0.label "Save List Configuration">
+<!ENTITY staff.cat.record_buckets_overlay.add_all_query_to_pending.label "Add All to Pending Records">
+<!ENTITY staff.cat.record_buckets_overlay.add_sel_query_to_pending.label "Add Selected to Pending Records">
+<!ENTITY staff.cat.record_buckets_overlay.pending_buckets_list_actions.label "List Actions">
+<!ENTITY staff.cat.record_buckets_overlay.menuitem.sel_clip1.label "Copy Field from selected row to Clipboard">
+<!ENTITY staff.cat.record_buckets_overlay.menuitem.pending_buckets_csv_to_printer.label "Print List CSV">
+<!ENTITY staff.cat.record_buckets_overlay.menuitem.pending_buckets_csv_to_clipboard.label "Copy List CSV to Clipboard">
+<!ENTITY staff.cat.record_buckets_overlay.menuitem.pending_buckets_csv_to_file.label "Save List CSV to File">
+<!ENTITY staff.cat.record_buckets_overlay.menuitem.save_columns1.label "Save List Configuration">
+<!ENTITY staff.cat.record_buckets_overlay.add_all_pending_to_record_bucket.label "Add All to current Bucket">
+<!ENTITY staff.cat.record_buckets_overlay.add_all_pending_to_record_bucket.accesskey "A">
+<!ENTITY staff.cat.record_buckets_overlay.add_sel_pending_to_record_bucket.label "Add Selected to current Bucket">
+<!ENTITY staff.cat.record_buckets_overlay.record_buckets_del_item.label "Remove Selected from Bucket">
+<!ENTITY staff.cat.record_buckets_overlay.record_buckets_to_pending_buckets.label "Add Selected to Pending Records">
+<!ENTITY staff.cat.record_buckets_overlay.info_box.label "Bucket #">
+<!ENTITY staff.cat.record_buckets_overlay.bucket_owner.label "Owner:">
+<!ENTITY staff.cat.record_buckets_overlay.record_buckets_list_actions.label "List Actions">
+<!ENTITY staff.cat.record_buckets_overlay.menuitem.sel_clip2.label "Copy Field from selected row to Clipboard">
+<!ENTITY staff.cat.record_buckets_overlay.menuitem.record_buckets_csv_to_printer.label "Print List CSV">
+<!ENTITY staff.cat.record_buckets_overlay.menuitem.record_buckets_csv_to_clipboard.label "Copy List CSV to Clipboard">
+<!ENTITY staff.cat.record_buckets_overlay.menuitem.record_buckets_csv_to_file.label "Save List CSV to File">
+<!ENTITY staff.cat.record_buckets_overlay.menuitem.save_columns2.label "Save List Configuration">
+<!ENTITY staff.cat.record_buckets_overlay.box.label "Batch:">
+<!ENTITY staff.cat.record_buckets_overlay.sel_opac.label "Show All in Catalog">
+<!ENTITY staff.cat.record_buckets_overlay.del_records.label "Delete All Records">
+<!ENTITY staff.cat.record_buckets_overlay.merge_records.label "Merge All Records">
+<!ENTITY staff.cat.record_buckets_overlay.export_records.label "Export All Records">
+<!ENTITY staff.cat.record_buckets_overlay.menuitem.export_usmarc.label "MARC21">
+<!ENTITY staff.cat.record_buckets_overlay.menuitem.export_unimarc.label "UNIMARC">
+<!ENTITY staff.cat.record_buckets_overlay.menuitem.export_xml.label "XML">
+<!ENTITY staff.cat.record_buckets_overlay.menuitem.export_eg_bre.label "Evergreen BRE">
+<!ENTITY staff.cat.record_buckets_quick.groupbox.caption "Record Buckets">
+<!ENTITY staff.cat.record_buckets_quick.add_to_bucket.title "Add to Bucket">
+<!ENTITY staff.cat.record_buckets_quick.add_to_bucket.label "Add to Selected Bucket">
+<!ENTITY staff.cat.record_buckets_quick.add_to_bucket.accesskey "A">
+<!ENTITY staff.cat.record_buckets_quick.new_bucket.label "Add to New Bucket">
+<!ENTITY staff.cat.record_buckets_quick.new_bucket.accesskey "N">
+<!ENTITY staff.cat.record_buckets_quick.cancel.label "Cancel">
+<!ENTITY staff.cat.record_buckets_quick.cancel.accesskey "C">
+<!ENTITY staff.cat.spine_labels.re-generate.label "Re-Generate">
+<!ENTITY staff.cat.spine_labels.re-generate.accesskey "G">
+<!ENTITY staff.cat.spine_labels.preview_and_print.label "Preview and Print">
+<!ENTITY staff.cat.spine_labels.preview_and_print.accesskey "P">
+<!ENTITY staff.cat.spine_labels.close_window.label "Close Window">
+<!ENTITY staff.cat.spine_labels.close_window.accesskey "C">
+<!ENTITY staff.cat.spine_labels.font_size_label.value "Font size (in pts):">
+<!ENTITY staff.cat.spine_labels.spine_label.value "Spine Label">
+<!ENTITY staff.cat.spine_labels.spine_label.left_margine.value "Left Margin (in characters):">
+<!ENTITY staff.cat.spine_labels.spine_label.label_width.value "Label Width (in characters):">
+<!ENTITY staff.cat.spine_labels.spine_label.label_length.value "Label Length (in lines):">
+<!ENTITY staff.cat.spine_labels.pocket_label.value "Pocket Label">
+<!ENTITY staff.cat.spine_labels.pocket_label.middle_margin.value "Middle Margin (in characters):">
+<!ENTITY staff.cat.spine_labels.pocket_label.label_width.value "Label Width (in characters):">
+<!ENTITY staff.cat.spine_labels.pocket_label.label_length.value "Label Length (in lines):">
+<!ENTITY staff.cat.spine_labels.pocket_label.title.label "Include Title (wraps on word at label width)">
+<!ENTITY staff.cat.spine_labels.on_line.value "On line:">
+<!ENTITY staff.cat.spine_labels.pocket_label.include_title.label "Include Title (segment after wrapping)">
+<!ENTITY staff.cat.spine_labels.indent_title.label "Indent a space?">
+<!ENTITY staff.cat.spine_labels.inc_call_number.label "Include Call Number">
+<!ENTITY staff.cat.spine_labels.inc_owning_library_policy_code.label "Include Owning Library (policy code)">
+<!ENTITY staff.cat.spine_labels.inc_owning_library.label "Include Owning Library">
+<!ENTITY staff.cat.spine_labels.inc_shelving_location.label "Include Shelving Location">
+<!ENTITY staff.cat.spine_labels.inc_item_barcode.label "Include Item Barcode">
+<!ENTITY staff.cat.spine_labels.custom.label "Custom:">
+<!ENTITY staff.cat.spine_labels.available_macros.label "Available Macros">
+<!ENTITY staff.cat.volume_copy_creator.label "Volume/Copy Creator">
+<!ENTITY staff.cat.volume_copy_creator.check_barcodes.label "Check Barcodes?">
+<!ENTITY staff.cat.volume_copy_creator.check_barcodes.accesskey "B">
+<!ENTITY staff.cat.volume_copy_creator.print_labels.label "Print Labels?">
+<!ENTITY staff.cat.volume_copy_creator.print_labels.accesskey "P">
+<!ENTITY staff.cat.volume_copy_creator.create.label "Edit then Create">
+<!ENTITY staff.cat.volume_copy_creator.create.accesskey "C">
+<!ENTITY staff.cat.volume_copy_creator.library_label.value "Library">
+<!ENTITY staff.cat.volume_copy_creator.num_of_volumes_label.value "# of volumes">
+<!ENTITY staff.cat.volume_editor.caption.label "Volume Editor">
+<!ENTITY staff.cat.volume_editor.modify.label "Modify">
+<!ENTITY staff.cat.z3950.marc_import.label "MARC Import via Z39.50">
+<!ENTITY staff.cat.z3950.service_credentials.label "Service and Credentials">
+<!ENTITY staff.cat.z3950.service.label "Service">
+<!ENTITY staff.cat.z3950.username.label "Username">
+<!ENTITY staff.cat.z3950.password.label "Password">
+<!ENTITY staff.cat.z3950.catalog_service.label "Local Catalog">
+<!ENTITY staff.cat.z3950.catalog_service.tooltiptext "Evergreen Native Catalog">
+<!ENTITY staff.cat.z3950.save_creds.label "Save as Default">
+<!ENTITY staff.cat.z3950.save_creds.accesskey "D">
+<!ENTITY staff.cat.z3950.query.label "Query">
+<!ENTITY staff.cat.z3950.query.label "Tip: Click a search field label and then the 'Save as Default' button to have that field focused by default.">
+<!ENTITY staff.cat.z3950.clear.label "Clear Form">
+<!ENTITY staff.cat.z3950.clear.accesskey "C">
+<!ENTITY staff.cat.z3950.search.label "Search">
+<!ENTITY staff.cat.z3950.search.accesskey "S">
+<!ENTITY staff.cat.z3950.results_page.label "Results Page">
+<!ENTITY staff.cat.z3950.results_page.accesskey "P">
+<!ENTITY staff.cat.z3950.results_caption.label "Results">
+<!ENTITY staff.cat.z3950.search_form.label "Search Form">
+<!ENTITY staff.cat.z3950.search_form.accesskey "F">
+<!ENTITY staff.cat.z3950.page_next.label "Fetch More Results">
+<!ENTITY staff.cat.z3950.page_next.accesskey "M">
+<!ENTITY staff.cat.z3950.export.label "CSV to Clipboard">
+<!ENTITY staff.cat.z3950.clip_button.label "Copy to Clipboard">
+<!ENTITY staff.cat.z3950.save_cols_btn.label "Save Columns">
+<!ENTITY staff.cat.z3950.marc_view.label "MARC View">
+<!ENTITY staff.cat.z3950.marc_view.accesskey "V">
+<!ENTITY staff.cat.z3950.marc_import_overlay.label "MARC Editor for Overlay">
+<!ENTITY staff.cat.z3950.marc_import_overlay.accesskey "O">
+<!ENTITY staff.cat.z3950.marc_import.label "MARC Editor for Import">
+<!ENTITY staff.cat.z3950.marc_import.accesskey "I">
+<!ENTITY staff.pat.barcode_entry.retrieve_patron.label "Retrieve Patron">
+<!ENTITY staff.pat.barcode_entry.barcode.label "Barcode:">
+<!ENTITY staff.pat.barcode_entry.barcode.accesskey "B">
+<!ENTITY staff.pat.barcode_entry.submit_btn.label "Submit">
+<!ENTITY staff.pat.barcode_entry.submit_btn.accesskey "S">
+<!ENTITY staff.pat.barcode_entry.retrieving.label "Retrieving...">
+<!ENTITY staff.patron.bill_cc_info.visa.label "Visa">
+<!ENTITY staff.patron.bill_cc_info.mastercard.label "Mastercard">
+<!ENTITY staff.patron.bill_cc_info.american_express.label "American Express">
+<!ENTITY staff.patron.bill_cc_info.discover.label "Discover">
+<!ENTITY staff.patron.bill_cc_info.other.label "Other">
+<!ENTITY staff.patron.bill_cc_info.cc_number.value "CC Number">
+<!ENTITY staff.patron.bill_cc_info.month_expire.value "Expire Month">
+<!ENTITY staff.patron.bill_cc_info.year_expire.value "Expire Year">
+<!ENTITY staff.patron.bill_cc_info.approval_code.value "Approval Code">
+<!ENTITY staff.patron.bill_cc_info.note.value "Note">
+<!ENTITY staff.patron.bill_cc_info.cancel.label "Cancel">
+<!ENTITY staff.patron.bill_cc_info.cancel.accesskey "C">
+<!ENTITY staff.patron.bill_cc_info.submit.label "Submit this Info">
+<!ENTITY staff.patron.bill_cc_info.submit.accesskey "S">
+<!ENTITY staff.patron.bill_check_info.check_info.label "Check Info">
+<!ENTITY staff.patron.bill_check_info.check_number.value "Check Number">
+<!ENTITY staff.patron.bill_check_info.note.value "Note">
+<!ENTITY staff.patron.bill_check_info.cancel.label "Cancel">
+<!ENTITY staff.patron.bill_check_info.cancel.accesskey "C">
+<!ENTITY staff.patron.bill_check_info.submit.label "Submit this Info">
+<!ENTITY staff.patron.bill_check_info.submit.accesskey "S">
+<!ENTITY staff.patron.bill_details.bills.label "Bills">
+<!ENTITY staff.patron.bill_details.save_columns.label "Save Columns">
+<!ENTITY staff.patron.bill_details.copy_to_clipboard.label "Copy to Clipboard">
+<!ENTITY staff.patron.bill_details.print_export.label "Print Export">
+<!ENTITY staff.patron.bill_details.void_selection.label "Void selected billings">
+<!ENTITY staff.patron.bill_details.payments.label "Payments">
+<!ENTITY staff.patron.bill_details.show_in_catalog.label "Show in Catalog">
+<!ENTITY staff.patron.bill_details.show_in_catalog.accesskey "S">
+<!ENTITY staff.patron.bill_details.close_window.label "Close Window">
+<!ENTITY staff.patron.bill_details.close_window.accesskey "c">
+<!ENTITY staff.patron.bill_history.caption.label "Bill History">
+<!ENTITY staff.patron.bill_history.add_billing.label "Add Billing">
+<!ENTITY staff.patron.bill_history.full_details.label "Full Details">
+<!ENTITY staff.patron.bill_history.full_details.accesskey "D">
+<!ENTITY staff.patron.bill_history.show_in_catalog.label "Show in Catalog">
+<!ENTITY staff.patron.bill_history.show_in_catalog.accesskey "S">
+<!ENTITY staff.patron.bill_history.print.label "Print">
+<!ENTITY staff.patron.bill_history.print.accesskey "P">
+<!ENTITY staff.patron.bill_history.close_window.label "Close Window">
+<!ENTITY staff.patron.bill_history.close_window.accesskey "c">
+<!ENTITY staff.patron.bills_overlay.still_checked_out.label "Red Items are still Checked Out">
+<!ENTITY staff.patron.bills_overlay.uncheck_all.label "Uncheck All">
+<!ENTITY staff.patron.bills_overlay.check_all.label "Check All">
+<!ENTITY staff.patron.bills_overlay.print_bills.label "Print Bills" >
+<!ENTITY staff.patron.bills_overlay.alternate_view.label "Alternate View">
+<!ENTITY staff.patron.bills_overlay.alternate_view.accesskey "V">
+<!ENTITY staff.patron.bills_overlay.summary.label "Summary">
+<!ENTITY staff.patron.bills_overlay.net_balance.value "Net Balance">
+<!ENTITY staff.patron.bills_overlay.payment_applied.value "- Payment applied">
+<!ENTITY staff.patron.bills_overlay.new_balance.value "= New Balance">
+<!ENTITY staff.patron.bills_overlay.pay_bill.label "Pay Bill">
+<!ENTITY staff.patron.bills_overlay.payment_type.value "Payment Type">
+<!ENTITY staff.patron.bills_overlay.payment_type.accesskey "t">
+<!ENTITY staff.patron.bills_overlay.cash.label "Cash">
+<!ENTITY staff.patron.bills_overlay.check.label "Check">
+<!ENTITY staff.patron.bills_overlay.credit_card.label "Credit Card">
+<!ENTITY staff.patron.bills_overlay.word.label "Work">
+<!ENTITY staff.patron.bills_overlay.forgive.label "Forgive">
+<!ENTITY staff.patron.bills_overlay.goods.label "Goods">
+<!ENTITY staff.patron.bills_overlay.payment_received.value "Payment received">
+<!ENTITY staff.patron.bills_overlay.payment_received.accesskey "a">
+<!ENTITY staff.patron.bills_overlay.payment_applied.value "- Payment applied">
+<!ENTITY staff.patron.bills_overlay.change.value "= Change">
+<!ENTITY staff.patron.bills_overlay.patron_credit.value "or Patron Credit">
+<!ENTITY staff.patron.bills_overlay.bill_patron.label "Bill Patron">
+<!ENTITY staff.patron.bills_overlay.bill_patron.accesskey "B">
+<!ENTITY staff.patron.bills_overlay.history.label "History">
+<!ENTITY staff.patron.bills_overlay.history.accesskey "H">
+<!ENTITY staff.patron.bills_overlay.annotate_payment.label "Annotate Payment">
+<!ENTITY staff.patron.bills_overlay.convert_change_to_credit.label "Convert Change to Patron Credit">
+<!ENTITY staff.patron.bills_overlay.apply_payment.label "Apply Payment!">
+<!ENTITY staff.patron.bills_overlay.apply_payment.accesskey "P">
+<!ENTITY staff.patron.bill_summary_overlay.bill_number.value "Bill #">
+<!ENTITY staff.patron.bill_summary_overlay.total_billed.value "Total Billed">
+<!ENTITY staff.patron.bill_summary_overlay.title.value "Title">
+<!ENTITY staff.patron.bill_summary_overlay.type.value "Type">
+<!ENTITY staff.patron.bill_summary_overlay.total_paid.value "Total Paid">
+<!ENTITY staff.patron.bill_summary_overlay.checked_out.value "Checked Out">
+<!ENTITY staff.patron.bill_summary_overlay.start.value "Start">
+<!ENTITY staff.patron.bill_summary_overlay.balance_owed.value "Balance Owed">
+<!ENTITY staff.patron.bill_summary_overlay.due_date.value "Due Date">
+<!ENTITY staff.patron.bill_summary_overlay.finish.value "Finish">
+<!ENTITY staff.patron.bill_summary_overlay.renewal.value "Renewal?">
+<!ENTITY staff.patron.bill_summary_overlay.checked_in.value "Checked In">
+<!ENTITY staff.patron.bill_wizard.create_bill.label "Create Bill">
+<!ENTITY staff.patron.bill_wizard.location.value "Location">
+<!ENTITY staff.patron.bill_wizard.transaction_type.value "Transaction Type">
+<!ENTITY staff.patron.bill_wizard.grocery.label "Grocery">
+<!ENTITY staff.patron.bill_wizard.circulation.label "Circulation">
+<!ENTITY staff.patron.bill_wizard.billing_type.label "Billing Type">
+<!ENTITY staff.patron.bill_wizard.amount.value "Amount">
+<!ENTITY staff.patron.bill_wizard.note.value "Note">
+<!ENTITY staff.patron.bill_wizard.cancel.label "Cancel">
+<!ENTITY staff.patron.bill_wizard.cancel.accesskey "C">
+<!ENTITY staff.patron.bill_wizard.submit.label "Submit this Bill">
+<!ENTITY staff.patron.bill_wizard.submit.accesskey "S">
+<!ENTITY staff.patron.display_overlay.none_selected.value "No Patron Selected">
+<!ENTITY staff.patron.display_overlay.barred.value "(Barred)">
+<!ENTITY staff.patron.display_overlay.expired.value "(Expired)">
+<!ENTITY staff.patron.display_overlay.inactive.value "(In-Active)">
+<!ENTITY staff.patron.display_overlay.juvenile.value "(Juvenile)">
+<!ENTITY staff.patron.display_overlay.alert.value "(Alert)">
+<!ENTITY staff.patron.display_overlay.see_notes.value "(See Notes)">
+<!ENTITY staff.patron.display_overlay.max_bills.value "(Max Bills)">
+<!ENTITY staff.patron.display_overlay.max_overdues.value "(Max Overdues)">
+<!ENTITY staff.patron.display_overlay.has_bills.value "(Has Bills)">
+<!ENTITY staff.patron.display_overlay.has_overdues.value "(Has Overdues)">
+<!ENTITY staff.patron.display_overlay.invalid_dob.value "(Invalid DOB)">
+<!ENTITY staff.patron.display_overlay.invalid_address.value "(Invalid Address)">
+<!ENTITY staff.patron.display_overlay.exit.label "Exit">
+<!ENTITY staff.patron.display_overlay.exit.accesskey "x">
+<!ENTITY staff.patron.display_overlay.search_form.label "Search Form">
+<!ENTITY staff.patron.display_overlay.search_form.accesskey "F">
+<!ENTITY staff.patron.display_overlay.retrieve_patron.label "Retrieve Patron">
+<!ENTITY staff.patron.display_overlay.retrieve_patron.accesskey "R">
+<!ENTITY staff.patron.hold_notices.add_record_notification.label "Add Record of Notification">
+<!ENTITY staff.patron.hold_notices.add_record_notification.accesskey "A">
+<!ENTITY staff.patron.hold_notices.close_window.label "Close">
+<!ENTITY staff.patron.hold_notices.close_window.accesskey "C">
+<!ENTITY staff.patron.holds_overlay.pickup_lib.label "Pickup Library">
+<!ENTITY staff.patron.holds_overlay.request_lib.label "Requesting Library">
+<!ENTITY staff.patron.holds_overlay.fulfillment_lib.label "Fulfilling Library">
+<!ENTITY staff.patron.holds_overlay.circ_lib.label "Item Circulating Library">
+<!ENTITY staff.patron.holds_overlay.owning_lib.label "Volume Owning Library">
+<!ENTITY staff.patron.holds_overlay.home_lib.label "Patron Home Library foo">
+<!ENTITY staff.patron.holds_overlay.fetch_more.label "Fetch More Holds">
+<!ENTITY staff.patron.holds_overlay.fetch_more.accesskey "M">
+<!ENTITY staff.patron.holds_overlay.lib_filter_checkbox.label "Filter:">
+<!ENTITY staff.patron.holds_overlay.actions_for_holds.label "Actions for Selected Holds">
+<!ENTITY staff.patron.holds_overlay.actions_for_holds.accesskey "S">
+<!ENTITY staff.patron.holds_overlay.holds_export.label "Export">
+<!ENTITY staff.patron.info_group.clone.label "Register a New Group Member by Cloning Selected Patrons">
+<!ENTITY staff.patron.info_group.clone.accesskey "N">
+<!ENTITY staff.patron.info_group.remove.accesskey "R">
+<!ENTITY staff.patron.info_group.remove.label "Remove Selected Patrons from the Group">
+<!ENTITY staff.patron.info_group.move.accesskey "M">
+<!ENTITY staff.patron.info_group.move.label "Move Selected Patrons to ANOTHER patron's group.">
+<!ENTITY staff.patron.info_group.add.accesskey "A">
+<!ENTITY staff.patron.info_group.add.label "Move ANOTHER patron to this patron group.">
+<!ENTITY staff.patron.info_group.retrieve_p.accesskey "P">
+<!ENTITY staff.patron.info_group.retrieve_p.label "Retrieve Selected Patrons">
+<!ENTITY staff.patron.info_group.group_member.label "Group Members">
+<!ENTITY staff.patron.info_group.choose_an_action.label "Choose an Action...">
+<!ENTITY staff.patron.info_group.choose_an_action.accesskey "A">
<!ENTITY opac.advanced.quick.tcn "TCN"> <!-- title control number -->
<!ENTITY opac.advanced.quick.barcode "Item Barcode">
<!ENTITY opac.advanced.quick.cn "Call Number">
+<!ENTITY opac.advanced.copy_loc_filter "Shelving Location">
<!-- ==========================================================
MARC expert search
<!ENTITY advanced.search.title "Search Input">
<!ENTITY advanced.add.row "Add Search Row">
<!ENTITY advanced.search.submit "Submit Search">
+<!ENTITY advanced.search.reset "Reset Form">
<!ENTITY advanced.search.filters "Search Filters">
<!ENTITY advanced.item.form "Item Form">
<!ENTITY advanced.item.type "Item Type">
#xul_recipient_me { margin-left: 25px; }
#myopac_holds_thaw_date_form {padding: 10px; text-align: center;}
#myopac_holds_freeze_select_thaw {margin-right: 100px; margin-left: 100px; }
-
attachEvt("common", "run", advgInit);
+attachEvt("common", "locationChanged", advSyncCopyLocLink );
var COOKIE_NOGROUP_RECORDS = 'grpt';
+var advSelectedOrg = null;
function advgInit() {
$('opac.result.limit2avail').checked = true;
initSearchBoxes();
+
+ advSyncCopyLocLink(getLocation());
+}
+
+function advSyncCopyLocLink(org) {
+ // display the option to filter by copy location
+ advLocationsLoaded = false;
+ advSelectedOrg = org;
+ removeChildren($('adv_copy_location_filter_select'));
+
+ if(isTrue(findOrgType(findOrgUnit(org).ou_type()).can_have_vols())) {
+ unHideMe($('adv_copy_location_filter_row'));
+ advLoadCopyLocations(org);
+ } else {
+ hideMe($('adv_copy_location_filter_row'));
+ }
+
}
-function initSearchBoxes() {
+function initSearchBoxes(clean) {
/* loads the compiled search from the search cookie
and sets the widgets accordingly */
advAddGblRow();
var rows = $('adv_global_tbody').getElementsByTagName('tr');
+
+ if(clean) {
+ for(var t = 0; t < rows.length; t++) {
+ var input = $n(rows[t], 'term');
+ if(input) input.value = '';
+ }
+ return;
+ }
+
for(var t = 0; t < types.length; t++) {
var row = rows[t];
setSelector($n(row, 'type'), types[t]);
var itemtypes = advGetVisSelectorVals('adv_global_item_type');
var audiences = advGetVisSelectorVals('adv_global_audience');
var biblevels = advGetVisSelectorVals('adv_global_bib_level');
+ var locations = advGetVisSelectorVals('adv_copy_location_filter_select');
var languages = getSelectedList($('adv_global_lang')) + '';
var limit2avail = $('opac.result.limit2avail').checked ? 1 : ''
args[PARAM_LITFORM] = litforms;
args[PARAM_AUDIENCE] = audiences;
args[PARAM_LANGUAGE] = languages;
+ args[PARAM_COPYLOCS] = locations;
//args[PARAM_SEARCHES] = js2JSON(searches); /* break these out */
args[PARAM_DEPTH] = depthSelGetDepth();
args[PARAM_LOCATION] = depthSelGetNewLoc();
}
+// retrieves the shelving locations
+var advLocationsLoaded = false;
+function advLoadCopyLocations(org) {
+ if(org == null)
+ org = advSelectedOrg;
+ var req = new Request(FETCH_COPY_LOCATIONS, org);
+ req.callback(advShowCopyLocations);
+ req.send();
+ advLocationsLoaded = true;
+}
+
+// inserts the shelving locations into the multi-select
+function advShowCopyLocations(r) {
+ var locations = r.getResultObject();
+ var sel = $('adv_copy_location_filter_select');
+ for(var i = 0; i < locations.length; i++)
+ insertSelectorVal(sel, -1, locations[i].name(), locations[i].id());
+}
if(getLitForm()) args.lit_form = getLitForm().split(/,/);
if(getLanguage()) args.language = getLanguage().split(/,/);
if(getBibLevel()) args.bib_level = getBibLevel().split(/,/);
+ if(getCopyLocs()) args.locations = getCopyLocs().split(/,/);
_debug('Search args: ' + js2JSON(args));
_debug('Raw query: ' + getTerm());
<!-- add a new row -->
<tr id='adv_global_addrow'>
<td align='center'>
+ <button onclick='initSearchBoxes(1);'>&advanced.search.reset;</button>
+ <span style='padding-left: 10px;'> </span>
<button id='myopac_new_global_row' onclick='advAddGblRow();'>&advanced.add.row;</button>
<span style='padding-left: 10px;'> </span>
<button onclick='advSubmitGlobal();'>&advanced.search.submit;</button>
</td>
</tr>
+ <!-- copy location selector -->
+ <tr id='adv_copy_location_filter_row' class='hide_me'>
+ <td align='right'>&opac.advanced.copy_loc_filter;</td>
+ <td align='left' id='adv_copy_location_filter_td'>
+ <select size='3' id='adv_copy_location_filter_select' multiple='multiple'>
+ </select>
+ </td>
+ </tr>
</tbody>
</table>
</td>
//_debug('NEXT PARAM = ' + oilsRptID2);
//_debug('NEXT PARAM = ' + oilsRptNextParam());
- if( filter == 'is' || filter == 'is not' )
+ if( filter == 'is' || filter == 'is not' || filter == 'is blank' || filter == 'is not blank' )
where.condition[filter] = null;
else where.condition[filter] = oilsRptNextParam();
column: { transform: tform, colname: oilsRptPathCol(path) },
condition : {}
};
- if( filter == 'is' || filter == 'is not' )
+ if( filter == 'is' || filter == 'is not' || filter == 'is blank' || filter == 'is not blank' )
having.condition[filter] = null;
else having.condition[filter] = oilsRptNextParam();
return new oilsRptSetWidget(widgetArgs);
case 'is':
case 'is not':
+ case 'is blank':
+ case 'is not blank':
return new oilsRptNullWidget(widgetArgs);
case 'between':
case 'not between':
'is not' : {
label : 'Is not NULL'
+ },
+
+ 'is blank' : {
+ label : 'Is NULL or Blank'
+ },
+
+ 'is not blank' : {
+ label : 'Is not NULL or Blank'
}
}
if (tab_name.match(/filter/)) {
element.condition = {};
- if (tab[field].op == 'is' || tab[field].op == 'is not') {
+ if (tab[field].op == 'is' || tab[field].op == 'is not' || tab[field].op == 'is blank' || tab[field].op == 'is not blank') {
element.condition[tab[field].op] = null;
} else {
element.condition[tab[field].op] =
var docid; var marc_html; var top_pane; var bottom_pane; var opac_frame; var opac_url;
+var marc_view_reset = true;
+var marc_edit_reset = true;
+var copy_browser_reset = true;
+var hold_browser_reset = true;
+
function $(id) { return document.getElementById(id); }
function my_init() {
}
}
-function set_brief_view(reset) {
+function set_brief_view() {
var url = xulG.url_prefix( urls.XUL_BIB_BRIEF ) + '?docid=' + window.escape(docid);
dump('spawning ' + url + '\n');
top_pane.set_iframe(
);
}
-function set_marc_view(reset) {
+function set_marc_view() {
g.view = 'marc_view';
- if (reset) {
+ if (marc_view_reset) {
bottom_pane.reset_iframe( xulG.url_prefix( urls.XUL_MARC_VIEW ) + '?docid=' + window.escape(docid),{},xulG);
+ marc_view_reset = false;
} else {
bottom_pane.set_iframe( xulG.url_prefix( urls.XUL_MARC_VIEW ) + '?docid=' + window.escape(docid),{},xulG);
}
}
-function set_marc_edit(reset) {
+function set_marc_edit() {
g.view = 'marc_edit';
var a = xulG.url_prefix( urls.XUL_MARC_EDIT );
var b = {};
}
}
};
- if (reset) {
+ if (marc_edit_reset) {
bottom_pane.reset_iframe( a,b,c );
+ marc_edit_reset = false;
} else {
bottom_pane.set_iframe( a,b,c );
}
}
-function set_copy_browser(reset) {
+function set_copy_browser() {
g.view = 'copy_browser';
- if (reset) {
+ if (copy_browser_reset) {
bottom_pane.reset_iframe( xulG.url_prefix( urls.XUL_COPY_VOLUME_BROWSE ) + '?docid=' + window.escape(docid),{},xulG);
+ copy_browser_reset =false;
} else {
bottom_pane.set_iframe( xulG.url_prefix( urls.XUL_COPY_VOLUME_BROWSE ) + '?docid=' + window.escape(docid),{},xulG);
}
}
-function set_hold_browser(reset) {
+function set_hold_browser() {
g.view = 'hold_browser';
- if (reset) {
+ if (hold_browser_reset) {
bottom_pane.reset_iframe( xulG.url_prefix( urls.XUL_HOLDS_BROWSER ) + '?docid=' + window.escape(docid),{},xulG);
+ hold_browser_reset = false;
} else {
bottom_pane.set_iframe( xulG.url_prefix( urls.XUL_HOLDS_BROWSER ) + '?docid=' + window.escape(docid),{},xulG);
}
}
-function set_opac(reset) {
+function set_opac() {
g.view = 'opac';
try {
var content_params = {
try {
if (docid == id) return;
docid = id;
- refresh_display(id,true);
+ refresh_display(id);
} catch(E) {
g.error.standard_unexpected_error_alert('rdetail -> recordRetrieved',E);
}
alert(document.getElementById('offlineStrings').getFormattedString('cat.opac.record_deleted.error', [docid, robj.textcode, robj.desc]) + '\n');
} else {
alert(document.getElementById('offlineStrings').getString('cat.opac.record_deleted'));
- refresh_display(docid,true);
+ refresh_display(docid);
}
}
}
alert(document.getElementById('offlineStrings').getFormattedString('cat.opac.record_undeleted.error', [docid, robj.textcode, robj.desc]) + '\n');
} else {
alert(document.getElementById('offlineStrings').getString('cat.opac.record_undeleted'));
- refresh_display(docid,true);
+ refresh_display(docid);
}
}
}
-function refresh_display(id,reset) {
+function refresh_display(id) {
try {
+ marc_view_reset = true;
+ marc_edit_reset = true;
+ copy_browser_reset = true;
+ hold_browser_reset = true;
while(top_pane.node.lastChild) top_pane.node.removeChild( top_pane.node.lastChild );
var children = bottom_pane.node.childNodes;
for (var i = 0; i < children.length; i++) {
if (children[i] != browser_frame) bottom_pane.node.removeChild(children[i]);
}
- set_brief_view(reset);
+ set_brief_view();
$('nav').setAttribute('hidden','false');
var settings = g.network.simple_request(
'FM_AUS_RETRIEVE',
g.view_override = null;
}
switch(view) {
- case 'marc_view' : set_marc_view(reset); break;
- case 'marc_edit' : set_marc_edit(reset); break;
- case 'copy_browser' : set_copy_browser(reset); break;
- case 'hold_browser' : set_hold_browser(reset); break;
+ case 'marc_view' : set_marc_view(); break;
+ case 'marc_edit' : set_marc_edit(); break;
+ case 'copy_browser' : set_copy_browser(); break;
+ case 'hold_browser' : set_hold_browser(); break;
case 'opac' :
- default: set_opac(reset); break;
+ default: set_opac(); break;
}
} catch(E) {
g.error.standard_unexpected_error_alert('in refresh_display',E);
<menuitem label="&staff.cat.opac.remove_me.label;" id="remove_me" oncommand="remove_me();"/>
<menuseparator/>
<menuitem label="&staff.cat.opac.default.label;" id="default" oncommand="set_default();"/>
- <menuitem label="&staff.cat.opac.refresh_me.label;" id="refresh_me" oncommand="refresh_display(docid,true);"/>
+ <menuitem label="&staff.cat.opac.refresh_me.label;" id="refresh_me" oncommand="refresh_display(docid);"/>
</menupopup>
</menu>
</menubar>
}
}
],
+ 'cmd_search_bib_id' : [
+ ['oncommand'],
+ function() {
+ var bib_id = prompt(offlineStrings.getString('menu.cmd_search_bib_id.tab'),'',offlineStrings.getString('menu.cmd_search_bib_id.prompt'));
+ if (!bib_id) return;
+
+ var opac_url = obj.url_prefix( urls.opac_rdetail ) + '?r=' + bib_id;
+ var content_params = {
+ 'session' : ses(),
+ 'authtime' : ses('authtime'),
+ 'opac_url' : opac_url,
+ };
+ obj.set_tab(
+ obj.url_prefix(urls.XUL_OPAC_WRAPPER),
+ {'tab_name':'#' + bib_id},
+ content_params
+ );
+ }
+ ],
'cmd_copy_status' : [
['oncommand'],
function() {
<command id="cmd_search_opac" key="search-opac-key" />
<command id="cmd_public_opac" />
<command id="cmd_search_tcn" />
+ <command id="cmd_search_bib_id" />
<command id="cmd_patron_register" key="patron-register-key" />
<command id="cmd_standalone" />
<command id="cmd_survey_wizard" />
<menupopup id="main.menu.cat.popup">
<menuitem label="&staff.main.menu.cat.bib_search.label;" accesskey="&staff.main.menu.cat.bib_search.key;" key="search-opac-key" command="cmd_search_opac"/>
<menuitem label="&staff.main.menu.cat.search_tcn.label;" accesskey="&staff.main.menu.cat.search_tcn.accesskey;" key="search-tcn-key" command="cmd_search_tcn" />
+ <menuitem label="&staff.main.menu.cat.search_bib_id.label;" accesskey="&staff.main.menu.cat.search_bib_id.accesskey;" key="search-bib-id-key" command="cmd_search_bib_id" />
<menuitem label="&staff.main.menu.cat.copy_status.label;" accesskey="&staff.main.menu.cat.copy_status.accesskey;" key="copy-status-key" command="cmd_copy_status"/>
<menuseparator />
<!--
<menuitem label="&staff.main.menu.search.patrons.label;" accesskey="&staff.main.menu.search.patrons.accesskey;" key="patron-search-key" command="cmd_patron_search" />
<menuitem label="&staff.main.menu.search.catalog.label;" accesskey="&staff.main.menu.search.catalog.accesskey;" key="search-opac-key" command="cmd_search_opac" />
<menuitem label="&staff.main.menu.search.record.label;" accesskey="&staff.main.menu.search.record.accesskey;" key="search-tcn-key" command="cmd_search_tcn" />
+ <menuitem label="&staff.main.menu.search.record_via_id.label;" accesskey="&staff.main.menu.search.record_via_id.accesskey;" key="search-bib-id-key" command="cmd_search_bib_id" />
<menuitem label="&staff.main.menu.search.copies.label;" accesskey="&staff.main.menu.search.copies.accesskey;" key="copy-status-key" command="cmd_copy_status"/>
<menuitem label="&staff.main.menu.search.patrons_barcode.label;" accesskey="&staff.main.menu.search.patrons_barcode.accesskey;" key="circ-checkout-key" command="cmd_circ_checkout"/>
</menupopup>
menu.cmd_replace_barcode.renaming.error=Error renaming item.
menu.cmd_replace_barcode.renaming.failure=The rename operation probably failed.
menu.cmd_search_opac.tab=Catalog
+menu.cmd_search_bib_id.tab=What is the internal ID for the bibliographic record?
+menu.cmd_search_bib_id.prompt=Bib ID Lookup
menu.cmd_search_tcn.tab=What is the TCN or accession ID for the record?
menu.cmd_search_tcn.prompt=TCN Lookup
menu.cmd_search_tcn.not_found.error="%1$s" not found
<img src="/opac/common/js/jscalendar/img.gif"
id='cd_edit_allmultiday_start_date_img' class='cal_img'/>
- <span> Until</span>
+ <span> Through</span>
<input id='cd_edit_allmultiday_end_date' type='text' size='10' maxlength='10'/>
<img src="/opac/common/js/jscalendar/img.gif"
<vbox id="admin_offline_manage_xacts_main" flex="1">
<groupbox flex="1">
- <caption label="&staff.server.admin.offline.xacts.sessions;"/>
+ <caption label="&staff.server.admin.offline.xacts.caption;"/>
<hbox>
<button id="refresh" label="&common.refresh;" accesskey="&staff.server.admin.offline.xacts.refresh.accesskey;"/>
<button id="create" label="&staff.server.admin.offline.xacts.create.label;" disabled="true"/>
if (window.xulG.record.url) {
var req = new XMLHttpRequest();
- req.open('GET',window.xulG.record.url,false);
+ req.open('POST',window.xulG.record.url,false);
req.send(null);
window.xulG.record.marc = req.responseText.replace(xmlDeclaration, '');
}
<?xml version="1.0"?>
<!DOCTYPE overlay PUBLIC "" ""[
- <!--#include virtual="/opac/locale/en-US/lang.dtd"-->
+ <!--#include virtual="/opac/locale/${locale}/lang.dtd"-->
]>
<overlay id="record_buckets_overlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script>dump('loading record_buckets_overlay.xul\n');</script>
+<messagecatalog id="catStrings" src="/xul/server/locale/<!--#echo var='locale'-->/cat.properties" />
+<messagecatalog id="circStrings" src="/xul/server/locale/<!--#echo var='locale'-->/circ.properties" />
+<messagecatalog id="commonStrings" src="/xul/server/locale/<!--#echo var='locale'-->/common.properties" />
+
<commandset id="record_buckets_cmds" />
<box id="record_buckets_main" flex="1" orient="vertical" class="my_overflow">
<vbox id="cmvb1" flex="1">
<tabbox id="record_buckets_tabbox" flex="1" persist="selectedIndex">
<tabs>
- <tab id="record_query_tab" label="Record Query" accesskey="Q"/>
- <tab id="pending_records_tab" label="Pending Records" accesskey="P"/>
- <tab id="bucket_view_tab" label="Bucket View" accesskey="V" />
+ <tab id="record_query_tab" label="&staff.cat.record_buckets_overlay.record_query_tab.label;"
+ accesskey="&staff.cat.record_buckets_overlay.record_query_tab.accesskey;"/>
+ <tab id="pending_records_tab" label="&staff.cat.record_buckets_overlay.pending_records_tab.label;"
+ accesskey="&staff.cat.record_buckets_overlay.pending_records_tab.accesskey;"/>
+ <tab id="bucket_view_tab" label="&staff.cat.record_buckets_overlay.bucket_view_tab.label;"
+ accesskey="&staff.cat.record_buckets_overlay.bucket_view_tab.accesskey;" />
</tabs>
<tabpanels flex="1">
<tabpanel id="record_query_panel">
<groupbox flex="1">
- <caption label="Record Query" />
+ <caption label="&staff.cat.record_buckets_overlay.record_query_tab.label;" />
<hbox id="record_query_top_ui" />
<label id="query_status"/>
<tree id="record_query_list" flex="1" enableColumnDrag="true"/>
</tabpanel>
<tabpanel id="pending_records_panel">
<groupbox flex="1">
- <caption label="Pending Records" />
+ <caption label="&staff.cat.record_buckets_overlay.pending_records_tab.label;" />
<hbox id="pending_buckets_top_ui" />
<tree id="pending_records_list" flex="1" enableColumnDrag="true"/>
<hbox id="pending_buckets_bottom_ui" />
<vbox flex="1">
<hbox>
<hbox id="record_buckets_menulist_placeholder" />
- <button id="record_buckets_action_list" label="Bucket Actions" type="menu" allowevents="true">
+ <button id="record_buckets_action_list" label="&staff.cat.record_buckets_overlay.bucket_view_panel.label;" type="menu" allowevents="true">
<menupopup id="record_buckets_action_list_popup">
- <menuitem command="cmd_record_buckets_new_bucket" label="New Bucket"/>
- <menuitem command="cmd_record_buckets_delete_bucket" label="Delete Bucket"/>
- <menuitem command="cmd_record_buckets_refresh" label="Refresh"/>
+ <menuitem command="cmd_record_buckets_new_bucket" label="&staff.cat.record_buckets_overlay.new_bucket.label;"/>
+ <menuitem command="cmd_record_buckets_delete_bucket" label="&staff.cat.record_buckets_overlay.delete_bucket.label;"/>
+ <menuitem command="cmd_record_buckets_refresh" label="&staff.cat.record_buckets_overlay.refresh_bucket.label;"/>
</menupopup>
</button>
<label id="bucket_item_count" />
</vbox>
<hbox id="record_query_top_ui">
- <label id="record_query_label" value="Query" accesskey="y" control="record_query_input"/>
+ <label id="record_query_label" value="&staff.cat.record_buckets_overlay.record_query_label.value;"
+ accesskey="&staff.cat.record_buckets_overlay.record_query_label.accesskey;" control="record_query_input"/>
<textbox id="record_query_input" flex="1"/>
- <button command="cmd_submit_query" label="Submit" accesskey="S"/>
- <button id="query_help" label="Help" accesskey="H" oncommand="window.open('/xul/server/locale/<!--#echo var='locale' -->/multiclass_search_help.html','multiclass_search_help','chrome,modal,resizable');" >
+ <button command="cmd_submit_query" label="&staff.cat.record_buckets_overlay.cmd_submit_query.button.label;"
+ accesskey="&staff.cat.record_buckets_overlay.cmd_submit_query.button.accesskey;"/>
+ <button id="query_help" label="&staff.cat.record_buckets_overlay.query_help.button.label;"
+ accesskey="&staff.cat.record_buckets_overlay.query_help.button.accesskey;"
+ oncommand="window.open('/xul/server/locale/<!--#echo var='locale' -->/multiclass_search_help.html','multiclass_search_help','chrome,modal,resizable');" >
</button>
</hbox>
<hbox id="record_query_bottom_ui">
- <button id="record_query_list_actions" label="List Actions" type="menu" allowevents="true">
+ <button id="record_query_list_actions" label="&staff.cat.record_buckets_overlay.query_list_actions.label;" type="menu" allowevents="true">
<menupopup id="record_query_list_actions_popup">
- <menuitem command="sel_clip0" label="Copy Field from selected row to Clipboard" disabled="true" />
- <menuitem command="cmd_record_query_csv_to_printer" label="Print List CSV" />
- <menuitem command="cmd_record_query_csv_to_clipboard" label="Copy List CSV to Clipboard" accesskey=""/>
- <menuitem command="cmd_record_query_csv_to_file" label="Save List CSV to File" accesskey=""/>
- <menuitem command="save_columns0" label="Save List Configuration" />
+ <menuitem command="sel_clip0" label="&staff.cat.record_buckets_overlay.menuitem.sel_clip0.label;" disabled="true" />
+ <menuitem command="cmd_record_query_csv_to_printer" label="&staff.cat.record_buckets_overlay.menuitem.query_csv_to_printer.label;" />
+ <menuitem command="cmd_record_query_csv_to_clipboard" label="&staff.cat.record_buckets_overlay.menuitem.query_csv_to_clipboard.label;" accesskey=""/>
+ <menuitem command="cmd_record_query_csv_to_file" label="&staff.cat.record_buckets_overlay.menuitem.query_csv_to_file.label;" accesskey=""/>
+ <menuitem command="save_columns0" label="&staff.cat.record_buckets_overlay.menuitem.save_columns0.label;" />
</menupopup>
</button>
<spacer flex="1"/>
- <button command="cmd_add_all_query_to_pending" label="Add All to Pending Records" accesskey="" image="/xul/server/skin/media/images/right_arrow.png"/>
- <button command="cmd_add_sel_query_to_pending" label="Add Selected to Pending Records" accesskey="" image="/xul/server/skin/media/images/right_arrow.png"/>
+ <button command="cmd_add_all_query_to_pending"
+ label="&staff.cat.record_buckets_overlay.add_all_query_to_pending.label;"
+ accesskey="" image="/xul/server/skin/media/images/right_arrow.png"/>
+ <button command="cmd_add_sel_query_to_pending"
+ label="&staff.cat.record_buckets_overlay.add_sel_query_to_pending.label;"
+ accesskey="" image="/xul/server/skin/media/images/right_arrow.png"/>
</hbox>
<hbox id="pending_buckets_bottom_ui">
- <button id="pending_buckets_list_actions" label="List Actions" type="menu" allowevents="true">
+ <button id="pending_buckets_list_actions"
+ label="&staff.cat.record_buckets_overlay.pending_buckets_list_actions.label;"
+ type="menu" allowevents="true">
<menupopup id="pending_buckets_list_actions_popup">
- <menuitem command="sel_clip1" label="Copy Field from selected row to Clipboard" disabled="true" />
- <menuitem command="cmd_pending_buckets_csv_to_printer" label="Print List CSV" />
- <menuitem command="cmd_pending_buckets_csv_to_clipboard" label="Copy List CSV to Clipboard" accesskey=""/>
- <menuitem command="cmd_pending_buckets_csv_to_file" label="Save List CSV to File" accesskey=""/>
- <menuitem command="save_columns1" label="Save List Configuration" />
+ <menuitem command="sel_clip1" label="&staff.cat.record_buckets_overlay.menuitem.sel_clip1.label;" disabled="true" />
+ <menuitem command="cmd_pending_buckets_csv_to_printer" label="&staff.cat.record_buckets_overlay.menuitem.pending_buckets_csv_to_printer.label;" />
+ <menuitem command="cmd_pending_buckets_csv_to_clipboard" label="&staff.cat.record_buckets_overlay.menuitem.pending_buckets_csv_to_clipboard.label;" accesskey=""/>
+ <menuitem command="cmd_pending_buckets_csv_to_file" label="&staff.cat.record_buckets_overlay.menuitem.pending_buckets_csv_to_file.label;" accesskey=""/>
+ <menuitem command="save_columns1" label="&staff.cat.record_buckets_overlay.menuitem.save_columns1.label;" />
</menupopup>
</button>
<spacer flex="1"/>
- <button command="cmd_add_all_pending_to_record_bucket" label="Add All to current Bucket" accesskey="A" image="/xul/server/skin/media/images/right_arrow.png"/>
- <button command="cmd_add_sel_pending_to_record_bucket" label="Add Selected to current Bucket" accesskey="" image="/xul/server/skin/media/images/right_arrow.png"/>
+ <button command="cmd_add_all_pending_to_record_bucket"
+ label="&staff.cat.record_buckets_overlay.add_all_pending_to_record_bucket.label;"
+ accesskey="&staff.cat.record_buckets_overlay.add_all_pending_to_record_bucket.accesskey;"
+ image="/xul/server/skin/media/images/right_arrow.png"/>
+ <button command="cmd_add_sel_pending_to_record_bucket"
+ label="&staff.cat.record_buckets_overlay.add_sel_pending_to_record_bucket.label;"
+ accesskey="" image="/xul/server/skin/media/images/right_arrow.png"/>
</hbox>
<hbox id="record_buckets_top_ui">
- <button command="cmd_record_buckets_delete_item" label="Remove Selected from Bucket" disabled="true" image="/xul/server/skin/media/images/icon_delete.gif"/>
- <button command="cmd_record_buckets_to_pending_buckets" label="Add Selected to Pending Records" disabled="true" image="/xul/server/skin/media/images/left_arrow.png"/>
+ <button command="cmd_record_buckets_delete_item"
+ label="&staff.cat.record_buckets_overlay.record_buckets_del_item.label;"
+ disabled="true" image="/xul/server/skin/media/images/icon_delete.gif"/>
+ <button command="cmd_record_buckets_to_pending_buckets"
+ label="&staff.cat.record_buckets_overlay.record_buckets_to_pending_buckets.label;"
+ disabled="true" image="/xul/server/skin/media/images/left_arrow.png"/>
</hbox>
<hbox id="info_box" hidden="true" style="font-size: large;">
- <label value="Bucket #"/>
+ <label value="&staff.cat.record_buckets_overlay.info_box.label;"/>
<label id="bucket_number" style="color: blue; text-decoration: underline; -moz-user-focus: normal;" onclick="copy_to_clipboard(event)"/>
<label id="bucket_name" style="color: blue;"/>
- <label value="Owner:"/>
+ <label value="&staff.cat.record_buckets_overlay.bucket_owner.label;"/>
<label id="bucket_owner" style="color: blue;"/>
</hbox>
<hbox id="record_buckets_bottom_ui">
- <button id="record_buckets_list_actions" label="List Actions" type="menu" allowevents="true" disabled="true">
+ <button id="record_buckets_list_actions"
+ label="&staff.cat.record_buckets_overlay.record_buckets_list_actions.label;"
+ type="menu" allowevents="true" disabled="true">
<menupopup id="record_buckets_list_actions_popup">
- <menuitem command="sel_clip2" label="Copy Field from selected row to Clipboard" disabled="true" />
- <menuitem command="cmd_record_buckets_csv_to_printer" label="Print List CSV" />
- <menuitem command="cmd_record_buckets_csv_to_clipboard" label="Copy List CSV to Clipboard" accesskey=""/>
- <menuitem command="cmd_record_buckets_csv_to_file" label="Save List CSV to File" accesskey=""/>
- <menuitem command="save_columns2" label="Save List Configuration" />
+ <menuitem command="sel_clip2"
+ label="&staff.cat.record_buckets_overlay.menuitem.sel_clip2.label;" disabled="true" />
+ <menuitem command="cmd_record_buckets_csv_to_printer"
+ label="&staff.cat.record_buckets_overlay.menuitem.record_buckets_csv_to_printer.label;" />
+ <menuitem command="cmd_record_buckets_csv_to_clipboard"
+ label="&staff.cat.record_buckets_overlay.menuitem.record_buckets_csv_to_clipboard.label;" />
+ <menuitem command="cmd_record_buckets_csv_to_file"
+ label="&staff.cat.record_buckets_overlay.menuitem.record_buckets_csv_to_file.label;" accesskey=""/>
+ <menuitem command="save_columns2" label="&staff.cat.record_buckets_overlay.menuitem.save_columns2.label;" />
</menupopup>
</button>
<spacer flex="1"/>
<hbox style="background: grey">
- <vbox><spacer flex="1"/><label value="Batch:" style="font-weight: bold"/><spacer flex="1"/></vbox>
- <button command="cmd_sel_opac" label="Show All in Catalog" accesskey=""/>
- <button command="cmd_delete_records" label="Delete All Records"/>
- <button command="cmd_merge_records" label="Merge All Records"/>
- <button id="record_buckets_export_records" label="Export All Records" type="menu" allowevents="true" disabled="true">
+ <vbox><spacer flex="1"/><label value="&staff.cat.record_buckets_overlay.box.label;" style="font-weight: bold"/><spacer flex="1"/></vbox>
+ <button command="cmd_sel_opac" label="&staff.cat.record_buckets_overlay.sel_opac.label;" accesskey=""/>
+ <button command="cmd_delete_records" label="&staff.cat.record_buckets_overlay.del_records.label;"/>
+ <button command="cmd_merge_records" label="&staff.cat.record_buckets_overlay.merge_records.label;"/>
+ <button id="record_buckets_export_records" label="&staff.cat.record_buckets_overlay.export_records.label;" type="menu" allowevents="true" disabled="true">
<menupopup id="record_buckets_export_record_types" allowevents="true">
- <menuitem command="cmd_export_records_usmarc" label="MARC21"/>
- <menuitem command="cmd_export_records_unimarc" label="UNIMARC"/>
- <menuitem command="cmd_export_records_xml" label="XML"/>
- <menuitem command="cmd_export_records_bre" label="Evergreen BRE"/>
+ <menuitem command="cmd_export_records_usmarc" label="&staff.cat.record_buckets_overlay.menuitem.export_usmarc.label;"/>
+ <menuitem command="cmd_export_records_unimarc" label="&staff.cat.record_buckets_overlay.menuitem.export_unimarc.label;"/>
+ <menuitem command="cmd_export_records_xml" label="&staff.cat.record_buckets_overlay.menuitem.export_xml.label;"/>
+ <menuitem command="cmd_export_records_bre" label="&staff.cat.record_buckets_overlay.menuitem.export_eg_bre.label;"/>
</menupopup>
</button>
</hbox>
</hbox>
</overlay>
+
<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
<!-- LOCALIZATION -->
<!DOCTYPE window PUBLIC "" ""[
- <!--#include virtual="/opac/locale/en-US/lang.dtd"-->
+ <!--#include virtual="/opac/locale/${locale}/lang.dtd"-->
]>
<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
<!-- OVERLAYS -->
<?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?>
-<window id="record_buckets_win" title="Add to Bucket"
+<window id="record_buckets_win" title="&staff.cat.record_buckets_quick.add_to_bucket.title;"
onload="try { my_init(); font_helper(); } catch(E) { alert(E); }" persist="height,width"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
function my_init() {
try {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
- if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
+ if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
JSAN.use('util.error'); g.error = new util.error();
- g.error.sdump('D_TRACE','my_init() for record_buckets.xul');
+ g.error.sdump('D_TRACE','my_init() for cat/record_buckets_quick.xul');
JSAN.use('util.network'); g.network = new util.network();
JSAN.use('OpenILS.data'); g.data = new OpenILS.data(); g.data.init({'via':'stash'});
$('desc').appendChild( document.createTextNode(
(g.record_ids.length == 1 ?
- 'Copy this 1 record into which bucket?' :
- 'Copy these ' + g.record_ids.length + ' items into which bucket?')
+ $("catStrings").getString('staff.cat.record_buckets_quick.copy_one_record') :
+ $("catStrings").getFormattedString('staff.cat.record_buckets_quick.copy_multiple_records', [g.record_ids.length]))
) );
var robj = g.network.simple_request('BUCKET_RETRIEVE_VIA_USER',[ ses(), g.data.list.au[0].id() ]);
if (typeof robj.ilsevent != 'undefined') throw(robj);
} catch(E) {
try {
- g.error.standard_unexpected_error_alert('Trying to init record_buckets_quick.xul',E);
+ g.error.standard_unexpected_error_alert($("catStrings").getString('staff.cat.record_buckets_quick.initing_record_buckets_quick_xul'), E);
} catch(F) {
alert(E);
}
g.new_bucket = function() {
try {
- var name = prompt('What would you like to name the bucket?','','Bucket Creation');
+ var name = prompt($("catStrings").getString('staff.cat.record_buckets_quick.name_of_bucket'),
+ '',
+ $("catStrings").getString('staff.cat.record_buckets_quick.name_of_bucket.title'));
if (name) {
var bucket = new cbreb();
bucket.btype('staff_client');
g.add_to_bucket(bucket_id);
}
} catch(E) {
- g.error.standard_unexpected_error_alert('Bucket creation failed.',E);
+ g.error.standard_unexpected_error_alert($("catStrings").getString('staff.cat.record_buckets_quick.bucket_creation_failure'),E);
}
}
if (typeof robj == 'object') throw robj;
} catch(E) {
- g.error.standard_unexpected_error_alert('Addition likely failed for bucket = ' + bucket_id + ' and record id = ' + g.record_ids[i],E);
+ g.error.standard_unexpected_error_alert($("catStrings").getFormattedString('staff.cat.record_buckets_quick.add_to_bucket.addition_failed', [bucket_id, g.record_ids[i]]), E);
}
}
window.close();
]]>
</script>
+
+ <messagecatalog id="catStrings" src="/xul/server/locale/<!--#echo var='locale'-->/cat.properties" />
+ <messagecatalog id="circStrings" src="/xul/server/locale/<!--#echo var='locale'-->/circ.properties" />
+ <messagecatalog id="commonStrings" src="/xul/server/locale/<!--#echo var='locale'-->/common.properties" />
<vbox flex="1" style="overflow: auto">
<groupbox flex="1">
- <caption label="Record Buckets"/>
+ <caption label="&staff.cat.record_buckets_quick.groupbox.caption;"/>
<description id="desc"/>
<listbox id="bucket_list" rows="5" flex="1" style="overflow: auto"/>
<hbox>
- <button label="Add to Selected Bucket" accesskey="A" oncommand="g.add_to_bucket()"/>
- <button label="Add to New Bucket" accesskey="N" oncommand="g.new_bucket()"/>
+ <button label="&staff.cat.record_buckets_quick.add_to_bucket.label;"
+ accesskey="&staff.cat.record_buckets_quick.add_to_bucket.accesskey;" oncommand="g.add_to_bucket()"/>
+ <button label="&staff.cat.record_buckets_quick.new_bucket.label;"
+ accesskey="&staff.cat.record_buckets_quick.new_bucket.accesskey;" oncommand="g.new_bucket()"/>
</hbox>
<hbox>
<!--
<button label="Advanced" accesskey="v" oncommand="g.advanced()"/>
-->
- <button label="Cancel" accesskey="C" oncommand="window.close()"/>
+ <button label="&staff.cat.record_buckets_quick.cancel.label;"
+ accesskey="&staff.cat.record_buckets_quick.cancel.accesskey;" oncommand="window.close()"/>
</hbox>
</groupbox>
</vbox>
function my_init() {
try {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
- if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
+ if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
JSAN.use('util.error'); g.error = new util.error();
var ds = document.createElement('description'); vb.appendChild(ds);
ds.appendChild( document.createTextNode( g.volumes[i].label() ) );
var ds2 = document.createElement('description'); vb.appendChild(ds2);
- ds2.appendChild( document.createTextNode( g.volumes[i].copies().length + ( g.volumes[i].copies().length == 1 ? ' copy' : ' copies') ) );
+ ds2.appendChild( document.createTextNode( g.volumes[i].copies().length + (
+ g.volumes[i].copies().length == 1 ? $("catStrings").getString('staff.cat.spine_labels.copy') : $("catStrings").getString('staff.cat.spine_labels.copies')) ) );
ds2.setAttribute('style','color: green');
var hb = document.createElement('hbox'); vb.appendChild(hb);
idx++;
}
} catch(E) {
- g.error.standard_unexpected_error_alert('Generate',E);
+ g.error.standard_unexpected_error_alert($("catStrings").getString('staff.cat.spine_labels.generate.std_unexpeceted_err'),E);
}
}
'show_print_button' : 1,
'alternate_print' : 1,
'no_xulG' : 1,
- 'title' : 'Spine Labels',
+ 'title' : $("catStrings").('staff.cat.spine_labels.preview.title'),
'on_url_load' : function(b) {
try {
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
} catch(E) {
alert(E);
}
- },
+ }
};
} catch(E) {
- g.error.standard_unexpected_error_alert('Preview and Print',E);
+ g.error.standard_unexpected_error_alert($("catStrings").('staff.cat.spine_labels.preview.std_unexpected_err'),E);
}
}
<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
<!-- LOCALIZATION -->
<!DOCTYPE window PUBLIC "" ""[
- <!--#include virtual="/opac/locale/en-US/lang.dtd"-->
+ <!--#include virtual="/opac/locale/${locale}/lang.dtd"-->
]>
<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
<script type="text/javascript" src="/xul/server/cat/spine_labels.js"/>
<messagecatalog id="circStrings" src="/xul/server/locale/<!--#echo var='locale' -->/circ.properties"/>
+ <messagecatalog id="catStrings" src="/xul/server/locale/<!--#echo var='locale'-->/cat.properties" />
+ <messagecatalog id="commonStrings" src="/xul/server/locale/<!--#echo var='locale'-->/common.properties" />
<vbox id="spine_labels_main" flex="1" class="my_overflow">
<hbox flex="1" class="my_overflow">
<vbox>
<hbox>
- <button label="Re-Generate" accesskey="G" oncommand="generate()"/>
+ <button label="&staff.cat.spine_labels.re-generate.label;"
+ accesskey="&staff.cat.spine_labels.re-generate.accesskey;" oncommand="generate()"/>
<spacer />
- <button id="preview" disabled="true" label="Preview and Print" accesskey="P" oncommand="preview()"/>
+ <button id="preview" disabled="true" label="&staff.cat.spine_labels.preview_and_print.label;"
+ accesskey="&staff.cat.spine_labels.preview_and_print.accesskey;" oncommand="preview()"/>
<spacer />
- <button id="close" disabled="false" label="Close Window" accesskey="C" oncommand="window.close()"/>
+ <button id="close" disabled="false" label="&staff.cat.spine_labels.close_window.label;"
+ accesskey="&staff.cat.spine_labels.close_window.accesskey;" oncommand="window.close()"/>
</hbox>
- <hbox><label value="Font size (in pts):" control="pt"/><textbox id="pt" value="10" onchange="this.setAttribute('value',this.value)" persist="value"/></hbox>
+ <hbox>
+ <label value="&staff.cat.spine_labels.font_size_label.value;" control="pt"/>
+ <textbox id="pt" value="10" onchange="this.setAttribute('value',this.value)" persist="value"/>
+ </hbox>
<grid><columns><column/><column/><column/><column/></columns><rows>
- <row> <label class="header" value="Spine Label"/><spacer/> </row>
- <row> <label value="Left Margin (in characters):" control="lm"/><textbox id="lm" value="0" onchange="this.setAttribute('value',this.value)" persist="value"/> </row>
- <row> <label value="Label Width (in characters):" control="lw"/><textbox id="lw" value="8" onchange="this.setAttribute('value',this.value)" persist="value"/> </row>
- <row> <label value="Label Length (in lines):" control="ll"/><textbox id="ll" value="9" onchange="this.setAttribute('value',this.value)" persist="value"/> </row>
- <row> <label class="header" value="Pocket Label"/><checkbox id="pl" checked="false" persist="checked" label="Enabled"/> </row>
- <row> <label value="Middle Margin (in characters):" control="mm"/><textbox id="mm" value="2" onchange="this.setAttribute('value',this.value)" persist="value"/> </row>
- <row> <label value="Label Width (in characters):" control="plw"/><textbox id="plw" value="28" onchange="this.setAttribute('value',this.value)" persist="value"/> </row>
- <row> <label value="Label Length (in lines):" control="pll"/><textbox id="pll" value="9" onchange="this.setAttribute('value',this.value)" persist="value"/> </row>
- <row> <checkbox id="title" checked="true" persist="checked" label="Include Title (wraps on word at label width)"/><hbox><label value="On line:"/><textbox id="title_line" value="4" persist="value" onchange="this.setAttribute('value',this.value)"/></hbox> </row>
- <row> <checkbox id="title_r" checked="true" persist="checked" label="Include Title (segment after wrapping)"/><hbox><label value="On line:"/><textbox id="title_r_line" value="5" persist="value" onchange="this.setAttribute('value',this.value)"/></hbox> </row>
- <row> <spacer/><checkbox id="title_r_indent" checked="true" persist="checked" label="Indent a space?"/> </row>
- <row> <checkbox id="author" checked="true" persist="checked" label="Include Author"/><hbox><label value="On line:"/><textbox id="author_line" value="3" persist="value" onchange="this.setAttribute('value',this.value)"/></hbox> </row>
- <row> <checkbox id="call_number" checked="true" persist="checked" label="Include Call Number"/><hbox><label value="On line:"/><textbox id="call_number_line" value="2" persist="value" onchange="this.setAttribute('value',this.value)"/></hbox> </row>
+ <row> <label class="header" value="&staff.cat.spine_labels.spine_label.value;"/><spacer/> </row>
+ <row> <label value="&staff.cat.spine_labels.spine_label.left_margine.value;" control="lm"/><textbox id="lm" value="0" onchange="this.setAttribute('value',this.value)" persist="value"/> </row>
+ <row> <label value="&staff.cat.spine_labels.spine_label.label_width.value;" control="lw"/><textbox id="lw" value="8" onchange="this.setAttribute('value',this.value)" persist="value"/> </row>
+ <row> <label value="&staff.cat.spine_labels.spine_label.label_length.value;" control="ll"/><textbox id="ll" value="9" onchange="this.setAttribute('value',this.value)" persist="value"/> </row>
+ <row> <label class="header" value="&staff.cat.spine_labels.pocket_label.value;"/><checkbox id="pl" checked="false" persist="checked" label="Enabled"/> </row>
+ <row> <label value="&staff.cat.spine_labels.pocket_label.middle_margin.value;" control="mm"/><textbox id="mm" value="2" onchange="this.setAttribute('value',this.value)" persist="value"/> </row>
+ <row> <label value="&staff.cat.spine_labels.pocket_label.label_width.value;" control="plw"/><textbox id="plw" value="28" onchange="this.setAttribute('value',this.value)" persist="value"/> </row>
+ <row> <label value="&staff.cat.spine_labels.pocket_label.label_length.value;" control="pll"/><textbox id="pll" value="9" onchange="this.setAttribute('value',this.value)" persist="value"/> </row>
+ <row>
+ <checkbox id="title" checked="true" persist="checked" label="&staff.cat.spine_labels.pocket_label.title.label;"/>
+ <hbox>
+ <label value="&staff.cat.spine_labels.on_line.value;"/>
+ <textbox id="title_line" value="4" persist="value" onchange="this.setAttribute('value',this.value)"/>
+ </hbox>
+ </row>
+ <row>
+ <checkbox id="title_r" checked="true" persist="checked" label="&staff.cat.spine_labels.pocket_label.include_title.label;"/>
+ <hbox>
+ <label value="&staff.cat.spine_labels.on_line.value;"/>
+ <textbox id="title_r_line" value="5" persist="value" onchange="this.setAttribute('value',this.value)"/>
+ </hbox>
+ </row>
+ <row> <spacer/><checkbox id="title_r_indent" checked="true" persist="checked" label="&staff.cat.spine_labels.indent_title.label;"/> </row>
+ <row>
+ <checkbox id="author" checked="true" persist="checked" label="Include Author"/>
+ <hbox>
+ <label value="&staff.cat.spine_labels.on_line.value;"/>
+ <textbox id="author_line" value="3" persist="value" onchange="this.setAttribute('value',this.value)"/>
+ </hbox>
+ </row>
+ <row>
+ <checkbox id="call_number" checked="true" persist="checked" label="&staff.cat.spine_labels.inc_call_number.label;"/>
+ <hbox>
+ <label value="&staff.cat.spine_labels.on_line.value;"/>
+ <textbox id="call_number_line" value="2" persist="value" onchange="this.setAttribute('value',this.value)"/>
+ </hbox>
+ </row>
<row>
- <checkbox id="owning_lib_shortname" checked="false" persist="checked" label="Include Owning Library (policy code)"/>
- <hbox><label value="On line:"/><textbox id="owning_lib_shortname_line" value="" persist="value" onchange="this.setAttribute('value',this.value)"/></hbox>
+ <checkbox id="owning_lib_shortname" checked="false" persist="checked" label="&staff.cat.spine_labels.inc_owning_library_policy_code.label;"/>
+ <hbox>
+ <label value="&staff.cat.spine_labels.on_line.value;"/>
+ <textbox id="owning_lib_shortname_line" value="" persist="value" onchange="this.setAttribute('value',this.value)"/>
+ </hbox>
</row>
<row>
- <checkbox id="owning_lib" checked="false" persist="checked" label="Include Owning Library"/><hbox><label value="On line:"/><textbox id="owning_lib_line" value="" persist="value" onchange="this.setAttribute('value',this.value)"/></hbox>
+ <checkbox id="owning_lib" checked="false" persist="checked" label="&staff.cat.spine_labels.inc_owning_library.label;"/>
+ <hbox>
+ <label value="&staff.cat.spine_labels.on_line.value;"/>
+ <textbox id="owning_lib_line" value="" persist="value" onchange="this.setAttribute('value',this.value)"/>
+ </hbox>
</row>
<row>
- <checkbox id="shelving_location" checked="false" persist="checked" label="Include Shelving Location"/><hbox><label value="On line:"/><textbox id="shelving_location_line" value="" persist="value" onchange="this.setAttribute('value',this.value)"/></hbox>
+ <checkbox id="shelving_location" checked="false" persist="checked" label="&staff.cat.spine_labels.inc_shelving_location.label;"/>
+ <hbox>
+ <label value="&staff.cat.spine_labels.on_line.value;"/>
+ <textbox id="shelving_location_line" value="" persist="value" onchange="this.setAttribute('value',this.value)"/>
+ </hbox>
</row>
<row>
- <checkbox id="barcode" checked="true" persist="checked" label="Include Item Barcode"/><hbox><label value="On line:"/><textbox id="barcode_line" value="1" persist="value" onchange="this.setAttribute('value',this.value)"/></hbox>
+ <checkbox id="barcode" checked="true" persist="checked" label="&staff.cat.spine_labels.inc_item_barcode.label;"/>
+ <hbox>
+ <label value="&staff.cat.spine_labels.on_line.value;"/>
+ <textbox id="barcode_line" value="1" persist="value" onchange="this.setAttribute('value',this.value)"/>
+ </hbox>
</row>
<row>
- <hbox><checkbox id="custom1" checked="false" persist="checked" label="Custom:"/><textbox id="custom1_tb" value="%price%" persist="value" onchange="this.setAttribute('value',this.value)"/></hbox>
- <hbox><label value="On line:"/><textbox id="custom1_line" value="" persist="value" onchange="this.setAttribute('value',this.value)"/></hbox>
+ <hbox>
+ <checkbox id="custom1" checked="false" persist="checked" label="&staff.cat.spine_labels.custom.label;"/>
+ <textbox id="custom1_tb" value="%price%" persist="value" onchange="this.setAttribute('value',this.value)"/>
+ </hbox>
+ <hbox>
+ <label value="&staff.cat.spine_labels.on_line.value;"/>
+ <textbox id="custom1_line" value="" persist="value" onchange="this.setAttribute('value',this.value)"/>
+ </hbox>
</row>
<row>
- <hbox><checkbox id="custom2" checked="false" persist="checked" label="Custom:"/><textbox id="custom2_tb" value="%deposit_amount%" persist="value" onchange="this.setAttribute('value',this.value)"/></hbox>
- <hbox><label value="On line:"/><textbox id="custom2_line" value="" persist="value" onchange="this.setAttribute('value',this.value)"/></hbox>
+ <hbox>
+ <checkbox id="custom2" checked="false" persist="checked" label="&staff.cat.spine_labels.custom.label;"/>
+ <textbox id="custom2_tb" value="%deposit_amount%" persist="value" onchange="this.setAttribute('value',this.value)"/>
+ </hbox>
+ <hbox>
+ <label value="&staff.cat.spine_labels.on_line.value;"/>
+ <textbox id="custom2_line" value="" persist="value" onchange="this.setAttribute('value',this.value)"/>
+ </hbox>
</row>
<row>
- <hbox><checkbox id="custom3" checked="false" persist="checked" label="Custom:"/><textbox id="custom3_tb" value="%alert_message%" persist="value" onchange="this.setAttribute('value',this.value)"/></hbox>
- <hbox><label value="On line:"/><textbox id="custom3_line" value="" persist="value" onchange="this.setAttribute('value',this.value)"/></hbox>
+ <hbox>
+ <checkbox id="custom3" checked="false" persist="checked" label="&staff.cat.spine_labels.custom.label;"/>
+ <textbox id="custom3_tb" value="%alert_message%" persist="value" onchange="this.setAttribute('value',this.value)"/>
+ </hbox>
+ <hbox>
+ <label value="&staff.cat.spine_labels.on_line.value;"/>
+ <textbox id="custom3_line" value="" persist="value" onchange="this.setAttribute('value',this.value)"/>
+ </hbox>
</row>
<row>
- <hbox><checkbox id="custom4" checked="false" persist="checked" label="Custom:"/><textbox id="custom4_tb" value="Don't sell me on eBay" persist="value" onchange="this.setAttribute('value',this.value)"/></hbox>
- <hbox><label value="On line:"/><textbox id="custom4_line" value="" persist="value" onchange="this.setAttribute('value',this.value)"/></hbox>
+ <hbox>
+ <checkbox id="custom4" checked="false" persist="checked" label="&staff.cat.spine_labels.custom.label;"/>
+ <textbox id="custom4_tb" value="Don't sell me on eBay" persist="value" onchange="this.setAttribute('value',this.value)"/>
+ </hbox>
+ <hbox>
+ <label value="&staff.cat.spine_labels.on_line.value;"/>
+ <textbox id="custom4_line" value="" persist="value" onchange="this.setAttribute('value',this.value)"/>
+ </hbox>
</row>
</rows></grid>
- <button label="Available Macros" oncommand="show_macros()"/>
+ <button label="&staff.cat.spine_labels.available_macros.label;" oncommand="show_macros()"/>
</vbox>
<splitter><grippy/></splitter>
<vbox id="panel" flex="1" class="my_overflow"/>
dump('entering cat/util.js\n');
+function $(id) { return document.getElementById(id); }
+
if (typeof cat == 'undefined') var cat = {};
cat.util = {};
JSAN.use('util.network');
var network = new util.network();
- if (!old_bc) old_bc = window.prompt('Enter original barcode for the copy:','','Replace Barcode');
+ if (!old_bc) old_bc = window.prompt($("catStrings").getString('staff.cat.util.replace_barcode.old_bc_window_prompt.prompt'),
+ '',
+ $("catStrings").getString('staff.cat.util.replace_barcode.old_bc_window_prompt.title'));
if (!old_bc) return;
var copy;
if (typeof copy.ilsevent != 'undefined') throw(copy);
if (!copy) throw(copy);
} catch(E) {
- alert('We were unable to retrieve an item with barcode "' + old_bc + '".\n');
+ alert($("catStrings").getFormattedString('staff.cat.util.replace_barcode.error_alert', [old_bc]) + '\n');
return old_bc;
}
if (typeof copy.ilsevent != 'undefined') throw(copy);
if (!copy) throw(copy);
} catch(E) {
- try { alert('We were unable to retrieve an item with barcode "' + old_bc + '".\n' + (typeof E.ilsevent == 'undefined' ? '' : E.textcode + ' : ' + E.desc)); } catch(F) { alert(E + '\n' + F); }
+ try {
+ alert($("catStrings").getFormattedString('staff.cat.util.replace_barcode.error_alert', [old_bc]) +
+ '\n' + (typeof E.ilsevent == 'undefined' ? '' : E.textcode + ' : ' + E.desc));
+ } catch(F) {
+ alert(E + '\n' + F);
+ }
return old_bc;
}
- var new_bc = window.prompt('Enter the replacement barcode for the copy:','','Replace Barcode');
+ var new_bc = window.prompt($("catStrings").getString('staff.cat.util.replace_barcode.new_bc_window_prompt.prompt'),
+ '',
+ $("catStrings").getString('staff.cat.util.replace_barcode.new_bc_window_prompt.title'));
new_bc = String( new_bc ).replace(/\s/g,'');
if (!new_bc) {
- alert('Rename aborted. Blank for barcode not allowed.');
+ alert($("catStrings").getString('staff.cat.util.replace_barcode.new_bc.failed'));
return old_bc;
}
return old_bc;
} else {
if (test.ilsevent != 1502 /* ASSET_COPY_NOT_FOUND */) {
- obj.error.standard_unexpected_error_alert('Error testing replacement barcode "' + new_bc + '".',test);
+ obj.error.standard_unexpected_error_alert($("catStrings").getFormattedString('staff.cat.util.replace_barcode.testing_error', [new_bc]), test);
return old_bc;
}
}
if (typeof r.ilsevent != 'undefined') {
if (r.ilsevent != 0) {
if (r.ilsevent == 5000 /* PERM_FAILURE */) {
- alert('Renamed aborted. Insufficient permission.');
+ alert($("catStrings").getString('staff.cat.util.replace_barcode.insufficient_permission_for_rename'));
return old_bc;
} else {
- obj.error.standard_unexpected_error_alert('Error renaming item.',r);
+ obj.error.standard_unexpected_error_alert($("catStrings").getString('staff.cat.util.replace_barcode.item_rename_error'),r);
return old_bc;
}
}
return new_bc;
} catch(E) {
JSAN.use('util.error'); var error = new util.error();
- error.standard_unexpected_error_alert('Rename did not likely occur.',E);
+ error.standard_unexpected_error_alert($("catStrings").getString('staff.cat.util.replace_barcode.rename_error'),E);
return old_bc;
}
}
try {
data.stash_retrieve();
if (!data.marked_volume) {
- alert('Please mark a volume as the destination from within holdings maintenance and then try this again.');
+ alert($("catStrings").getString('staff.cat.util.transfer_copies.unmarked_volume_alert'));
return;
}
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserWrite');
var xml = '<vbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" flex="1" style="overflow: auto">';
if (!params.message) {
- params.message = 'Transfer items from their original volumes to ';
- params.message += data.hash.aou[ params.owning_lib ].shortname() + "'s volume labelled ";
- params.message += '"' + params.volume_label + '" on the following record (and change their circ libs to match)?';
+ params.message = $("catStrings").getFormattedString('staff.cat.util.transfer_copies.params_message', [data.hash.aou[ params.owning_lib ].shortname(), params.volume_label]);
+ //params.message = 'Transfer items from their original volumes to ';
+ //params.message += data.hash.aou[ params.owning_lib ].shortname() + "'s volume labelled ";
+ //params.message += '"' + params.volume_label + '" on the following record (and change their circ libs to match)?';
}
xml += '<description>' + params.message.replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>') + '</description>';
- xml += '<hbox><button label="Transfer" name="fancy_submit"/>';
- xml += '<button label="Cancel" accesskey="C" name="fancy_cancel"/></hbox>';
+ xml += '<hbox><button label="' + $("catStrings").getString('staff.cat.util.transfer_copies.transfer.label')+ '" name="fancy_submit"/>';
+ xml += '<button label="' + $("catStrings").getString('staff.cat.util.transfer_copies.cancel.label');
+ xml += '" accesskey="'+ $("catStrings").getString('staff.cat.util.transfer_copies.cancel.accesskey') +'" name="fancy_cancel"/></hbox>';
xml += '<iframe style="overflow: scroll" flex="1" src="' + urls.XUL_BIB_BRIEF + '?docid=' + params.docid + '"/>';
xml += '</vbox>';
//data.temp_transfer = xml; data.stash('temp_transfer');
//+ '?xml_in_stash=temp_transfer'
//+ '&title=' + window.escape('Item Transfer'),
'fancy_prompt', 'chrome,resizable,modal,width=500,height=300',
- { 'xml' : xml, 'title' : 'Item Transfer' }
+ { 'xml' : xml, 'title' : $("catStrings").getString('staff.cat.util.transfer_copies.window_title') }
);
- if (fancy_prompt_data.fancy_status == 'incomplete') { alert('Transfer Aborted'); return; }
+ if (fancy_prompt_data.fancy_status == 'incomplete') { alert($("catStrings").getString('staff.cat.util.transfer_copies.aborted_transfer')); return; }
JSAN.use('util.functional');
[ ses(), copies, true ],
null,
{
- 'title' : 'Override Transfer Failure?',
+ 'title' : $("catStrings").getString('staff.cat.util.transfer_copies.override_transfer_failure'),
'overridable_events' : [
1208 /* TITLE_LAST_COPY */,
1227 /* COPY_DELETE_WARNING */,
if (typeof robj.ilsevent != 'undefined') {
throw(robj);
} else {
- alert('Items transferred.');
+ alert($("catStrings").getString('staff.cat.util.transfer_copies.successful_transfer'));
}
} catch(E) {
- error.standard_unexpected_error_alert('All items not likely transferred.',E);
+ error.standard_unexpected_error_alert($("catStrings").getString('staff.cat.util.transfer_copies.transfer_error'),E);
}
}
data.stash('temp_barcodes_for_labels');
xulG.new_tab(
xulG.url_prefix( urls.XUL_SPINE_LABEL ),
- { 'tab_name' : 'Spine Labels' },
+ { 'tab_name' : $("catStrings").getString('staff.cat.util.spine_editor.tab_name') },
{}
);
} catch(E) {
- error.standard_unexpected_error_alert('Spine Labels',E);
+ error.standard_unexpected_error_alert($("catStrings").getString('staff.cat.util.spine_editor.spine_editor_error'),E);
}
}
for (var i = 0; i < selection_list.length; i++) {
doc_id = selection_list[i].doc_id;
if (!doc_id) {
- alert(selection_list[i].barcode + ' is not cataloged');
+ alert($("catStrings").getFormattedString('staff.cat.util.show_in_opac.unknown_barcode', [selection_list[i].barcode]));
continue;
}
if (typeof seen[doc_id] != 'undefined') {
);
}
} catch(E) {
- error.standard_unexpected_error_alert('Error opening catalog for document id = ' + doc_id,E);
+ error.standard_unexpected_error_alert($("catStrings").getFormattedString('staff.cat.util.show_in_opac.catalog_error_for_doc_id', [doc_id]),E);
}
}
JSAN.use('util.error'); obj.error = new util.error();
var title = '';
- if ((params.copy_ids && params.copy_ids.length > 1) || (params.copies && params.copies.length > 1 )) title += 'Batch ';
- title += params.edit == 1 ? 'Edit' : 'View';
- title += ' Copy Attributes';
-
+ if (params.copy_ids && params.copy_ids.length > 1 && params.edit == 1)
+ title = $("catStrings").getString('staff.cat.util.copy_editor.batch_edit');
+ else if(params.copies && params.copies.length > 1 && params.edit == 1)
+ title = $("catStrings").getString('staff.cat.util.copy_editor.batch_view');
+ else if(params.copy_ids && params.copy_ids.length == 1)
+ title = $("catStrings").getString('staff.cat.util.copy_editor.edit');
+ else
+ title = $("catStrings").getString('staff.cat.util.copy_editor.view');
+
JSAN.use('util.window'); var win = new util.window();
var my_xulG = win.open(
(urls.XUL_COPY_EDITOR),
params
);
if (!my_xulG.copies && params.edit) {
- alert(typeof params.no_copies_modified_msg != 'undefined' ? params.no_copies_modified_msg : 'Copies not modified.');
+ alert(typeof params.no_copies_modified_msg != 'undefined' ? params.no_copies_modified_msg : $("catStrings").getString('staff.cat.util.copy_editor.not_modified'));
} else {
return my_xulG.copies;
}
}
if (magic_status) {
- error.yns_alert('Action failed. One or more of these items is in a special status (Checked Out, In Transit, etc.) and cannot be changed to the Damaged status.','Action failed.','OK',null,null,'Check here to confirm this message');
+ error.yns_alert($("catStrings").getString('staff.cat.util.mark_item_damaged.af_message'),
+ $("catStrings").getString('staff.cat.util.mark_item_damaged.af_title'),
+ $("catStrings").getString('staff.cat.util.mark_item_damaged.af_ok_label'), null, null,
+ $("catStrings").getString('staff.cat.util.mark_item_damaged.af_confirm_action'));
} else {
- var r = error.yns_alert('Change the status for these items to Damaged? You will have to manually retrieve the last circulation if you need to bill a patron. Barcodes: ' + util.functional.map_list( copies, function(o) { return o.barcode(); } ).join(", "), 'Mark Damaged', 'OK', 'Cancel', null, 'Check here to confirm this action');
+ var r = error.yns_alert($("catStrings").getFormattedString('staff.cat.util.mark_item_damaged.md_message', [util.functional.map_list( copies, function(o) { return o.barcode(); } ).join(", ")]),
+ $("catStrings").getString('staff.cat.util.mark_item_damaged.md_title'),
+ $("catStrings").getString('staff.cat.util.mark_item_damaged.md_ok_label'),
+ $("catStrings").getString('staff.cat.util.mark_item_damaged.md_cancel_label'), null,
+ $("catStrings").getString('staff.cat.util.mark_item_damaged.md_confirm_action'));
if (r == 0) {
var count = 0;
if (typeof robj.ilsevent != 'undefined') throw(robj);
count++;
} catch(E) {
- error.standard_unexpected_error_alert('Error marking item ' + copies[i].barcode() + ' damaged.',E);
+ error.standard_unexpected_error_alert($("catStrings").getFormattedString('staff.cat.util.mark_item_damaged.marking_error', [copies[i].barcode()]),E);
}
}
- alert(count == 1 ? 'Item marked Damaged' : count + ' items marked Damaged.');
+ alert(count == 1 ? $("catStrings").getString('staff.cat.util.mark_item_damaged.one_item_damaged') :
+ $("catStrings").getFormattedString('staff.cat.util.mark_item_damaged.multiple_item_damaged', [count]));
}
}
}
if (magic_status) {
- error.yns_alert('Action failed. One or more of these items is in a special status (Checked Out, In Transit, etc.) and cannot be changed to the Missing status.','Action failed.','OK',null,null,'Check here to confirm this message');
+ error.yns_alert($("catStrings").getString('staff.cat.util.mark_item_missing.af_message'),
+ $("catStrings").getString('staff.cat.util.mark_item_missing.af_title'),
+ $("catStrings").getString('staff.cat.util.mark_item_missing.af_ok_label'), null, null,
+ $("catStrings").getString('staff.cat.util.mark_item_missing.af_confirm_action'));
} else {
- var r = error.yns_alert('Change the status for these items to Missing? Barcodes: ' + util.functional.map_list( copies, function(o) { return o.barcode(); } ).join(", "), 'Mark Missing', 'OK', 'Cancel', null, 'Check here to confirm this action');
+ var r = error.yns_alert($("catStrings").getFormattedString('staff.cat.util.mark_item_missing.ms_message', [util.functional.map_list( copies, function(o) { return o.barcode(); } ).join(", ")]),
+ $("catStrings").getString('staff.cat.util.mark_item_missing.ms_title'),
+ $("catStrings").getString('staff.cat.util.mark_item_missing.ms_ok_label'),
+ $("catStrings").getString('staff.cat.util.mark_item_missing.ms_cancel_label'), null,
+ $("catStrings").getString('staff.cat.util.mark_item_missing.ms_confirm_action'));
if (r == 0) {
var count = 0;
if (typeof robj.ilsevent != 'undefined') throw(robj);
count++;
} catch(E) {
- error.standard_unexpected_error_alert('Error marking item ' + copies[i].barcode() + ' missing.',E);
+ error.standard_unexpected_error_alert($("catStrings").getFormattedString('staff.cat.util.mark_item_missing.marking_error', [copies[i].barcode()]),E);
}
}
- alert(count == 1 ? 'Item marked Missing' : count + ' items marked Missing.');
+ alert(count == 1 ? $("catStrings").getString('staff.cat.util.mark_item_missing.one_item_missing') :
+ $("catStrings").getFormattedString('staff.cat.util.mark_item_missing.multiple_item_missing', [count]));
}
}
<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
<!-- LOCALIZATION -->
<!DOCTYPE window PUBLIC "" ""[
- <!--#include virtual="/opac/locale/en-US/lang.dtd"-->
+ <!--#include virtual="/opac/locale/${locale}/lang.dtd"-->
]>
<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
<script type="text/javascript" src="/xul/server/main/JSAN.js"/>
<script>
<![CDATA[
+ function $(id) { return document.getElementById(id); }
+
function my_init() {
try {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
- if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
+ if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
JSAN.use('util.error'); g.error = new util.error();
g.error.sdump('D_TRACE','my_init() for cat/volume_buckets.xul');
if (typeof window.xulG == 'object' && typeof window.xulG.set_tab_name == 'function') {
- try { window.xulG.set_tab_name('Volume Buckets'); } catch(E) { alert(E); }
+ try { window.xulG.set_tab_name($("catStrings").getString('staff.cat.volume_buckets.window_tab_name')); } catch(E) { alert(E); }
}
} catch(E) {
]]>
</script>
+ <messagecatalog id="catStrings" src="/xul/server/locale/<!--#echo var='locale'-->/cat.properties" />
+ <messagecatalog id="circStrings" src="/xul/server/locale/<!--#echo var='locale'-->/circ.properties" />
+ <messagecatalog id="commonStrings" src="/xul/server/locale/<!--#echo var='locale'-->/common.properties" />
+
<label value="Just a stub, Not Yet Implemented"/>
</window>
/* Initial setup */
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
- if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
+ if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
JSAN.use('util.error'); g.error = new util.error();
ml.setAttribute('editable','true');
ml.setAttribute('width', '200');
var btn = document.createElement('button');
- btn.setAttribute('label','Apply');
+ btn.setAttribute('label',$('catStrings').getString('staff.cat.volume_copy_creator.my_init.btn.label'));
btn.setAttribute('accesskey','A');
btn.setAttribute('image','/xul/server/skin/media/images/down_arrow.gif');
hbox.appendChild(btn);
g.load_prefs();
} catch(E) {
- var err_msg = "!! This software has encountered an error. Please tell your friendly " +
- "system administrator or software developer the following:\ncat/volume_copy_creator.xul\n" +E+ '\n';
+ var err_msg = $("commonStrings").getFormattedString('common.exception', ['cat/volume_copy_creator.js', E]);
try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); dump(js2JSON(E)); }
alert(err_msg);
}
if (ev.target.disabled) return;
if (! isNaN( Number( ev.target.value) ) ) {
if ( Number( ev.target.value ) > g_max_copies_that_can_be_added_at_a_time_per_volume ) {
- g.error.yns_alert('You may not add more than ' + g_max_copies_that_can_be_added_at_a_time_per_volume + ' items at a time for a given volume in this interface.','Maximum items exceeded.','Ok',null,null,'');
- return;
+ g.error.yns_alert($("catStrings").getFormattedString('staff.cat.volume_copy_creator.render_volume_count_entry.message', [g_max_copies_that_can_be_added_at_a_time_per_volume]),
+ $("catStrings").getString('staff.cat.volume_copy_creator.render_volume_count_entry.title'),
+ $("catStrings").getString('staff.cat.volume_copy_creator.render_volume_count_entry.ok_label'),null,null,'');
+ return;
}
if (node) { row.removeChild(node); node = null; }
//ev.target.disabled = true;
var rows = grid.lastChild;
var r = document.createElement('row'); rows.appendChild( r );
var x = document.createElement('label'); r.appendChild(x);
- x.setAttribute('value','Call Numbers'); x.setAttribute('style','font-weight: bold');
+ x.setAttribute('value', $("catStrings").getString('staff.cat.volume_copy_creator.render_callnumber_copy_count_entry.call_nums')); x.setAttribute('style','font-weight: bold');
x = document.createElement('label'); r.appendChild(x);
- x.setAttribute('value','# of Copies'); x.setAttribute('style','font-weight: bold');
+ x.setAttribute('value',$("catStrings").getString('staff.cat.volume_copy_creator.render_callnumber_copy_count_entry.num_of_copies')); x.setAttribute('style','font-weight: bold');
x.setAttribute('size','3'); x.setAttribute('cols','3');
if (tb1.value == '') return;
if (isNaN( Number( tb2.value ) )) return;
if ( Number( tb2.value ) > g_max_copies_that_can_be_added_at_a_time_per_volume ) {
- g.error.yns_alert('You may not add more than ' + g_max_copies_that_can_be_added_at_a_time_per_volume + ' items at a time for a given volume in this interface.','Maximum items exceeded.','Ok',null,null,'');
+ g.error.yns_alert($("catStrings").getFormattedString('staff.cat.volume_copy_creator.render_volume_count_entry.message', [g_max_copies_that_can_be_added_at_a_time_per_volume]),
+ $("catStrings").getString('staff.cat.volume_copy_creator.render_volume_count_entry.title'),
+ $("catStrings").getString('staff.cat.volume_copy_creator.render_volume_count_entry.ok_label'),null,null,'');
return;
}
var barcode = String( ev.target.value ).replace(/\s/g,'');
if (barcode != ev.target.value) ev.target.value = barcode;
if ($('check_barcodes').checked && ! util.barcode.check(barcode) ) {
- g.error.yns_alert( '"' + barcode + '" is an invalid barcode.','Invalid Barcode','OK',null,null,'Check here to confirm this message.');
+ g.error.yns_alert($("catStrings").getFormattedString('staff.cat.volume_copy_creator.render_barcode_entry.alert_message', [barcode]),
+ $("catStrings").getString('staff.cat.volume_copy_creator.render_barcode_entry.alert_title'),
+ $("catStrings").getString('staff.cat.volume_copy_creator.render_barcode_entry.alert_ok_button'),null,null,
+ $("catStrings").getString('staff.cat.volume_copy_creator.render_barcode_entry.alert_confirm'));
setTimeout( function() { ev.target.select(); ev.target.focus(); }, 0);
}
}, false);
);
if (typeof acn_id.ilsevent != 'undefined') {
- g.error.standard_unexpected_error_alert('Problem finding or creating ' + cn + '. We will skip item creation for this volume.',acn_id);
+ g.error.standard_unexpected_error_alert($("catStrings").getFormattedString('staff.cat.volume_copy_creator.stash_and_close.problem_with_volume', [cn]), acn_id);
continue;
}
);
}
} catch(E) {
- g.error.standard_unexpected_error_alert('volume tree update 2',E);
+ g.error.standard_unexpected_error_alert($(catStrings).getString('staff.cat.volume_copy_creator.stash_and_close.tree_err2'),E);
}
}
window.close();
} catch(E) {
- g.error.standard_unexpected_error_alert('volume tree update 3',E);
+ g.error.standard_unexpected_error_alert($(catStrings).getString('staff.cat.volume_copy_creator.stash_and_close.tree_err3'),E);
}
}
}
} catch(E) {
- g.error.standard_unexpected_error_alert('Error retrieving stored preferences',E);
+ g.error.standard_unexpected_error_alert($(catStrings).getString('staff.cat.volume_copy_creator.load_prefs.err_retrieving_prefs'),E);
+
}
}
);
file.close();
} catch(E) {
- g.error.standard_unexpected_error_alert('Error storing preferences',E);
+ g.error.standard_unexpected_error_alert($(catStrings).getString('staff.cat.volume_copy_creator.save_prefs.err_storing_prefs'),E);
}
}
<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
<!-- LOCALIZATION -->
<!DOCTYPE window PUBLIC "" ""[
- <!--#include virtual="/opac/locale/en-US/lang.dtd"-->
+ <!--#include virtual="/opac/locale/${locale}/lang.dtd"-->
]>
<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
<script type="text/javascript" src="/xul/server/main/JSAN.js"/>
<script type="text/javascript" src="volume_copy_creator.js"/>
+
+ <messagecatalog id="catStrings" src="/xul/server/locale/<!--#echo var='locale'-->/cat.properties" />
+ <messagecatalog id="circStrings" src="/xul/server/locale/<!--#echo var='locale'-->/circ.properties" />
+ <messagecatalog id="commonStrings" src="/xul/server/locale/<!--#echo var='locale'-->/common.properties" />
<iframe id="summary" />
<groupbox flex="1" style="overflow: auto">
- <caption id="caption" label="Volume/Copy Creator"/>
+ <caption id="caption" label="&staff.cat.volume_copy_creator.label;/>
<hbox style="border-bottom: solid black thin">
<hbox id="marc_cn"/>
<spacer flex="1" />
- <checkbox id="check_barcodes" label="Check Barcodes?" oncommand="g.save_prefs();" accesskey="B"/>
- <checkbox id="print_labels" label="Print Labels?" oncommand="g.save_prefs();" accesskey="P"/>
- <button id="Create" accesskey="C" label="Edit then Create" disabled="true" oncommand="g.stash_and_close();"/>
+ <checkbox id="check_barcodes" label="&staff.cat.volume_copy_creator.check_barcodes.label; oncommand="g.save_prefs();" accesskey="&staff.cat.volume_copy_creator.check_barcodes.accesskey;"/>
+ <checkbox id="print_labels" label="&staff.cat.volume_copy_creator.print_labels.label;" oncommand="g.save_prefs();" accesskey="&staff.cat.volume_copy_creator.print_labels.accesskey;"/>
+ <button id="Create" accesskey="&staff.cat.volume_copy_creator.create.accesskey;" label="&staff.cat.volume_copy_creator.create.label;" disabled="true" oncommand="g.stash_and_close();"/>
</hbox>
<grid flex="1">
<columns> <column flex="0"/> <column flex="0"/> <column flex="1"/> </columns>
<rows id="rows">
<row>
- <label value="Library" style="font-weight: bold"/>
- <label value="# of volumes" style="font-weight: bold"/>
+ <label value="&staff.cat.volume_copy_creator.library_label.value;" style="font-weight: bold"/>
+ <label value="&staff.cat.volume_copy_creator.num_of_volumes_label.value;" style="font-weight: bold"/>
</row>
</rows>
</grid>
<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
<!-- LOCALIZATION -->
<!DOCTYPE window PUBLIC "" ""[
- <!--#include virtual="/opac/locale/en-US/lang.dtd"-->
+ <!--#include virtual="/opac/locale/${locale}/lang.dtd"-->
]>
<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
function my_init() {
try {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
- if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
+ if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
JSAN.use('util.error'); g.error = new util.error();
}
} catch(E) {
- var err_msg = "!! This software has encountered an error. Please tell your friendly " +
- "system administrator or software developer the following:\ncat/volume_editor.xul\n" + E + '\n';
+ var err_msg = $("commonStrings").getFormattedString('common.exception', ['cat/volume_editor.xul', E]);
try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); dump(js2JSON(E)); }
alert(err_msg);
}
]]>
</script>
+
+ <messagecatalog id="catStrings" src="/xul/server/locale/<!--#echo var='locale'-->/cat.properties" />
+ <messagecatalog id="circStrings" src="/xul/server/locale/<!--#echo var='locale'-->/circ.properties" />
+ <messagecatalog id="commonStrings" src="/xul/server/locale/<!--#echo var='locale'-->/common.properties" />
<groupbox flex="1" style="overflow: auto">
- <caption id="caption" label="Volume Editor"/>
+ <caption id="caption" label="&staff.cat.volume_editor.caption.label;"/>
<hbox>
<button label="Cancel" oncommand="window.close();"/>
<spacer flex="1" />
- <button label="Modify" oncommand="g.stash_and_close();"/>
+ <button label="&staff.cat.volume_editor.modify.label;" oncommand="g.stash_and_close();"/>
</hbox>
<grid flex="1">
<columns> <column /> <column /> <column flex="1"/> </columns>
dump('entering cat.z3950.js\n');
+function $(id) { return document.getElementById(id); }
+
if (typeof cat == 'undefined') cat = {};
cat.z3950 = function (params) {
try {
obj.controller.view.marc_view.disabled = false;
obj.controller.view.marc_view.setAttribute('retrieve_id',list[0]);
} catch(E) {
- obj.error.standard_unexpected_error_alert('Failure during list construction.',E);
+ obj.error.standard_unexpected_error_alert($("catStrings").getString('staff.cat.z3950.obj_list_init.list_construction_error'),E);
}
},
}
} else {
document.getElementById('deck').selectedIndex = 1;
n.setAttribute('toggle','1');
- n.setAttribute('label','Results View');
+ n.setAttribute('label', $("catStrings").getString('staff.cat.z3950.obj_controller_init.deck_label'));
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
var f = get_contentWindow(document.getElementById('marc_frame'));
var retrieve_id = n.getAttribute('retrieve_id');
f.document.body.firstChild.focus();
}
} catch(E) {
- obj.error.standard_unexpected_error_alert('Failure during marc view.',E);
+ obj.error.standard_unexpected_error_alert($("catStrings").getString('staff.cat.z3950.obj_controller_init.marc_view_error'),E);
}
},
],
obj.result_set[ result_idx ].records[ record_idx ].service /* FIXME: we want biblio_source here */
);
} catch(E) {
- obj.error.standard_unexpected_error_alert('Failure during marc import.',E);
+ obj.error.standard_unexpected_error_alert($("catStrings").getString('staff.cat.z3950.obj_controller_init.marc_import_error'),E);
}
},
],
obj.result_set[ result_idx ].records[ record_idx ].service /* FIXME: we want biblio_source here */
);
} catch(E) {
- obj.error.standard_unexpected_error_alert('Failure during marc import overlay.',E);
+ obj.error.standard_unexpected_error_alert($("catStrings").getString('staff.cat.z3950.obj_controller_init.marc_import_overlay_error'),E);
}
},
],
}
}
} catch(E) {
- obj.error.standard_unexpected_error_alert('Error setting up search fields.',E);
+ obj.error.standard_unexpected_error_alert($("catStrings").getString('staff.cat.z3950.obj_controller_init.search_fields_error'),E);
}
}
},0
);
} catch(E) {
- obj.error.standard_unexpected_error_alert('Z39.50 services not likely retrieved.',E);
+ obj.error.standard_unexpected_error_alert($("catStrings").getString('staff.cat.z3950.obj_controller_init.z39_service_error'),E);
}
}
}
util.widgets.remove_children( obj.controller.view.result_message );
var x = document.createElement('description'); obj.controller.view.result_message.appendChild(x);
if (obj.active_services.length < 1) {
- x.appendChild( document.createTextNode( 'No services selected to search.' ));
+ x.appendChild( document.createTextNode($("catStrings").getString('staff.cat.z3950.initial_search.no_search_selection')));
return;
}
- x.appendChild( document.createTextNode( 'Searching...' ));
+ x.appendChild( document.createTextNode($("catStrings").getString('staff.cat.z3950.initial_search.searching')));
obj.search_params = {}; obj.list.clear();
obj.controller.view.page_next.disabled = true;
util.widgets.remove_children( obj.controller.view.result_message );
}
} catch(E) {
- this.error.standard_unexpected_error_alert('Failure during initial search.',E);
+ this.error.standard_unexpected_error_alert($("catStrings").getString('staff.cat.z3950.initial_search.failed_search'),E);
}
},
JSAN.use('util.widgets');
util.widgets.remove_children( obj.controller.view.result_message );
var x = document.createElement('description'); obj.controller.view.result_message.appendChild(x);
- x.appendChild( document.createTextNode( 'Retrieving more results...' ));
+ x.appendChild( document.createTextNode($("catStrings").getString('staff.cat.z3950.page_next.more_results')));
obj.search_params.offset += obj.search_params.limit;
obj.search();
} catch(E) {
- this.error.standard_unexpected_error_alert('Failure during subsequent search.',E);
+ this.error.standard_unexpected_error_alert($("catStrings").getString('staff.cat.z3950.page_next.subsequent_search_error'),E);
}
},
);
document.getElementById('deck').selectedIndex = 0;
} catch(E) {
- this.error.standard_unexpected_error_alert('Failure during actual search.',E);
+ this.error.standard_unexpected_error_alert($("catStrings").getString('staff.cat.z3950.search.search_error'),E);
}
},
util.widgets.remove_children( obj.controller.view.result_message ); var x;
if (results == null) {
x = document.createElement('description'); obj.controller.view.result_message.appendChild(x);
- x.appendChild( document.createTextNode( 'Server Error: request returned null' ));
+ x.appendChild( document.createTextNode($("catStrings").getString('staff.cat.z3950.handle_results.null_server_error')));
return;
}
if (typeof results.ilsevent != 'undefined') {
x = document.createElement('description'); obj.controller.view.result_message.appendChild(x);
- x.appendChild( document.createTextNode( 'Server Error: ' + results.textcode + ' : ' + results.desc ));
+ x.appendChild( document.createTextNode($("catStrings").getFormattedString('staff.cat.z3950.handle_results.server_error', [results.textcode, results.desc])));
return;
}
if (typeof results.length == 'undefined') results = [ results ];
for (var i = 0; i < results.length; i++) {
if (results[i].query) {
x = document.createElement('description'); obj.controller.view.result_message.appendChild(x);
- x.appendChild( document.createTextNode( 'Raw query: ' + results[i].query ));
+ x.appendChild( document.createTextNode($("catStrings").getFormattedString('staff.cat.z3950.handle_results.raw_query', [results[i].query])));
}
if (results[i].count) {
if (results[i].records) {
x = document.createElement('description'); obj.controller.view.result_message.appendChild(x);
var showing = obj.search_params.offset + results[i].records.length;
x.appendChild(
- document.createTextNode( 'Showing ' + (showing > results[i].count ? results[i].count : showing) + ' of ' + results[i].count + ' for ' + results[i].service )
+ document.createTextNode($("catStrings").getFormattedString('staff.cat.z3950.handle_results.showing_results',
+ [(showing > results[i].count ? results[i].count : showing), results[i].count, results[i].service]))
);
}
if (obj.search_params.offset + obj.search_params.limit <= results[i].count) {
} else {
x = document.createElement('description'); obj.controller.view.result_message.appendChild(x);
x.appendChild(
- document.createTextNode( (results[i].count ? results[i].count : 0) + ' records found')
- );
+ document.createTextNode($("catStrings").getFormattedString('staff.cat.z3950.handle_results.num_of_results', [(results[i].count ? results[i].count : 0)])));
}
if (results[i].records) {
obj.result_set[ ++obj.number_of_result_sets ] = results[i];
} else {
x = document.createElement('description'); obj.controller.view.result_message.appendChild(x);
x.appendChild(
- document.createTextNode( 'Error retrieving results.')
+ document.createTextNode($("catStrings").getString('staff.cat.z3950.handle_results.result_error'))
);
}
}
} catch(E) {
- this.error.standard_unexpected_error_alert('Failure during search result handling.',E);
+ this.error.standard_unexpected_error_alert($("catStrings").getString('staff.cat.z3950.handle_results.search_result_error'),E);
}
},
};
xulG.set_tab(
xulG.url_prefix(urls.XUL_OPAC_WRAPPER),
- {'tab_name':'Retrieving title...'},
+ {'tab_name': $("catStrings").getString('staff.cat.z3950.replace_tab_with_opac.tab_name')},
content_params
);
},
if (typeof r.ilsevent != 'undefined') {
switch(Number(r.ilsevent)) {
case 1704 /* TCN_EXISTS */ :
- var msg = 'A record with TCN ' + r.payload.tcn + ' already exists.\nFIXME: add record summary here';
- var title = 'Import Collision';
- var btn1 = 'Overlay';
- var btn2 = typeof r.payload.new_tcn == 'undefined' ? null : 'Import with alternate TCN ' + r.payload.new_tcn;
+ var msg = $("catStrings").getFormattedString('staff.cat.z3950.spawn_marc_editor.same_tcn', [r.payload.tcn]);
+ var title = $("catStrings").getString('staff.cat.z3950.spawn_marc_editor.title');
+ var btn1 = $("catStrings").getString('staff.cat.z3950.spawn_marc_editor.btn1_overlay');
+ var btn2 = typeof r.payload.new_tcn == 'undefined' ? null : $("catStrings").getFormattedString('staff.cat.z3950.spawn_marc_editor.btn2_import', [r.payload.new_tcn]);
if (btn2) {
obj.data.init({'via':'stash'});
var robj = obj.network.simple_request(
]
);
if (typeof robj.ilsevent != 'undefined') {
- obj.error.standard_unexpected_error_alert('check permission',E);
+ obj.error.standard_unexpected_error_alert($("catStrings").getString('staff.cat.z3950.spawn_marc_editor.permission_error'),E);
}
if (robj.length != 0) btn2 = null;
}
- var btn3 = 'Cancel Import';
- var p = obj.error.yns_alert(msg,title,btn1,btn2,btn3,'Check here to confirm this action');
+ var btn3 = $("catStrings").getString('staff.cat.z3950.spawn_marc_editor.btn3_cancel_import');
+ var p = obj.error.yns_alert(msg,title,btn1,btn2,btn3,$("catStrings").getString('staff.cat.z3950.spawn_marc_editor.confrim_action'));
obj.error.sdump('D_ERROR','option ' + p + 'chosen');
switch(p) {
case 0:
if (typeof r3.ilsevent != 'undefined') {
throw(r3);
} else {
- alert('Record successfully overlayed.');
+ alert($("catStrings").getString('staff.cat.z3950.spawn_marc_editor.successful_overlay'));
obj.replace_tab_with_opac(r3.id());
}
break;
if (typeof r2.ilsevent != 'undefined') {
throw(r2);
} else {
- alert('Record successfully imported with alternate TCN.');
+ alert($("catStrings").getString('staff.cat.z3950.spawn_marc_editor.successful_import_with_new_tcn'));
obj.replace_tab_with_opac(r2.id());
}
break;
case 2:
default:
- alert('Record import cancelled');
+ alert($("catStrings").getString('staff.cat.z3950.spawn_marc_editor.import_cancelled'));
break;
}
break;
break;
}
} else {
- alert('Record successfully imported.');
+ alert($("catStrings").getString('staff.cat.z3950.spawn_marc_editor.successful_import'));
obj.replace_tab_with_opac(r.id());
}
} catch(E) {
- obj.error.standard_unexpected_error_alert('Record not likely imported.',E);
+ obj.error.standard_unexpected_error_alert($("catStrings").getString('staff.cat.z3950.spawn_marc_editor.import_error'),E);
}
}
}
var obj = this; // JSAN.use('OpenILS.data'); var data = new OpenILS.data(); data.init({'via':'stash'});
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserWrite');
var top_xml = '<vbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" flex="1" >';
- top_xml += '<description>Overlay this record?</description>';
- top_xml += '<hbox><button id="lead" disabled="false" label="Overlay" name="fancy_submit" accesskey="O"/><button label="Cancel" accesskey="C" name="fancy_cancel"/></hbox></vbox>';
+ top_xml += '<description>'+$("catStrings").getString('staff.cat.z3950.confim_overlay.description')+'</description>';
+ top_xml += '<hbox><button id="lead" disabled="false" label="'+$("catStrings").getString('staff.cat.z3950.confim_overlay.lead.label')+'" name="fancy_submit"';
+ top_xml += ' accesskey="'+$("catStrings").getString('staff.cat.z3950.confim_overlay.lead.accesskey')+'"/>';
+ top_xml += ' <button label="'+$("catStrings").getString('staff.cat.z3950.confim_overlay.cancel.label')+'" accesskey="'+
+ $("catStrings").getString('staff.cat.z3950.confim_overlay.cancel.accesskey')+'" name="fancy_cancel"/></hbox></vbox>';
var xml = '<form xmlns="http://www.w3.org/1999/xhtml">';
xml += '<table width="100%"><tr valign="top">';
// + '&top_xml_in_stash=temp_merge_top'
// + '&title=' + window.escape('Record Overlay'),
'fancy_prompt', 'chrome,resizable,modal,width=700,height=500',
- { 'top_xml' : top_xml, 'xml' : xml, 'title' : 'Record Overlay' }
+ { 'top_xml' : top_xml, 'xml' : xml, 'title' : $("catStrings").getString('staff.cat.z3950.confim_overlay.title') }
);
//data.stash_retrieve();
- if (fancy_prompt_data.fancy_status == 'incomplete') { alert('Overlay Aborted'); return false; }
+ if (fancy_prompt_data.fancy_status == 'incomplete') { alert($("catStrings").getString('staff.cat.z3950.confim_overlay.aborted')); return false; }
return true;
},
var obj = this;
obj.data.init({'via':'stash'});
if (!obj.data.marked_record) {
- alert('Please mark a record for overlay from within the catalog and try this again.');
+ alert($("catStrings").getString('staff.cat.z3950.spawn_marc_editor_for_overlay.try_again'));
return;
}
xulG.new_tab(
xulG.url_prefix(urls.XUL_MARC_EDIT),
- { 'tab_name' : 'MARC Editor' },
+ { 'tab_name' : $("catStrings").getString('staff.cat.z3950.spawn_marc_editor_for_overlay.tab_name') },
{
'record' : { 'marc' : my_marcxml },
'save' : {
- 'label' : 'Overlay Record',
+ 'label' : $("catStrings").getString('staff.cat.z3950.spawn_marc_editor_for_overlay.overlay_record_label'),
'func' : function (new_marcxml) {
try {
if (! obj.confirm_overlay( [ obj.data.marked_record ] ) ) { return; }
if (typeof r.ilsevent != 'undefined') {
switch(Number(r.ilsevent)) {
case 1704 /* TCN_EXISTS */ :
- var msg = 'A record with TCN ' + r.payload.tcn + ' already exists.\nFIXME: add record summary here';
- var title = 'Import Collision';
- var btn1 = typeof r.payload.new_tcn == 'undefined' ? null : 'Overlay with alternate TCN ' + r.payload.new_tcn;
+ var msg = $("catStrings").getFormattedString('staff.cat.z3950.spawn_marc_editor_for_overlay.same_tcn', [r.payload.tcn]);
+ var title = $("catStrings").getString('staff.cat.z3950.spawn_marc_editor_for_overlay.import_collision');
+ var btn1 = typeof r.payload.new_tcn == 'undefined' ? null : $("catStrings").getFormattedString('staff.cat.z3950.spawn_marc_editor_for_overlay.btn1_overlay', [r.payload.new_tcn]);
if (btn1) {
var robj = obj.network.simple_request(
'PERM_CHECK',[
]
);
if (typeof robj.ilsevent != 'undefined') {
- obj.error.standard_unexpected_error_alert('check permission',E);
+ obj.error.standard_unexpected_error_alert($("catStrings").getString('staff.cat.z3950.spawn_marc_editor_for_overlay.permission_error'),E);
}
if (robj.length != 0) btn1 = null;
}
- var btn2 = 'Cancel Import';
- var p = obj.error.yns_alert(msg,title,btn1,btn2,null,'Check here to confirm this action');
+ var btn2 = $("catStrings").getString('staff.cat.z3950.spawn_marc_editor_for_overlay.btn2_cancel');
+ var p = obj.error.yns_alert(msg,title,btn1,btn2,null, $("catStrings").getString('staff.cat.z3950.spawn_marc_editor_for_overlay.confirm_action'));
obj.error.sdump('D_ERROR','option ' + p + 'chosen');
switch(p) {
case 0:
if (typeof r2.ilsevent != 'undefined') {
throw(r2);
} else {
- alert('Record successfully overlayed with alternate TCN.');
+ alert($("catStrings").getString('staff.cat.z3950.spawn_marc_editor_for_overlay.successful_overlay_with_new_TCN'));
obj.replace_tab_with_opac(r2.id());
}
break;
case 1:
default:
- alert('Record overlay cancelled');
+ alert($("catStrings").getString('staff.cat.z3950.spawn_marc_editor_for_overlay.cancelled_overlay'));
break;
}
break;
break;
}
} else {
- alert('Record successfully overlayed.');
+ alert($("catStrings").getString('staff.cat.z3950.spawn_marc_editor_for_overlay.success_overlay'));
obj.replace_tab_with_opac(r.id());
}
} catch(E) {
- obj.error.standard_unexpected_error_alert('Record not likely overlayed.',E);
+ obj.error.standard_unexpected_error_alert($("catStrings").getString('staff.cat.z3950.spawn_marc_editor_for_overlay.overlay_error'),E);
}
}
}
}
}
} catch(E) {
- obj.error.standard_unexpected_error_alert('Error retrieving stored z39.50 credentials',E);
+ obj.error.standard_unexpected_error_alert($("catStrings").getString('staff.cat.z3950.load_creds.z3950_cred_error'),E);
}
},
file.set_object(obj.creds);
file.close();
} catch(E) {
- obj.error.standard_unexpected_error_alert('Problem storing z39.50 credentials.',E);
+ obj.error.standard_unexpected_error_alert($("catStrings").getString('staff.cat.z3950.save_creds.z3950_cred_error'),E);
}
},
<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
<!-- LOCALIZATION -->
<!DOCTYPE window PUBLIC "" ""[
- <!--#include virtual="/opac/locale/en-US/lang.dtd"-->
+ <!--#include virtual="/opac/locale/${locale}/lang.dtd"-->
]>
<script type="text/javascript" src="/xul/server/main/JSAN.js"/>
<script>
<![CDATA[
+ function $(id) { return document.getElementById(id); }
+
function my_init() {
try {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
- if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
+ if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
JSAN.use('util.error'); g.error = new util.error();
}
} catch(E) {
- var err_msg = "!! This software has encountered an error. Please tell your friendly " +
- "system administrator or software developer the following:\ncat/z3950.xul\n" + E + '\n';
+ var err_msg = $("commonStrings").getFormattedString('common.exception', ['cat/z3950.xul', E]);
try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
alert(err_msg);
}
</script>
<messagecatalog id="circStrings" src="/xul/server/locale/<!--#echo var='locale' -->/circ.properties"/>
+ <messagecatalog id="catStrings" src="/xul/server/locale/<!--#echo var='locale'-->/cat.properties" />
+ <messagecatalog id="commonStrings" src="/xul/server/locale/<!--#echo var='locale'-->/common.properties" />
<commandset id="cat_z3950_cmds">
<command id="cmd_broken" />
</commandset>
<groupbox flex="1">
- <caption label="MARC Import via Z39.50"/>
+ <caption label="&staff.cat.z3950.marc_import.label;"/>
<deck id="z3950_deck" flex="1">
<hbox id="top_pane" persist="height" flex="1">
<vbox id="top_left_pane" persist="width" flex="1">
<groupbox id="first_pane" flex="1" class="my_overflow">
- <caption id="c2" label="Service and Credentials" class="shrinkable_groupbox"/>
+ <caption id="c2" label="&staff.cat.z3950.service_credentials.label;" class="shrinkable_groupbox"/>
<grid flex="1">
<columns>
<column/>
</columns>
<rows id="service_rows">
<row>
- <label value="Service"/>
- <label value="Username"/>
- <label value="Password"/>
+ <label value="&staff.cat.z3950.service.label;"/>
+ <label value="&staff.cat.z3950.username.label;"/>
+ <label value="&staff.cat.z3950.password.label;"/>
</row>
<row>
- <checkbox id="native-evergreen-catalog_service" mytype="service_class" service="native-evergreen-catalog" label="Local Catalog" tooltiptext="Evergreen Native Catalog" />
+ <checkbox id="native-evergreen-catalog_service" mytype="service_class" service="native-evergreen-catalog"
+ label="&staff.cat.z3950.catalog_service.label;" tooltiptext="&staff.cat.z3950.catalog_service.tooltiptext;" />
<textbox id="native-evergreen-catalog_username" hidden="true"/>
<textbox id="native-evergreen-catalog_password" type="password" hidden="true"/>
</row>
</grid>
</groupbox>
<hbox>
- <button id="save_creds" label="Save as Default" accesskey="D"/>
+ <button id="save_creds" label="&staff.cat.z3950.save_creds.label;" accesskey="&staff.cat.z3950.save_creds.accesskey;"/>
</hbox>
</vbox>
<splitter collapse="before"><grippy/></splitter>
<vbox id="top_right_pane" persist="width" flex="1">
<groupbox id="second_pane" flex="1" class="my_overflow">
- <caption label="Query" class="shrinkable_groupbox"/>
+ <caption label="&staff.cat.z3950.query.label;" class="shrinkable_groupbox"/>
<hbox>
<spacer flex="1"/>
<description>
- Tip: Click a search field label and then the "Save as Default" button to have that field focused by default.
+ &staff.cat.z3950.query.description;
</description>
<spacer flex="1"/>
</hbox>
</grid>
</groupbox>
<hbox>
- <button id="clear" label="Clear Form" accesskey="C"/>
- <button id="search" label="Search" accesskey="S"/>
+ <button id="clear" label="&staff.cat.z3950.clear.label;" accesskey="&staff.cat.z3950.clear.accesskey;"/>
+ <button id="search" label="&staff.cat.z3950.search.label;" accesskey="&staff.cat.z3950.search.accesskey;"/>
<spacer flex="1"/>
- <button id="results_page" label="Results Page" accesskey="P"/>
+ <button id="results_page" label="&staff.cat.z3950.results_page.label;" accesskey="&staff.cat.z3950.results_page.accesskey;"/>
</hbox>
</vbox>
</hbox>
<groupbox flex="1" id="third_pane" persist="height">
- <caption label="Results" />
+ <caption label="&staff.cat.z3950.results_caption.label;"/>
<hbox id="result_message" />
<hbox>
- <button id="search_form" label="Search Form" accesskey="F" />
- <button id="page_next" label="Fetch More Results" accesskey="M" disabled="true"/>
- <button id="export" label="CSV to Clipboard" command="cmd_export" accesskey=""/>
- <button id="clip_button" command="sel_clip" label="Copy to Clipboard" disabled="true"/>
- <button id="save_cols_btn" command="save_columns" label="Save Columns" />
+ <button id="search_form" label="&staff.cat.z3950.search_form.label;" accesskey="&staff.cat.z3950.search_form.accesskey;"/>
+ <button id="page_next" label="&staff.cat.z3950.page_next.label;" accesskey="&staff.cat.z3950.page_next.accesskey;" disabled="true"/>
+ <button id="export" label="&staff.cat.z3950.export.label;" command="cmd_export" accesskey=""/>
+ <button id="clip_button" command="sel_clip" label="&staff.cat.z3950.clip_button.label;" disabled="true"/>
+ <button id="save_cols_btn" command="save_columns" label="&staff.cat.z3950.save_cols_btn.label;"/>
<spacer flex="1"/>
- <button id="marc_view" label="MARC View" accesskey="V" disabled="true"/>
- <button id="marc_import_overlay" label="MARC Editor for Overlay" accesskey="O" disabled="true"/>
- <button id="marc_import" label="MARC Editor for Import" accesskey="I" disabled="true"/>
+ <button id="marc_view" label="&staff.cat.z3950.marc_view.label;" accesskey="&staff.cat.z3950.marc_view.accesskey;" disabled="true"/>
+ <button id="marc_import_overlay" label="&staff.cat.z3950.marc_import_overlay.label;" accesskey="&staff.cat.z3950.marc_import_overlay.accesskey;" disabled="true"/>
+ <button id="marc_import" label="&staff.cat.z3950.marc_import.label;" accesskey="&staff.cat.z3950.marc_import.accesskey;" disabled="true"/>
</hbox>
<deck id="deck" flex="1">
<tree id="results" flex="1" enableColumnDrag="true" seltype="single"/>
staff.cat.record_buckets.cmd_sel_opac.catch.std_unex_err=Showing in OPAC
staff.cat.record_buckets.submit.query_status=Searching...
staff.cat.record_buckets.prep_record_for_list.std_unex_err=Could not retrieve this record: %1$s
+staff.cat.record_buckets_quick.copy_one_record=Copy this record into which bucket?
+staff.cat.record_buckets_quick.copy_multiple_records=Copy these %1$s items into which bucket?
+staff.cat.record_buckets_quick.initing_record_buckets_quick_xul=Trying to init record_buckets_quick.xul
+staff.cat.record_buckets_quick.name_of_bucket=What would you like to name the bucket?
+staff.cat.record_buckets_quick.name_of_bucket.title=Bucket Creation
+staff.cat.record_buckets_quick.bucket_creation_failure=Bucket creation failed.
+staff.cat.record_buckets_quick.add_to_bucket.addition_failed=Addition likely failed for bucket = %1$s and record id = %2$s
+staff.cat.spine_labels.copy=copy
+staff.cat.spine_labels.copies=copies
+staff.cat.spine_labels.generate.std_unexpeceted_err=Generate
+staff.cat.spine_labels.preview.title=Spine Labels
+staff.cat.spine_labels.preview.std_unexpected_err=Preview and Print
+staff.cat.util.replace_barcode.old_bc_window_prompt.prompt=Enter original barcode for the copy:
+staff.cat.util.replace_barcode.old_bc_window_prompt.title=Replace Barcode
+staff.cat.util.replace_barcode.error_alert=We were unable to retrieve an item with barcode "%1$s".
+staff.cat.util.replace_barcode.new_bc_window_prompt.prompt=Enter the replacement barcode for the copy:
+staff.cat.util.replace_barcode.new_bc_window_prompt.title=Replace Barcode
+staff.cat.util.replace_barcode.new_bc.failed=Rename aborted. Blank for barcode not allowed.
+staff.cat.util.replace_barcode.testing_error=Error testing replacement barcode "%1$s".
+staff.cat.util.replace_barcode.insufficient_permission_for_rename=Rename aborted. Insufficient permission.
+staff.cat.util.replace_barcode.item_rename_error=Error renaming item.
+staff.cat.util.replace_barcode.rename_error=Rename did not likely occur.
+staff.cat.util.transfer_copies.unmarked_volume_alert=Please mark a volume as the destination from within holdings maintenance and then try this again.
+staff.cat.util.transfer_copies.params_message=Transfer items from their original volumes to %1$s's volume labelled %2$s on the following record (and change their circ libs to match)?
+staff.cat.util.transfer_copies.transfer.label=Transfer
+staff.cat.util.transfer_copies.cancel.label=Cancel
+staff.cat.util.transfer_copies.cancel.accesskey=C
+staff.cat.util.transfer_copies.window_title=Item Transfer
+staff.cat.util.transfer_copies.aborted_transfer=Transfer Aborted
+staff.cat.util.transfer_copies.override_transfer_failure=Override Transfer Failure?
+staff.cat.util.transfer_copies.successful_transfer=Items transferred.
+staff.cat.util.transfer_copies.transfer_error=All items not likely transferred.
+staff.cat.util.spine_editor.tab_name=Spine Labels
+staff.cat.util.spine_editor.spine_editor_error=Spine Labels
+staff.cat.util.show_in_opac.unknown_barcode=%1$s is not cataloged
+staff.cat.util.show_in_opac.catalog_error_for_doc_id=Error opening catalog for document id = %1$s
+staff.cat.util.copy_editor.batch_in_title=Batch
+staff.cat.util.copy_editor.edit_in_title=Edit
+staff.cat.util.copy_editor.view_in_title=View
+staff.cat.util.copy_editor.copy_attributes_in_title=Copy Attributes
+staff.cat.util.copy_editor.batch_edit=Batch Edit
+staff.cat.util.copy_editor.batch_view=Batch View
+staff.cat.util.copy_editor.edit=Edit
+staff.cat.util.copy_editor.view=View
+staff.cat.util.copy_editor.not_modified=Copies not modified.
+staff.cat.util.mark_item_damaged.af_message=Action failed. One or more of these items is in a special status (Checked Out, In Transit, etc.) and cannot be changed to the Damaged status.
+staff.cat.util.mark_item_damaged.af_title=Action failed.
+staff.cat.util.mark_item_damaged.af_ok_label=OK
+staff.cat.util.mark_item_damaged.af_confirm_action=Check here to confirm this message
+staff.cat.util.mark_item_damaged.md_message='Change the status for these items to Damaged? You will have to manually retrieve the last circulation if you need to bill a patron. Barcodes: %1$s
+staff.cat.util.mark_item_damaged.md_title=Mark Damaged
+staff.cat.util.mark_item_damaged.md_ok_label=OK
+staff.cat.util.mark_item_damaged.md_cancel_label=Cancel
+staff.cat.util.mark_item_damaged.md_confirm_action=Check here to confirm this action
+staff.cat.util.mark_item_damaged.marking_error=Error marking item %1$s damaged.
+staff.cat.util.mark_item_damaged.one_item_damaged=Item marked Damaged
+staff.cat.util.mark_item_damaged.multiple_item_damaged=%1$s items marked Damaged.
+staff.cat.util.mark_item_missing.af_message=Action failed. One or more of these items is in a special status (Checked Out, In Transit, etc.) and cannot be changed to the Missing status.
+staff.cat.util.mark_item_missing.af_title=Action failed.
+staff.cat.util.mark_item_missing.af_ok_label=OK
+staff.cat.util.mark_item_missing.af_confirm_action=Check here to confirm this message
+staff.cat.util.mark_item_missing.ms_message='Change the status for these items to Missing? Barcodes: %1$s
+staff.cat.util.mark_item_missing.ms_title=Mark Missing
+staff.cat.util.mark_item_missing.ms_ok_label=OK
+staff.cat.util.mark_item_missing.ms_cancel_label=Cancel
+staff.cat.util.mark_item_missing.ms_confirm_action=Check here to confirm this action
+staff.cat.util.mark_item_missing.marking_error=Error marking item %1$s missing.
+staff.cat.util.mark_item_missing.one_item_missing=Item marked Missing
+staff.cat.util.mark_item_missing.multiple_item_missing=%1$s items marked Missing.
+staff.cat.volume_buckets.window_tab_name=Volume Buckets
+staff.cat.volume_copy_creator.my_init.btn.label=Apply
+staff.cat.volume_copy_creator.render_volume_count_entry.message=You may not add more than %1$s items at a time for a given volume in this interface.
+staff.cat.volume_copy_creator.render_volume_count_entry.title=Maximum items exceeded.
+staff.cat.volume_copy_creator.render_volume_count_entry.ok_label=Ok
+staff.cat.volume_copy_creator.render_callnumber_copy_count_entry.call_nums=Call Numbers
+staff.cat.volume_copy_creator.render_callnumber_copy_count_entry.num_of_copies=# of Copies
+staff.cat.volume_copy_creator.render_barcode_entry.alert_message="%1$s" is an invalid barcode.
+staff.cat.volume_copy_creator.render_barcode_entry.alert_title=Invalid Barcode
+staff.cat.volume_copy_creator.render_barcode_entry.alert_ok_button=OK
+staff.cat.volume_copy_creator.render_barcode_entry.alert_confirm=Check here to confirm this message.
+staff.cat.volume_copy_creator.stash_and_close.problem_with_volume=Problem finding or creating %1$s. We will skip item creation for this volume.
+staff.cat.volume_copy_creator.stash_and_close.tree_err2=volume tree update 2
+staff.cat.volume_copy_creator.stash_and_close.tree_err3=volume tree update 3
+staff.cat.volume_copy_creator.load_prefs.err_retrieving_prefs=Error retrieving stored preferences
+staff.cat.volume_copy_creator.save_prefs.err_storing_prefs=Error storing preferences
+staff.cat.z3950.obj_list_init.list_construction_error=Failure during list construction.
+staff.cat.z3950.obj_controller_init.deck_label=Results View
+staff.cat.z3950.obj_controller_init.marc_view_error=Failure during marc view.
+staff.cat.z3950.obj_controller_init.marc_import_error=Failure during marc import.
+staff.cat.z3950.obj_controller_init.marc_import_overlay_error=Failure during marc import overlay.
+staff.cat.z3950.obj_controller_init.search_fields_error=Error setting up search fields.
+staff.cat.z3950.obj_controller_init.z39_service_error=Z39.50 services not likely retrieved.
+staff.cat.z3950.initial_search.no_search_selection=No services selected to search.
+staff.cat.z3950.initial_search.searching=Searching...
+staff.cat.z3950.initial_search.failed_search=Failure during initial search.
+staff.cat.z3950.page_next.more_results=Retrieving more results...
+staff.cat.z3950.page_next.subsequent_search_error=Failure during subsequent search.
+staff.cat.z3950.search.search_error=Failure during actual search.
+staff.cat.z3950.handle_results.null_server_error=Server Error: request returned null
+staff.cat.z3950.handle_results.server_error=Server Error: %1$s : %2$s
+staff.cat.z3950.handle_results.raw_query=Raw query: %1$s
+staff.cat.z3950.handle_results.showing_results=Showing %1$s of %2$s for %3$s
+staff.cat.z3950.handle_results.num_of_results=%1$s records found
+staff.cat.z3950.handle_results.result_error=Error retrieving results.
+staff.cat.z3950.handle_results.search_result_error=Failure during search result handling.
+staff.cat.z3950.replace_tab_with_opac.tab_name=Retrieving title...
+staff.cat.z3950.spawn_marc_editor.same_tcn=A record with TCN %1$s already exists.\nFIXME: add record summary here
+staff.cat.z3950.spawn_marc_editor.title=Import Collision
+staff.cat.z3950.spawn_marc_editor.btn1_overlay=Overlay
+staff.cat.z3950.spawn_marc_editor.btn2_import=Import with alternate TCN %1$s
+staff.cat.z3950.spawn_marc_editor.permission_error=check permission
+staff.cat.z3950.spawn_marc_editor.btn3_cancel_import=Cancel Import
+staff.cat.z3950.spawn_marc_editor.confrim_action=Check here to confirm this action
+staff.cat.z3950.spawn_marc_editor.successful_overlay=Record successfully overlaid.
+staff.cat.z3950.spawn_marc_editor.successful_import_with_new_tcn=Record successfully imported with alternate TCN.
+staff.cat.z3950.spawn_marc_editor.import_cancelled=Record import cancelled
+staff.cat.z3950.spawn_marc_editor.successful_import=Record successfully imported.
+staff.cat.z3950.spawn_marc_editor.import_error=Record not likely imported.
+staff.cat.z3950.confim_overlay.description=Overlay this record?
+staff.cat.z3950.confim_overlay.lead.label=Overlay
+staff.cat.z3950.confim_overlay.lead.accesskey=O
+staff.cat.z3950.confim_overlay.cancel.label=Cancel
+staff.cat.z3950.confim_overlay.cancel.accesskey=C
+staff.cat.z3950.confim_overlay.title=Record Overlay
+staff.cat.z3950.confim_overlay.aborted=Overlay Aborted
+staff.cat.z3950.spawn_marc_editor_for_overlay.try_again=Please mark a record for overlay from within the catalog and try this again.
+staff.cat.z3950.spawn_marc_editor_for_overlay.tab_name=MARC Editor
+staff.cat.z3950.spawn_marc_editor_for_overlay.overlay_record_label=Overlay Record
+staff.cat.z3950.spawn_marc_editor_for_overlay.same_tcn=A record with TCN %1$s already exists.\nFIXME: add record summary here
+staff.cat.z3950.spawn_marc_editor_for_overlay.import_collision=Import Collision
+staff.cat.z3950.spawn_marc_editor_for_overlay.btn1_overlay=Overlay with alternate TCN %1$s
+staff.cat.z3950.spawn_marc_editor_for_overlay.permission_error=check permission
+staff.cat.z3950.spawn_marc_editor_for_overlay.btn2_cancel=Cancel Import
+staff.cat.z3950.spawn_marc_editor_for_overlay.confirm_action=Check here to confirm this action
+staff.cat.z3950.spawn_marc_editor_for_overlay.successful_overlay_with_new_TCN=Record successfully overlaid with alternate TCN.
+staff.cat.z3950.spawn_marc_editor_for_overlay.cancelled_overlay=Record overlay cancelled
+staff.cat.z3950.spawn_marc_editor_for_overlay.success_overlay=Record successfully overlaid.
+staff.cat.z3950.spawn_marc_editor_for_overlay.overlay_error=Record not likely overlaid.
+staff.cat.z3950.load_creds.z3950_cred_error=Error retrieving stored z39.50 credentials
+staff.cat.z3950.save_creds.z3950_cred_error=Problem storing z39.50 credentials.
# common.grouping_string = the string that should be inserted between elements of a grouped list
common.grouping_string=,
common.unimplemented=Not yet implemented
+common.yes=Yes
+common.no=No
+common.check_to_confirm=Check here to confirm this message
lang.version=remote v1
openils.global_util.clear_cache.error=Problem clearing the cache: %1$s
openils.global_util.clipboard.error=Clipboard action failed: %1$s
--- /dev/null
+staff.patron.barcode_entry.user_permission_editor=User Permission Editor
+staff.patron.barcode_entry.check_out=Check Out
+staff.patron.barcode_entry.no_barcode=No barcode entered.
+staff.patron.barcode_entry.barcode_retrieval_problem=Problem retrieving %1$s. Please report this message: \n%2$s
+staff.patron.barcode_entry.barcode_not_found=Barcode %1$s not found.
+staff.patron.barcode_entry.consent_from_patron=Does patron %1$s, %2$s from %3$s (%4$s) consent to having their personal information shared with your library?
+staff.patron.barcode_entry.patron_consent_title=Patron/Library Opt-In Confirmation
+staff.patron.barcode_entry.patron_consent_accept=Accept
+staff.patron.barcode_entry.patron_consent_deny=Deny
+staff.patron.barcode_entry.patron_consent_confirm=Check here to confirm this message
+staff.patron.barcode_entry.patron_display_error=spawning patron display
+staff.patron.barcode_entry.user_perm_display_error=spawning user perm editor
+staff.patron.bill_details.my_init.error=bill_details.xul, my_init:
+staff.patron.bill_details.handle_void.voided_billings.alert=All selected billings have already voided.
+staff.patron.bill_details.handle_void.confirm_void_billing=Are you sure you would like to void $%1$s worth of line-item billings?
+staff.patron.bill_details.handle_void.confirm_void_billing_title=Voiding Bills
+staff.patron.bill_details.handle_void.confirm_void_billing_yes=Yes
+staff.patron.bill_details.handle_void.confirm_void_billing_no=No
+staff.patron.bill_details.handle_void.confirm_void_billing_confirm_message=Check here to confirm this message
+staff.patron.bill_details.handle_void.voiding_error=Error voiding bills.
+staff.patron.bill_details.handle_void.billings_voided=Billings voided.
+staff.patron.bill_history.retrieve_mbts_for_list.close_win_try_again=Please close this window and try again.
+staff.patron.bill_history.my_init.current_bills=Current Bills
+staff.patron.bill_history.my_init.bill_history=Bill History
+staff.patron.bill_history.handle_add.message_plural=Are you sure you would like to add a billing to bills %1$s?
+staff.patron.bill_history.handle_add.message_singular=Are you sure you would like to add a billing to bill %1$s?
+staff.patron.bill_history.handle_add.title=Bill Patron
+staff.patron.bill_history.handle_add.btn_yes=Yes
+staff.patron.bill_history.handle_add.btn_no=No
+staff.patron.bill_history.handle_add.confirm_message=Check here to confirm this message
+staff.patron.bill_history.print_bills.print_error=printing bills
+staff.patron.bills.bill_payment_amount.credit_amount=Patron only has %1$s in credit.
+staff.patron.bills.bill_change_amount.greedy=Someone wanted more money than they deserved
+staff.patron.bills.apply_payment.nothing_applied=No payments or patron credit applied.
+staff.patron.bills.pay.annotate_payment=Please annotate this payment:
+staff.patron.bills.pay.annotate_payment.title=Annotate Payment
+staff.patron.bills.pay.refund_exceeds_desk_payment=%1$s\n\nAnother way to "zero" this transaction is to use Add Billing and add a misc bill to counter the negative balance.
+staff.patron.bills.pay.payment_failed=Bill payment likely failed
+staff.patron.bills.info_box.label_value.title=Title
+staff.patron.bills.info_box.label_value.type=Type
+staff.patron.bills.info_box.label_value.last_billing=Last Billing:
+staff.patron.bills.info_box.label_value.add_billing=Add Billing
+staff.patron.bills.info_box.label_value.refund=Refund
+staff.patron.bills.info_box.label_value.void_all_billings=Void All Billings
+staff.patron.bills.void_all_billings.all_voided=All billings already voided on this bill.
+staff.patron.bills.void_all_billings.void.message=Are you sure you would like to void $%1$s worth of line-item billings?
+staff.patron.bills.void_all_billings.void.title=Voiding Bills
+staff.patron.bills.void_all_billings.void.yes=Yes
+staff.patron.bills.void_all_billings.void.no=No
+staff.patron.bills.void_all_billings.void.confirm_message=Check here to confirm this message
+staff.patron.bills.void_all_billings.error_voiding_bills=Error voiding bills.
+staff.patron.bills.void_all_billings.billings_voided=Billings voided.
+staff.patron.bill_wizard.patron_bill_finish.billing_added=Billing added.
+staff.patron.display.cmd_patron_edit.edit_search=Editor would like to search for: %1$s
+staff.patron.display.spawn_editor.editing_related_patron=Editing Related Patron
+staff.patron.display.init.retrieving=Retrieving...
+staff.patron.display.init.network_request.alert_message=Alert message: "%1$s"<br/><br/>
+staff.patron.display.init.network_request.inactive_card=Patron account retrieved with an INACTIVE card.<br/><br/>
+staff.patron.display.init.network_request.account_barred=Patron account is BARRED.<br/><br/>
+staff.patron.display.init.network_request.account_inactive=Patron account is INACTIVE.<br/><br/>
+staff.patron.display.init.network_request.account_expired=Patron account is EXPIRED.<br/><br/>
+staff.patron.display.init.network_request.window_title=Alert
+staff.patron.display.init.network_request.window_message=Press a navigation button above (for example, Check Out) to clear this alert.
+staff.patron.display.init.network_request.dump_error_message=Not re-displaying this alert message: %1$s
+staff.patron.display.init.network_request.error_showing_alert=Error showing patron alert and holds availability.
+staff.patron.hold_notices.tooltiptext=ID: %1$s Hold ID: %2$s Notifying Staff ID: %3$s
+staff.patron.hold_notices.new_notification_record=New Notification Record
+staff.patron.hold_notices.method=Method
+staff.patron.hold_notices.note=Note
+staff.patron.hold_notices.cancel=Cancel
+staff.patron.hold_notices.cancel_accesskey=C
+staff.patron.hold_notices.add_notif_record=Add Notification Record
+staff.patron.hold_notices.add_notif_record_accesskey=A
+staff.patron.hold_notices.new_notification.not_created=The notification was not likely created.
+staff.patron.holds.init.hold_num_error=Error retrieving details for hold #%1$s
+staff.patron.holds.show_notifications.error_rendering_notifs=Error rendering/retrieving hold notifications.
+staff.patron.holds.holds_edit_selection_depth.choose_hold_range=Please choose a Hold Range:
+staff.patron.holds.holds_edit_selection_depth.done.label=Done
+staff.patron.holds.holds_edit_selection_depth.done.accesskey=D
+staff.patron.holds.holds_edit_selection_depth.cancel.label=Cancel
+staff.patron.holds.holds_edit_selection_depth.cancel.accesskey=C
+staff.patron.holds.holds_edit_selection_depth.choose_library=Choose a Pick Up Library
+staff.patron.holds.holds_edit_selection_depth.modify_holds_message.singular=Are you sure you would like to change the Hold Range for hold %1$s to "%2$s"?;
+staff.patron.holds.holds_edit_selection_depth.modify_holds_message.plural=Are you sure you would like to change the Hold Range for holds %1$s to "%2$s"?;
+staff.patron.holds.holds_edit_selection_depth.modify_holds_title=Modifying Holds
+staff.patron.holds.holds_not_modified=Holds not likely modified.
+staff.patron.holds.holds_edit_pickup_lib.new_pickup_lib.description=Please choose a new Pickup Library:
+staff.patron.holds.holds_edit_pickup_lib.done.label=Done
+staff.patron.holds.holds_edit_pickup_lib.done.accesskey=D
+staff.patron.holds.holds_edit_pickup_lib.cancel.label=Cancel
+staff.patron.holds.holds_edit_pickup_lib.cancel.accesskey=C
+staff.patron.holds.holds_edit_pickup_lib.choose_lib=Choose a Pick Up Library
+staff.patron.holds.holds_edit_pickup_lib.change_pickup_lib_message.singular=Are you sure you would like to change the Pick Up Library for hold %1$s to %2$s?;
+staff.patron.holds.holds_edit_pickup_lib.change_pickup_lib_message.plural=Are you sure you would like to change the Pick Up Library for holds %1$s to %2$s?;
+staff.patron.holds.holds_edit_pickup_lib.change_pickup_lib_title=Modifying Holds
+staff.patron.holds.holds_edit_phone_notify.new_phone_number=Please enter a new phone number for hold notification (leave the field empty to disable phone notification):
+staff.patron.holds.holds_edit_phone_notify.btn_done.label=Done
+staff.patron.holds.holds_edit_phone_notify.btn_done.accesskey=D
+staff.patron.holds.holds_edit_phone_notify.btn_cancel.label=Cancel
+staff.patron.holds.holds_edit_phone_notify.btn_cancel.accesskey=C
+staff.patron.holds.holds_edit_phone_notify.choose_phone_number=Choose a Hold Notification Phone Number
+staff.patron.holds.holds_edit_phone_notify.confirm_phone_number_change.singular=Are you sure you would like to change the Notification Phone Number for hold %1$s to "%2$s"?
+staff.patron.holds.holds_edit_phone_notify.confirm_phone_number_change.plural=Are you sure you would like to change the Notification Phone Number for holds %1$s to "%2$s"?
+staff.patron.holds.holds_edit_phone_notify.modifying_holds_title=Modifying Holds
+staff.patron.holds.holds_edit_email_notify.description=Send email notifications (when appropriate)? The email address used is found in the hold recipient account.
+staff.patron.holds.holds_edit_email_notify.btn_email.label=Email
+staff.patron.holds.holds_edit_email_notify.btn_email.accesskey=E
+staff.patron.holds.holds_edit_email_notify.btn_no_email.label=No Email
+staff.patron.holds.holds_edit_email_notify.btn_no_email.accesskey=N
+staff.patron.holds.holds_edit_email_notify.btn_cancel.label=Cancel
+staff.patron.holds.holds_edit_email_notify.btn_cancel.accesskey=C
+staff.patron.holds.holds_edit_email_notify.set_notifs=Set Email Notification for Holds
+staff.patron.holds.holds_edit_email_notify.enable_email.singular=Are you sure you would like to enable email notification for hold %1$s?
+staff.patron.holds.holds_edit_email_notify.enable_email.plural=Are you sure you would like to enable email notification for holds %1$s?
+staff.patron.holds.holds_edit_email_notify.disable_email.singular=Are you sure you would like to disable email notification for hold %1$s?
+staff.patron.holds.holds_edit_email_notify.disable_email.plural=Are you sure you would like to disable email notification for hold %1$s?
+staff.patron.holds.holds_edit_email_notify.mod_holds_title=Modifying Holds
+staff.patron.holds.holds_retarget.reset_hold_message.singular=Are you sure you would like to reset hold %1$s?
+staff.patron.holds.holds_retarget.reset_hold_message.plural=Are you sure you would like to reset holds %1$s?
+staff.patron.holds.holds_retarget.reset_hold_title=Resetting Holds
+staff.patron.holds.holds_retarget.holds_not_reset=Holds not likely reset.
+staff.patron.holds.holds_cancel.cancel_hold_message.singular=Are you sure you would like to cancel hold %1$s?
+staff.patron.holds.holds_cancel.cancel_hold_message.plural=Are you sure you would like to cancel holds %1$s?
+staff.patron.holds.holds_cancel.cancel_hold_title=Cancelling Holds
+staff.patron.holds.holds_cancel.cancel_for_barcodes=For barcodes %1$s, should the associated transits also be cancelled?
+staff.patron.holds.holds_cancel.cancel_for_barcodes.title=Cancelling Transits
+staff.patron.holds.holds_cancel.hold_transits_not_cancelled=Hold transits not likely cancelled.
+staff.patron.holds.holds_cancel.hold_not_cancelled=Holds not likely cancelled.
+staff.patron.holds.show_catalog.unknown_htype=I do not understand the hold type of %1$s so I can not display the appropriate record in the catalog.
+staff.patron.holds.show_catalog.retrieving_title=Retrieving title...
+staff.patron.holds.lib_menus.missing_library_list=Missing library list.
+staff.patron.info_group.retrieve_group_members.failure=Failed to retrieve all the group members.
+staff.patron.info_group.retrieve_patron.tab_name=Retrieving Patron..
+staff.patron.info_group.retrieve_patron.failed_retrieving_patron=Failed to retrieve patron.
+staff.patron.info_group.retrieve_patron.failed_retrieving_patrons=Failed to retrieve patrons.
+staff.patron.info_group.clone_patron.register_clone.tab_name=Register Patron Clone for Group
+staff.patron.info_group.clone_patron.error_spawning_editors=error spawning user editors
+staff.patron.info_group.spwan_editor.editing_patron=Editing Related Patron
+staff.patron.info_group.spwan_search=spawn search
+staff.patron.info_group.remove_patron.warning_message=WARNING: If you remove the currently displayed patron, a NEW group will be displayed in this interface.
+staff.patron.info_group.remove_patron.warning_message_confirm=Remove selected patrons from this group? %1$s
+staff.patron.info_group.remove_patron.error_removing_patron=error removing patron (id=%1$s) from usergroup
+staff.patron.info_group.remove_patron.patrons_removed_from_group=Patrons removed from group.
+staff.patron.info_group.remove_patron.patrons_not_removed_from_group=Patron not removed from group.
+staff.patron.info_group.link_patron.null_not_allowed=null parameter not allowed
+staff.patron.info_group.link_patron.invalid_parameter=Invalid parameter. Expected boolean.
+staff.patron.info_group.link_patron.scan_patron_barcode=Please scan a patron barcode:
+staff.patron.info_group.link_patron.move_patron_to_new_usergroup=Move patron %1$s into patron %2$s's usergroup...
+staff.patron.info_group.link_patron.move.label=Move
+staff.patron.info_group.link_patron.move.accesskey=M
+staff.patron.info_group.link_patron.done.label=Done
+staff.patron.info_group.link_patron.done.accesskey=D
+staff.patron.info_group.link_patron.move_patron_to_usergroup=Move Patron into a Usergroup
+staff.patron.info_group.link_patron.error_linking_patron=error linking patron (id=%1$s)
+staff.patron.info_group.link_patron.usergroups_updated=User groups updated.
+staff.patron.info_group.link_patron.error_linking_patrons=error linking patrons
<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
<!-- LOCALIZATION -->
<!DOCTYPE window PUBLIC "" ""[
- <!--#include virtual="/opac/locale/en-US/lang.dtd"-->
+ <!--#include virtual="/opac/locale/${locale}/lang.dtd"-->
]>
<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
<script type="text/javascript" src="/xul/server/main/JSAN.js"/>
<script>
<![CDATA[
+ function $(id) { return document.getElementById(id); }
+
function my_init() {
try {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
- if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
+ if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
JSAN.use('util.error'); g.error = new util.error();
if (typeof window.xulG == 'object' && typeof window.xulG.set_tab_name == 'function') {
if (xul_param('perm_editor')) {
- try { window.xulG.set_tab_name('User Permission Editor'); } catch(E) { alert(E); }
+ try { window.xulG.set_tab_name($(patronStrings).getString('staff.patron.barcode_entry.user_permission_editor')); } catch(E) { alert(E); }
} else {
- try { window.xulG.set_tab_name('Check Out'); } catch(E) { alert(E); }
+ try { window.xulG.set_tab_name($(patronStrings).getString('staff.patron.barcode_entry.check_out')); } catch(E) { alert(E); }
}
}
} catch(E) {
var err_msg = "!! This software has encountered an error. Please tell your friendly " +
"system administrator or software developer the following:\n" + E + '\n';
+ var err_msg = $("commonStrings").getFormattedString('common.exception', ['patron/barcode_entry.xul', E]);
try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
alert(err_msg);
}
barcode = String( barcode ).replace( /\s+/g, '' );
- if (!barcode) { sound.bad(); add_msg('No barcode entered.'); tb.select(); tb.focus(); return; }
+ if (!barcode) { sound.bad(); add_msg($(patronStrings).getString('staff.patron.barcode_entry.no_barcode')); tb.select(); tb.focus(); return; }
JSAN.use('util.network'); var net = new util.network();
var robj = req.getResultObject();
if (typeof robj.ilsevent != 'undefined') {
sound.bad();
- add_msg('Problem retrieving ' + barcode + '. Please report this message: \n' + js2JSON(robj));
+ add_msg($(patronStrings).getFormattedString('staff.patron.barcode_entry.barcode_retrieval_problem', [barcode, js2JSON(robj)]));
return;
} else if (robj == 0) {
sound.bad();
- add_msg('Barcode ' + barcode + ' not found.');
+ add_msg($(patronStrings).getFormattedString('staff.patron.barcode_entry.barcode_not_found', [barcode]));
return;
}
- if (g.data.user_org_unit_opt_in_enabled) {
- var r = net.simple_request('USER_ORG_UNIT_OPT_IN_CHECK',[ ses(), robj ]);
- if (typeof r.ilsevent != 'undefined') {
- throw(r);
- } else {
-
- if (r == 0) {
-
- JSAN.use('patron.util');
- var parts = patron.util.retrieve_name_via_id( ses(), robj );
+ if (g.data.user_org_unit_opt_in_enabled) {
+ var r = net.simple_request('USER_ORG_UNIT_OPT_IN_CHECK',[ ses(), robj ]);
+ if (typeof r.ilsevent != 'undefined') {
+ throw(r);
+ } else {
+
+ if (r == 0) {
+
+ JSAN.use('patron.util');
+ var parts = patron.util.retrieve_name_via_id( ses(), robj );
- if (0 != g.error.yns_alert(
- 'Does patron ' + parts[0] + ', ' + parts[1] + (parts[2] ? ' ' + parts[2] : '') + ' from ' + g.data.hash.aou[ parts[3] ].name() + ' (' + g.data.hash.aou[ parts[3] ].shortname() + ') consent to having their personal information shared with your library?',
- 'Patron/Library Opt-In Confirmation',
- 'Accept', 'Deny', null, 'Check here to confirm this message'
- )
- ) {
- tb.select(); tb.focus();
- return;
- } else {
- var c = net.simple_request('USER_ORG_UNIT_OPT_IN_CREATE',[ ses(), robj ]);
- if (typeof c.ilsevent != 'undefined') throw(r);
- }
- }
+ if (0 != g.error.yns_alert(
+ $(patronStrings).getFormattedString('staff.patron.barcode_entry.consent_from_patron',
+ [parts[0], parts[1] + (parts[2] ? ' ' + parts[2] : ''), g.data.hash.aou[ parts[3] ].name(), g.data.hash.aou[ parts[3] ].shortname()]),
+ $(patronStrings).getString('staff.patron.barcode_entry.patron_consent_title'),
+ $(patronStrings).getString('staff.patron.barcode_entry.patron_consent_accept'),
+ $(patronStrings).getString('staff.patron.barcode_entry.patron_consent_deny'), null,
+ $(patronStrings).getString('staff.patron.barcode_entry.patron_consent_confirm')
+ )
+ ) {
+ tb.select(); tb.focus();
+ return;
+ } else {
+ var c = net.simple_request('USER_ORG_UNIT_OPT_IN_CREATE',[ ses(), robj ]);
+ if (typeof c.ilsevent != 'undefined') throw(r);
+ }
+ }
sound.good();
spawn(barcode);
location.href = loc + '?barcode=' + window.escape(barcode);
}
} catch(E) {
- g.error.standard_unexpected_error_alert('spawning patron display',E);
+ g.error.standard_unexpected_error_alert($(patronStrings).getString('staff.patron.barcode_entry.patron_display_error'),E);
}
}
location.href = loc;
}
} catch(E) {
- g.error.standard_unexpected_error_alert('spawning user perm editor',E);
+ g.error.standard_unexpected_error_alert($(patronStrings).getString('staff.patron.barcode_entry.user_perm_display_error'),E);
}
}
function default_focus() { try { setTimeout( function() { document.getElementById('barcode_tb').focus(); }, 0); } catch(E) {} }
]]>
</script>
+
+ <messagecatalog id="commonStrings" src="/xul/server/locale/<!--#echo var='locale'-->/common.properties" />
+ <messagecatalog id="patronStrings" src="/xul/server/locale/<!--#echo var='locale'-->/patron.properties" />
<vbox flex="1" class="my_overflow">
<groupbox orient="vertical" flex="1">
- <caption label="Retrieve Patron" />
+ <caption label="&staff.pat.barcode_entry.retrieve_patron.label;" />
<hbox>
- <label value="Barcode:" accesskey="B" control="barcode_tb"/>
+ <label value="&staff.pat.barcode_entry.barcode.label;" accesskey="&staff.pat.barcode_entry.barcode.accesskey;" control="barcode_tb"/>
<textbox id="barcode_tb" />
- <button label="Submit" accesskey="S" oncommand="submit();"/>
+ <button label="&staff.pat.barcode_entry.submit_btn.label;" accesskey="&staff.pat.barcode_entry.submit_btn.accesskey;" oncommand="submit();"/>
</hbox>
- <label value="Retrieving..." style="color: green" id="progress" hidden="true"/>
+ <label value="&staff.pat.barcode_entry.retrieving.label;" style="color: green" id="progress" hidden="true"/>
<vbox id="status">
</vbox>
</groupbox>
<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
<!-- LOCALIZATION -->
<!DOCTYPE window PUBLIC "" ""[
- <!--#include virtual="/opac/locale/en-US/lang.dtd"-->
+ <!--#include virtual="/opac/locale/${locale}/lang.dtd"-->
]>
<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
<script>
<![CDATA[
+ function $(id) { return document.getElementById(id); }
function info_init() {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
- if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
+ if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
JSAN.use('util.error'); g.error = new util.error();
]]>
</script>
+ <messagecatalog id="catStrings" src="/xul/server/locale/<!--#echo var='locale'-->/patron.properties" />
+ <messagecatalog id="commonStrings" src="/xul/server/locale/<!--#echo var='locale'-->/common.properties" />
<groupbox>
<caption label="Credit Card Info"/>
<label value="CC Type"/>
<menulist id="cc_type" oncommand="g.payment_blob.cc_type = this.value;">
<menupopup>
- <menuitem label="Visa" value="Visa"/>
- <menuitem label="Mastercard" value="Mastercard"/>
- <menuitem label="American Express" value="American Express"/>
- <menuitem label="Discover" value="Discover"/>
- <menuitem label="Other" value="Other"/>
+ <menuitem label="&staff.patron.bill_cc_info.visa.label;" value="Visa"/>
+ <menuitem label="&staff.patron.bill_cc_info.mastercard.label;" value="Mastercard"/>
+ <menuitem label="&staff.patron.bill_cc_info.american_express.label;" value="American Express"/>
+ <menuitem label="&staff.patron.bill_cc_info.discover.label;" value="Discover"/>
+ <menuitem label="&staff.patron.bill_cc_info.other.label;" value="Other"/>
</menupopup>
</menulist>
</row>
<row>
- <label value="CC Number"/>
+ <label value="&staff.patron.bill_cc_info.cc_number.value;"/>
<textbox id="cc_number" onchange="g.payment_blob.cc_number = event.target.value"/>
</row>
<row>
- <label value="Expire Month"/>
+ <label value="&staff.patron.bill_cc_info.month_expire.value;"/>
<textbox id="expire_month" onchange="g.payment_blob.expire_month = event.target.value"/>
</row>
<row>
- <label value="Expire Year"/>
+ <label value="&staff.patron.bill_cc_info.year_expire.value;"/>
<textbox id="expire_year" onchange="g.payment_blob.expire_year = event.target.value"/>
</row>
<row>
- <label value="Approval Code"/>
+ <label value="&staff.patron.bill_cc_info.approval_code.value;"/>
<textbox id="approval_code" onchange="g.payment_blob.approval_code = event.target.value"/>
</row>
<row>
- <label value="Note"/>
+ <label value="&staff.patron.bill_cc_info.note.value;"/>
<textbox id="note" onchange="g.payment_blob.note = event.target.value" multiline="true"/>
</row>
</rows>
</grid>
<hbox>
<spacer flex="1"/>
- <button label="Cancel" oncommand="window.close()" accesskey="C"/>
- <button label="Submit this Info" oncommand="info_finish(); window.close();" accesskey="S"/>
+ <button label="&staff.patron.bill_cc_info.cancel.label;" oncommand="window.close()" accesskey="&staff.patron.bill_cc_info.cancel.accesskey;"/>
+ <button label="&staff.patron.bill_cc_info.submit.label;" oncommand="info_finish(); window.close();" accesskey="&staff.patron.bill_cc_info.submit.accesskey;"/>
</hbox>
</groupbox>
<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
<!-- LOCALIZATION -->
<!DOCTYPE window PUBLIC "" ""[
- <!--#include virtual="/opac/locale/en-US/lang.dtd"-->
+ <!--#include virtual="/opac/locale/${locale}/lang.dtd"-->
]>
<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
<script>
<![CDATA[
+ function $(id) { return document.getElementById(id); }
function info_init() {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
- if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
+ if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
JSAN.use('util.error'); g.error = new util.error();
]]>
</script>
+ <messagecatalog id="catStrings" src="/xul/server/locale/<!--#echo var='locale'-->/patron.properties" />
+ <messagecatalog id="commonStrings" src="/xul/server/locale/<!--#echo var='locale'-->/common.properties" />
<groupbox>
- <caption label="Check Info"/>
+ <caption label="&staff.patron.bill_check_info.check_info.label;"/>
<grid>
<columns> <column flex="0" /> <column flex="0" /> </columns>
<rows>
<row>
- <label value="Check Number"/>
+ <label value="&staff.patron.bill_check_info.check_number.value;"/>
<textbox id="check_number" onchange="g.payment_blob.check_number = event.target.value"/>
</row>
<row>
- <label value="Note"/>
+ <label value="&staff.patron.bill_check_info.note.value;"/>
<textbox id="note" onchange="g.payment_blob.note = event.target.value" multiline="true"/>
</row>
</rows>
</grid>
<hbox>
<spacer flex="1"/>
- <button label="Cancel" oncommand="window.close()" accesskey="C"/>
- <button label="Submit this Info" oncommand="info_finish(); window.close();" accesskey="S"/>
+ <button label="&staff.patron.bill_check_info.cancel.label;" oncommand="window.close()" accesskey="&staff.patron.bill_check_info.cancel.accesskey;"/>
+ <button label="&staff.patron.bill_check_info.submit.label;" oncommand="info_finish(); window.close();" accesskey="&staff.patron.bill_check_info.submit.accesskey;"/>
</hbox>
</groupbox>
<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
<!-- LOCALIZATION -->
<!DOCTYPE window PUBLIC "" ""[
- <!--#include virtual="/opac/locale/en-US/lang.dtd"-->
+ <!--#include virtual="/opac/locale/${locale}/lang.dtd"-->
]>
<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
function my_init() {
try {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
- if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
+ if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
);
} catch(E) {
- try { g.error.standard_unexpected_error_alert('bill_details.xul, my_init:',E); } catch(F) { alert(E); }
+ try { g.error.standard_unexpected_error_alert($("patronStrings").getString('staff.patron.bill_details.my_init.error'),E); } catch(F) { alert(E); }
}
}
var mb_list = util.functional.map_list(g.bill_list_selection, function(o){return g.mb_list[o];});
mb_list = util.functional.filter_list( mb_list, function(o) { return ! get_bool( o.voided() ) });
- if (mb_list.length == 0) { alert('All selected billings have already voided.'); return; }
+ if (mb_list.length == 0) { alert($("patronStrings").getString('staff.patron.bill_details.handle_void.voided_billings.alert')); return; }
var sum = 0;
for (var i = 0; i < mb_list.length; i++) sum += util.money.dollars_float_to_cents_integer( mb_list[i].amount() );
sum = util.money.cents_as_dollars( sum );
- var msg = 'Are you sure you would like to void $' + sum + ' worth of line-item billings?';
- var r = g.error.yns_alert(msg,'Voiding Bills','Yes','No',null,'Check here to confirm this message');
+ var msg = $("patronStrings").getFormattedString('staff.patron.bill_details.handle_void.confirm_void_billing', sum);
+ var r = g.error.yns_alert(msg,
+ $("patronStrings").getString('staff.patron.bill_details.handle_void.confirm_void_billing_title'),
+ $("patronStrings").getString('staff.patron.bill_details.handle_void.confirm_void_billing_yes'),
+ $("patronStrings").getString('staff.patron.bill_details.handle_void.confirm_void_billing_no'),null,
+ $("patronStrings").getString('staff.patron.bill_details.handle_void.confirm_void_billing_confirm_message'));
if (r == 0) {
var robj = g.network.simple_request('FM_MB_VOID',[ses()].concat(util.functional.map_list(mb_list,function(o){return o.id();})));
if (robj.ilsevent) {
switch(Number(robj.ilsevent)) {
default:
- g.error.standard_unexpected_error_alert('Error voiding bills.',robj);
+ g.error.standard_unexpected_error_alert($("patronStrings").getString('staff.patron.bill_details.handle_void.voiding_error'),robj);
retrieve_mbts();
g.bill_list.clear();
retrieve_mb();
g.data.voided_billings.push( mb_list[i] );
}
g.data.stash('voided_billings');
- alert('Billings voided.');
+ alert($("patronStrings").getString('staff.patron.bill_details.handle_void.billings_voided'));
retrieve_mbts();
g.bill_list.clear();
retrieve_mb();
]]>
</script>
- <messagecatalog id="commonStrings" src="/xul/server/locale/<!--#echo var='locale'-->/common.properties"/>
+ <messagecatalog id="commonStrings" src="/xul/server/locale/<!--#echo var='locale'-->/common.properties"/>
+ <messagecatalog id="patronStrings" src="/xul/server/locale/<!--#echo var='locale'-->/patron.properties"/>
<vbox flex="1" class="my_overflow">
<label id="patron_name" class="patronNameLarge"/>
<splitter><grippy/></splitter>
<groupbox orient="vertical" flex="2">
- <caption label="Bills" style="color: red"/>
+ <caption label="&staff.patron.bill_details.bills.label;" style="color: red"/>
<tree id="bill_tree" flex="1" enableColumnDrag="true"/>
<hbox>
- <button label="Save Columns" oncommand="g.bill_list.save_columns();"/>
- <button label="Copy to Clipboard" oncommand="g.bill_list.clipboard();"/>
- <button label="Print Export" oncommand="try { g.bill_list.on_all_fleshed = function() { JSAN.use('util.print'); var p = new util.print(); p.simple( g.bill_list.dump_csv(), { 'content_type' : 'text/plain' } ); setTimeout( function() { g.bill_list.on_all_fleshed = null; }, 0); }; g.bill_list.full_retrieve(); } catch(E) { alert(E); }"/>
+ <button label="&staff.patron.bill_details.save_columns.label;" oncommand="g.bill_list.save_columns();"/>
+ <button label="&staff.patron.bill_details.copy_to_clipboard.label;" oncommand="g.bill_list.clipboard();"/>
+ <button label="&staff.patron.bill_details.print_export.label;" oncommand="try { g.bill_list.on_all_fleshed = function() { JSAN.use('util.print'); var p = new util.print(); p.simple( g.bill_list.dump_csv(), { 'content_type' : 'text/plain' } ); setTimeout( function() { g.bill_list.on_all_fleshed = null; }, 0); }; g.bill_list.full_retrieve(); } catch(E) { alert(E); }"/>
<spacer flex="1"/>
- <button id="void" label="Void selected billings" disabled="true"/>
+ <button id="void" label="&staff.patron.bill_details.void_selection.label;" disabled="true"/>
</hbox>
</groupbox>
<splitter><grippy/></splitter>
<groupbox orient="vertical" flex="2">
- <caption label="Payments" style="color: green"/>
+ <caption label="&staff.patron.bill_details.payments.label;" style="color: green"/>
<tree id="payment_tree" flex="1" enableColumnDrag="true"/>
<hbox>
- <button label="Save Columns" oncommand="g.payment_list.save_columns();"/>
- <button label="Copy to Clipboard" oncommand="g.payment_list.clipboard();"/>
- <button label="Print Export" oncommand="try { g.payment_list.on_all_fleshed = function() { JSAN.use('util.print'); var p = new util.print(); p.simple( g.payment_list.dump_csv(), { 'content_type' : 'text/plain' } ); setTimeout( function() { g.payment_list.on_all_fleshed = null; }, 0); }; g.payment_list.full_retrieve(); } catch(E) { alert(E); }"/>
+ <button label="&staff.patron.bill_details.save_columns.label;" oncommand="g.payment_list.save_columns();"/>
+ <button label="&staff.patron.bill_details.copy_to_clipboard.label;" oncommand="g.payment_list.clipboard();"/>
+ <button label="&staff.patron.bill_details.print_export.label;" oncommand="try { g.payment_list.on_all_fleshed = function() { JSAN.use('util.print'); var p = new util.print(); p.simple( g.payment_list.dump_csv(), { 'content_type' : 'text/plain' } ); setTimeout( function() { g.payment_list.on_all_fleshed = null; }, 0); }; g.payment_list.full_retrieve(); } catch(E) { alert(E); }"/>
<spacer flex="1"/>
</hbox>
</groupbox>
<hbox>
- <button id="opac" label="Show in Catalog" accesskey="S" hidden="true"/>
+ <button id="opac" label="&staff.patron.bill_details.show_in_catalog.label;" accesskey="&staff.patron.bill_details.show_in_catalog.accesskey;" hidden="true"/>
<spacer flex="1"/>
- <button label="Close Window" oncommand="window.close()" accesskey="c"/>
+ <button label="&staff.patron.bill_details.close_window.label;" oncommand="window.close()" accesskey="&staff.patron.bill_details.close_window.accesskey;"/>
</hbox>
</vbox>
<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
<!-- LOCALIZATION -->
<!DOCTYPE window PUBLIC "" ""[
- <!--#include virtual="/opac/locale/en-US/lang.dtd"-->
+ <!--#include virtual="/opac/locale/${locale}/lang.dtd"-->
]>
<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
g.mbts_ids = g.network.simple_request(method,[ses(),g.patron_id]);
if (g.mbts_ids.ilsevent) {
switch(Number(g.mbts_ids.ilsevent)) {
- case -1: g.error.standard_network_error_alert('Please close this window and try again.'); break;
- default: g.error.standard_unexpected_error_alert('Please close this window and try again.',g.mbts_ids); break;
+ case -1: g.error.standard_network_error_alert($("patronStrings").getString('staff.patron.bill_history.retrieve_mbts_for_list.close_win_try_again')); break;
+ default: g.error.standard_unexpected_error_alert($("patronStrings").getString('staff.patron.bill_history.retrieve_mbts_for_list.close_win_try_again'),g.mbts_ids); break;
}
} else if (g.mbts_ids == null) {
- g.error.standard_unexpected_error_alert('Please close this window and try again.',null);
+ g.error.standard_unexpected_error_alert($("patronStrings").getString('staff.patron.bill_history.retrieve_mbts_for_list.close_win_try_again'),null);
} else {
//g.mbts_ids.reverse();
var funcs = [];
function my_init() {
try {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
- if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
+ if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
);
if (xul_param('current')) {
- $('caption').setAttribute('label','Current Bills');
- document.title = 'Current Bills';
+ $('caption').setAttribute('label',$("patronStrings").getString('staff.patron.bill_history.my_init.current_bills'));
+ document.title = $("patronStrings").getString('staff.patron.bill_history.my_init.current_bills');
} else {
- $('caption').setAttribute('label','Bill History');
- document.title = 'Bill History';
+ $('caption').setAttribute('label',$("patronStrings").getString('staff.patron.bill_history.my_init.bill_history'));
+ document.title = $("patronStrings").getString('staff.patron.bill_history.my_init.bill_history');
}
} catch(E) {
- var err_msg = "!! This software has encountered an error. Please tell your friendly " +
- "system administrator or software developer the following:\nbill_history.xul\n" + E + '\n';
+ var err_msg = $("commonStrings").getFormattedString('common.exception', ['patron/bill_history.xul', E]);
try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
alert(err_msg);
}
}
function handle_add() {
- var msg = 'Are you sure you would like to add a billing to bill' + ( g.bill_list_selection.length > 1 ? 's ' : ' ') + g.bill_list_selection + '?';
- var r = g.error.yns_alert(msg,'Bill Patron','Yes','No',null,'Check here to confirm this message');
+ if(g.bill_list_selection.length > 1)
+ var msg = $("patronStrings").getFormattedString('staff.patron.bill_history.handle_add.message_plural', [g.bill_list_selection]);
+ else
+ var msg = $("patronStrings").getFormattedString('staff.patron.bill_history.handle_add.message_singular', [g.bill_list_selection]);
+
+ var r = g.error.yns_alert(msg,
+ $("patronStrings").getString('staff.patron.bill_history.handle_add.title'),
+ $("patronStrings").getString('staff.patron.bill_history.handle_add.btn_yes'),
+ $("patronStrings").getString('staff.patron.bill_history.handle_add.btn_no'),null,
+ $("patronStrings").getString('staff.patron.bill_history.handle_add.confirm_message'));
if (r == 0) {
JSAN.use('util.window');
var win = new util.window();
};
g.bill_list.print(params);
} catch(E) {
- g.error.standard_unexpected_error_alert('printing bills', E);
+ g.error.standard_unexpected_error_alert($("patronStrings").getString('staff.patron.bill_history.print_bills.print_error'), E);
}
}
]]>
</script>
- <messagecatalog id="commonStrings" src="/xul/server/locale/<!--#echo var='locale'-->/common.properties"/>
+ <messagecatalog id="commonStrings" src="/xul/server/locale/<!--#echo var='locale'-->/common.properties"/>
+ <messagecatalog id="patronStrings" src="/xul/server/locale/<!--#echo var='locale'-->/patron.properties"/>
<vbox flex="1" class="my_overflow">
<vbox id="v1" persist="height" flex="1">
<vbox id="v3" persist="height" flex="3">
<groupbox orient="vertical" flex="1">
- <caption id="caption" label="Bill History"/>
+ <caption id="caption" label="&staff.patron.bill_history.caption.label;"/>
<tree id="bill_tree" flex="1" enableColumnDrag="true" seltype="single"/>
<hbox>
<spacer flex="1"/>
- <button id="add" label="Add Billing" disabled="true"/>
- <button id="details" label="Full Details" disabled="true" accesskey="D"/>
+ <button id="add" label="&staff.patron.bill_history.add_billing.label;" disabled="true"/>
+ <button id="details" label="&staff.patron.bill_history.full_details.label;" disabled="true" accesskey="&staff.patron.bill_history.full_details.accesskey;"/>
</hbox>
</groupbox>
<hbox flex="0">
- <button id="opac" label="Show in Catalog" accesskey="S" hidden="true" oncommand="alert('Not Yet Implemented');"/>
- <button id="print" label="Print" accesskey="P" hidden="false" oncommand="print_bills();"/>
+ <button id="opac" label="&staff.patron.bill_history.show_in_catalog.label;" accesskey="&staff.patron.bill_history.show_in_catalog.accesskey;" hidden="true" oncommand="alert('Not Yet Implemented');"/>
+ <button id="print" label="&staff.patron.bill_history.print.label;" accesskey="&staff.patron.bill_history.print.accesskey;" hidden="false" oncommand="print_bills();"/>
<spacer flex="1"/>
- <button label="Close Window" oncommand="window.close()" accesskey="c"/>
+ <button label="&staff.patron.bill_history.close_window.label;" oncommand="window.close()" accesskey="&staff.patron.bill_history.close_window.accesskey;"/>
</hbox>
</vbox>
</vbox>
<?xml version="1.0"?>
<!DOCTYPE overlay PUBLIC "" ""[
- <!--#include virtual="/opac/locale/en-US/lang.dtd"-->
+ <!--#include virtual="/opac/locale/${locale}/lang.dtd"-->
]>
<overlay id="bills_overlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
</columns>
<rows>
<row>
- <label class="header" value="Bill #"/>
+ <label class="header" value="&staff.patron.bill_summary_overlay.bill_number.value;"/>
<label id="mbts_id" />
- <label class="header" value="Total Billed"/>
+ <label class="header" value="&staff.patron.bill_summary_overlay.total_billed.value;"/>
<label id="mbts_total_owed" />
- <label class="header" id="title_label" value="Title" hidden="true"/>
+ <label class="header" id="title_label" value="&staff.patron.bill_summary_overlay.title.value;" hidden="true"/>
<description id="title"/>
</row>
<row>
- <label class="header" value="Type"/>
+ <label class="header" value="&staff.patron.bill_summary_overlay.type.value;"/>
<label id="mbts_xact_type"/>
- <label class="header" value="Total Paid"/>
+ <label class="header" value="&staff.patron.bill_summary_overlay.total_paid.value;"/>
<label id="mbts_total_paid" />
- <label class="header" id="checked_out_label" value="Checked Out" hidden="true"/>
+ <label class="header" id="checked_out_label" value="&staff.patron.bill_summary_overlay.checked_out.value;" hidden="true"/>
<label id="checked_out"/>
</row>
<row>
- <label class="header" value="Start"/>
+ <label class="header" value="&staff.patron.bill_summary_overlay.start.value;"/>
<label id="mbts_xact_start"/>
- <label class="header" value="Balance Owed"/>
+ <label class="header" value="&staff.patron.bill_summary_overlay.balance_owed.value;"/>
<label id="mbts_balance_owed" />
- <label class="header" id="due_label" value="Due Date" hidden="true"/>
+ <label class="header" id="due_label" value="&staff.patron.bill_summary_overlay.due_date.value;" hidden="true"/>
<label id="due"/>
</row>
<row>
- <label class="header" value="Finish"/>
+ <label class="header" value="&staff.patron.bill_summary_overlay.finish.value;"/>
<label id="mbts_xact_finish"/>
- <label class="header" value="Renewal?"/>
+ <label class="header" value="&staff.patron.bill_summary_overlay.renewal.value;"/>
<label id="renewal"/>
- <label class="header" id="checked_in_label" value="Checked In" hidden="true"/>
+ <label class="header" id="checked_in_label" value="&staff.patron.bill_summary_overlay.checked_in.value;" hidden="true"/>
<label id="checked_in"/>
</row>
</rows>
<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
<!-- LOCALIZATION -->
<!DOCTYPE window PUBLIC "" ""[
- <!--#include virtual="/opac/locale/en-US/lang.dtd"-->
+ <!--#include virtual="/opac/locale/${locale}/lang.dtd"-->
]>
<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
function patron_bill_init() {
try {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
- if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
+ if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
JSAN.use('util.error'); g.error = new util.error();
}
} catch(E) {
- var err_msg = "!! This software has encountered an error. Please tell your friendly " +
- "system administrator or software developer the following:\n"
- + 'patron/bill_wizard.xul\n' + E + '\n';
+ var err_msg = $("commonStrings").getFormattedString('common.exception', ['patron/bill_wizard.xul', E]);
try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
alert(err_msg);
}
[ ses(), billing ]
);
if (typeof mb_id.ilsevent != 'undefined') throw(mb_id);
- alert('Billing added.');
+ alert($('patronStrings').getString('staff.patron.bill_wizard.patron_bill_finish.billing_added'));
} else {
throw(xact_id);
}
]]>
</script>
+
+ <messagecatalog id="commonStrings" src="/xul/server/locale/<!--#echo var='locale'-->/common.properties" />
+ <messagecatalog id="patronStrings" src="/xul/server/locale/<!--#echo var='locale'-->/patron.properties"/>
<vbox flex="1">
<groupbox orient="vertical" flex="1" id="summary" hidden="true"/>
<groupbox flex="1">
- <caption label="Create Bill"/>
+ <caption label="&staff.patron.bill_wizard.create_bill.label;"/>
<grid>
<columns> <column flex="0" /> <column flex="0" /> </columns>
<rows id="page1_rows">
- <row><label value="Location"/><textbox id="billing_location" disabled="true" /></row>
- <row><label value="Transaction Type"/>
+ <row><label value="&staff.patron.bill_wizard.location.value;"/><textbox id="billing_location" disabled="true" /></row>
+ <row><label value="&staff.patron.bill_wizard.transaction_type.value;"/>
<menulist id="xact_type">
<menupopup>
- <menuitem label="Grocery" value="grocery" selected="true"/>
- <menuitem label="Circulation" value="circulation" disabled="true"/>
+ <menuitem label="&staff.patron.bill_wizard.grocery.label;" value="grocery" selected="true"/>
+ <menuitem label="&staff.patron.bill_wizard.circulation.label;" value="circulation" disabled="true"/>
</menupopup>
</menulist>
</row>
- <row><label value="Billing Type"/>
+ <row><label value="&staff.patron.bill_wizard.billing_type.label;"/>
<hbox id="menu_placeholder"/>
</row>
- <row><label value="Amount"/><textbox id="bill_amount" /></row>
- <row><label value="Note"/><textbox id="bill_note" multiline="true" rows="5" /></row>
+ <row><label value="&staff.patron.bill_wizard.amount.value;"/><textbox id="bill_amount" /></row>
+ <row><label value="&staff.patron.bill_wizard.note.value;"/><textbox id="bill_note" multiline="true" rows="5" /></row>
</rows>
</grid>
<spacer flex="1"/>
<hbox>
<spacer flex="1"/>
- <button label="Cancel" oncommand="window.close()" accesskey="C"/>
- <button label="Submit this Bill" oncommand="patron_bill_finish(); window.close();" accesskey="S"/>
+ <button label="&staff.patron.bill_wizard.cancel.label;" oncommand="window.close()" accesskey="&staff.patron.bill_wizard.cancel.accesskey;"/>
+ <button label="&staff.patron.bill_wizard.submit.label;" oncommand="patron_bill_finish(); window.close();" accesskey="&staff.patron.bill_wizard.submit.accesskey;"/>
</hbox>
</groupbox>
</vbox>
dump('entering patron.bills.js\n');
+function $(id) { return document.getElementById(id); }
+
if (typeof patron == 'undefined') patron = {};
patron.bills = function (params) {
var bo = obj.bills[i].transaction.balance_owed();
total_owed += util.money.dollars_float_to_cents_integer( bo );
var id = obj.bills[i].transaction.id();
- obj.current_payments.push( { 'mobts_id' : id, 'balance_owed' : bo, 'checkbox' : cb, 'textbox' : tb, } );
+ obj.current_payments.push( { 'mobts_id' : id, 'balance_owed' : bo, 'checkbox' : cb, 'textbox' : tb } );
}
obj.controller.view.bill_total_owed.value = util.money.cents_as_dollars( total_owed );
obj.controller.view.bill_total_owed.setAttribute('value',obj.controller.view.bill_total_owed.value);
'render' : 'obj.payment_box()'
}
],
- 'map_row_to_column' : obj.gen_map_row_to_column(),
+ 'map_row_to_column' : obj.gen_map_row_to_column()
}
);
'control_map' : {
'cmd_broken' : [
['command'],
- function() { alert('Not Yet Implemented'); }
+ function() { alert($("commonStrings").getString('common.unimplemented')); }
],
'cmd_bill_wizard' : [
['command'],
{
'current' : 1,
'patron_id' : obj.patron_id,
- 'refresh' : function() { obj.refresh(); },
+ 'refresh' : function() { obj.refresh(); }
}
);
} catch(E) {
var proposed = util.money.dollars_float_to_cents_integer(ev.target.value);
var available = util.money.dollars_float_to_cents_integer(au_obj.credit_forward_balance());
if (proposed > available) {
- alert('Patron only has ' + au_obj.credit_forward_balance() + ' in credit.');
+ alert($("patronStrings").getFormattedString('staff.patron.bills.bill_payment_amount.credit_amount', [au_obj.credit_forward_balance()]));
ev.target.value = util.money.cents_as_dollars( available );
ev.target.setAttribute('value',ev.target.value);
}
obj.update_payment_applied();
var real_change = util.money.dollars_float_to_cents_integer( tb.value );
if ( proposed_change > real_change ) {
- obj.error.sdump('D_ERROR','Someone wanted more money than they deserved\n');
+ obj.error.sdump('D_ERROR',$("patronStrings").getString('staff.patron.bills.bill_change_amount.greedy'));
proposed_change = real_change;
} else if ( real_change > proposed_change ) {
proposed_credit = real_change - proposed_change;
'bill_new_balance' : [
['render'],
function(e) { return function() {}; }
- ],
+ ]
}
}
);
}
}
if ( payment_blob.payments.length == 0 && payment_blob.patron_credit == '0.00' ) {
- alert('No payments or patron credit applied.');
+ alert($("patronStrings").getString('staff.patron.bills.apply_payment.nothing_applied'));
return;
}
if ( obj.pay( payment_blob ) ) {
'last_billing_type' : obj.bill_map[ o[0] ].transaction.last_billing_type(),
'last_billing_note' : obj.bill_map[ o[0] ].transaction.last_billing_note(),
'title' : typeof obj.bill_map[ o[0] ].title != 'undefined' ? obj.bill_map[ o[0] ].title : '',
- 'barcode' : typeof obj.bill_map[ o[0] ].barcode != 'undefined' ? obj.bill_map[ o[0] ].barcode : '',
+ 'barcode' : typeof obj.bill_map[ o[0] ].barcode != 'undefined' ? obj.bill_map[ o[0] ].barcode : ''
};
}
),
- 'data' : obj.previous_summary,
+ 'data' : obj.previous_summary
};
obj.error.sdump('D_DEBUG',js2JSON(params));
if (document.getElementById('auto_print').checked) params.no_prompt = true;
try {
var x = document.getElementById('annotate_payment');
if (x && x.checked && (! payment_blob.note)) {
- payment_blob.note = window.prompt('Please annotate this payment:','','Annotate Payment');
+ payment_blob.note = window.prompt($("patronStrings").getString('staff.patron.bills.pay.annotate_payment'),'', $("patronStrings").getString('staff.patron.bills.pay.annotate_payment.title'));
}
obj.previous_summary = {
original_balance : obj.controller.view.bill_total_owed.value,
credit_given : obj.controller.view.bill_credit_amount.value,
new_balance : obj.controller.view.bill_new_balance.value,
payment_type : obj.controller.view.payment_type.getAttribute('label'),
- note : payment_blob.note,
+ note : payment_blob.note
}
var robj = obj.network.request(
api.BILL_PAY.app,
if (typeof robj.ilsevent != 'undefined') {
switch(Number(robj.ilsevent)) {
case 0 /* SUCCESS */ : return true; break;
- case 1226 /* REFUND_EXCEEDS_DESK_PAYMENTS */ : alert(robj.desc + '\n\nAnother way to "zero" this transaction is to use Add Billing and add a misc bill to counter the negative balance.'); return false; break;
+ case 1226 /* REFUND_EXCEEDS_DESK_PAYMENTS */ : alert($("patronStrings").getFormattedString('staff.patron.bills.pay.refund_exceeds_desk_payment', [robj.desc])); return false; break;
default: throw(robj); break;
}
}
} catch(E) {
- obj.error.standard_unexpected_error_alert('Bill payment likely failed',E);
+ obj.error.standard_unexpected_error_alert($("patronStrings").getString('staff.patron.bills.pay.payment_failed'),E);
return false;
}
},
obj.update_payment_applied();
var real_change = util.money.dollars_float_to_cents_integer( tb.value );
if ( proposed_change > real_change ) {
- obj.error.sdump('D_ERROR','Someone wanted more money than they deserved\n');
+ obj.error.sdump('D_ERROR',$("patronStrings").getString('staff.patron.bills.bill_change_amount.greedy'));
proposed_change = real_change;
} else if ( real_change > proposed_change ) {
proposed_credit = real_change - proposed_change;
var id = o.transaction.id();
var hash = {
'title' : typeof obj.bill_map[ id ].title != 'undefined' ? obj.bill_map[ id ].title : '',
- 'barcode' : typeof obj.bill_map[ id ].barcode != 'undefined' ? obj.bill_map[ id ].barcode : '',
+ 'barcode' : typeof obj.bill_map[ id ].barcode != 'undefined' ? obj.bill_map[ id ].barcode : ''
};
for (var i = 0; i < columns.length; i++) {
var v = columns[i].render( { 'mbts' : o.transaction } );
);
break;
default:
- xt_label.setAttribute( 'value', my.mvr ? 'Title' : 'Type' );
+ xt_label.setAttribute( 'value',
+ my.mvr ? $("patronStrings").getString('staff.patron.bills.info_box.label_value.title') : $("patronStrings").getString('staff.patron.bills.info_box.label_value.type') );
xt_value.appendChild( document.createTextNode( my.mvr ? my.mvr.title() : my.mobts.xact_type() ) );
break;
}
var lb_label = document.createElement('label');
last_billing.appendChild( lb_label );
- lb_label.setAttribute( 'value', 'Last Billing:' );
+ lb_label.setAttribute( 'value', $("patronStrings").getString('staff.patron.bills.info_box.label_value.last_billing') );
var lb_value = document.createElement('label');
last_billing.appendChild( lb_value );
);
var btn2 = document.createElement('button');
btn_box.appendChild( btn2 );
- btn2.setAttribute( 'label', 'Add Billing' );
+ btn2.setAttribute( 'label', $("patronStrings").getString('staff.patron.bills.info_box.label_value.add_billing') );
btn2.setAttribute( 'mobts_id', my.mobts.id() );
btn2.addEventListener(
'command',
if (my.mobts.balance_owed() < 0) {
var btn3 = document.createElement('button');
btn_box.appendChild( btn3 );
- btn3.setAttribute( 'label', 'Refund' );
+ btn3.setAttribute( 'label', $("patronStrings").getString('staff.patron.bills.info_box.label_value.refund') );
btn3.setAttribute( 'mobts_id', my.mobts.id() );
btn3.addEventListener(
'command',
var btn4 = document.createElement('button');
btn_box.appendChild( btn4 );
- btn4.setAttribute( 'label', 'Void All Billings' );
+ btn4.setAttribute( 'label', $("patronStrings").getString('staff.patron.bills.info_box.label_value.void_all_billings') );
btn4.setAttribute( 'mobts_id', my.mobts.id() );
btn4.addEventListener(
'command',
mb_list = util.functional.filter_list( mb_list, function(o) { return ! get_bool( o.voided() ) });
- if (mb_list.length == 0) { alert('All billings already voided on this bill.'); return; }
+ if (mb_list.length == 0) { alert($("patronStrings").getString('staff.patron.bills.void_all_billings.all_voided')); return; }
var sum = 0;
for (var i = 0; i < mb_list.length; i++) sum += util.money.dollars_float_to_cents_integer( mb_list[i].amount() );
sum = util.money.cents_as_dollars( sum );
- var msg = 'Are you sure you would like to void $' + sum + ' worth of line-item billings?';
- var r = obj.error.yns_alert(msg,'Voiding Bills','Yes','No',null,'Check here to confirm this message');
+ var msg = $("patronStrings").getFormattedString('staff.patron.bills.void_all_billings.void.message', [sum]);
+ var r = obj.error.yns_alert(msg,
+ $("patronStrings").getString('staff.patron.bills.void_all_billings.void.title'),
+ $("patronStrings").getString('staff.patron.bills.void_all_billings.void.yes'),
+ $("patronStrings").getString('staff.patron.bills.void_all_billings.void.no'), null,
+ $("patronStrings").getString('staff.patron.bills.void_all_billings.void.confirm_message'));
if (r == 0) {
var robj = obj.network.simple_request('FM_MB_VOID',[ses()].concat(util.functional.map_list(mb_list,function(o){return o.id();})));
if (robj.ilsevent) {
switch(Number(robj.ilsevent)) {
default:
- obj.error.standard_unexpected_error_alert('Error voiding bills.',robj);
+ obj.error.standard_unexpected_error_alert($("patronStrings").getString('staff.patron.bills.void_all_billings.error_voiding_bills'),robj);
obj.refresh(); return;
break;
}
obj.data.voided_billings.push( mb_list[i] );
}
obj.data.stash('voided_billings');
- alert('Billings voided.');
+ alert($("patronStrings").getString('staff.patron.bills.void_all_billings.billings_voided'));
obj.refresh();
}
} catch(E) {
<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
<!-- LOCALIZATION -->
<!DOCTYPE window PUBLIC "" ""[
- <!--#include virtual="/opac/locale/en-US/lang.dtd"-->
+ <!--#include virtual="/opac/locale/${locale}/lang.dtd"-->
]>
<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
<script type="text/javascript" src="/xul/server/main/JSAN.js"/>
<script>
<![CDATA[
+ function $(id) { return document.getElementById(id); }
+
function my_init() {
try {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
- if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
+ if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
JSAN.use('util.error'); g.error = new util.error();
document.getElementById('bill_payment_amount').focus();
} catch(E) {
- var err_msg = "!! This software has encountered an error. Please tell your friendly " +
- "system administrator or software developer the following:\n" + E + '\n';
+ var err_msg = $("commonStrings").getFormattedString('common.exception', ['patron/bills.xul', E]);
try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
alert(err_msg);
}
<command id="cmd_print_bills" />
<command id="cmd_alternate_view" />
</commandset>
-
- <messagecatalog id="commonStrings" src="/xul/server/locale/<!--#echo var='locale'-->/common.properties"/>
+
+ <messagecatalog id="commonStrings" src="/xul/server/locale/<!--#echo var='locale'-->/common.properties"/>
+ <messagecatalog id="patronStrings" src="/xul/server/locale/<!--#echo var='locale'-->/patron.properties"/>
<box id="bills_main" />
<?xml version="1.0"?>
<!DOCTYPE overlay PUBLIC "" ""[
- <!--#include virtual="/opac/locale/en-US/lang.dtd"-->
+ <!--#include virtual="/opac/locale/${locale}/lang.dtd"-->
]>
<overlay id="bills_overlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<label style="font-weight: bold;" value="Un-Selected:"/><label id="unselected_balance"/>
<label style="font-weight: bold;" value="Voided:"/><label id="voided_balance"/>
<spacer flex="1"/>
- <label id="circulating_hint" hidden="true" style="background: red; color: white" value="Red Items are still Checked Out"/>
+ <label id="circulating_hint" hidden="true" style="background: red; color: white" value="&staff.patron.bills_overlay.still_checked_out.label;"/>
</hbox>
<listbox id="bill_list" flex="1"/>
<hbox>
- <button command="cmd_uncheck_all" label="Uncheck All"/>
- <button command="cmd_check_all" label="Check All"/>
+ <button command="cmd_uncheck_all" label="&staff.patron.bills_overlay.uncheck_all.label;"/>
+ <button command="cmd_check_all" label="&staff.patron.bills_overlay.check_all.label;"/>
<spacer flex="1"/>
- <button command="cmd_print_bills" label="Print Bills" />
- <button command="cmd_alternate_view" label="Alternate View" accesskey="V"/>
+ <button command="cmd_print_bills" label="&staff.patron.bills_overlay.print_bills.label;"/>
+ <button command="cmd_alternate_view" label="&staff.patron.bills_overlay.alternate_view.label;" accesskey="&staff.patron.bills_overlay.alternate_view.accesskey;"/>
</hbox>
</box>
<vbox id="bills_top_ui">
<hbox>
<groupbox>
- <caption label="Summary"/>
+ <caption label="&staff.patron.bills_overlay.summary.label;"/>
<grid>
<columns><column /><column /></columns>
<rows>
<row>
- <label value="Net Balance" />
+ <label value="&staff.patron.bills_overlay.net_balance.value;"/>
<textbox id="bill_total_owed" value="" readonly="true" />
</row>
<row>
- <label value="- Payment applied" />
+ <label value="&staff.patron.bills_overlay.payment_applied.value;"/>
<textbox id="bill_payment_applied" readonly="true"/>
</row>
<row>
- <label value="= New Balance"
+ <label value="&staff.patron.bills_overlay.new_balance.value;"
style="font-family: bold" />
<textbox id="bill_new_balance" readonly="true"/>
</groupbox>
<spacer flex="2"/>
<groupbox>
- <caption label="Pay Bill"/>
+ <caption label="&staff.patron.bills_overlay.pay_bill.label;"/>
<grid>
<columns><column /><column /></columns>
<rows>
<row>
- <label value="Payment Type"
- accesskey="t" control="payment_type" />
+ <label value="&staff.patron.bills_overlay.payment_type.value;"
+ accesskey="&staff.patron.bills_overlay.payment_type.accesskey;" control="payment_type" />
<menulist id="payment_type">
<menupopup id="payment_type_menupopup">
- <menuitem id="payment_type_menuitem1" label="Cash" value="cash_payment"/>
- <menuitem id="payment_type_menuitem2" label="Check" value="check_payment"/>
- <menuitem id="payment_type_menuitem3" label="Credit Card" value="credit_card_payment"/>
+ <menuitem id="payment_type_menuitem1" label="&staff.patron.bills_overlay.cash.label;" value="cash_payment"/>
+ <menuitem id="payment_type_menuitem2" label="&staff.patron.bills_overlay.check.label;" value="check_payment"/>
+ <menuitem id="payment_type_menuitem3" label="&staff.patron.bills_overlay.credit_card.label;" value="credit_card_payment"/>
<!--
<menuitem id="payment_type_menuitem4" label="Patron Credit" value="credit_payment" />
-->
- <menuitem id="payment_type_menuitem5" label="Work" value="work_payment"/>
- <menuitem id="payment_type_menuitem6" label="Forgive" value="forgive_payment"/>
- <menuitem id="payment_type_menuitem7" label="Goods" value="goods_payment"/>
+ <menuitem id="payment_type_menuitem5" label="&staff.patron.bills_overlay.word.label;" value="work_payment"/>
+ <menuitem id="payment_type_menuitem6" label="&staff.patron.bills_overlay.forgive.label;" value="forgive_payment"/>
+ <menuitem id="payment_type_menuitem7" label="&staff.patron.bills_overlay.goods.label;" value="goods_payment"/>
</menupopup>
</menulist>
</row>
<row>
- <label value="Payment received" style="font-weight: bold"
- accesskey="a" control="bill_payment_amount" />
+ <label value="&staff.patron.bills_overlay.payment_received.value;" style="font-weight: bold"
+ accesskey="&staff.patron.bills_overlay.payment_received.accesskey;" control="bill_payment_amount" />
<textbox id="bill_payment_amount" style="border: solid thick black"/>
</row>
<row>
- <label value="- Payment applied" />
+ <label value="&staff.patron.bills_overlay.payment_applied.value;"/>
<textbox id="bpato" observes="bill_payment_applied" />
</row>
<row>
- <label value="= Change" control="bill_change_amount" style="font-weight: bold" />
+ <label value="&staff.patron.bills_overlay.change.value;" control="bill_change_amount" style="font-weight: bold" />
<hbox>
<textbox id="bill_change_amount" readonly="true"/>
</hbox>
</row>
<row class="hide_patron_credit" hidden="true">
- <label value="or Patron Credit"
+ <label value="&staff.patron.bills_overlay.patron_credit.value;"
style="font-family: bold" />
<textbox id="bill_credit_amount" readonly="true"/>
</groupbox>
</hbox>
<hbox>
- <button id="bill_wizard" label="Bill Patron" accesskey="B" command="cmd_bill_wizard"/>
- <button id="bill_history" label="History" accesskey="H" command="cmd_bill_history"/>
+ <button id="bill_wizard" label="&staff.patron.bills_overlay.bill_patron.label;" accesskey="&staff.patron.bills_overlay.bill_patron.accesskey;" command="cmd_bill_wizard"/>
+ <button id="bill_history" label="&staff.patron.bills_overlay.history.label;" accesskey="&staff.patron.bills_overlay.history.accesskey;" command="cmd_bill_history"/>
<spacer flex="2"/>
- <checkbox id="annotate_payment" label="Annotate Payment" persist="checked" checked="false" />
+ <checkbox id="annotate_payment" label="&staff.patron.bills_overlay.annotate_payment.label;" persist="checked" checked="false" />
<checkbox id="auto_print" label="Auto-Print" persist="checked" checked="true" />
- <button class="hide_patron_credit" hidden="true" disabled="true" id="change_to_credit" label="Convert Change to Patron Credit" command="cmd_change_to_credit"/>
- <button id="bill_apply_payment" label="Apply Payment!" accesskey="P" command="cmd_bill_apply_payment"/>
+ <button class="hide_patron_credit" hidden="true" disabled="true" id="change_to_credit" label="&staff.patron.bills_overlay.convert_change_to_credit.label;" command="cmd_change_to_credit"/>
+ <button id="bill_apply_payment" label="&staff.patron.bills_overlay.apply_payment.label;" accesskey="&staff.patron.bills_overlay.apply_payment.accesskey;" command="cmd_bill_apply_payment"/>
</hbox>
<label value=" "/>
</vbox>
dump('entering patron/display.js\n');
+function $(id) { return document.getElementById(id); }
+
if (typeof patron == 'undefined') patron = {};
patron.display = function (params) {
{
'row' : {
'my' : {
- 'circ_id' : checkout.circ.id(),
+ 'circ_id' : checkout.circ.id()
}
}
}
control_map : {
'cmd_broken' : [
['command'],
- function() { alert('Not Yet Implemented'); }
+ function() { alert($("commonStrings").getString('common.unimplemented')); }
],
'cmd_patron_retrieve' : [
['command'],
obj.bill_window.g.bills.refresh(true);
},
'url_prefix' : xulG.url_prefix,
- 'new_tab' : xulG.new_tab,
+ 'new_tab' : xulG.new_tab
}
);
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
obj.reset_nav_styling('cmd_patron_edit');
function spawn_search(s) {
- obj.error.sdump('D_TRACE', 'Editor would like to search for: ' + js2JSON(s) );
+ obj.error.sdump('D_TRACE', $("commonStrings").getFormattedString('staff.patron.display.cmd_patron_edit.edit_search', [js2JSON(s)]) );
obj.data.stash_retrieve();
var loc = xulG.url_prefix(urls.XUL_PATRON_DISPLAY);
//loc += '?doit=1&query=' + window.escape(js2JSON(s));
{
'url' : url,
'show_print_button' : true ,
- 'tab_name' : 'Editing Related Patron' ,
+ 'tab_name' : $("patronStrings").getString('staff.patron.display.spawn_editor.editing_related_patron'),
'passthru_content_params' : {
'spawn_search' : spawn_search,
'spawn_editor' : spawn_editor,
'url_prefix' : xulG.url_prefix,
'new_tab' : xulG.new_tab,
- 'params' : p,
+ 'params' : p
}
}
);
'params' : {
'ses' : ses(),
'usr' : obj.patron.id(),
- },
+ }
'on_save' : function(p) {
try {
if (obj.barcode) obj.barcode = p.card().barcode();
'spawn_search' : spawn_search,
'spawn_editor' : spawn_editor,
'url_prefix' : xulG.url_prefix,
- 'new_tab' : xulG.new_tab,
+ 'new_tab' : xulG.new_tab
}
}
);
{
'patron_id' : obj.patron.id(),
'url_prefix' : xulG.url_prefix,
- 'new_tab' : xulG.new_tab,
+ 'new_tab' : xulG.new_tab
}
);
}
obj.refresh_all();
},
'url_prefix' : xulG.url_prefix,
- 'new_tab' : xulG.new_tab,
+ 'new_tab' : xulG.new_tab
}
);
}
function(e) {
return function() {}
}
- ],
+ ]
}
}
);
obj.controller.view.cmd_patron_bills.setAttribute('disabled','true');
obj.controller.view.cmd_patron_edit.setAttribute('disabled','true');
obj.controller.view.cmd_patron_info.setAttribute('disabled','true');
- obj.controller.view.patron_name.setAttribute('value','Retrieving...');
+ obj.controller.view.patron_name.setAttribute('value', $("patronStrings").getString('staff.patron.display.init.retrieving'));
document.documentElement.setAttribute('class','');
var frame = obj.left_deck.set_iframe(
urls.XUL_PATRON_SUMMARY,
function(req) {
try {
var msg = ''; obj.stop_checkouts = false;
- if (patron.alert_message()) msg += 'Alert message: "' + patron.alert_message() + '"<br/><br/>\n';
+ if (patron.alert_message())
+ msg += $("patronStrings").getFormattedString('staff.patron.display.init.network_request.alert_message', [patron.alert_message()]);
//alert('obj.barcode = ' + obj.barcode);
if (obj.barcode) {
if (patron.cards()) for (var i = 0; i < patron.cards().length; i++) {
//alert('card #'+i+' == ' + js2JSON(patron.cards()[i]));
if ( (patron.cards()[i].barcode()==obj.barcode) && ( ! get_bool(patron.cards()[i].active()) ) ) {
- msg += 'Patron account retrieved with an INACTIVE card.<br/><br/>\n';
+ msg += $("patronStrings").getString('staff.patron.display.init.network_request.inactive_card');
obj.stop_checkouts = true;
}
}
}
if (get_bool(patron.barred())) {
- msg += 'Patron account is BARRED.<br/><br/>\n';
+ msg += $("patronStrings").getString('staff.patron.display.init.network_request.account_barred');
obj.stop_checkouts = true;
}
if (!get_bool(patron.active())) {
- msg += 'Patron account is INACTIVE.<br/><br/>\n';
+ msg += $("patronStrings").getString('staff.patron.display.init.network_request.account_inactive');
obj.stop_checkouts = true;
}
if (patron.expire_date()) {
expire = expire.getTime()/1000
if (expire < now) {
- msg += 'Patron account is EXPIRED.<br/><br/>\n';
+ msg += $("patronStrings").getString('staff.patron.display.init.network_request.account_expired');
obj.stop_checkouts = true;
}
}
if (msg != obj.old_msg) {
//obj.error.yns_alert(msg,'Alert Message','OK',null,null,'Check here to confirm this message.');
document.documentElement.firstChild.focus();
- var data_url = window.escape("<img src='" + xulG.url_prefix('/xul/server/skin/media/images/stop_sign.png') + "'/>" + '<h1>Alert</h1><blockquote><p>' + msg + '</p>\r\n\r\n<pre>Press a navigation button above (e.g. Check Out) to clear this alert.</pre></blockquote>');
+ var data_url = window.escape("<img src='" + xulG.url_prefix('/xul/server/skin/media/images/stop_sign.png') + "'/>" + '<h1>'
+ + $("patronStrings").getString('staff.patron.display.init.network_request.window_title') + '</h1><blockquote><p>' + msg + '</p>\r\n\r\n<pre>'
+ + $("patronStrings").getString('staff.patron.display.init.network_request.window_message') + '</pre></blockquote>');
obj.right_deck.set_iframe('data:text/html,'+data_url,{},{});
obj.old_msg = msg;
} else {
- obj.error.sdump('D_TRACE','Not re-displaying this alert message: ' + msg);
+ obj.error.sdump('D_TRACE',$("patronStrings").getFormattedString('staff.patron.display.init.network_request.dump_error_message', [msg]));
}
}
if (obj.stop_checkouts && obj.checkout_window) {
}, 1000);
}
} catch(E) {
- obj.error.standard_unexpected_error_alert('Error showing patron alert and holds availability.',E);
+ obj.error.standard_unexpected_error_alert($("patronStrings").getString('staff.patron.display.init.network_request.error_showing_alert'),E);
}
}
);
obj.controller.view.cmd_patron_retrieve.setAttribute('disabled','false');
obj.controller.view.cmd_search_form.setAttribute('disabled','false');
obj.retrieve_ids = list;
- obj.controller.view.patron_name.setAttribute('value','Retrieving...');
+ obj.controller.view.patron_name.setAttribute('value',$("patronStrings").getString('staff.patron.display.init.retrieving'));
document.documentElement.setAttribute('class','');
setTimeout(
function() {
'refresh_all' : function() {
var obj = this;
- obj.controller.view.patron_name.setAttribute(
- 'value','Retrieving...'
- );
+ obj.controller.view.patron_name.setAttribute('value', $("patronStrings").getString('staff.patron.display.init.retrieving'));
document.documentElement.setAttribute('class','');
try { obj.summary_window.refresh(); } catch(E) { obj.error.sdump('D_ERROR', E + '\n'); }
try { obj.refresh_deck(); } catch(E) { obj.error.sdump('D_ERROR', E + '\n'); }
<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
<!-- LOCALIZATION -->
<!DOCTYPE window PUBLIC "" ""[
- <!--#include virtual="/opac/locale/en-US/lang.dtd"-->
+ <!--#include virtual="/opac/locale/${locale}/lang.dtd"-->
]>
<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
<script type="text/javascript" src="/xul/server/main/JSAN.js"/>
<script>
<![CDATA[
+ function $(id) { return document.getElementById(id); }
+
function my_init() {
try {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
- if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
+ if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
JSAN.use('util.error'); g.error = new util.error();
//document.documentElement.style.setProperty('font-size-adjust','1','important');
} catch(E) {
- var err_msg = "!! This software has encountered an error. Please tell your friendly " +
- "system administrator or software developer the following:\n"
- + 'patron/display.xul\n' + E + '\n';
+ var err_msg = $("commonStrings").getFormattedString('common.exception', ['patron/display.xul', E]);
try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
alert(err_msg);
}
]]>
</script>
+ <messagecatalog id="patronStrings" src="/xul/server/locale/<!--#echo var='locale'-->/patron.properties"/>
+ <messagecatalog id="commonStrings" src="/xul/server/locale/<!--#echo var='locale'-->/common.properties" />
+
<commandset id="patron_display_cmds">
<command id="cmd_patron_refresh" />
<command id="cmd_patron_checkout" />
<?xml version="1.0"?>
<!DOCTYPE overlay PUBLIC "" ""[
- <!--#include virtual="/opac/locale/en-US/lang.dtd"-->
+ <!--#include virtual="/opac/locale/${locale}/lang.dtd"-->
]>
<overlay id="patron_display_overlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<vbox id="pdm2" flex="1">
<hbox id="pdm2hb1">
<hbox>
- <label id="patron_name" class="patronNameLarge" tooltiptext="&staff.patron_display.name.label;" value="No Patron Selected" flex="1"/>
+ <label id="patron_name" class="patronNameLarge" tooltiptext="&staff.patron_display.name.label;" value="&staff.patron.display_overlay.none_selected.value;" flex="1"/>
</hbox>
<deck id="PatronNavBar" flex="1" class="my_overflow" />
</hbox>
<hbox id="pdm2hb1a">
- <label class="hideme barred_indicator" value="(Barred)"/>
- <label class="hideme expired_indicator" value="(Expired)"/>
- <label class="hideme inactive_indicator" value="(In-Active)"/>
- <label class="hideme juvenile_indicator" value="(Juvenile)"/>
- <label class="hideme alert_indicator" value="(Alert)"/>
- <label class="hideme note_indicator" value="(See Notes)"/>
- <label class="hideme max_bills_indicator" value="(Max Bills)"/>
- <label class="hideme max_overdues_indicator" value="(Max Overdues)"/>
- <label class="hideme bills_indicator" value="(Has Bills)"/>
- <label class="hideme overdues_indicator" value="(Has Overdues)"/>
- <label class="hideme invalid_dob_indicator" value="(Invalid DOB)"/>
- <label class="hideme invalid_address_indicator" value="(Invalid Address)"/>
+ <label class="hideme barred_indicator" value="&staff.patron.display_overlay.barred.value;"/>
+ <label class="hideme expired_indicator" value="&staff.patron.display_overlay.expired.value;"/>
+ <label class="hideme inactive_indicator" value="&staff.patron.display_overlay.inactive.value;"/>
+ <label class="hideme juvenile_indicator" value="&staff.patron.display_overlay.juvenile.value;"/>
+ <label class="hideme alert_indicator" value="&staff.patron.display_overlay.alert.value;"/>
+ <label class="hideme note_indicator" value="&staff.patron.display_overlay.see_notes.value;"/>
+ <label class="hideme max_bills_indicator" value="&staff.patron.display_overlay.max_bills.value;"/>
+ <label class="hideme max_overdues_indicator" value="&staff.patron.display_overlay.max_overdues.value;"/>
+ <label class="hideme bills_indicator" value="&staff.patron.display_overlay.has_bills.value;"/>
+ <label class="hideme overdues_indicator" value="&staff.patron.display_overlay.has_overdues.value;"/>
+ <label class="hideme invalid_dob_indicator" value="&staff.patron.display_overlay.invalid_dob.value;"/>
+ <label class="hideme invalid_address_indicator" value="&staff.patron.display_overlay.invalid_address.value;"/>
</hbox>
<hbox id="PatronNotNavBar" flex="1" class="my_bg">
<vbox id="pdm3" flex="1" persist="width">
<button id="PatronNavBar_info" command="cmd_patron_info" class="nav"
label="&staff.patron_navbar.info;" accesskey="&staff.patron_navbar.info.accesskey;"/>
<button id="PatronNavBar_exit" command="cmd_patron_exit" class="nav"
- label="Exit" accesskey="x"/>
+ label="&staff.patron.display_overlay.exit.label;" accesskey="&staff.patron.display_overlay.exit.accesskey;"/>
</hbox>
<hbox id="PatronNavBar0">
<spacer flex="1"/>
- <button id="pnb1b0" label="Search Form" accesskey="F" command="cmd_search_form"/>
- <button id="pnb1b1" label="Retrieve Patron" accesskey="R" command="cmd_patron_retrieve"/>
+ <button id="pnb1b0" label="&staff.patron.display_overlay.search_form.label;" accesskey="&staff.patron.display_overlay.search_form.accesskey;" command="cmd_search_form"/>
+ <button id="pnb1b1" label="&staff.patron.display_overlay.retrieve_patron.label;" accesskey="&staff.patron.display_overlay.retrieve_patron.accesskey;" command="cmd_patron_retrieve"/>
</hbox>
</overlay>
<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
<!-- LOCALIZATION -->
<!DOCTYPE window PUBLIC "" ""[
- <!--#include virtual="/opac/locale/en-US/lang.dtd"-->
+ <!--#include virtual="/opac/locale/${locale}/lang.dtd"-->
]>
<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
function my_init() {
try {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
- if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
+ if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
/* template */
var node = $('notification_template').cloneNode(true); np.appendChild(node); node.hidden = false;
util.widgets.apply(node,'name','notify_time',
- function(n){n.setAttribute("tooltiptext","ID: " + g.notifications[i].id() + " Hold ID: " + g.notifications[i].hold() + " Notifying Staff ID: " + g.notifications[i].notify_staff());}
+ function(n){n.setAttribute("tooltiptext", $("patronStrings").getFormattedString('staff.patron.hold_notices.tooltiptext',[g.notifications[i].id(), g.notifications[i].hold(), g.notifications[i].notify_staff()]));
);
apply(node,'method',g.notifications[i].method ? g.notifications[i].method() : '');
apply(node,'note',g.notifications[i].note() ? g.notifications[i].note() : '');
try {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect UniversalBrowserWrite");
var xml = '<groupbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" flex="1">';
- xml += '<caption label="New Notification Record"/><grid flex="1"><columns><column/><column flex="1"/></columns><rows>';
- xml += '<row><label value="Method"/><textbox id="method" name="fancy_data"/></row>';
- xml += '<row><label value="Note"/><textbox multiline="true" id="note" name="fancy_data"/></row>';
- xml += '<row><spacer/><hbox><button label="Cancel" name="fancy_cancel" accesskey="C"/>';
- xml += '<button label="Add Notification Record" accesskey="A" name="fancy_submit"/></hbox></row></rows></grid></groupbox>';
+ xml += '<caption label="' + $("patronStrings").getString('staff.patron.hold_notices.new_notification_record') + '"/><grid flex="1"><columns><column/><column flex="1"/></columns><rows>';
+ xml += '<row><label value="' + $("patronStrings").getString('staff.patron.hold_notices.method') + '"/><textbox id="method" name="fancy_data"/></row>';
+ xml += '<row><label value="' + $("patronStrings").getString('staff.patron.hold_notices.note') + '"/><textbox multiline="true" id="note" name="fancy_data"/></row>';
+ xml += '<row><spacer/><hbox><button label="' + $("patronStrings").getString('staff.patron.hold_notices.cancel') + '" name="fancy_cancel"';
+ xml += 'accesskey="' + $("patronStrings").getString('staff.patron.hold_notices.cancel_accesskey') + '"/>';
+ xml += '<button label="' + $("patronStrings").getString('staff.patron.hold_notices.add_notif_record') + '";'
+ xml += 'accesskey="' + $("patronStrings").getString('staff.patron.hold_notices.add_notif_record_accesskey') + '" name="fancy_submit"/></hbox></row></rows></grid></groupbox>';
//g.data.init({'via':'stash'});
//g.data.temp_notification_xml = xml; g.data.stash('temp_notification_xml');
JSAN.use('util.window'); var win = new util.window();
//+ '&focus=' + window.escape('method')
//+ '&title=' + window.escape('Add Notification Record'),
'fancy_prompt', 'chrome,resizable,modal,width=700,height=500',
- { 'xml' : xml, 'focus' : 'method', 'title' : 'Add Notification Record' }
+ { 'xml' : xml, 'focus' : 'method', 'title' : $("patronStrings").getString('staff.patron.hold_notices.add_notif_record') }
);
if (fancy_prompt_data.fancy_status == 'complete') {
var notification = new ahn();
setTimeout(function(){refresh();},0);
}
} catch(E) {
- g.error.standard_unexpected_error_alert('The notification was not likely created.',E);
+ g.error.standard_unexpected_error_alert($("patronStrings").getString('staff.patron.hold_notices.new_notification.not_created'),E);
setTimeout(function(){refresh();},0);
}
}
]]>
</script>
- <messagecatalog id="circStrings" src="/xul/server/locale/<!--#echo var='locale' -->/circ.properties"/>
+ <messagecatalog id="circStrings" src="/xul/server/locale/<!--#echo var='locale' -->/circ.properties"/>
+ <messagecatalog id="patronStrings" src="/xul/server/locale/<!--#echo var='locale'-->/patron.properties"/>
+ <messagecatalog id="commonStrings" src="/xul/server/locale/<!--#echo var='locale'-->/common.properties" />
<stack hidden="true" id="notification_template" flex="1">
<groupbox flex="1" style="background-color: black;"/>
<tree id="holds_list" flex="1" enableColumnDrag="true" style=""/>
</vbox>
<hbox>
- <button label="Add Record of Notification" accesskey="A" oncommand="new_notification()"/>
+ <button label="&staff.patron.hold_notices.add_record_notification.label;" accesskey="&staff.patron.hold_notices.add_record_notification.accesskey;" oncommand="new_notification()"/>
<spacer flex="1"/>
- <button label="Close" accesskey="C" oncommand="window.close()"/>
+ <button label="&staff.patron.hold_notices.close_window.label;" accesskey="&staff.patron.hold_notices.close_window.accesskey;" oncommand="window.close()"/>
</hbox>
</vbox>
dump('entering patron.holds.js\n');
+function $(id) { return document.getElementById(id); }
+
if (typeof patron == 'undefined') patron = {};
patron.holds = function (params) {
'current_copy' : { 'hidden' : false },
'capture_time' : { 'hidden' : false },
'notify_time' : { 'hidden' : false },
- 'notify_count' : { 'hidden' : false },
+ 'notify_count' : { 'hidden' : false }
}
);
'id':row.my.ahr.id(),
'type':row.my.ahr.hold_type(),
'target':row.my.ahr.target(),
- 'usr':row.my.ahr.usr(),
+ 'usr':row.my.ahr.usr()
})
);
if (typeof params.on_retrieve == 'function') { params.on_retrieve(row); }
} catch(E) {
- obj.error.standard_unexpected_error_alert('Error retrieving details for hold #' + row.my.hold_id, E);
+ obj.error.standard_unexpected_error_alert($("patronStrings").getFormattedString('staff.patron.holds.init.hold_num_error', [row.my.hold_id]), E);
}
}
);
obj.controller.view.cmd_holds_cancel.setAttribute('disabled','true');
obj.controller.view.cmd_show_catalog.setAttribute('disabled','true');
}
- },
-
+ }
}
);
],
'cmd_broken' : [
['command'],
- function() { alert('Not Yet Implemented'); }
+ function() { alert($("commonStrings").getString('common.unimplemented')); }
],
'sel_patron' : [
['command'],
);
}
} catch(E) {
- obj.error.standard_unexpected_error_alert('Error rendering/retrieving hold notifications.',E);
+ obj.error.standard_unexpected_error_alert($("patronStrings").getString('staff.patron.holds.show_notifications.error_rendering_notifs'),E);
}
}
],
ml.setAttribute('id','selection');
ml.setAttribute('name','fancy_data');
var xml = '<vbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" flex="1" style="overflow: vertical">';
- xml += '<description>Please choose a Hold Range:</description>';
+ xml += '<description>' + $("patronStrings").getString('staff.patron.holds.holds_edit_selection_depth.choose_hold_range') + '</description>';
xml += util.widgets.serialize_node(ml);
xml += '</vbox>';
var bot_xml = '<hbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" flex="1" style="overflow: vertical">';
- bot_xml += '<spacer flex="1"/><button label="Done" accesskey="D" name="fancy_submit"/>';
- bot_xml += '<button label="Cancel" accesskey="C" name="fancy_cancel"/></hbox>';
+ bot_xml += '<spacer flex="1"/><button label="'+ $("patronStrings").getString('staff.patron.holds.holds_edit_selection_depth.done.label') +'"';
+ bot_xml += 'accesskey="'+ $("patronStrings").getString('staff.patron.holds.holds_edit_selection_depth.done.accesskey') +'" name="fancy_submit"/>';
+ bot_xml += '<button label="'+ $("patronStrings").getString('staff.patron.holds.holds_edit_selection_depth.cancel.label') +'"';
+ bot_xml += 'accesskey="'+ $("patronStrings").getString('staff.patron.holds.holds_edit_selection_depth.cancel.accesskey') +'" name="fancy_cancel"/></hbox>';
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserWrite');
//obj.data.temp_mid = xml; obj.data.stash('temp_mid');
//obj.data.temp_bot = bot_xml; obj.data.stash('temp_bot');
//+ '&bottom_xml_in_stash=temp_bot'
//+ '&title=' + window.escape('Choose a Pick Up Library'),
'fancy_prompt', 'chrome,resizable,modal',
- { 'xml' : xml, 'bottom_xml' : bot_xml, 'title' : 'Choose a Pick Up Library' }
+ { 'xml' : xml, 'bottom_xml' : bot_xml, 'title' : $("patronStrings").getString('staff.patron.holds.holds_edit_selection_depth.choose_library') }
);
if (fancy_prompt_data.fancy_status == 'incomplete') { return; }
var selection = fancy_prompt_data.selection;
- var msg = 'Are you sure you would like to change the Hold Range for hold' + ( obj.retrieve_ids.length > 1 ? 's ' : ' ') + util.functional.map_list( obj.retrieve_ids, function(o){return o.id;}).join(', ') + ' to "' + obj.data.hash.aout[selection].opac_label() + '"?';
- var r = obj.error.yns_alert(msg,'Modifying Holds','Yes','No',null,'Check here to confirm this message');
+
+ var hold_list = util.functional.map_list(obj.retrieve_ids, function(o){return o.id;}).join(', ');
+ var msg = '';
+ if(obj.retrieve_ids.length > 1) {
+ msg = $("patronStrings").getformattedString('staff.patron.holds.holds_edit_selection_depth.modify_holds_message.plural', [hold_list, obj.data.hash.aout[selection].opac_label()])
+ } else {
+ msg = $("patronStrings").getformattedString('staff.patron.holds.holds_edit_selection_depth.modify_holds_message.singular', [hold_list, obj.data.hash.aout[selection].opac_label()])
+ }
+
+ var r = obj.error.yns_alert(msg,
+ $("patronStrings").getString('staff.patron.holds.holds_edit_selection_depth.modify_holds_title'),
+ $("commonStrings").getString('common.yes'),
+ $("commonStrings").getString('common.no'),
+ null,
+ $("commonStrings").getString('common.check_to_confirm')
+ );
if (r == 0) {
for (var i = 0; i < obj.retrieve_ids.length; i++) {
var hold = obj.holds_map[ obj.retrieve_ids[i].id ];
obj.clear_and_retrieve(true);
}
} catch(E) {
- obj.error.standard_unexpected_error_alert('Holds not likely modified.',E);
+ obj.error.standard_unexpected_error_alert($("patronStrings").getString('staff.patron.holds.holds_not_modified'),E);
}
}
],
ml.setAttribute('id','lib');
ml.setAttribute('name','fancy_data');
var xml = '<vbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" flex="1" style="overflow: vertical">';
- xml += '<description>Please choose a new Pickup Library:</description>';
+ xml += '<description>'+$("patronStrings").getString('staff.patron.holds.holds_edit_pickup_lib.new_pickup_lib.description')+'</description>';
xml += util.widgets.serialize_node(ml);
xml += '</vbox>';
var bot_xml = '<hbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" flex="1" style="overflow: vertical">';
- bot_xml += '<spacer flex="1"/><button label="Done" accesskey="D" name="fancy_submit"/>';
- bot_xml += '<button label="Cancel" accesskey="C" name="fancy_cancel"/></hbox>';
+ bot_xml += '<spacer flex="1"/><button label="'+ $("patronStrings").getString('staff.patron.holds.holds_edit_pickup_lib.done.label') +'"';
+ bot_xml += ' accesskey="'+$("patronStrings").getString('staff.patron.holds.holds_edit_pickup_lib.done.accesskey')+'" name="fancy_submit"/>';
+ bot_xml += '<button label="'+$("patronStrings").getString('staff.patron.holds.holds_edit_pickup_lib.cancel.label')+'"';
+ bot_xml += ' accesskey="'+$("patronStrings").getString('staff.patron.holds.holds_edit_pickup_lib.cancel.accesskey')+'" name="fancy_cancel"/></hbox>';
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserWrite');
//obj.data.temp_mid = xml; obj.data.stash('temp_mid');
//obj.data.temp_bot = bot_xml; obj.data.stash('temp_bot');
//+ '&bottom_xml_in_stash=temp_bot'
//+ '&title=' + window.escape('Choose a Pick Up Library'),
'fancy_prompt', 'chrome,resizable,modal',
- { 'xml' : xml, 'bottom_xml' : bot_xml, 'title' : 'Choose a Pick Up Library' }
+ { 'xml' : xml, 'bottom_xml' : bot_xml, 'title' : $("patronStrings").getString('staff.patron.holds.holds_edit_pickup_lib.choose_lib') }
);
if (fancy_prompt_data.fancy_status == 'incomplete') { return; }
var pickup_lib = fancy_prompt_data.lib;
- var msg = 'Are you sure you would like to change the Pick Up Lib for hold' + ( obj.retrieve_ids.length > 1 ? 's ' : ' ') + util.functional.map_list( obj.retrieve_ids, function(o){return o.id;}).join(', ') + ' to ' + obj.data.hash.aou[pickup_lib].shortname() + '?';
- var r = obj.error.yns_alert(msg,'Modifying Holds','Yes','No',null,'Check here to confirm this message');
+
+ var hold_list = util.functional.map_list(obj.retrieve_ids, function(o){return o.id;}).join(', ');
+ var msg = '';
+ if(obj.retrieve_ids.length > 1) {
+ msg = $("patronStrings").getFormattedString('staff.patron.holds.holds_edit_pickup_lib.change_pickup_lib_message.plural',[hold_list, obj.data.hash.aou[pickup_lib].shortname()]);
+ } else {
+ msg = $("patronStrings").getFormattedString('staff.patron.holds.holds_edit_pickup_lib.change_pickup_lib_message.singular',[hold_list, obj.data.hash.aou[pickup_lib].shortname()]);
+ }
+ var r = obj.error.yns_alert(msg,
+ $("patronStrings").getString('staff.patron.holds.holds_edit_pickup_lib.change_pickup_lib_title'),
+ $("commonStrings").getString('common.yes'),
+ $("commonStrings").getString('common.no'),
+ null,
+ $("commonStrings").getString('common.check_to_confirm')
+ );
if (r == 0) {
for (var i = 0; i < obj.retrieve_ids.length; i++) {
var hold = obj.holds_map[ obj.retrieve_ids[i].id ];
obj.clear_and_retrieve(true);
}
} catch(E) {
- obj.error.standard_unexpected_error_alert('Holds not likely modified.',E);
+ obj.error.standard_unexpected_error_alert($("patronStrings").getString('staff.patron.holds.holds_not_modified'),E);
}
}
],
function() {
try {
var xml = '<vbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" flex="1" style="overflow: vertical">';
- xml += '<description>Please enter a new phone number for hold notification (leave the field empty to disable phone notification):</description>';
+ xml += '<description>'+$("patronStrings").getString('staff.patron.holds.holds_edit_phone_notify.new_phone_number')+'</description>';
xml += '<textbox id="phone" name="fancy_data"/>';
xml += '</vbox>';
var bot_xml = '<hbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" flex="1" style="overflow: vertical">';
- bot_xml += '<spacer flex="1"/><button label="Done" accesskey="D" name="fancy_submit"/>';
- bot_xml += '<button label="Cancel" accesskey="C" name="fancy_cancel"/></hbox>';
+ bot_xml += '<spacer flex="1"/><button label="'+$("patronStrings").getString('staff.patron.holds.holds_edit_phone_notify.btn_done.label')+'"';
+ bot_xml += ' accesskey="'+$("patronStrings").getString('staff.patron.holds.holds_edit_phone_notify.btn_done.accesskey')+'" name="fancy_submit"/>';
+ bot_xml += '<button label="'+$("patronStrings").getString('staff.patron.holds.holds_edit_phone_notify.btn_cancel.label')+'"';
+ bot_xml += ' accesskey="'+$("patronStrings").getString('staff.patron.holds.holds_edit_phone_notify.btn_cancel.accesskey')+'" name="fancy_cancel"/></hbox>';
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserWrite');
//obj.data.temp_mid = xml; obj.data.stash('temp_mid');
//obj.data.temp_bot = bot_xml; obj.data.stash('temp_bot');
//+ '&title=' + window.escape('Choose a Hold Notification Phone Number')
//+ '&focus=phone',
'fancy_prompt', 'chrome,resizable,modal',
- { 'xml' : xml, 'bottom_xml' : bot_xml, 'title' : 'Choose a Hold Notification Phone Number', 'focus' : 'phone' }
+ { 'xml' : xml, 'bottom_xml' : bot_xml, 'title' : $("patronStrings").getString('staff.patron.holds.holds_edit_phone_notify.choose_phone_number'), 'focus' : 'phone' }
);
if (fancy_prompt_data.fancy_status == 'incomplete') { return; }
var phone = fancy_prompt_data.phone;
- var msg = 'Are you sure you would like to change the Notification Phone Number for hold' + ( obj.retrieve_ids.length > 1 ? 's ' : ' ') + util.functional.map_list( obj.retrieve_ids, function(o){return o.id;}).join(', ') + ' to "' + phone + '"?';
- var r = obj.error.yns_alert(msg,'Modifying Holds','Yes','No',null,'Check here to confirm this message');
+
+ var hold_list = util.functional.map_list(obj.retrieve_ids, function(o){return o.id;}).join(', ');
+ var msg = '';
+ if(obj.retrieve_ids.length > 1) {
+ msg = $("patronStrings").getFormattedString('staff.patron.holds.holds_edit_phone_notify.confirm_phone_number_change.plural',[hold_list, phone]);
+ } else {
+ msg = $("patronStrings").getFormattedString('staff.patron.holds.holds_edit_phone_notify.confirm_phone_number_change.singular',[hold_list, phone]);
+ }
+ var r = obj.error.yns_alert(msg,
+ $("patronStrings").getString('staff.patron.holds.holds_edit_phone_notify.modifying_holds_title'),
+ $("commonStrings").getString('common.yes'),
+ $("commonStrings").getString('common.no'),
+ null,
+ $("commonStrings").getString('common.check_to_confirm')
+ );
if (r == 0) {
for (var i = 0; i < obj.retrieve_ids.length; i++) {
var hold = obj.holds_map[ obj.retrieve_ids[i].id ];
obj.clear_and_retrieve(true);
}
} catch(E) {
- obj.error.standard_unexpected_error_alert('Holds not likely modified.',E);
+ obj.error.standard_unexpected_error_alert($("patronStrings").getString('staff.patron.holds.holds_not_modified'),E);
}
}
],
function() {
try {
var xml = '<vbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" flex="1" style="overflow: vertical">';
- xml += '<description>Send email notifications (when appropriate)? The email address used is found in the hold recipient account.</description>';
- xml += '<hbox><button value="email" label="Email" accesskey="E" name="fancy_submit"/>';
- xml += '<button value="noemail" label="No Email" accesskey="N" name="fancy_submit"/></hbox>';
+ xml += '<description>'+$("patronStrings").getString('staff.patron.holds.holds_edit_email_notify.description')+'</description>';
+ xml += '<hbox><button value="email" label="'+$("patronStrings").getString('staff.patron.holds.holds_edit_email_notify.btn_email.label')+'"';
+ xml += ' accesskey="'+$("patronStrings").getString('staff.patron.holds.holds_edit_email_notify.btn_email.accesskey')+'" name="fancy_submit"/>';
+ xml += '<button value="noemail" label="'+$("patronStrings").getString('staff.patron.holds.holds_edit_email_notify.btn_no_email.label')+'"';
+ xml += ' accesskey="'+$("patronStrings").getString('staff.patron.holds.holds_edit_email_notify.btn_no_email.accesskey')+'" name="fancy_submit"/></hbox>';
xml += '</vbox>';
var bot_xml = '<hbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" flex="1" style="overflow: vertical">';
- bot_xml += '<spacer flex="1"/><button label="Cancel" accesskey="C" name="fancy_cancel"/></hbox>';
+ bot_xml += '<spacer flex="1"/><button label="'+$("patronStrings").getString('staff.patron.holds.holds_edit_email_notify.btn_cancel.label')+'"';
+ bot_xml += ' accesskey="'+$("patronStrings").getString('staff.patron.holds.holds_edit_email_notify.btn_cancel.accesskey')+'" name="fancy_cancel"/></hbox>';
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserWrite');
//obj.data.temp_mid = xml; obj.data.stash('temp_mid');
//obj.data.temp_bot = bot_xml; obj.data.stash('temp_bot');
//+ '&bottom_xml_in_stash=temp_bot'
//+ '&title=' + window.escape('Set Email Notification for Holds'),
'fancy_prompt', 'chrome,resizable,modal',
- { 'xml' : xml, 'bottom_xml' : bot_xml, 'title' : 'Set Email Notification for Holds' }
+ { 'xml' : xml, 'bottom_xml' : bot_xml, 'title' : $("patronStrings").getString('staff.patron.holds.holds_edit_email_notify.set_notifs') }
);
if (fancy_prompt_data.fancy_status == 'incomplete') { return; }
var email = fancy_prompt_data.fancy_submit == 'email' ? get_db_true() : get_db_false();
- var msg = 'Are you sure you would like ' + ( get_bool( email ) ? 'enable' : 'disable' ) + ' email notification for hold' + ( obj.retrieve_ids.length > 1 ? 's ' : ' ') + util.functional.map_list( obj.retrieve_ids, function(o){return o.id;}).join(', ') + '?';
- var r = obj.error.yns_alert(msg,'Modifying Holds','Yes','No',null,'Check here to confirm this message');
+
+ var hold_list = util.functional.map_list( obj.retrieve_ids, function(o){return o.id;}).join(', ');
+ var msg = '';
+ if(get_bool(email)) {
+ if(obj.retrieve_ids.length > 1) {
+ msg = $("patronStrings").getFormattedString('staff.patron.holds.holds_edit_email_notify.enable_email.plural', [hold_list]);
+ } else {
+ msg = $("patronStrings").getFormattedString('staff.patron.holds.holds_edit_email_notify.enable_email.singular', [hold_list]);
+ }
+ } else {
+ if(obj.retrieve_ids.length > 1) {
+ msg = $("patronStrings").getFormattedString('staff.patron.holds.holds_edit_email_notify.disable_email.plural', [hold_list]);
+ } else {
+ msg = $("patronStrings").getFormattedString('staff.patron.holds.holds_edit_email_notify.disable_email.singular', [hold_list]);
+ }
+ }
+
+ var r = obj.error.yns_alert(msg,
+ $("patronStrings").getString('staff.patron.holds.holds_edit_email_notify.mod_holds_title'),
+ $("commonStrings").getString('common.yes'),
+ $("commonStrings").getString('common.no'),
+ null,
+ $("commonStrings").getString('common.check_to_confirm')
+ );
if (r == 0) {
for (var i = 0; i < obj.retrieve_ids.length; i++) {
var hold = obj.holds_map[ obj.retrieve_ids[i].id ];
obj.clear_and_retrieve(true);
}
} catch(E) {
- obj.error.standard_unexpected_error_alert('Holds not likely modified.',E);
+ obj.error.standard_unexpected_error_alert($("patronStrings").getString('staff.patron.holds.holds_not_modified'),E);
}
}
],
function() {
try {
JSAN.use('util.functional');
- var msg = 'Are you sure you would like to reset hold' + ( obj.retrieve_ids.length > 1 ? 's ' : ' ') + util.functional.map_list( obj.retrieve_ids, function(o){return o.id;}).join(', ') + '?';
- var r = obj.error.yns_alert(msg,'Resetting Holds','Yes','No',null,'Check here to confirm this message');
+
+ var hold_list = util.functional.map_list( obj.retrieve_ids, function(o){return o.id;}).join(', ');
+ var msg = '';
+ if(obj.retrieve_ids.length > 1) {
+ msg = $("patronStrings").getFormattedString('staff.patron.holds.holds_retarget.reset_hold_message.plural',[hold_list]);
+ } else {
+ msg = $("patronStrings").getFormattedString('staff.patron.holds.holds_retarget.reset_hold_message.singular',[hold_list]);
+ }
+ var r = obj.error.yns_alert(msg,
+ $("patronStrings").getString('staff.patron.holds.holds_retarget.reset_hold_title'),
+ $("commonStrings").getString('common.yes'),
+ $("commonStrings").getString('common.no'),
+ null,
+ $("commonStrings").getString('common.check_to_confirm')
+ );
if (r == 0) {
for (var i = 0; i < obj.retrieve_ids.length; i++) {
var robj = obj.network.simple_request('FM_AHR_RESET',[ ses(), obj.retrieve_ids[i].id]);
obj.clear_and_retrieve();
}
} catch(E) {
- obj.error.standard_unexpected_error_alert('Holds not likely reset.',E);
+ obj.error.standard_unexpected_error_alert($("patronStrings").getString('staff.patron.holds.holds_retarget.holds_not_reset'),E);
}
}
function() {
try {
JSAN.use('util.functional');
- var msg = 'Are you sure you would like to cancel hold' + ( obj.retrieve_ids.length > 1 ? 's ' : ' ') + util.functional.map_list( obj.retrieve_ids, function(o){return o.id;}).join(', ') + '?';
- var r = obj.error.yns_alert(msg,'Cancelling Holds','Yes','No',null,'Check here to confirm this message');
+
+ var hold_list = util.functional.map_list( obj.retrieve_ids, function(o){return o.id;}).join(', ');
+ var msg = '';
+ if(obj.retrieve_ids.length > 1 ) {
+ msg = $("patronStrings").getFormattedString('staff.patron.holds.holds_cancel.cancel_hold_message.plural', [hold_list]);
+ } else {
+ msg = $("patronStrings").getFormattedString('staff.patron.holds.holds_cancel.cancel_hold_message.singular', [hold_list]);
+ }
+ var r = obj.error.yns_alert(msg,
+ $("patronStrings").getString('staff.patron.holds.holds_cancel.cancel_hold_title'),
+ $("commonStrings").getString('common.yes'),
+ $("commonStrings").getString('common.no'),
+ null,
+ $("commonStrings").getString('common.check_to_confirm')
+ );
if (r == 0) {
var transits = [];
for (var i = 0; i < obj.retrieve_ids.length; i++) {
if (typeof robj.ilsevent != 'undefined') throw(robj);
}
if (transits.length > 0) {
- var msg2 = 'For barcodes ' + transits.join(', ') + ' cancel the transits as well?';
- var r2 = obj.error.yns_alert(msg2,'Cancelling Transits','Yes','No',null,'Check here to confirm this message');
+ var msg2 = $("patronStrings").getFormattedString('staff.patron.holds.holds_cancel.cancel_for_barcodes', [transits.join(', ')]);
+ var r2 = obj.error.yns_alert(msg2,
+ $("patronStrings").getString('staff.patron.holds.holds_cancel.cancel_for_barcodes.title'),
+ $("commonStrings").getString('common.yes'),
+ $("commonStrings").getString('common.no'),
+ null,
+ $("commonStrings").getString('common.check_to_confirm'));
if (r2 == 0) {
try {
for (var i = 0; i < transits.length; i++) {
}
}
} catch(E) {
- obj.error.standard_unexpected_error_alert('Hold-transits not likely cancelled.',E);
+ obj.error.standard_unexpected_error_alert($("patronStrings").getString('staff.patron.holds.holds_cancel.hold_transits_not_cancelled'),E);
}
}
}
obj.clear_and_retrieve();
}
} catch(E) {
- obj.error.standard_unexpected_error_alert('Holds not likely cancelled.',E);
+ obj.error.standard_unexpected_error_alert($("patronStrings").getString('staff.patron.holds.holds_cancel.hold_not_cancelled'),E);
}
}
],
opac_url = xulG.url_prefix( urls.opac_rdetail) + '?r=' + my_acn.record();
break;
default:
- obj.error.standard_unexpected_error_alert("I don't understand the hold type of " + htype + ", so I can't jump to the appropriate record in the catalog.", obj.retrieve_ids[i]);
+ obj.error.standard_unexpected_error_alert($("patronStrings").getFormattedString('staff.patron.holds.show_catalog.unknown_htype', [htype]), obj.retrieve_ids[i]);
continue;
break;
}
var content_params = {
'session' : ses(),
'authtime' : ses('authtime'),
- 'opac_url' : opac_url,
+ 'opac_url' : opac_url
};
xulG.new_tab(
xulG.url_prefix(urls.XUL_OPAC_WRAPPER),
- {'tab_name': htype == 'M' ? 'Catalog' : 'Retrieving title...'},
+ {'tab_name': htype == 'M' ? 'Catalog' : $("patronStrings").getString('staff.patron.holds.show_catalog.retrieving_title') },
content_params
);
}
{
'row' : {
'my' : {
- 'hold_id' : hold_id,
+ 'hold_id' : hold_id
}
}
}
);
obj.controller.view.lib_menu = ml;
} else {
- throw('Missing library list.\n');
+ throw($("patronStrings").getString('staff.patron.holds.lib_menus.missing_library_list'));
}
} catch(E) {
this.error.standard_unexpected_error_alert('rendering lib menu',E);
}
- },
+ }
}
dump('exiting patron.holds.js\n');
<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
<!-- LOCALIZATION -->
<!DOCTYPE window PUBLIC "" ""[
- <!--#include virtual="/opac/locale/en-US/lang.dtd"-->
+ <!--#include virtual="/opac/locale/${locale}/lang.dtd"-->
]>
<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
<script type="text/javascript" src="/xul/server/main/JSAN.js"/>
<script>
<![CDATA[
+ function $(id) { return document.getElementById(id); }
+
function my_init() {
try {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
- if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
+ if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
JSAN.use('util.error'); g.error = new util.error();
default_focus();
} catch(E) {
- var err_msg = "!! This software has encountered an error. Please tell your friendly " +
- "system administrator or software developer the following:\npatron/holds.xul\n" + E + '\n';
+ var err_msg = $("commonStrings").getFormattedString('common.exception', ['patron/holds.xul', E]);
try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
alert(err_msg);
}
]]>
</script>
- <messagecatalog id="circStrings" src="/xul/server/locale/<!--#echo var='locale' -->/circ.properties"/>
+ <messagecatalog id="circStrings" src="/xul/server/locale/<!--#echo var='locale' -->/circ.properties"/>
+ <messagecatalog id="commonStrings" src="/xul/server/locale/<!--#echo var='locale'-->/common.properties" />
<commandset id="holds_cmds">
<command id="sel_mark_items_damaged" disabled="true"/>
<?xml version="1.0"?>
<!DOCTYPE overlay PUBLIC "" ""[
- <!--#include virtual="/opac/locale/en-US/lang.dtd"-->
+ <!--#include virtual="/opac/locale/${locale}/lang.dtd"-->
]>
<overlay id="holds_overlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
</vbox>
<hbox id="holds_top_ui" flex="1">
- <checkbox id="lib_filter_checkbox" persist="checked" checked="true" hidden="true" label="Filter:"/>
+ <checkbox id="lib_filter_checkbox" persist="checked" checked="true" hidden="true" label="&staff.patron.holds_overlay.lib_filter_checkbox.label;"/>
<menulist id="lib_type_menu" hidden="true" persist="value">
<menupopup>
- <menuitem id="pickup_lib" value="pickup_lib" label="Pickup Library"/>
- <menuitem id="request_lib" value="request_lib" label="Requesting Library"/>
- <menuitem id="fulfillment_lib" value="fulfillment_lib" label="Fulfilling Library"/>
- <menuitem id="circ_lib" value="circ_lib" label="Item Circulating Library"/>
- <menuitem id="owning_lib" value="owning_lib" label="Volume Owning Library"/>
- <menuitem id="home_lib" value="home_lib" label="Patron Home Library foo"/>
+ <menuitem id="pickup_lib" value="pickup_lib" label="&staff.patron.holds_overlay.pickup_lib.label;"/>
+ <menuitem id="request_lib" value="request_lib" label="&staff.patron.holds_overlay.request_lib.label;"/>
+ <menuitem id="fulfillment_lib" value="fulfillment_lib" label="&staff.patron.holds_overlay.fulfillment_lib.label;"/>
+ <menuitem id="circ_lib" value="circ_lib" label="&staff.patron.holds_overlay.circ_lib.label;"/>
+ <menuitem id="owning_lib" value="owning_lib" label="&staff.patron.holds_overlay.owning_lib.label;"/>
+ <menuitem id="home_lib" value="home_lib" label="&staff.patron.holds_overlay.home_lib.label;"/>
</menupopup>
</menulist>
<vbox id="lib_menu_placeholder" hidden="true"/>
- <button id="fetch_more" label="Fetch More Holds" accesskey="M" hidden="true"/>
+ <button id="fetch_more" label="&staff.patron.holds_overlay.fetch_more.label;" accesskey="&staff.patron.holds_overlay.fetch_more.accesskey;" hidden="true"/>
<spacer flex="1"/>
<menubar>
- <menu label="Actions for Selected Holds" accesskey="S">
+ <menu label="&staff.patron.holds_overlay.actions_for_holds.label;" accesskey="&staff.patron.holds_overlay.actions_for_holds.accesskey;">
<menupopup>
<menuitem command="sel_clip" label="&staff.circ.holds.copy_to_clipboard;" accesskey="&staff.circ.holds.copy_to_clipboard.accesskey;" />
<menuitem label="&staff.circ.holds.show_in_catalog;" command="cmd_show_catalog" accesskey="&staff.circ.holds.show_in_catalog.accesskey;"/>
<spacer flex="1"/>
<button id="holds_print" label="Print" command="cmd_holds_print" accesskey="P" />
<button id="holds_export"
- label="Export"
+ label="&staff.patron.holds_overlay.holds_export.label;"
command="cmd_holds_export"
accesskey=""/>
</hbox>
<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
<!-- LOCALIZATION -->
<!DOCTYPE window PUBLIC "" ""[
- <!--#include virtual="/opac/locale/en-US/lang.dtd"-->
+ <!--#include virtual="/opac/locale/${locale}/lang.dtd"-->
]>
<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
function my_init() {
try {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
- if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
+ if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
refresh();
} catch(E) {
- var err_msg = "!! This software has encountered an error. Please tell your friendly " +
- "system administrator or software developer the following:\npatron_info_group.xul\n" + E + '\n';
+ var err_msg = $("commonStrings").getFormattedString('common.exception', ['patron/info_group.xul', E]);
try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
alert(err_msg);
}
exec.chain( funcs );
} catch(E) {
- g.error.standard_unexpected_error_alert('Failed to retrieve all the group members.',E);
+ g.error.standard_unexpected_error_alert($("patronStrings").getString('staff.patron.info_group.retrieve_group_members.failure'),E);
}
}
var url = urls.XUL_PATRON_DISPLAY// + '?id=' + window.escape( g.sel_list[i] );
window.xulG.new_tab(
url,
- { 'tab_name' : 'Retrieving Patron..' },
+ { 'tab_name' : $("patronStrings").getString('staff.patron.info_group.retrieve_patron.tab_name') },
{
'id' : g.sel_list[i],
'url_prefix' : xulG.url_prefix,
}
);
} catch(E) {
- g.error.standard_unexpected_error_alert('Failed to retrieve patron.',E);
+ g.error.standard_unexpected_error_alert($("patronStrings").getString('staff.patron.info_group.retrieve_patron.failed_retrieving_patron'),E);
}
}
}
} catch(E) {
- g.error.standard_unexpected_error_alert('Failed to retrieve patrons.',E);
+ g.error.standard_unexpected_error_alert($("patronStrings").getString('staff.patron.info_group.retrieve_patron.failed_retrieving_patrons'),E);
}
}
{
'url' : urls.XUL_PATRON_EDIT, // + '?ses=' + window.escape(ses()) + '&clone=' + g.sel_list[i],
'show_print_button' : true ,
- 'tab_name' : 'Register Patron Clone for Group' ,
+ 'tab_name' : $("patronStrings").getString('staff.patron.info_group.clone_patron.register_clone.tab_name'),
'passthru_content_params' : {
'ses' : ses(),
'clone' : g.sel_list[i],
);
}
} catch(E) {
- g.error.standard_unexpected_error_alert('error spawning user editors',E);
+ g.error.standard_unexpected_error_alert($("patronStrings").getString('staff.patron.info_group.clone_patron.error_spawning_editors'),E);
}
}
{
'url' : url,
'show_print_button' : true ,
- 'tab_name' : 'Editing Related Patron' ,
+ 'tab_name' : $("patronStrings").getString('staff.patron.info_group.spwan_editor.editing_patron'),
'passthru_content_params' : passthru,
'url_prefix' : xulG.url_prefix,
'new_tab' : xulG.new_tab,
if (typeof window.xulG == 'object' && typeof window.xulG.new_tab == 'function')
xulG.new_tab( loc, {}, {'doit':1,'query':s} );
} catch(E) {
- g.error.standard_unexpected_error_alert('spawn search',E);
+ g.error.standard_unexpected_error_alert($("patronStrings").getString('staff.patron.info_group.spwan_search'),E);
}
}
function remove_patron() {
if (! g.sel_list ) return;
- var msg = ''; for (var i = 0 ; i < g.sel_list.length; i++) if (g.sel_list[i] == g.patron_id) msg =
- 'WARNING: If you remove the currently displayed patron, a NEW group will be displayed in this interface.';
- var c = window.confirm('Remove selected patrons from this group? ' + msg);
+ var msg = '';
+ for (var i = 0 ; i < g.sel_list.length; i++)
+ if (g.sel_list[i] == g.patron_id)
+ msg = $("patronStrings").getString('staff.patron.info_group.remove_patron.warning_message');
+
+ var c = window.confirm($("patronStrings").getFormattedString('staff.patron.info_group.remove_patron.warning_message_confirm', [msg]));
if (c) {
for (var i = 0; i < g.sel_list.length; i++) {
var robj = g.network.simple_request('FM_AU_NEW_USERGROUP', [ ses(), g.sel_list[i], get_db_true() ]);
if (typeof robj.ilsevent != 'undefined') {
- g.error.standard_unexpected_error_alert('error removing patron (id=' + g.sel_list[i] + ') from usergroup',robj);
+ g.error.standard_unexpected_error_alert($("patronStrings").getFormattedString('staff.patron.info_group.remove_patron.error_removing_patron', [g.sel_list[i]]), robj);
}
}
- alert('Patrons removed from group.');
+ alert($("patronStrings").getString('staff.patron.info_group.remove_patron.patrons_removed_from_group'));
/* FIXME - xulrunner bug if this alert comes after refresh? */
/* that's okay, because now that we're on a distributed database, we want human delay to mitigate race conditions */
refresh();
} else {
- alert('Patron not removed from group.');
+ alert($("patronStrings").getString('staff.patron.info_group.remove_patron.patrons_not_removed_from_group'));
}
}
function link_patron(direction) {
try {
if (! g.sel_list ) { g.sel_list = []; g.sel_list[0] = g.patron_id; }
- if (direction == null) throw('null paramater not allowed');
+ if (direction == null) throw($("patronStrings").getString('staff.patron.info_group.link_patron.null_not_allowed'));
var first_msg; var second_msg;
switch(direction) {
case true: first_msg = "-->"; break;
case false: first_msg = "<--"; break;
- default: throw('Invalid parameter. Expected boolean.'); break;
+ default: throw($("patronStrings").getString('staff.patron.info_group.link_patron.invalid_parameter')); break;
}
- var barcode = window.prompt('Please scan a patron barcode:','',first_msg);
+ var barcode = window.prompt($("patronStrings").getString('staff.patron.info_group.link_patron.scan_patron_barcode'),'',first_msg);
if (!barcode) return;
JSAN.use('patron.util');
var patron_b = patron.util.retrieve_fleshed_au_via_barcode(ses(),barcode);
var patron_a = patron.util.retrieve_fleshed_au_via_id(ses(),g.sel_list[i]);
if (typeof patron_a.ilsevent != 'undefined') throw(patron_a);
switch(direction) {
- case true: second_msg = "Move patron " + patron_a.card().barcode() + " into patron " + patron_b.card().barcode() + "'s usergroup..."; break;
- case false: second_msg = "Move patron " + patron_b.card().barcode() + " into patron " + patron_a.card().barcode() + "'s usergroup..."; break;
+ case true:
+ second_msg = $("patronStrings").getFormattedString('staff.patron.info_group.link_patron.move_patron_to_new_usergroup',[patron_a.card().barcode(), patron_b.card().barcode()]);
+ break;
+ case false:
+ second_msg = $("patronStrings").getFormattedString('staff.patron.info_group.link_patron.move_patron_to_new_usergroup',[patron_b.card().barcode(), patron_a.card().barcode()]);
+ break;
}
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserWrite');
- var top_xml = '<vbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" flex="1" style="overflow: auto"><description>' + second_msg + '</description><hbox><spacer flex="1"/><button label="Move" accesskey="M" name="fancy_submit"/><button label="Done" accesskey="D" name="fancy_cancel"/></hbox></vbox>';
+ var top_xml = '<vbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" flex="1" style="overflow: auto"><description>' + second_msg + '</description>';
+ top_xml += '<hbox><spacer flex="1"/><button label="'+$("patronStrings").getFormattedString('staff.patron.info_group.link_patron.move.label')+'"';
+ top_xml += ' accesskey="'+$("patronStrings").getFormattedString('staff.patron.info_group.link_patron.move.accesskey')+'" name="fancy_submit"/>';
+ top_xml += '<button label="'+$("patronStrings").getFormattedString('staff.patron.info_group.link_patron.done.label')+'"';
+ top_xml += ' accesskey="'+$("patronStrings").getFormattedString('staff.patron.info_group.link_patron.done.accesskey')+'" name="fancy_cancel"/></hbox></vbox>';
var xml = '<vbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" flex="1" style="overflow: vertical"><hbox flex="1">';
/************/
xml += '<vbox flex="1">';
//+ '&bottom_xml_in_stash=temp_bot'
//+ '&title=' + window.escape('Move Patron into a Usergroup'),
'fancy_prompt', 'chrome,resizable,modal,width=700,height=500',
- { 'xml' : xml, 'top_xml' : top_xml, 'bottom_xml' : bot_xml, 'title' : 'Move Patron into a Usergroup' }
+ { 'xml' : xml, 'top_xml' : top_xml, 'bottom_xml' : bot_xml, 'title' : $("patronStrings").getString('staff.patron.info_group.link_patron.move_patron_to_usergroup')}
);
if (fancy_prompt_data.fancy_status == 'incomplete') { continue; }
else {
break;
}
var robj = g.network.simple_request('FM_AU_UPDATE',[ ses(), patron_c ]);
- if (typeof robj.ilsevent != 'undefined') g.error.standard_unexpected_error_alert('error linking patron (id=' + g.sel_list[i] + ')', robj);
+ if (typeof robj.ilsevent != 'undefined') g.error.standard_unexpected_error_alert($("patronStrings").getFormattedString('staff.patron.info_group.link_patron.error_linking_patron', [g.sel_list[i]]), robj);
}
}
- alert('User groups updated.');
+ alert($("patronStrings").getString('staff.patron.info_group.link_patron.usergroups_updated'));
refresh();
} catch(E) {
- g.error.standard_unexpected_error_alert('error linking patrons',E);
+ g.error.standard_unexpected_error_alert($("patronStrings").getString('staff.patron.info_group.link_patron.error_linking_patrons'),E);
refresh();
}
}
]]>
</script>
+
+ <messagecatalog id="patronStrings" src="/xul/server/locale/<!--#echo var='locale'-->/patron.properties"/>
<commandset id="info_group_cmds">
- <command id="clone" accesskey="N" label="Register a New Group Member by Cloning Selected Patrons" oncommand="try{clone_patron();}catch(E){alert('FIXME:'+E);}"/>
- <command id="remove" accesskey="R" label="Remove Selected Patrons from the Group" oncommand="try{remove_patron();}catch(E){alert('FIXME:'+E);}"/>
- <command id="move" accesskey="M" label="Move Selected Patrons to ANOTHER patron's group." oncommand="try{link_patron(true);}catch(E){alert('FIXME:'+E);}"/>
- <command id="add" accesskey="A" label="Move ANOTHER patron to this patron group." oncommand="try{link_patron(false);}catch(E){alert('FIXME:'+E);}"/>
- <command id="retrieve_p" label="Retrieve Selected Patrons" accesskey="P" oncommand="try{retrieve_patron();}catch(E){alert(E);}"/>
+ <command id="clone" accesskey="&staff.patron.info_group.clone.accesskey;" label="&staff.patron.info_group.clone.label;" oncommand="try{clone_patron();}catch(E){alert('FIXME:'+E);}"/>
+ <command id="remove" accesskey="&staff.patron.info_group.remove.accesskey;" label="&staff.patron.info_group.remove.label;" oncommand="try{remove_patron();}catch(E){alert('FIXME:'+E);}"/>
+ <command id="move" accesskey="&staff.patron.info_group.move.accesskey;" label="&staff.patron.info_group.move.label;" oncommand="try{link_patron(true);}catch(E){alert('FIXME:'+E);}"/>
+ <command id="add" accesskey="&staff.patron.info_group.add.accesskey;" label="&staff.patron.info_group.add.label;" oncommand="try{link_patron(false);}catch(E){alert('FIXME:'+E);}"/>
+ <command id="retrieve_p" label="&staff.patron.info_group.retrieve_p.label;" accesskey="&staff.patron.info_group.retrieve_p.accesskey;" oncommand="try{retrieve_patron();}catch(E){alert(E);}"/>
</commandset>
<popupset id="info_group_popupset">
<vbox flex="1" class="my_overflow" id="group_panel">
<groupbox flex="1">
- <caption label="Group Members"/>
+ <caption label="&staff.patron.info_group.group_member.label;"/>
<hbox>
<spacer flex="1"/>
<menubar id="ml">
- <menu label="Choose an Action..." accesskey="A" value="0">
+ <menu label="&staff.patron.info_group.choose_an_action.label;" accesskey="&staff.patron.info_group.choose_an_action.accesskey;" value="0">
<menupopup>
<menuitem command="clone" />
<menuitem command="remove" />
--- /dev/null
+#!/usr/bin/env python
+# -----------------------------------------------------------------------
+# Copyright (C) 2008 Laurentian University
+# Dan Scott <dscott@laurentian.ca>
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# -----------------------------------------------------------------------
+
+# vim:et:sw=4:ts=4: set fileencoding=utf-8 :
+
+"""
+Parse DTD files and XUL files looking for trouble
+ * Missing entities
+"""
+
+import os
+import re
+
+DEBUG = False
+
+DTD_DIRS = (
+ '../../../Open-ILS/web/opac/locale/en-US/',
+ )
+
+XUL_DIRS = (
+ '../../../Open-ILS/xul/staff_client/server/',
+ '../../../Open-ILS/xul/staff_client/chrome/',
+ )
+
+def parse_entities():
+ """
+ Parse entities files in known places
+ """
+
+ basedir = os.path.normpath(os.path.dirname(os.path.abspath(__file__)))
+
+ entities = {
+ "amp" : "&",
+ "lt" : "<",
+ "gt" : ">",
+ "nbsp" : ">",
+ "quot" : ">",
+ }
+
+ dtd_files = []
+
+ for p_dir in DTD_DIRS:
+ p_dir = os.path.normpath(os.path.join(basedir, p_dir))
+ file_list = os.listdir(p_dir)
+ for d_file in file_list:
+ if os.path.splitext(d_file)[1] == '.dtd':
+ dtd_files.append(os.path.join(p_dir, d_file))
+
+ prefix = os.path.commonprefix(dtd_files)
+
+ for d_file in dtd_files:
+
+ # Get the shortest unique address for this file
+ short_df = d_file[len(prefix):]
+
+ dtd_file = open(d_file, 'r')
+
+ line_num = 1
+
+ for line in dtd_file:
+ line_num += 1
+
+ # Get rid of trailing linefeed
+ line = line[0:-1]
+
+ # Parse entity/value
+ unpack = re.search(r'<!ENTITY\s+(.+?)\s+([\'"])(.*?)\2\s*>', line)
+ if DEBUG and unpack:
+ print unpack.groups()
+
+ # Skip anything other than entity definitions
+ # Note that this makes some massive assumptions:
+ # 1. that we only have with one entity defined per line
+ # 2. that we only have single-line entities
+ # 3. that the entity begins in position 0 on the line
+ if not unpack or not line or not line.startswith('<!ENTITY'):
+ continue
+
+ # If we did not retrieve an entity and definition, that's probably not good
+ if len(unpack.groups()) != 3:
+ print("%s:%d: No entity defined on line [%s]" % (short_df, line_num, line))
+ continue
+
+ entity_key, quote, value = unpack.groups()
+ if DEBUG:
+ print entity_key, value
+
+ if not entities.has_key(entity_key):
+ entities[entity_key] = [{'value': value, 'file': short_df}]
+ continue
+
+ for entry in entities[entity_key]:
+ if ['file'] == short_df:
+ print("%s:%d: Duplicate key '%s' in line [%s]" % (short_df, line_num, entity_key, line[0:-1]))
+ continue
+
+ entities[entity_key].append({'value': value, 'file': short_df})
+
+ dtd_file.close()
+
+ return entities
+
+def check_xul_files(entities):
+ """
+ Finds all the XUL and JavaScript files
+ """
+
+ basedir = os.path.normpath(os.path.dirname(os.path.abspath(__file__)))
+
+ xul_files = []
+
+ for x_dir in XUL_DIRS:
+ for root, dirs, files in os.walk(x_dir):
+ for x_file in files:
+ if os.path.splitext(x_file)[1] == '.xul' or os.path.splitext(x_file)[1] == '.js':
+ check_xul(root, x_file, entities)
+
+def check_xul(root, filename, entities):
+ """
+ Checks all XUL files to ensure:
+ * that the requested entity exists
+ * that every entity is actually required
+ """
+
+ num_strings = 0
+
+ # Typical entity usage:
+ # &blah.blah.blah_bity.blah;
+ strings = re.compile(r'''&([a-zA-Z._]+);''')
+
+ xul = open(os.path.join(root, filename), 'r')
+ content = xul.read()
+ xul.close()
+
+ if DEBUG:
+ print "File: %s" % (os.path.normpath(os.path.join(root, filename)))
+
+ for s_match in strings.finditer(content):
+ num_strings += 1
+ if not entities.has_key(s_match.group(1)):
+ print "File: %s" % (os.path.normpath(os.path.join(root, filename)))
+ print "\tEntity %s not found, expected in %s" % (s_match.group(1), 'lang.dtd')
+
+ if DEBUG:
+ print "\t%d entities found" % (num_strings)
+
+if __name__ == '__main__':
+ entities = parse_entities()
+ check_xul_files(entities)