l.a.b.t.PillarFormatterAPI(CustomizableFormatter) : class documentation

Part of lp.app.browser.tales View In Hierarchy

Adapter for IProduct, IDistribution and IProjectGroup objects to a formatted string.
Method url See ObjectFormatterAPI.
Method link The html to show a link to a Product, ProjectGroup or distribution.
Method link_with_displayname The html to show a link to a Product, ProjectGroup or
Method _link_summary_values Return a dict of values to use for template substitution.
Method _getLinkHTML Generates html, mapping a link context to given templates.

Inherited from CustomizableFormatter:

Method sprite_css Retrieve the icon for the _context, if any.
Method _make_link_summary Create a summary from _template and _link_summary_values().
Method _title_values Return a dict of values to use for template substitution.
Method _make_title Create a title from _title_template and _title_values().

Inherited from ObjectFormatterAPI (via CustomizableFormatter):

Method __init__ Undocumented
Method api_url Return the object's (partial) canonical web service URL.
Method traverse Traverse the specified path, processing any optional parameters.
Method global_css Undocumented
Method pagetitle The page title to be used.
Method _getSaneBreadcrumbDetail Undocumented
def _link_summary_values(self):
Return a dict of values to use for template substitution.

These values should not be escaped, as this will be performed later. For this reason, only string values should be supplied.

def url(self, view_name=None, rootsite=None):
See ObjectFormatterAPI.

The default URL for a pillar is to the mainsite.

def _getLinkHTML(self, view_name, rootsite, template, custom_icon_template):
Generates html, mapping a link context to given templates.

The html is generated using given template or custom_icon_template based on the presence of a custom icon for Products/ProjectGroups. Named string substitution is used to render the final html (see below for a list of allowed keys).

The link context is a dict containing info about current Products or ProjectGroups. Keys are url, name, displayname, custom_icon (if present), css_class (if a custom icon does not exist), 'summary' (see CustomizableFormatter._make_link_summary()).

def link(self, view_name, rootsite='mainsite'):
The html to show a link to a Product, ProjectGroup or distribution.

In the case of Products or ProjectGroups we display the custom icon, if one exists. The default URL for a pillar is to the mainsite.

def link_with_displayname(self, view_name, rootsite='mainsite'):
The html to show a link to a Product, ProjectGroup or distribution, including displayname and name.

In the case of Products or ProjectGroups we display the custom icon, if one exists. The default URL for a pillar is to the mainsite.

API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.