Edgewall Software
Modify

Opened 5 years ago

Closed 5 years ago

#13291 closed enhancement (fixed)

List text templates on Interface Customization of about page

Reported by: Ryan J Ollos Owned by:
Priority: normal Milestone: 1.4.2
Component: general Version:
Severity: normal Keywords:
Cc: Branch:
Release Notes:

Templates with extension txt (e.g. ticket_notify_email.txt) are shown on the About page in the Interface Customization section.

API Changes:
Internal Changes:

Description

Currently, only files ending in .html are listed. .txt files should also be listed. Or maybe we should just list all files in the directories?

Attachments (0)

Change History (2)

comment:1 by Ryan J Ollos, 5 years ago

Waiting to see what the problem is for #13287, but if we needed to debug template overrides and name conflicts with plugins, the following could be useful:

  • trac/web/chrome.py

    diff --git a/trac/web/chrome.py b/trac/web/chrome.py
    index 2f663e13a..894cc4ffa 100644
    a b class Chrome(Component):  
    13181318            self.jenv.globals.update(unicode=to_unicode)
    13191319            presentation.jinja2_update(self.jenv)
    13201320            self.jenv_text = self.jenv.overlay(autoescape=False)
    1321         return (self.jenv_text if text else self.jenv).get_template(filename)
     1321        template = (self.jenv_text if text else self.jenv).get_template(filename)
     1322        self.log.debug("Loaded template from %s", template.filename)
     1323        return template
    13221324
    13231325    def render_template(self, req, filename, data, metadata):
    13241326        """Renders the ``filename`` template using ``data`` for the context.
11:54:22 Trac[main] DEBUG: Rendering response with template ticket.html
11:54:22 Trac[chrome] DEBUG: Loaded template from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/ticket/templates/ticket.html

comment:2 by Ryan J Ollos, 5 years ago

Release Notes: modified (diff)
Resolution: fixed
Status: newclosed

Committed to 1.4-stable in r17324, merged to trunk in r17325.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.