Modify ↓
#11374 closed enhancement (fixed)
"Add keywords" section in newticket template
Reported by: | ipm | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Component: | TracKeywordsPlugin |
Severity: | normal | Keywords: | newticket |
Cc: | Trac Release: | 1.0 |
Description
How can I use the "add keywords" section in the newticket template?
Now I only see it in change ticket.
Thanks for all. Regards.
Attachments (0)
Change History (5)
comment:1 Changed 11 years ago by
Trac Release: | → 1.0 |
---|
comment:3 Changed 11 years ago by
Status: | new → assigned |
---|
Thank you for the patch, and sorry for the delay in reviewing it. I'll push the changes now.
comment:5 Changed 11 years ago by
Since I modified the patch slightly and didn't have much time to test it out, I appreciate if you have a chance to report back after you've tested the latest changes.
Note: See
TracTickets for help on using
tickets.
I've modified the code to do this:
In web_ui.py:
def filter_stream(self, req, method, filename, stream, data): if filename in 'ticket.html': ticket = data.get('ticket') if self.keywords and ticket and ticket.exists and \ 'TICKET_CHGPROP' in req.perm(ticket.resource): filter = Transformer('//fieldset[@id="properties"]') stream |= filter.after(self._render_template(req)) + else: + filter = Transformer('//fieldset[@id="properties"]') + stream |= filter.after(self._render_template(req)) elif filename == 'newticket.html': filter = Transformer('//fieldset[@id="properties"]') stream |= filter.after(self._render_template(req)) elif filename == 'wiki_edit.html' and self.tagsplugin_enabled: filter = Transformer('//fieldset[@id="changeinfo"]') stream |= filter.after(self._render_template(req)) return stream