Bug 13112

Summary: Add name of template file in html comment for each '.tt' file.
Product: Koha Reporter: Barton Chittenden <barton>
Component: TemplatesAssignee: Marc Véron <veron>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: aleisha, tomascohen, veron
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 13112 - Add name of template file in html comment for each '.tt' file.
[PASSED QA] Bug 13112 - Add name of template file in html comment for each '.tt' file.

Description Barton Chittenden 2014-10-20 12:50:34 UTC
For the purposes of trouble-shooting, it would be helpful to be able to do a a browser search from with 'view page source' to quickly determine the name of the template being used.

I would suggest adding the file path, starting with either 'intranet-tmpl' or 'opac-tmpl', e.g.

<-- TEMPLATE FILE NAME: opac-tmpl/bootstrap/en/modules/opac-results.tt -->
Comment 1 Marc Véron 2014-10-20 20:09:12 UTC Comment hidden (obsolete)
Comment 2 Aleisha Amohia 2014-10-28 03:38:36 UTC
Tested on sandbox, works fine, signing off. :)
Comment 3 Katrin Fischer 2014-10-28 07:04:49 UTC
Created attachment 32820 [details] [review]
[PASSED QA] Bug 13112 - Add name of template file in html comment for each '.tt' file.

This patch adds the name of the .tt file as a HTML comment to OPAC and Staff client pages.

To test:
Apply patch
Open pages in OPAC and Staff client.
Make sure that a comment similar to the following appears in the source code:
<!-- TEMPLATE FILE: intranet-main.tt -->

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Comment 4 Tomás Cohen Arazi 2014-10-28 13:54:54 UTC
Patch pushed to master.

Nice and simple enhancement Marc!