From: Bill Erickson Date: Mon, 22 Apr 2019 15:56:51 +0000 (-0700) Subject: LP1825851 Server Template Release Notes X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=815a3cc6333abff9a3866d285b8d5ec7ee935717;p=working%2FEvergreen.git LP1825851 Server Template Release Notes Signed-off-by: Bill Erickson --- diff --git a/docs/RELEASE_NOTES_NEXT/Administration/server-print-templates.adoc b/docs/RELEASE_NOTES_NEXT/Administration/server-print-templates.adoc new file mode 100644 index 0000000000..a08b94ecca --- /dev/null +++ b/docs/RELEASE_NOTES_NEXT/Administration/server-print-templates.adoc @@ -0,0 +1,82 @@ +Server-Managed Print Templates +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +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. + +An example template ("Address Label") is included to demonstrate how +it's used. See below for instructions on enabling the Address Label +template. + +Note that while it's possible to migrate AngularJS receipt templates +to be server-hosted (again, see below) the main thrust of this feature +is to provide the basis for managing templates going forward, particularly +as interfaces are migrated to the Angular browser client. + +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 generate 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 +--------------------------------------------------------------------------- + +Migrating To A Server Template +++++++++++++++++++++++++++++++ + +Once a template is added to the database and the admin has configured the +template as desired, the server-managed template will be used instead of +the traditional TT2 templates in the AngularJS client. + +Using the new 'Address Label' template for example. + +1. Modify, test, and activate the server template labeled 'Address Label' +2. Remove any the workstation setting which stores user-saved versions + of the template by deleting the workstation type. +[source,sql] +--------------------------------------------------------------------------- +DELETE FROM config.workstation_setting_type + WHERE name = 'eg.print.template.patron_address'; +--------------------------------------------------------------------------- +3. Navigate to patron search, search for a patron, then 'Print' the address. +