]> git.evergreen-ils.org Git - Evergreen.git/blob - docs/RELEASE_NOTES_NEXT/Administration/server-print-templates.adoc
first rough pass at 3.4 release notes
[Evergreen.git] / docs / RELEASE_NOTES_NEXT / Administration / server-print-templates.adoc
1 Server-Managed Print Templates for Angular
2 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3
4 Adds support for generating print content via server-side web service.  
5 Server print templates are implemented as Template Toolkit and content
6 is compiled and generated on the server, based on runtime data provided
7 by clients.
8
9 Feature includes a new Angular admin interface for testing and editing
10 server-managed print templates.  The UI is accessed under Admin =>
11 Server Administration => Print Templates, though the menu entry may be
12 moved to Admin => Local Administration, once Local Admin is migrated
13 to Angular.
14
15 Two sample templates are included to demonstrate the format and 
16 functionality.  The `Holds For Bib Record` template may be tested by
17 navigating to the record holds tab in the Angular staff catalog 
18 (/eg2/en-US/staff/catalog/record/<record-id>/holds) and chose the 
19 `Print Holds` grid action.
20
21 Apache Configuration
22 ++++++++++++++++++++
23
24 Apply Apache configuration changes to eg_vhost.conf and eg_startup.
25
26 * Add to eg_vhost.conf
27 [source,conf]
28 ---------------------------------------------------------------------------
29 <Location /print_template>
30     SetHandler perl-script
31     PerlHandler OpenILS::WWW::PrintTemplate
32     Options +ExecCGI
33     PerlSendHeader On
34     Require all granted
35 </Location>
36 ---------------------------------------------------------------------------
37
38 * Add to eg_startup
39
40 [source,conf]
41 ---------------------------------------------------------------------------
42 # Pass second argument of '1' to enable process-level template caching.
43 use OpenILS::WWW::PrintTemplate ('/openils/conf/opensrf_core.xml', 0); 
44 ---------------------------------------------------------------------------
45
46 New Perl Dependency
47 +++++++++++++++++++
48
49 A new Perl module `HTML::Defang` is required for cleansing generated HTML 
50 of executable code for security purposes.  The dependency is added to 
51 the Makefile.install process for new builds.  Existing Evergreen instances
52 will need the dependency manually installed.
53
54 Installing on (for example) Ubuntu:
55
56 [source,conf]
57 ---------------------------------------------------------------------------
58 sudo apt-get install libhtml-defang-perl
59 ---------------------------------------------------------------------------