Modify ↓
#4452 closed enhancement (fixed)
[Patch] Use wiki formatting in tables
Reported by: | Owned by: | Ryan J Ollos | |
---|---|---|---|
Priority: | normal | Component: | WikiTableMacro |
Severity: | normal | Keywords: | |
Cc: | falkb | Trac Release: | 0.11 |
Description
It would be nice to be able to use wiki rendering of the output; for example, if using the sqlite database backend, it would be nice to be able to make the links by using WikiFormatting:
{{{ #!SQLTable select '[milestone:' || name || ' ' || name || "]" as name, due,completed,description from milestone }}}
right now, it displays a literal [milestone:milestone1 milestone1]
Attachments (1)
Change History (9)
Changed 15 years ago by
Attachment: | wikitable.patch added |
---|
comment:1 Changed 15 years ago by
Patch that essentially does this
-
0.11/trunk/wikitable/htdocs/css/wikitable.css
diff -ur wikitablemacro.orig/0.11/trunk/wikitable/htdocs/css/wikitable.css wikitablemacro/0.11/trunk/wikitable/htdocs/css/wikit able.css
old new 1 1 table.wikitable { 2 2 width: auto; 3 } 4 No newline at end of file 3 } 4 5 table.wikitable p { 6 display: inline; 7 } -
0.11/trunk/wikitable/table.py
diff -ur wikitablemacro.orig/0.11/trunk/wikitable/table.py wikitablemacro/0.11/trunk/wikitable/table.py
old new 5 5 from trac.core import implements 6 6 from trac.web.chrome import ITemplateProvider, add_stylesheet 7 7 8 from trac.wiki import wiki_to_html 9 8 10 from trac.wiki.macros import WikiMacroBase 9 11 from trac.util.html import Markup 10 12 … … 53 55 css_class = (idx % 2 == 0) and 'odd' or 'even' 54 56 print >>out, " <tr class='%s'>" % css_class 55 57 for col in row: 56 print >>out, "<td>%s</td>" % col 58 text = wiki_to_html (StringIO(col).getvalue(), self.env, req) 59 print >>out, "<td>%s</td>" % text 57 60 print >>out, " </tr>" 58 61 59 62 print >>out, " </tbody>"
comment:2 Changed 15 years ago by
Summary: | Request for wiki formatting of result tables → [Patch] Use wiki formatting in tables |
---|---|
Type: | defect → enhancement |
comment:3 Changed 15 years ago by
Owner: | changed from Martin Aspeli to Ryan J Ollos |
---|
Changing ticket owner as maintainership will soon be transferred.
comment:4 Changed 12 years ago by
comment:5 Changed 12 years ago by
Status: | new → assigned |
---|
An example has been added to the project wiki page.
comment:6 Changed 12 years ago by
Cc: | falkb added; anonymous removed |
---|
comment:7 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Please follow-up here if you have any issues with the latest change.
Note: See
TracTickets for help on using
tickets.
Patch the essentially accomplishes the above