Changes between Version 12 and Version 13 of TracBasicMacro


Ignore:
Timestamp:
Dec 23, 2016, 6:03:56 PM (7 years ago)
Author:
figaro
Comment:

Moved example to functional description

Legend:

Unmodified
Added
Removed
Modified
  • TracBasicMacro

    v12 v13  
    99=== !ConfigOptionMacro
    1010
    11 Insert configuration options in Wiki pages.
     11Insert 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.
    1225
    1326=== !WikiHistoryMacro
    1427
    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.
     28Embed 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
     38For the latest documentation consult `TracMacros` page in your local environment.
    1639
    1740== Bugs/Feature Requests
     
    3659You can check out TracBasicMacro from its [http://bitbucket.org/olemis/trac-basic-macros Bitbucket repository] using '''Mercurial'''.
    3760
    38 == Example
     61== Installation
    3962
    40 Install the plugin and enable [TracBasicMacro TracBasicMacros] plugin by inserting the following lines in your [TracIni trac.ini] file:
     63Install the plugin and enable it by inserting the following lines in your [TracIni trac.ini] file:
    4164
    4265{{{#!ini
     
    4568}}}
    4669
    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
    6071
    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:
     72Administrators 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:
    6473
    6574{{{#!ini
     
    7281will 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.
    7382
    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 
    8283== Author/Contributors
    8384