lp834961: fix authoritative versions of callnumber retrieval calls
Makes open-ils.search.callnumber[.fleshed].retrieve.authoritative
actually be authoritative. Fixes bug where adding a volume
could result in a false ASSET_CALL_NUMBER_NOT_FOUND error if using
database replication and Slony-II.
Bill Erickson [Tue, 13 Sep 2011 17:42:01 +0000 (13:42 -0400)]
Remove unused reference to oils_web.xml in startup.pl
TODO: give EGCatLoader child_init-like functionality to connect to
opensrf to address the (unlikely) case that EGWeb/EGCatLoader are
the first/only mod_perl handlers loaded on an Evergreen Apache server.
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Bill Erickson [Tue, 13 Sep 2011 16:49:17 +0000 (12:49 -0400)]
Template Toolkit OPAC
See Template Toolkit OPAC release notes at
http://evergreen-ils.org/dokuwiki/doku.php?id=dev:opac:template-toolkit:release_notes
Additional non-tpac-specific changes include moving web templates
from the web dir into Open-ILS/src/templates/, removing /default/
from the template paths, and porting vandelay strings from the DTD
into the template (for better/consistent translation support).
Dan Scott [Tue, 13 Sep 2011 02:51:23 +0000 (22:51 -0400)]
Fix mislabelling of Cancel button as Submit
As funny as it was to give people two options: Submit, or Submit, one
could imagine that it would be confusing. Also, remove the alt / title
attributes now that we're using meaningful markup that stands on its
own.
Dan Scott [Tue, 13 Sep 2011 02:17:39 +0000 (22:17 -0400)]
CSS-ize the search results control bar
Along with the standard "swap images with fancy CSS links", we also
bring some style to the rather drab "Detailed View" link in the search
results control bar.
Dan Scott [Mon, 12 Sep 2011 19:35:17 +0000 (15:35 -0400)]
CSS versions of the main MyOPAC tabs
We can reuse much of the advanced search tab CSS (imagine that!), so not
only are we getting accessibility and HTTP request wins, we're cutting
down on the size of the CSS to deal with to skin this cat(alogue).
Dan Scott [Mon, 12 Sep 2011 18:47:04 +0000 (14:47 -0400)]
Style the advanced search tabs with CSS
We could go further and disable the link on the active advanced search
tab, but for now we're just replacing what was there with a reasonable
visual approximation.
Dan Scott [Mon, 12 Sep 2011 17:40:19 +0000 (13:40 -0400)]
Use SUBMIT buttons instead of IMAGE buttons
With a bit of CSS, we can replace <input type="image"> buttons with
<input type="submit"> buttons. The payoff is directly translatable
values and better semantics for screen readers, etc, rather than having
to set up a process of generating buttons in your colour & languages of
choice - as well as fewer HTTP requests for images over the network.
Note that we also replace some of the JavaScript-dependent reset /
cancel links with <input type="reset"> buttons.
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>
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.
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>
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>
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>
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>
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>
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>
Dan Scott [Wed, 7 Sep 2011 19:18:07 +0000 (15:18 -0400)]
Display warning message and prompt before PostgreSQL removal
Building on the good work in LP# 801624, use the -P "prompt" flag
instead of -yq for apt(itude) to ensure that the user has the ability to
quit the dependency install and reevaluate whether they want to actually
destroy their existing PostgreSQL databases. Note that this is
specifically in the context of the removal of the database packages,
rather than a global change.
Also, turn the inline comment into a displayed description of what is
happening and why, along with a nice big warning.
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>