working/Evergreen.git
13 years agoCan't install oils_web.xml.example if it does not exist collab/berick/tpac-misc-cleanup
Dan Scott [Mon, 12 Sep 2011 15:10:50 +0000 (11:10 -0400)]
Can't install oils_web.xml.example if it does not exist

Just remove the entry from Makefile.am and we're happy.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
13 years agoRemoved sample oils_web.xml; removed from README
Bill Erickson [Mon, 12 Sep 2011 14:26:40 +0000 (10:26 -0400)]
Removed sample oils_web.xml; removed from README

Thanks for the suggestion, Dan.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
13 years agoRemove no-longer-necessary DTD override in vandelay
Bill Erickson [Mon, 12 Sep 2011 13:10:23 +0000 (09:10 -0400)]
Remove no-longer-necessary DTD override in vandelay

Also, since vandelay was the only code using this hacked-in override
option, remove the option from the base template.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
13 years agoVandelay: import strings from DTD
Bill Erickson [Mon, 12 Sep 2011 12:43:32 +0000 (08:43 -0400)]
Vandelay: import strings from DTD

Using the new template-style embedded string localizer:  [% l('...') %]
Removed vandelay.dtd.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
13 years agoVandelay: repaired URL path to embedded match set editor
Bill Erickson [Mon, 12 Sep 2011 12:43:25 +0000 (08:43 -0400)]
Vandelay: repaired URL path to embedded match set editor

Signed-off-by: Bill Erickson <berick@esilibrary.com>
13 years agoTPac: template path cleanup
Bill Erickson [Mon, 12 Sep 2011 00:07:57 +0000 (20:07 -0400)]
TPac: template path cleanup

Rearrange the few templates that relied on the now-defunct oils_web.xml
handler path/template mapping.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
13 years agoTPac: deprecate oils_web.xml
Bill Erickson [Sun, 11 Sep 2011 23:49:37 +0000 (19:49 -0400)]
TPac: deprecate oils_web.xml

Configuration values are now loaded from Apache configuration.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
13 years agoTPac: locale handling improvements
Bill Erickson [Sun, 11 Sep 2011 15:20:39 +0000 (11:20 -0400)]
TPac: locale handling improvements

Allow Locale::Maketext to fall through to parent locales
(superordinate) when the a translation for a string in the given locale
is not present.  Locale::Maketext suppports arbitrary-length locale
tags, so it's possible to create locale hierarchies.

For example, you could create branch-specific translations that fall
through to system, then full locale, then base locale, then the default
template strings.

en_us_systemA_branchX => en_us_systemA => en_us => en => <template strings>

Each template string that needs translating will be tried against each
locale in order until it finds a translation.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
13 years agoTPac: Review & More content cafe option on results page
Bill Erickson [Fri, 9 Sep 2011 20:41:45 +0000 (16:41 -0400)]
TPac: Review & More content cafe option on results page

Links to a new top-level page.  Also cleaned up some bare &'s in the
content cafe url.  added a ctx->proto = http / https var.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
13 years agoTPac: move hold status chunk to separate template
Bill Erickson [Fri, 9 Sep 2011 20:00:51 +0000 (16:00 -0400)]
TPac: move hold status chunk to separate template

...for easier local overrideing of text that dislays for hold status

Signed-off-by: Bill Erickson <berick@esilibrary.com>
13 years agoTPac: Push subject extras tab to top of extras
Bill Erickson [Fri, 9 Sep 2011 19:13:48 +0000 (15:13 -0400)]
TPac: Push subject extras tab to top of extras

Signed-off-by: Bill Erickson <berick@esilibrary.com>
13 years agoTPac: toggle expandy arrow image to down-arrow on expanded record extras tabs
Bill Erickson [Fri, 9 Sep 2011 19:13:05 +0000 (15:13 -0400)]
TPac: toggle expandy arrow image to down-arrow on expanded record extras tabs

Signed-off-by: Bill Erickson <berick@esilibrary.com>
13 years agoTPac: on-fly-list management improvements
Bill Erickson [Fri, 9 Sep 2011 18:08:31 +0000 (14:08 -0400)]
TPac: on-fly-list management improvements

* implemented remove-from-list function
* After add or remove from list on results page, direct user back to the
context record via page anchor

Signed-off-by: Bill Erickson <berick@esilibrary.com>
13 years agoTPac: avoid 1995-esque "Submit Query" for form submission
Bill Erickson [Fri, 9 Sep 2011 15:50:55 +0000 (11:50 -0400)]
TPac: avoid 1995-esque "Submit Query" for form submission

On the update username, email, and password pages, use "Submit" instead
of relying on the browser "Submit Query" label

Signed-off-by: Bill Erickson <berick@esilibrary.com>
13 years agoMerge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac...
Bill Erickson [Sun, 11 Sep 2011 22:15:28 +0000 (18:15 -0400)]
Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac-master-merge

13 years agoWhen checking postgresql version use postgres db
Thomas Berezansky [Fri, 9 Sep 2011 14:25:10 +0000 (10:25 -0400)]
When checking postgresql version use postgres db

Otherwise we may get an error instead of a version number.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
13 years agoTake a stab at 9.1 support
Thomas Berezansky [Thu, 8 Sep 2011 22:09:49 +0000 (18:09 -0400)]
Take a stab at 9.1 support

Second create database SQL to deal with
CREATE EXTENSION
instead of contrib files.

Check create DB steps for errors. If any found, die.
This should cover "could not load file" from pre-9.1 as well.

Also copied the 9.0 fts-config as 9.1 to avoid that warning during
database load.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
13 years agoRemove references to Fedora 13 and 14
Dan Scott [Sat, 10 Sep 2011 16:36:14 +0000 (12:36 -0400)]
Remove references to Fedora 13 and 14

Fedora 13 has not been supported for months, Fedora 14 is about to lose
support. Simplifies README and prereq installer a bit.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
13 years agoRefresh dynamic link cache after libjs install
Dan Scott [Sat, 10 Sep 2011 16:28:32 +0000 (12:28 -0400)]
Refresh dynamic link cache after libjs install

The build of SpiderMonkey can fail if it can't find the freshly
installed libjs library, so run ldconfig after building libjs to avoid
that bit o' fun.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
13 years agoFix prerequisite install on Fedora 15
Dan Scott [Sat, 10 Sep 2011 16:27:41 +0000 (12:27 -0400)]
Fix prerequisite install on Fedora 15

The postgresql package shipped in Fedora proper is just called
'postgresql-devel', so get that right.

Also, try to put 64-bit libraries in the right directory.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
13 years agoStamping upgrade for penalty visiblity issue
Mike Rylander [Fri, 9 Sep 2011 19:41:00 +0000 (15:41 -0400)]
Stamping upgrade for penalty visiblity issue

Signed-off-by: Mike Rylander <mrylander@gmail.com>
13 years agoFix some standing penalty issues
Thomas Berezansky [Fri, 9 Sep 2011 18:31:27 +0000 (14:31 -0400)]
Fix some standing penalty issues

Circulations were using the circ matchpoint org unit for blocking.
That could, depending on the matchpoint that matched, result in staff
not being able to see the penalty that is being blocked for.

In addition, blocking is done based on the full path, not ancestors.
But, backend functions only used ancestors. Changed them to use the
full_path variant instead.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
13 years agoFix dos_print when NSPrint interface is used
Thomas Berezansky [Fri, 9 Sep 2011 19:23:09 +0000 (15:23 -0400)]
Fix dos_print when NSPrint interface is used

By adding params.dos_print = true where needed.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
13 years agoTPac: minor i18n string repairs
Bill Erickson [Thu, 8 Sep 2011 22:51:06 +0000 (18:51 -0400)]
TPac: minor i18n string repairs

Signed-off-by: Bill Erickson <berick@esilibrary.com>
13 years agoRepair makefile.am: install template dirs that were previously under /default/
Bill Erickson [Thu, 8 Sep 2011 22:32:49 +0000 (18:32 -0400)]
Repair makefile.am: install template dirs that were previously under /default/

Signed-off-by: Bill Erickson <berick@esilibrary.com>
13 years agoMerge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac...
Bill Erickson [Thu, 8 Sep 2011 21:52:01 +0000 (17:52 -0400)]
Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac-master-merge

13 years agoCalculate penalties when marking items lost
Jason Etheridge [Thu, 8 Sep 2011 20:08:30 +0000 (16:08 -0400)]
Calculate penalties when marking items lost

For example, if you a max fines threshold of $10, and a lost processing fee of
$50, currently if you mark an item lost (or an item ages to lost) and a patron
gets billed that $50, they won't automatically have the max fines penalty.  This
change calculates such penalties at the time a copy is marked and lost and money
is juggled, within the same transaction.

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
13 years agoMake bookbag title/author links
Bill Erickson [Thu, 8 Sep 2011 19:54:47 +0000 (15:54 -0400)]
Make bookbag title/author links

Signed-off-by: Bill Erickson <berick@esilibrary.com>
13 years agoStamping for LP821404 au last_update_time
Thomas Berezansky [Thu, 8 Sep 2011 19:55:42 +0000 (15:55 -0400)]
Stamping for LP821404 au last_update_time

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
13 years agoMerge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac...
Bill Erickson [Thu, 8 Sep 2011 19:55:36 +0000 (15:55 -0400)]
Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac-master-merge

13 years agoAlso add "Last Update" to the patron summary
Michael Peters [Fri, 5 Aug 2011 14:30:39 +0000 (10:30 -0400)]
Also add "Last Update" to the patron summary

Signed-off-by: Michael Peters <mrpeters@library.in.gov>
Typo in row id value

Signed-off-by: Michael Peters <mrpeters@library.in.gov>
Need to use obj.patron.last_update_date not obj.patron.update_date

Signed-off-by: Michael Peters <mrpeters@library.in.gov>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
13 years agofire last_update_time trigger on user insert in addition to update
Jason Etheridge [Thu, 8 Sep 2011 05:56:49 +0000 (01:56 -0400)]
fire last_update_time trigger on user insert in addition to update

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
13 years agochange column name from last_update_date to last_update_time
Jason Etheridge [Thu, 8 Sep 2011 05:54:11 +0000 (01:54 -0400)]
change column name from last_update_date to last_update_time

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
13 years agoupgrade script for actor.usr.last_update_date
Jason Etheridge [Fri, 5 Aug 2011 10:58:07 +0000 (06:58 -0400)]
upgrade script for actor.usr.last_update_date

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
13 years agoAdd an actor.usr.last_update_date column
Jason Etheridge [Fri, 5 Aug 2011 10:56:36 +0000 (06:56 -0400)]
Add an actor.usr.last_update_date column

Though should we call it edit_date, like on asset.copy? :)  Also added trigger,
and some display definitions in the staff client.

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
13 years agoa CSS hook in case folks want to hide this
Jason Etheridge [Thu, 8 Sep 2011 07:19:11 +0000 (03:19 -0400)]
a CSS hook in case folks want to hide this

If you'd like to hide usr_summary stat cats in the patron
info pane, add this to server/skin/patron_summary_custom.css:

.stat_cat_summary_row { display: none; }

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
13 years agoStat Cat Summary Display Fixes
Thomas Berezansky [Fri, 12 Aug 2011 15:47:43 +0000 (11:47 -0400)]
Stat Cat Summary Display Fixes

1 - Suppress sip field and format in horizontal interface
2 - Make "show in summary" work for vertical interface

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
13 years agoSupport server/id for server name
Thomas Berezansky [Thu, 25 Aug 2011 11:44:03 +0000 (07:44 -0400)]
Support server/id for server name

Strip off the /id part to get the real server name.
Each /id gets a different workstation registration.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
13 years agotweak description for "Patron: password from phone #" setting
Jason Etheridge [Thu, 8 Sep 2011 05:44:38 +0000 (01:44 -0400)]
tweak description for "Patron: password from phone #" setting

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
13 years agolp#794153 stamping upgrade script for phone pw
Jason Etheridge [Thu, 8 Sep 2011 05:26:34 +0000 (01:26 -0400)]
lp#794153 stamping upgrade script for phone pw

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
13 years agoUnwrapped upgrade script for descripition changes
Thomas Berezansky [Tue, 2 Aug 2011 18:15:44 +0000 (14:15 -0400)]
Unwrapped upgrade script for descripition changes

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
13 years agoSeed data update for regex descriptions
Thomas Berezansky [Tue, 2 Aug 2011 18:15:06 +0000 (14:15 -0400)]
Seed data update for regex descriptions

Mention capture group stuff in day_phone
Add note about day_phone to generic phone

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
13 years agoRegex check for "last 4 digits of phone number"
Thomas Berezansky [Mon, 13 Jun 2011 05:01:52 +0000 (01:01 -0400)]
Regex check for "last 4 digits of phone number"

If the day_phone regex (direct or from generic phone) has a capture group use it as the "last 4 digits".

For example, you might configure this for day_phone regex:

[2-9]\d{2}-\d{3}-(\d{4})( x\d+)?

With this patch the extension will be ignored for the last 4 digits.

Note: Does not require that the "last 4 digits" capture group actually contain 4 digits.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
13 years agoA/T reactor 'AstCall' can't have global CStoreEditor
Lebbeous Fogle-Weekley [Wed, 7 Sep 2011 20:15:20 +0000 (16:15 -0400)]
A/T reactor 'AstCall' can't have global CStoreEditor

It's not good for any Evergreen service to try to have a global
cstoreeditor instance.  Scope it to the handler() sub that needs it, and
comment out the thus-far unused/unfinished retrieve() sub.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
13 years agoStamping upgrade script for reservation capture notification~
Mike Rylander [Wed, 7 Sep 2011 20:59:31 +0000 (16:59 -0400)]
Stamping upgrade script for reservation capture notification~

Signed-off-by: Mike Rylander <mrylander@gmail.com>
13 years agoEmail notification of reservation capture
Jeff Davis [Tue, 30 Aug 2011 21:03:16 +0000 (14:03 -0700)]
Email notification of reservation capture

When a reserved resource is captured, Evergreen does not notify the patron
that the resource is ready for pickup. (As far as I am aware this is true
of all versions of Evergreen that include bookings.) This could give rise
to situations where the patron goes to pick up the resource at the specified
time, only to find that it hasn't been captured and is currently unavailable.

This change gives you a checkbox to enable email notification when creating
the reservation, and adds a hook, reactor, and validator so that you can
create an action trigger to send the emails.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
13 years agoFix unified interface w/ editing multiple volumes
Jason Etheridge [Wed, 7 Sep 2011 07:29:40 +0000 (03:29 -0400)]
Fix unified interface w/ editing multiple volumes

Breakage if editing existing items across volumes with non-default values for
call number class, prefix, or suffix.  This was due to some logic happening
within a loop that was sadly referencing data that changed out from under it
with every loop iteration (so for example, we were effectively referencing the
last rendered class menu instead of each in turn).

Remember folks:

for (var unsafe = 0; unsafe < 10; unsafe++) {
    setTimeout(
        function(safe) {
            return function() {
                do_something_with(safe); // good
                do_something_with(unsafe); // bad
            };
        }(unsafe),
        1000
    );
}

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
13 years agoLP#838311 acn_id = undefined error in vol/copy ui
Jason Etheridge [Wed, 31 Aug 2011 19:07:52 +0000 (15:07 -0400)]
LP#838311 acn_id = undefined error in vol/copy ui

Fixes race condition between multiple event listeners on drop-down menus.  Bug
happened most often when batch applying values across multiple volumes and then
hitting save/create/update.

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
13 years agoAdd CSV filetype filter options Vandelay CSV export
Bill Erickson [Wed, 31 Aug 2011 20:05:50 +0000 (16:05 -0400)]
Add CSV filetype filter options Vandelay CSV export

Includes generic support for specifying default filename, extension, and
new filter types for the XUL NsIFilePicker wrapper

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
13 years agoRemove "fallback to old style" UPDATE perm
Thomas Berezansky [Wed, 7 Sep 2011 17:39:32 +0000 (13:39 -0400)]
Remove "fallback to old style" UPDATE perm

The middle layer no longer supports the
UPDATE_ORG_UNIT_SETTING. + name
form of editing permissions. Don't use it as a fallback.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
13 years agoLibrary Settings Editor: Use real perms
Thomas Berezansky [Tue, 30 Aug 2011 21:04:57 +0000 (17:04 -0400)]
Library Settings Editor: Use real perms

When update_perm exists use that permission, instead of a permission based
solely on the name of the permission.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
13 years agoStamping the upgrade script for in-db OU proximity update
Mike Rylander [Wed, 7 Sep 2011 18:10:56 +0000 (14:10 -0400)]
Stamping the upgrade script for in-db OU proximity update

Signed-off-by: Mike Rylander <mrylander@gmail.com>
13 years agoLP#836768 Proximity update trigger
Steven Callender [Mon, 29 Aug 2011 15:11:18 +0000 (15:11 +0000)]
LP#836768 Proximity update trigger

Update org proximity automatically when parent org unit is changed to avoid the need to use the autogen -u parameter,
by means of a trigger on the actor.org_unit table and a new function.

Signed-off-by: Steven Callender <stevecallender@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
13 years agoFix for LP bug #702422.
Jason Stephenson [Tue, 30 Aug 2011 16:50:34 +0000 (12:50 -0400)]
Fix for LP bug #702422.

Add @libdir@/javascript/ path in legacy script section of
oils_sip.xml.example so that legacy scripts work with SIP2.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
13 years agoAdding org unit context selector to providers screen
James Fournie [Wed, 31 Aug 2011 17:37:21 +0000 (10:37 -0700)]
Adding org unit context selector to providers screen
This helps alleviate the bug reported in LP 731510 and
generally improves usability.

Signed-off-by: James Fournie <jfournie@sitka.bclibraries.ca>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
13 years agoCorrect pg_config failure in eg_db_config.pl
Thomas Berezansky [Fri, 26 Aug 2011 17:56:21 +0000 (13:56 -0400)]
Correct pg_config failure in eg_db_config.pl

Missing a =s in getopts config means it becomes a 0 or 1, when it should
be a string.

The problem only occurs when you are specifying a particular postgresql
pg_config file (for example, if you have multiple versions of postgresql
installed).

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
13 years agoClear org_unit cache fix for autogen.sh
Dan Wells [Wed, 7 Sep 2011 15:35:18 +0000 (11:35 -0400)]
Clear org_unit cache fix for autogen.sh

autogen.sh is not properly clearing the org_tree cache.  It is
unclear how this hasn't caused a problem before, but this fix
works for me and should be at least harmless in other enviroments.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
13 years agoStamp upgrade for generic mapping index normalizer
Mike Rylander [Tue, 6 Sep 2011 20:28:55 +0000 (16:28 -0400)]
Stamp upgrade for generic mapping index normalizer

Signed-off-by: Mike Rylander <mrylander@gmail.com>
13 years agoGeneric mapping index normalizer
Bill Erickson [Tue, 6 Sep 2011 15:54:47 +0000 (11:54 -0400)]
Generic mapping index normalizer

Useful for mapping values extracted for SVF (metabib.record_attr.attrs)
attributes to alternate values.  For example, you can map collections of
MARC Audience codes into groups of codes for to create audience groups.

This normalizer takes a text parameter (in addition to the extracted value)
that defines a simple mapping between input and output.  Each mapping
consists of one or more comma separated strings on the left of a separator
(called the source group), a separator, and a alphanumeric string to the
right of the separator (called the mapping target). The format of a mapping
is:

  {string}[,{string}][..]=>{non-whitespace-string}

For example:

  a,b,c=>X

Multiple mappings can be supplied, separated by whitespace.  Each mapping
itself is not sensitive to most whitespace.  For instance, the following
are all equivalent:

 a,b,c=>X
 a, b, c => X
    a   ,   b   ,   c    =>     X

In each, "a", "b" and "c" are mapped to "X", and anything else is returned
without mapping.

Additionionally, whitespace within a string in the source group is tolerated.
Given a mapping of:

  a e i o u, y, w => V

The string "a e i o u", "y" or "w" will return "V".

In addition to explicit mapping, an empty source group will produce a default
mapping, where anything not matching another mapping will return the mapping
target.  For instance, given the following:

  =>X a,b,c=>Y

An input of "b" will return "Y" and an input of "k" will return "X".  The
Default mapping target may be the same as the mapping target with an explicit
source group.  For instance, the following can be interperated as "map a, b
and c to X, map 1, 2, 3 and anything we don't know about to Y":

 a,b,c=>X 1,2,3=>Y =>Y

As a practical example, simplifying the audience values in MARC fixed fields
to three groups and using those values in a new coded value map would allow
one to create a dynamically populated search interface that uses more patron-
friendly terms.  For instance:

  a,b,j=>K c,d=>T a=>A =>A g=>E

The above makes the assumption that Unknown, Specialized and Not Coded should
be lumped in with Audult, just to be safe, and General is for (E)veryone.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
13 years agoPull in custom.js with offline/chrome overlays
Jason Etheridge [Tue, 6 Sep 2011 19:14:20 +0000 (15:14 -0400)]
Pull in custom.js with offline/chrome overlays

Or at least try to.  Main goal here is for browser.xul to see url constant
changes from custom.js and feed them to embedded Acquisition interfaces via
xulG.urls

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
13 years agoTPac: first try audience_group SVF for audience maps
Bill Erickson [Tue, 6 Sep 2011 16:12:36 +0000 (12:12 -0400)]
TPac: first try audience_group SVF for audience maps

Allow for configuration of an "audience_group"
config.record_attr_definition for collecting MARC audience codes into more
human-friendly groups.  This allows the TPac to behave more like the
current OPAC, which groups audience values into simpler collections. As
with "mattype", if no "audience_group" configuration exists, fall back to
the traditional, long-form "audience" attribute.

For future referene, here's an example setup using an "audience_group"
attribute.

-- Can be done in MARC Record Attributes admin UI
INSERT INTO config.record_attr_definition
    (name, label, description, fixed_field, filter)
VALUES
    ('audience_group', 'Audience Group', 'Audience Group', 'Audn', TRUE);

-- Can be done in MARC Coded Value Maps admin UI
INSERT INTO config.coded_value_map
    (ctype, code, value, description)
VALUES
    ('audience_group', 'A', 'Adult', 'Adult Audience'),
    ('audience_group', 'T', 'Teen', 'Teen Audience'),
    ('audience_group', 'C', 'Children', 'Children Audience');

-- No UI currently
INSERT INTO config.record_attr_index_norm_map
    (attr, norm, params)
VALUES
    ('audience_group', (
        SELECT id FROM
            config.index_normalizer WHERE func =
            'generic_map_normalizer'
        ),
        '["=>A g,e,f=>A a,c,j,b=>C d=>T"]'
);

Signed-off-by: Bill Erickson <berick@esilibrary.com>
13 years agoRepaired field name thinko for config.record_attr_index_norm_map
Bill Erickson [Tue, 6 Sep 2011 15:28:00 +0000 (11:28 -0400)]
Repaired field name thinko for config.record_attr_index_norm_map

Signed-off-by: Bill Erickson <berick@esilibrary.com>
13 years agoHourly fine periods do not charge enough
Dan Wells [Thu, 1 Sep 2011 13:13:47 +0000 (09:13 -0400)]
Hourly fine periods do not charge enough

Hourly fine periods are not charging for the first period of
overdue-ness. If an item is due at 2:00pm and has a fine of
$.50 per hour, the first fine should be eligible for generation
at 2:01pm. As it stands, the first fine does not generate until
an entire fine period has elapsed, so in this case, 3:00pm.

The previous version of the code had a special case for day-
granular fine periods, so a majority of fines were not affected.
This commit expands the same idea (charging for the fine period
you are currently "in") to all fine periods.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
13 years agoTPac: Multiple holds in staff client place-holds session
Bill Erickson [Fri, 2 Sep 2011 19:25:39 +0000 (15:25 -0400)]
TPac: Multiple holds in staff client place-holds session

Leave the patron_barcode cookie in place after holds placement succeeds
from the embedded catalog so that the next hold request will use the
same patron.  This allows for multiple hold request to take place within
one session.  The negative is that the cookie sticks around even after a
patron session is closed.  This is normally not a problem, because each
new patron sesion will update the cookie.  (And when the cookie is not
updated, staff still have the option to /not/ place a hold for the
pre-selected user).  However, it would be nice to have the staff client
clear the cookie at the right time.  Will look at that too.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
13 years agoTPac: MARC expert search bug fixes
Bill Erickson [Fri, 2 Sep 2011 16:11:27 +0000 (12:11 -0400)]
TPac: MARC expert search bug fixes

- Allow for searching on tags w/o specifying subfield
- Protect against empty search queries
- Cleanup: Avoid some of the manual osrf session management by using
  $U->simplereq, which does all of that for us.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
13 years agoTPac: Submit search on sort/limit change
Bill Erickson [Fri, 2 Sep 2011 14:48:46 +0000 (10:48 -0400)]
TPac: Submit search on sort/limit change

By popular demand, when the user changes the search sort or
limit-to-available options, the form is immediately resubmitted via
JavaScript.  Fails gracefully in the absence of JS.

Minor JS cleanup.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
13 years agoMerge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac...
Bill Erickson [Fri, 2 Sep 2011 16:25:22 +0000 (12:25 -0400)]
Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac-master-merge

13 years agoStamping upgrade script for LP#837566
Mike Rylander [Fri, 2 Sep 2011 16:07:14 +0000 (12:07 -0400)]
Stamping upgrade script for LP#837566

Signed-off-by: Mike Rylander <mrylander@gmail.com>
13 years agoLP#837566 undeleting a bib record causes an error
Jason Etheridge [Fri, 2 Sep 2011 15:13:07 +0000 (11:13 -0400)]
LP#837566 undeleting a bib record causes an error

fixes a column reference

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
13 years agofix Acq -> Update Barcodes post-parts
Jason Etheridge [Fri, 2 Sep 2011 03:18:03 +0000 (23:18 -0400)]
fix Acq -> Update Barcodes post-parts

Items from acquisitions were having null instead of [] for .parts()

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
13 years agoTPac: more template scrubbing and cleaning
Bill Erickson [Thu, 1 Sep 2011 18:41:42 +0000 (14:41 -0400)]
TPac: more template scrubbing and cleaning

Signed-off-by: Bill Erickson <berick@esilibrary.com>
13 years agoLP#838969 Silent print cannot be unselected
Jason Etheridge [Thu, 1 Sep 2011 18:06:53 +0000 (14:06 -0400)]
LP#838969 Silent print cannot be unselected

Thanks Bill!

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
13 years agoTpac: Support for skinning via Apache configuration
Bill Erickson [Thu, 1 Sep 2011 17:24:43 +0000 (13:24 -0400)]
Tpac: Support for skinning via Apache configuration

More generally, support for augmenting the Template Toolkit template
path list to allow for per-vhost template paths.

For example, a 3-tier consortium could do something like this:

<VirtualHost ...>
    [...]
    PerlAddVar OILSTemplatePath "/openils/var/templates_branch_abc"
    PerlAddVar OILSTemplatePath "/openils/var/templates_system_xyz"
    PerlAddVar OILSTemplatePath "/openils/var/templates_shared"
</VirtualHost>

Signed-off-by: Bill Erickson <berick@esilibrary.com>
13 years agoDon't prepend / to relative template paths collab/berick/templates-remove-default
Bill Erickson [Thu, 1 Sep 2011 17:02:33 +0000 (13:02 -0400)]
Don't prepend / to relative template paths

Signed-off-by: Bill Erickson <berick@esilibrary.com>
13 years agoRemove /default/ from template paths
Bill Erickson [Thu, 1 Sep 2011 14:58:03 +0000 (10:58 -0400)]
Remove /default/ from template paths

The original goal of having a /default/ component to the template path
was to support alternate skins.  However, Template Toolkit supports
alternate skins through a more elegant mechanism of providing template
overlays via template path configuration.  In other words, skin files
will be differentiated by the location of their root path and not
because they live in a different skin directory inside the main
template root.

Because of this, the /default/ component in the template path serves
no purpose and generally just gets in the way.

As a part of this, EGWeb.pm no longer inserts the skin name into the
template file path.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
13 years agoMerge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac...
Bill Erickson [Thu, 1 Sep 2011 13:27:45 +0000 (09:27 -0400)]
Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac-master-merge

13 years agoRemoved (very) old, unused template files
Bill Erickson [Thu, 1 Sep 2011 12:44:20 +0000 (08:44 -0400)]
Removed (very) old, unused template files

Signed-off-by: Bill Erickson <berick@esilibrary.com>
13 years agoTPac: more cleanup of unused IDs and files
Bill Erickson [Wed, 31 Aug 2011 21:13:23 +0000 (17:13 -0400)]
TPac: more cleanup of unused IDs and files

Signed-off-by: Bill Erickson <berick@esilibrary.com>
13 years agoTpac: more unused ID cleanup; parts/record
Bill Erickson [Wed, 31 Aug 2011 18:02:30 +0000 (14:02 -0400)]
Tpac: more unused ID cleanup; parts/record

Signed-off-by: Bill Erickson <berick@esilibrary.com>
13 years agoAddress LP#837517, Vandelay ISxN matching user/mrpeters-isl/payment_type_fix
Lebbeous Fogle-Weekley [Wed, 31 Aug 2011 16:13:33 +0000 (12:13 -0400)]
Address LP#837517, Vandelay ISxN matching

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
13 years agoAdd the forgotten script-numbering to previous commit (db756e623a9)
Lebbeous Fogle-Weekley [Wed, 31 Aug 2011 15:55:47 +0000 (11:55 -0400)]
Add the forgotten script-numbering to previous commit (db756e623a9)

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
13 years agoAddress LP#837522, bib-killing authority overlay generation bug
Mike Rylander [Tue, 30 Aug 2011 18:25:27 +0000 (14:25 -0400)]
Address LP#837522, bib-killing authority overlay generation bug

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
13 years agoTpac: removed unused code and IDs in advanced search parts
Bill Erickson [Wed, 31 Aug 2011 15:13:58 +0000 (11:13 -0400)]
Tpac: removed unused code and IDs in advanced search parts

Signed-off-by: Bill Erickson <berick@esilibrary.com>
13 years agoMerge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac...
Bill Erickson [Wed, 31 Aug 2011 13:36:52 +0000 (09:36 -0400)]
Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac-master-merge

13 years agoMerge branch 'collab/miker/acs-ui-repairs' from working/Evergreen.git
Lebbeous Fogle-Weekley [Tue, 30 Aug 2011 20:28:20 +0000 (16:28 -0400)]
Merge branch 'collab/miker/acs-ui-repairs' from working/Evergreen.git

Use bib tag instead to find the correct ACS, instead of the static field map
Use authority main entry instead of thesaurus to find the correct ACS
Add method for finding an ACS by authority tag

See https://bugs.launchpad.net/evergreen/+bug/837637

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
13 years agoTpac: only show opac_visible notification opt-in settings
Bill Erickson [Tue, 30 Aug 2011 16:54:48 +0000 (12:54 -0400)]
Tpac: only show opac_visible notification opt-in settings

Signed-off-by: Bill Erickson <berick@esilibrary.com>
13 years agoTpac: Support for adding/editing pending addresses
Bill Erickson [Wed, 10 Aug 2011 17:55:40 +0000 (13:55 -0400)]
Tpac: Support for adding/editing pending addresses

Signed-off-by: Bill Erickson <berick@esilibrary.com>
13 years agoTpac: show hold/copy count summary in holds status
Bill Erickson [Mon, 29 Aug 2011 19:27:04 +0000 (15:27 -0400)]
Tpac: show hold/copy count summary in holds status

Signed-off-by: Bill Erickson <berick@esilibrary.com>
13 years agoTPac: apply the select-all JS to holds list
Bill Erickson [Mon, 29 Aug 2011 15:45:01 +0000 (11:45 -0400)]
TPac: apply the select-all JS to holds list

Signed-off-by: Bill Erickson <berick@esilibrary.com>
13 years agoTpac: config option for record detail jacket size
Bill Erickson [Mon, 29 Aug 2011 17:47:16 +0000 (13:47 -0400)]
Tpac: config option for record detail jacket size

Signed-off-by: Bill Erickson <berick@esilibrary.com>
13 years agoTpac: merged esi/template-toolkit-opac; conflict resolution
Bill Erickson [Mon, 29 Aug 2011 17:37:19 +0000 (13:37 -0400)]
Tpac: merged esi/template-toolkit-opac; conflict resolution

Signed-off-by: Bill Erickson <berick@esilibrary.com>
13 years agoMerge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac...
Bill Erickson [Mon, 29 Aug 2011 17:08:15 +0000 (13:08 -0400)]
Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac-master-merge

13 years agoMerge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac
Bill Erickson [Mon, 29 Aug 2011 15:23:54 +0000 (11:23 -0400)]
Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac

13 years agoMerge branch 'template-toolkit-opac' of git.evergreen-ils.org:evergreen/equinox into...
Bill Erickson [Mon, 29 Aug 2011 15:23:44 +0000 (11:23 -0400)]
Merge branch 'template-toolkit-opac' of git.evergreen-ils.org:evergreen/equinox into template-toolkit-opac

13 years agoMerge branch 'master' of git.evergreen-ils.org:Evergreen
Jason Etheridge [Fri, 26 Aug 2011 20:03:15 +0000 (16:03 -0400)]
Merge branch 'master' of git.evergreen-ils.org:Evergreen

13 years agopin upgrade version number for magic macros
Jason Etheridge [Fri, 26 Aug 2011 20:02:05 +0000 (16:02 -0400)]
pin upgrade version number for magic macros
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
13 years agoExpose sort values from lists
Thomas Berezansky [Tue, 23 Aug 2011 16:06:55 +0000 (12:06 -0400)]
Expose sort values from lists

Specifically useful for things like receipt templates.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
13 years agoFive initial OU settings for %INCLUDE()% use
Thomas Berezansky [Tue, 23 Aug 2011 12:33:04 +0000 (08:33 -0400)]
Five initial OU settings for %INCLUDE()% use

header_text
footer_text
notice_text
alert_text
event_text

None are really restricted to a specific purpose. Names are more of a
hint than a requirement.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
13 years agoReceipt Macros: %INCLUDE()%
Thomas Berezansky [Mon, 22 Aug 2011 00:00:55 +0000 (20:00 -0400)]
Receipt Macros: %INCLUDE()%

Takes a single parameter: The name of the include.

Each include is an OU setting: circ.staff_client.receipt.<name>

The includes are done as the first substitution. This has the benefit
of allowing other substitutions within them (including additional calls
to %INCLUDE()%) and the downside of not allowing dynamic includes.

Because an include can contain includes the code keeps track of all
includes already done, skipping those already included. This prevents
infinite loops when A includes B and B includes A, or longer variants
thereof.

Primary intended use would be for libraries to place frequently changed
notices and such in their templates. Instead of having to edit every
template on every workstation they use the %INCLUDE()% macro and edit
the org unit settings. At the next login the updated text appears on
every workstation.

Due to the includes being processed first a library could use them to
centrally administer templates by using an include for each piece of
each template.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
13 years agoReceipt Macros: %SORT()%
Thomas Berezansky [Fri, 19 Aug 2011 19:15:48 +0000 (15:15 -0400)]
Receipt Macros: %SORT()%

Added to line item templates.
Takes one or more comma separated parameters:
field AS type ASC/DESC

AS type is optional
ASC/DESC is optional

Field is the field name without % signs.
Type is DATE, INT, FLOAT, NUMBER, LOWER, or UPPER

DATE will sort based on wrapping both sides in "new Date"
INT will sort based on wrapping both sides in parseInt
FLOAT and NUMBER will sort based on wrapping both sides in parseFloat
LOWER will apply .toLowerCase to both sides
UPPER will apply .toUpperCase to both sides

ASC (default) will sort in ascending order.
DESC will sort in descending order.

Can be specified more than once:
%SORT(a,b)% %SORT(c)%
Would sort by a, then b, then c.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Jason Etheridge <jason@esilibrary.com>