Server-Managed Print Templates for Angular ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Adds support for generating print content via server-side web service. Server print templates are implemented as Template Toolkit and content is compiled and generated on the server, based on runtime data provided by clients. Feature includes a new Angular admin interface for testing and editing server-managed print templates. The UI is accessed under Admin => Server Administration => Print Templates, though the menu entry may be moved to Admin => Local Administration, once Local Admin is migrated to Angular. Two sample templates are included to demonstrate the format and functionality. The `Holds For Bib Record` template may be tested by navigating to the record holds tab in the Angular staff catalog (/eg2/en-US/staff/catalog/record//holds) and chose the `Print Holds` grid action. Apache Configuration ++++++++++++++++++++ Apply Apache configuration changes to eg_vhost.conf and eg_startup. * Add to eg_vhost.conf [source,conf] --------------------------------------------------------------------------- SetHandler perl-script PerlHandler OpenILS::WWW::PrintTemplate Options +ExecCGI PerlSendHeader On Require all granted --------------------------------------------------------------------------- * Add to eg_startup [source,conf] --------------------------------------------------------------------------- # Pass second argument of '1' to enable process-level template caching. use OpenILS::WWW::PrintTemplate ('/openils/conf/opensrf_core.xml', 0); --------------------------------------------------------------------------- New Perl Dependency +++++++++++++++++++ A new Perl module `HTML::Defang` is required for cleansing generated HTML of executable code for security purposes. The dependency is added to the Makefile.install process for new builds. Existing Evergreen instances will need the dependency manually installed. Installing on (for example) Ubuntu: [source,conf] --------------------------------------------------------------------------- sudo apt-get install libhtml-defang-perl ---------------------------------------------------------------------------