#10995 closed enhancement (fixed)
[PATCH] Use add_script_data to pass data instead directly using TemplateLoader and render.
Reported by: | Jun Omae | Owned by: | Dirk Stöcker |
---|---|---|---|
Priority: | normal | Component: | TracIniAdminPanelPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.12 |
Description
The plugin currently directly use genshi.template.TemplateLoader
and the rendering to pass data. I think that code is complicated. It would be simple to use add_script_data
.
Attachments (3)
Change History (12)
Changed 12 years ago by
Attachment: | traciniadminpanel-use-add-script-data-r12844.diff added |
---|
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
P.S. Please use "trunk". While I probably will fix large bugs and security issues, I don't plan to update the 0.12 branch in any other way.
Changed 12 years ago by
Attachment: | traciniadminpanel-use-add-script-data-r12853-trunk.diff added |
---|
comment:3 Changed 12 years ago by
Ok. Understand iniadminpanel branch policy.
I just created my patch, traciniadminpanel-use-add-script-data-r12853-trunk.diff for trunk.
comment:4 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:5 Changed 12 years ago by
Maybe you also know a solution for a small issue: The descriptions should get wiki formated properly, currently they are output as text.
Changed 12 years ago by
Attachment: | traciniadminpanel-wiki-to-html-r12855-trunk.diff added |
---|
comment:6 Changed 12 years ago by
Use format_to_html
instead of format_to_oneline
or wiki_to_html
on genshi template. New patch, traciniadminpanel-wiki-to-html-r12855-trunk.diff, it would use wiki_to_html
on genshi template.
comment:8 Changed 12 years ago by
Applied with modifications for better style.
Only problem I see is that wiki_to_html is described as deprecated in trac code and will be removed. format_to_wiki should be used instead, but I failed to do so. I don't yet fully understand the template system, especially not which functions are available to templates and which not.
Thanks for the help. I would have stalled that issue until the far future :-)
comment:9 Changed 12 years ago by
wiki_to_html
is deprecated, but the wiki_to_html
function that is passed to the template is a partial function of format_to_html
. See here.
It is extremely confusing that format_to_html
is renamed to wiki_to_html
when pased to the template!
Sorry, that patch conflicts with the changes from #10994. Can you please recreate it?