Modify

Opened 4 years ago

Closed 4 years ago

#13875 closed enhancement (fixed)

[PATCH] Support Jinja2 Templates

Reported by: anonymous Owned by: Ryan J Ollos
Priority: normal Component: DynamicFieldsPlugin
Severity: normal Keywords: patch
Cc: Trac Release: 1.4

Description

I was looking into what this plugin could offer, and decided to try updating the template used to Jinja2.

Attached is my attempt. I'm new to this plugin, so I may not have tested all cases.

The code change in web_ui.py is trivial:

        if hasattr(Chrome, 'jenv'):
            template = 'prefs_panel_jinja.html'
            return template, data
        else:
            template = 'prefs_panel.html'
            return template, data

Attachments (1)

prefs_panel_jinja.html (1.4 KB) - added by anonymous 4 years ago.
Jinja2 version of preferences panel.

Download all attachments as: .zip

Change History (5)

Changed 4 years ago by anonymous

Attachment: prefs_panel_jinja.html added

Jinja2 version of preferences panel.

comment:1 Changed 4 years ago by Ryan J Ollos

Status: newaccepted

comment:2 Changed 4 years ago by Ryan J Ollos

jinjachecker.py reveals a missing <html> tag, but otherwise looks good.

$ jinjachecker.py dynfields/templates/prefs_panel_jinja.html

comment:3 Changed 4 years ago by Ryan J Ollos

In 17855:

2.6.0dev: Add prefs template for Trac 1.4+

Refs #13875.

comment:4 Changed 4 years ago by Ryan J Ollos

Resolution: fixed
Status: acceptedclosed

Thanks, appreciate the good work!

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.