11 | | Insert configuration options in Wiki pages. |
| 11 | Insert configuration options in Wiki pages: |
| 12 | |
| 13 | - `[[ConfigOption(project, name)]]` displays project name. |
| 14 | - `[[ConfigOption(trac, auto_reload, type=bool)]]` displays a check-box indicating whether the option is set or not. |
| 15 | - `[[ConfigOption(trac, auto_reload)]]` idem. the macro is able to lookup metadata describing the option (if it's registered in the global `Option`'s registry). |
| 16 | - `[[ConfigOption(olemis, simelo, type=text)]]` displays the specified text. |
| 17 | - `[[ConfigOption(timeline, default_daysback, type=int)]]` displays default number of days displayed in the `Timeline`, in days. Integers are displayed like this `30`. |
| 18 | - `[[ConfigOption(trac, metanav, type=list)]]` displays a list of ''metanav'' options and looks like this: |
| 19 | - login |
| 20 | - search |
| 21 | - help |
| 22 | - `[[ConfigOption(trac, permission_store, type=extension)]]` displays the component responsible of storing user permissions. |
| 23 | - `[[ConfigOption(trac, permission_policies, type=extension_list)]]` displays active permission policies. |
| 24 | - `[[ConfigOption(trac, permission_policies, type=extension_list, include_missing=true)]]` displays all permission policies, active first. |
15 | | Embed information about wiki changelog in wiki pages. If invoked without keyword arguments then the full changelog is shown inside a table with columns `Date`, `Version`, `Description`, `Author`. Please read below for further details. |
| 28 | Embed information about wiki changelog in wiki pages. If invoked without keyword arguments, then the full changelog is shown inside a table with columns `Date`, `Version`, `Description`, `Author`. |
| 29 | |
| 30 | - `[[WikiHistory]]` lists versions of current wiki page (or `WikiStart` if wiki text inserted elsewhere e.g. in a ticket's comment). |
| 31 | - `[[WikiHistory(,4)]]` lists versions of current wiki page (or `WikiStart` if wiki text is inserted elsewhere e.g. in a ticket's comment) up to version 4. |
| 32 | - `[[WikiHistory(TracGuide,cols=time:version:author)]]` lists versions of `TracGuide` wiki page but hides user comments. |
| 33 | - `[[WikiHistory(,cols=time:comment)]]` lists versions of current wiki page (or `WikiStart` if wiki text inserted elsewhere e.g. in a ticket's comment). Only shows modification time and user comment. |
| 34 | - `[[WikiHistory(TracGuide,19,cols=time:comment)]]` lists versions of `TracGuide` wiki page up to version 19. Only shows modification time and user comment. |
| 35 | - `[[WikiHistory(,attr=time)]]` displays last modification time of current wiki page (or `WikiStart` if wiki text inserted elsewhere e.g. in a ticket's comment) |
| 36 | - `[[WikiHistory(TracPermissions,2,attr=time)]]` displays modification time of version 2 of `TracPermissions` wiki page. |
| 37 | |
| 38 | For the latest documentation consult `TracMacros` page in your local environment. |
47 | | All the macros will be ready to use in your Trac environment: |
48 | | - `[[ConfigOption(project, name)]]` displays project name. |
49 | | - `[[ConfigOption(trac, auto_reload, type=bool)]]` displays a check-box indicating whether the option is set or not. |
50 | | - `[[ConfigOption(trac, auto_reload)]]` idem. the macro is able to lookup metadata describing the option (if it's registered in the global `Option`'s registry). |
51 | | - `[[ConfigOption(olemis, simelo, type=text)]]` displays the specified text. |
52 | | - `[[ConfigOption(timeline, default_daysback, type=int)]]` displays default number of days displayed in the `Timeline`, in days. Integers are displayed like this `30`. |
53 | | - `[[ConfigOption(trac, metanav, type=list)]]` displays a list of ''metanav'' options and looks like this: |
54 | | - login |
55 | | - search |
56 | | - help |
57 | | - `[[ConfigOption(trac, permission_store, type=extension)]]` displays the component responsible of storing user permissions. |
58 | | - `[[ConfigOption(trac, permission_policies, type=extension_list)]]` displays active permission policies. |
59 | | - `[[ConfigOption(trac, permission_policies, type=extension_list, include_missing=true)]]` displays all permission policies, active first. |
| 70 | == Configuration |
61 | | For the latest documentation consult `TracMacros` page in your local environment. |
62 | | |
63 | | '''Important:''' Administrator must specify permissions (i.e. permission names) needed to view a particular configuration option by adding entries under `config-perm` section in [TracIni trac.ini]. Option names will be of the form `section.option`, `section.*` or `*` to make reference respectively to a particular option, all options in a section, or any option. For instance, the following configuration: |
| 72 | Administrators must specify permissions (i.e. permission names) needed to view a particular configuration option by adding entries under `config-perm` section in [TracIni trac.ini]. Option names will be of the form `section.option`, `section.*` or `*` to make reference respectively to a particular option, all options in a section, or any option. For instance, the following configuration: |
74 | | - `[[WikiHistory]]` lists versions of current wiki page (or `WikiStart` if wiki text inserted elsewhere e.g. in a ticket's comment). |
75 | | - `[[WikiHistory(,4)]]` lists versions of current wiki page (or `WikiStart` if wiki text is inserted elsewhere e.g. in a ticket's comment) up to version 4. |
76 | | - `[[WikiHistory(TracGuide,cols=time:version:author)]]` lists versions of `TracGuide` wiki page but hides user comments. |
77 | | - `[[WikiHistory(,cols=time:comment)]]` lists versions of current wiki page (or `WikiStart` if wiki text inserted elsewhere e.g. in a ticket's comment). Only shows modification time and user comment. |
78 | | - `[[WikiHistory(TracGuide,19,cols=time:comment)]]` lists versions of `TracGuide` wiki page up to version 19. Only shows modification time and user comment. |
79 | | - `[[WikiHistory(,attr=time)]]` displays last modification time of current wiki page (or `WikiStart` if wiki text inserted elsewhere e.g. in a ticket's comment) |
80 | | - `[[WikiHistory(TracPermissions,2,attr=time)]]` displays modification time of version 2 of `TracPermissions` wiki page. |
81 | | |