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.
Dan Scott [Thu, 18 Aug 2011 15:04:20 +0000 (11:04 -0400)]
T-PAC: Point the Basic Catalog link to the T-PAC
Now that the T-PAC provides the base functionality (and more!) required
by the HTML-only basic catalog, but in a more extensible / skinnable
fashion, replace the link from the JSPAC to the Basic Catalog with a
link to the T-PAC - and add a reciprocal link from the T-PAC back to the
JSPAC, in case anybody wants to go that route.
Dan Scott [Tue, 16 Aug 2011 03:14:01 +0000 (23:14 -0400)]
Further autogen.sh cleanup
* Roll cache-generator.sh functionality into autogen.sh
* No longer install deleted scripts
* Teach Perl build infrastructure about OpenILS::Utils::Configure
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Dan Scott [Mon, 15 Aug 2011 22:03:37 +0000 (18:03 -0400)]
Revamp autogen.sh to call functions from a Perl module
This cut moves all of the logic from the individual scripts that
autogen.sh used to call into a self-contained Perl module. We use
OpenILS::Utils::Cronscript to avoid much of the init dupe code.
Note that calling Perl functions from a bash script is not crazy pretty,
but perhaps in the long run autogen.sh becomes something else. This is
just a step towards consolidating those functions in a single module
while maintaining the same interface as before.
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Dan Scott [Wed, 17 Aug 2011 21:18:54 +0000 (17:18 -0400)]
TPAC: Strip the "page" GET param from author searches
mkurl() generates a URL that, by default, retains all of the parameters
that the currnt query string includes - useful for retaining library
search scope, etc. However, searches for authors that are launched by
clicking on the author's name in the search results page / record
details were failing in many cases because the "page" parameter came
along with it - and if there weren't five pages of results for page=5,
for example, then no hits would be shown.
This commit removes the page param from the URL. In other places, all of
the params are stripped (see cnbrowse) but as I assume we want to retain
search scope and potentially other parameters, we'll start with the
smallest possible change.
Dan Scott [Wed, 17 Aug 2011 17:01:08 +0000 (13:01 -0400)]
Assume username, not barcode, in TPAC login
In the absence of a barcode regex OU setting (opac.barcode_regex), the
TPAC was assuming that the entered value was a barcode. However, the
default JSPAC assumption was that the entered value was a username. This
commit makes the TPAC continue to function with the same assumptions as
the default JSPAC in the absence of a barcode regex OU setting.
Dan Scott [Wed, 17 Aug 2011 21:18:54 +0000 (17:18 -0400)]
TPAC: Strip the "page" GET param from author searches
mkurl() generates a URL that, by default, retains all of the parameters
that the currnt query string includes - useful for retaining library
search scope, etc. However, searches for authors that are launched by
clicking on the author's name in the search results page / record
details were failing in many cases because the "page" parameter came
along with it - and if there weren't five pages of results for page=5,
for example, then no hits would be shown.
This commit removes the page param from the URL. In other places, all of
the params are stripped (see cnbrowse) but as I assume we want to retain
search scope and potentially other parameters, we'll start with the
smallest possible change.
Dan Scott [Wed, 17 Aug 2011 17:01:08 +0000 (13:01 -0400)]
Assume username, not barcode, in TPAC login
In the absence of a barcode regex OU setting (opac.barcode_regex), the
TPAC was assuming that the entered value was a barcode. However, the
default JSPAC assumption was that the entered value was a username. This
commit makes the TPAC continue to function with the same assumptions as
the default JSPAC in the absence of a barcode regex OU setting.
Bill Erickson [Wed, 17 Aug 2011 13:17:17 +0000 (09:17 -0400)]
Vandelay: don't clear item import profile when creating new queue
This avoids the problem of: enter import-profile in the UI => enter name for
new queue => profile is cleared. Import profile is still cleared/set when
an existing queue is selected, since existing queues already have an
item import profile set.
Dan Scott [Tue, 16 Aug 2011 20:44:16 +0000 (16:44 -0400)]
Address ISBN issues in T-PAC
A few problems fixed here:
* Refer to args.isbns (plural) consistently; at times we were referring
to args.isbn which did not exist
* Grab the textContent of the SFX ISBN node rather than the raw
XML::LibXML Element
* Use an assignment operation when regex'ing the SFX ISBN, as the
in-place was interpreted as a "print me" stmt and displaying the raw
SFX ISBN.
Dan Scott [Tue, 16 Aug 2011 19:09:58 +0000 (15:09 -0400)]
Delete templates_kcls from core
The KCLS templates, while a useful demonstration of how to skin the
T-PAC, should be maintained outside of the core repository as they
contain branding elements, etc, that are specific to KCLS.