LP1825851 Server Template Release Notes user/berick/lp1825851-server-generated-print-templates-wip
authorBill Erickson <berickxx@gmail.com>
Mon, 22 Apr 2019 15:56:51 +0000 (08:56 -0700)
committerBill Erickson <berickxx@gmail.com>
Mon, 22 Apr 2019 15:58:02 +0000 (08:58 -0700)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
docs/RELEASE_NOTES_NEXT/Administration/server-print-templates.adoc [new file with mode: 0644]

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 (file)
index 0000000..a4f0651
--- /dev/null
@@ -0,0 +1,54 @@
+Server-Managed Print Templates
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+description
+
+Apache Configuration
+++++++++++++++++++++
+
+Apply Apache configuration changes to eg_vhost.conf and eg_startup
+
+* Add to eg_vhost.conf
+[source,conf]
+---------------------------------------------------------------------------
+<Location /print_template>
+    SetHandler perl-script
+    PerlHandler OpenILS::WWW::PrintTemplate
+    Options +ExecCGI
+    PerlSendHeader On
+    Require all granted
+</Location>
+---------------------------------------------------------------------------
+
+* 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); 
+---------------------------------------------------------------------------
+
+Migrating To A Server Template
+++++++++++++++++++++++++++++++
+
+Once a template is added to the database and the admin has configured the
+template as desired, the legacy template data for AngularJS needs to be 
+removed before the new template will be used.
+
+Using the new 'Address Label' template for example.
+
+1. Modify, test, and activate the server template labeled 'Address Label'
+2. Remove the static AngularJS template file:
+[source,sh]
+---------------------------------------------------------------------------
+rm /openils/var/templates/staff/share/print_templates/t_patron_address.tt2
+---------------------------------------------------------------------------
+3. 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';
+---------------------------------------------------------------------------
+
+