trac.versioncontrol.web_ui.browser¶
-
class
trac.versioncontrol.web_ui.browser.DefaultPropertyRenderer¶ Bases:
trac.core.ComponentDefault version control property renderer.
-
class
trac.versioncontrol.web_ui.browser.IPropertyRenderer¶ Bases:
trac.core.InterfaceRender node properties in TracBrowser and TracChangeset views.
-
match_property(name, mode)¶ Indicate whether this renderer can treat the given property
modeis the current rendering context, which can be:- ‘browser’ rendered in the browser view
- ‘changeset’ rendered in the changeset view as a node property
- ‘revprop’ rendered in the changeset view as a revision property
Other identifiers might be used by plugins, so it’s advised to simply ignore unknown modes.
Returns a quality number, ranging from 0 (unsupported) to 9 (‘’perfect’’ match).
-
render_property(name, mode, context, props)¶ Render the given property.
nameis the property name as given tomatch(),modeis the same as formatch_property,contextis the context for the node being render (useful when the rendering depends on the node kind) andpropsis the collection of the corresponding properties (i.e. thenode.get_properties()).- The rendered result can be one of the following:
None: the property will be skipped- an
unicodevalue: the property will be displayed as text - a
RenderedPropertyinstance: the property will only be displayed using the instance’scontentattribute, and the other attributes will also be used in some display contexts (likerevprop) MarkuporFragment: the property will be displayed normally, using that content as a block-level markup
-
-
class
trac.versioncontrol.web_ui.browser.WikiPropertyRenderer¶ Bases:
trac.core.ComponentWiki text property renderer.
-
oneliner_properties¶ Comma-separated list of version control properties to render as oneliner wiki content in the repository browser.
-
wiki_properties¶ Comma-separated list of version control properties to render as wiki content in the repository browser.
-
-
trac.versioncontrol.web_ui.browser.datetime_now()¶ [tz] -> new datetime with tz’s local day and time.