12 | | |
13 | | Usage is as follows. |
14 | | |
15 | | `[[ConfigOption(section, name, type=option_type, sep=char)]]` |
16 | | |
17 | | - ''section'' : the section in trac.ini (mandatory) |
18 | | - ''name'' : option name (mandatory) |
19 | | - ''type'' : if this keyword argument is present then |
20 | | the value will be rendered using an |
21 | | appropriate format according to the option |
22 | | type. Supported values are `text` (default), |
23 | | `bool`, `int`, `list`, `path`, `extension`. |
24 | | - ''sep'' : list separator (otional, ignored if |
25 | | `type`! = `list`) |
34 | | |
35 | | Usage is as follows (all fields are optional). |
36 | | |
37 | | `[[WikiHistory(pagename, version, attr=attr_name, cols=columns)]]` |
38 | | |
39 | | - ''pagename'' : the name of target Wiki page. If missing or empty |
40 | | and a wiki page is being rendered then it defaults to |
41 | | the current wiki page. If the page being rendered |
42 | | doesn't belong in the Wiki then `WikiStart` is used instead. |
43 | | - ''version'' : consider changes prior to (and including) this version |
44 | | - ''attr'' : if this keyword argument is present then only the value |
45 | | of the version attribute identified by `attr_name` is |
46 | | rendered in textual form (and `cols` argument is ignored) |
47 | | Supported values are `time`, `version`, |
48 | | `comment`, and `author` |
49 | | - ''cols'' : colon separated list of identifiers used to select |
50 | | specific columns (order matters). Identifiers are |
51 | | the same supported for `attr` parameter. |
52 | | |
| 49 | - `[[ConfigOption(trac, auto_reload, type=bool)]]` displays a check-box indicating |
| 50 | whether the option is set or not |
| 51 | - `[[ConfigOption(trac, auto_reload)]]` idem. the macro is able to lookup |
| 52 | metadata describing the option (if it's registered in the global `Option`'s registry) |
| 53 | - `[[ConfigOption(olemis, simelo, type=text)]]` displays something like ~~ Missing ? ~~ ''';o)''' |
| 54 | - `[[ConfigOption(timeline, default_daysback, type=int)]]` displays default number of |
| 55 | days displayed in the `Timeline`, in days. Integers are displayed like this `30`. |
| 56 | - `[[ConfigOption(trac, metanav, type=list)]]` Display a list of ''metanav'' options. |
| 57 | Output looks like this |
| 58 | |
| 59 | - login |
| 60 | - search |
| 61 | - help |
| 62 | |
| 63 | - `[[ConfigOption(trac, permission_store, type=extension)]] ` display the component |
| 64 | responsible of storing user permissions. |
| 65 | - `[[ConfigOption(trac, permission_policies, type=extension_list)]]` display active |
| 66 | permission policies. |
| 67 | - `[[ConfigOption(trac, permission_policies, type=extension_list, include_missing=true)]]` |
| 68 | display all permission policies, active first. |
| 69 | |
| 70 | '''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 `*` in order to make reference respectively to a particular option, all options in a section , or any option. For instance, the configuration shown below |
| 71 | |
| 72 | {{{ |
| 73 | [config-perm] |
| 74 | * = TRAC_ADMIN |
| 75 | project.* = WIKI_VIEW |
| 76 | project.name = * |
| 77 | }}} |
| 78 | |
| 79 | will allow users with `TRAC_ADMIN` privilege to see any option, whereas all those able to read wiki pages may see any option under `project` section. Finally , any user will be able to see the project name. |
| 80 | |