Receipt Macros: %INCLUDE()%
authorThomas Berezansky <tsbere@mvlc.org>
Mon, 22 Aug 2011 00:00:55 +0000 (20:00 -0400)
committerJason Etheridge <jason@esilibrary.com>
Fri, 26 Aug 2011 19:57:36 +0000 (15:57 -0400)
commita1681de689a55638154662e0e9158468456e2543
treec30506ec8c47847598d286b1ef253848b8ce4e3e
parentb827b4b5d31074c2ec2cfb6635b541b243add728
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>
Open-ILS/xul/staff_client/chrome/content/util/print.js