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>
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>
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>
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>
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>
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>
Bill Erickson [Tue, 23 Aug 2011 18:22:06 +0000 (14:22 -0400)]
Support labelFormat for read-only AutoFieldWidget's
Previously only worked with edit widgets (e.g. drop-downs). This also
takes into account the fact that different instances of AutoFieldWidget
for the same class and value may have different labelFormat's
One user-visible result of this change is the ACQ read-only fund display
in purchase orders. Funds will now show the code and year for funds in
the copy grid before and after the data is rendered read-only.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Dan Scott [Thu, 23 Jun 2011 02:55:27 +0000 (22:55 -0400)]
Enhance sample Z39.50 config file
Make "expose holdings" the default; use specific indexes for ISBN and
ISSN; show how to scope results to a part of the org tree; and show that
multiple database configs can be specified in the same file.
Signed-off-by: Dan Scott <dan@coffeecode.net> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Liam Whalen [Thu, 11 Aug 2011 18:36:19 +0000 (14:36 -0400)]
Fixed seaching for a colon (:) surrounded by white space
When searching for a colon surrounded by white space the search would
freeze. An example of such a search would be:
Climate change economics and policy : an RFF anthology
This was happening because the decompose function within QueryParser.pm
Would build a regular expression that would search the query for both
classes and class aliases e.g (keyword and kw). However, when buliding
the regex for aliases QueryParser would add extraneous or symbols (|)
to the end of the regex without adding the accompanying alias.
This was happening because there was a check to see if the corresponding
class to each alias had already been added to the regex. But, the
check to see if the alias had already been appened to the regex happened
too late. I have moved the check to encopase the appending of the or
symbols and the class. Signed-off-by: Liam Whalen <lwhalen@evergreen-dev.catalogue.nrcan.gc.ca> Signed-off-by: Mike Rylander <mrylander@gmail.com>
James Fournie [Thu, 7 Jul 2011 02:07:50 +0000 (19:07 -0700)]
Adds org unit selectors to Admin -> Server Admin -> Booking menu items, also modifies
the IDL to give context-field based pcrud perms instead of 'require global'
This makes the booking module more org-unit scopable
Signed-off-by: James Fournie <jfournie@sitka.bclibraries.ca> Signed-off-by: Mike Rylander <mrylander@gmail.com>
When a user selects "Merge On Single Match" or "Merge On Best Match" and
apply a minimum quality ratio, the fall-through profile will be used in
a secondary merge attempt for any records that fail the initial merge
due to insufficient record quality.
This allows the user to choose 2 different outcomes based on record
quality. For example, you may wish to do a full overlay for all
high-quality records, but only extract subjects or other information
from lower quality records. This also allows users to do record+copy
imports for high-quality records and copy-only imports for low quality
records (using a no-op merge profile like "replace 901c").
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Jason Etheridge [Fri, 22 Jul 2011 05:47:15 +0000 (01:47 -0400)]
use_perm column for config.z3950_source
The idea is that if a permission code is specified for a given source, then
staff will need that permission to use that source in the staff client z39.50
interface.
Signed-off-by: Jason Etheridge <jason@esilibrary.com> Signed-off-by: Bill Erickson <berick@esilibrary.com>
Dan Scott [Sat, 20 Aug 2011 21:51:46 +0000 (17:51 -0400)]
Remove cache-generator.sh from Makefile.am
In a previous commit, we removed cache-generator.sh. Now we remove the
remaining reference to it in the Makefile.am that was generating an
error (reported by Ben Webb).
Dan Scott [Fri, 19 Aug 2011 20:35:12 +0000 (16:35 -0400)]
Disable Google Analytics in T-PAC by default
The option to enable Google Analytics has been turned into a config
setting in parts/config.tt2 for now, with a place to set the GA account
code.
Also, get consistent with foo.enabled instead of a mix of foo.enable /
foo.enabled in config.tt2.
Also, be a bit more careful about whitespace and hide comments in the
HTML source about things that are disabled (such as ChiliFresh and
Google Analytics) until they are enabled.
Bill Erickson [Fri, 19 Aug 2011 19:50:22 +0000 (15:50 -0400)]
Vandelay: repair item attr context org selector
1. Prevents resetting the context selector to the workstation org unit
each time it's changed.
2. Prevent the unintentional pileup of dojo.connect() events, which
can lead to exponential growth in the number of server calls to fetch
import-item-attribute-definitions with each change of the context org
selector.
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Ben Shum [Tue, 2 Aug 2011 15:15:57 +0000 (11:15 -0400)]
#LP801961, error when running edi_fetcher.pl
This patch addresses an error encountered when running edi_fetcher.pl.
The method "is_dir" should be just plain "dir" in RemoteAccount.pm file. Signed-off-by: Ben Shum <bshum@biblio.org> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Dan Wells [Tue, 16 Aug 2011 21:22:47 +0000 (17:22 -0400)]
Stricter order for actor.org_unit_parent_protect()
actor.org_unit_parent_protect() may not work due to the fact
that 'IF' conditions in PL/pgSQL are not necessarily processed
in the order written. This line:
"IF TG_OP = 'INSERT' OR NEW.parent_ou
IS DISTINCT FROM OLD.parent_ou THEN"
may fail because the 'IS DISTINCT FROM' happens before the
'INSERT' check, and and that fails because there is no 'OLD'
variable for INSERTs.
This commit may not be the optimal style for this circumstance
in this language, but it works. It also appears to change more
than it really does due to a loss of one level of indentation in
the structure.
Signed-off-by: Dan Wells <dbw2@calvin.edu> Signed-off-by: Dan Scott <dscott@laurentian.ca>
Dan Scott [Thu, 18 Aug 2011 19:32:53 +0000 (15:32 -0400)]
Update README to reflect the --create-database option
Now that eg_db_config.pl is intelligent enough to create the database,
update the README to free people from the tyranny of having to manually
issue database creation (and contrib-adding) commands.