Receipt Macros: %INCLUDE()%
authorThomas Berezansky <tsbere@mvlc.org>
Mon, 22 Aug 2011 00:00:55 +0000 (20:00 -0400)
committerThomas Berezansky <tsbere@mvlc.org>
Mon, 22 Aug 2011 22:58:08 +0000 (18:58 -0400)
commitc72d323af1bbd19d1e5c480f8cdbe2b95d779b0d
treeb26785fe6bbce34204fb04f5e43a2c0ce95b1733
parent2ed593c217d05a145700ccf0c228a10016197ec6
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>
Open-ILS/xul/staff_client/chrome/content/util/print.js