Changes between Version 8 and Version 9 of TracBasicMacro


Ignore:
Timestamp:
Sep 7, 2015, 12:10:26 PM (9 years ago)
Author:
figaro
Comment:

Cosmetic changes

Legend:

Unmodified
Added
Removed
Modified
  • TracBasicMacro

    v8 v9  
    11[[PageOutline(2-5,Contents,pullout)]]
    22
    3 = Simple but useful Trac macros =
     3= Some useful Trac macros
    44
    5 == Description ==
     5== Description
    66
    77Expand Trac capabilities by embedding simple snippets in wiki pages using simple macros.
    88
    9 === !ConfigOptionMacro ===
     9=== !ConfigOptionMacro
    1010
    1111Insert configuration options in Wiki pages
    1212
    13 ==== !WikiHistoryMacro ====
     13==== !WikiHistoryMacro
    1414
    15 Embed information about wiki changelog in wiki pages.
    16 If invoked without keyword arguments then full
    17 changelog is shown inside a table with columns
    18 `Date`, `Version`, `Description`, `Author`. Please
    19 read below for further details.
     15Embed information about wiki changelog in wiki pages. If invoked without keyword arguments then full changelog is shown inside a table with columns `Date`, `Version`, `Description`, `Author`. Please read below for further details.
    2016
    21 == Bugs/Feature Requests ==
     17== Bugs/Feature Requests
    2218
    2319Existing bugs and feature requests for TracBasicMacro are
     
    2521
    2622If you have any issues, create a
    27 [http://trac-hacks.org/newticket?component=TracBasicMacro&owner=olemis new ticket].
     23[/newticket?component=TracBasicMacro new ticket].
     24
    2825If you want to submit patches, please read the
    2926[wiki:olemis#Guidelinestocollaborate patch submission guidelines].
    3027
     28[[TicketQuery(component=TracBasicMacro&group=type,format=progress)]]
    3129
    32 == Download ==
     30== Download
    3331
    34 Download the zipped source from [http://pypi.python.org/pypi/TracBasicMacros PyPI].
     32Download the zipped source from [pypi:TracBasicMacros PyPI].
    3533
    36 == Source ==
     34== Source
    3735
    38 You can check out TracBasicMacro from [http://bitbucket.org/olemis/trac-basic-macros its Bitbucket repository] using '''Mercurial''' (currently it's not possible to [source:tracbasicmacro browse the source] with Trac ''':-/'''.
     36You can check out TracBasicMacro from [http://bitbucket.org/olemis/trac-basic-macros its Bitbucket repository] using '''Mercurial'''. Ccurrently it's not possible to [source:tracbasicmacro browse the source] with Trac.
    3937
    40 == Example ==
     38== Example
    4139
    4240Install the plugin and enable [TracBasicMacro TracBasicMacros] plugin by inserting the following lines in [TracIni trac.ini].
    4341
    44 {{{
     42{{{#!ini
    4543[components]
    4644tracbmacros.* = enabled
    4745}}}
    4846
    49 All the macros will be ready to use in your Trac environment. For up-to-date documentation consult `TracMacros` page in your local environment.
     47All 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)]]` Display a list of ''metanav'' options. Output looks like this:
     54   - login
     55   - search
     56   - help
     57 - `[[ConfigOption(trac, permission_store, type=extension)]]` display the component responsible of storing user permissions.
     58 - `[[ConfigOption(trac, permission_policies, type=extension_list)]]` display active permission policies.
     59 - `[[ConfigOption(trac, permission_policies, type=extension_list, include_missing=true)]]` display all permission policies, active first.
    5060
    51   - `[[ConfigOption(project, name)]]` displays project name.
    52   - `[[ConfigOption(trac, auto_reload, type=bool)]]` displays a check-box indicating
    53     whether the option is set or not
    54   - `[[ConfigOption(trac, auto_reload)]]` idem. the macro is able to lookup
    55     metadata describing the option (if it's registered in the global `Option`'s registry)
    56   - `[[ConfigOption(olemis, simelo, type=text)]]` displays something like ~~ Missing ? ~~ ''';o)'''
    57   - `[[ConfigOption(timeline, default_daysback, type=int)]]` displays default number of
    58     days displayed in the `Timeline`, in days. Integers are displayed like this `30`.
    59   - `[[ConfigOption(trac, metanav, type=list)]]` Display a list of ''metanav'' options.
    60     Output looks like this
     61For up-to-date documentation consult `TracMacros` page in your local environment.
    6162
    62   - login
    63   - search
    64   - help
     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:
    6564
    66   - `[[ConfigOption(trac, permission_store, type=extension)]] ` display the component
    67     responsible of storing user permissions.
    68   - `[[ConfigOption(trac, permission_policies, type=extension_list)]]` display active
    69     permission policies.
    70   - `[[ConfigOption(trac, permission_policies, type=extension_list, include_missing=true)]]`
    71     display all permission policies, active first.
    72 
    73 '''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
    74 
    75 {{{
     65{{{#!ini
    7666[config-perm]
    7767* = TRAC_ADMIN
     
    8272will 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.
    8373
    84   - `[[WikiHistory]]` lists versions of current wiki page (or
    85     `WikiStart` if wiki text inserted elsewhere e.g. in a ticket's comment)
    86   - `[[WikiHistory(,4)]]` lists versions of current wiki page (or
    87     `WikiStart` if wiki text inserted elsewhere e.g. in a ticket's comment)
    88     up to version 4
    89   - `[[WikiHistory(TracGuide,cols=time:version:author)]]` lists versions
    90     of `TracGuide` wiki page but hides user comments.
    91   - `[[WikiHistory(,cols=time:comment)]]` lists versions of current
    92     wiki page (or `WikiStart` if wiki text inserted elsewhere e.g. in a
    93     ticket's comment). Only shows modification time and user comment.
    94   - `[[WikiHistory(TracGuide,19,cols=time:comment)]]` lists versions of
    95     `TracGuide` wiki page up to version 19. Only shows modification time
    96     and user comment.
    97   - `[[WikiHistory(,attr=time)]]` displays last modification time of current
    98     wiki page (or `WikiStart` if wiki text inserted elsewhere e.g. in a
    99     ticket's comment)
    100   - `[[WikiHistory(TracPermissions,2,attr=time)]]` displays modification time of
    101     version 2 of `TracPermissions` wiki page.
     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 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.
    10281
    103 == Author/Contributors ==
     82== Author/Contributors
    10483
    10584'''Author:''' [wiki:olemis Olemis Lang] [[BR]]
    106 '''Maintainer:''' [wiki:olemis  Olemis Lang] [[BR]]
     85'''Maintainer:''' [[Maintainer]] [[BR]]
    10786'''Contributors:'''