lino.core.dashboard

Defines the DashboardItem class.

(This module's source code is available here.)

Classes

ActorItem(actor, **kwargs)

A dashboard item which simply renders a given actor.

DashboardItem(name[, header_level, min_count])

Base class for all dashboard items.

RequestItem(sar, **kwargs)

Experimentally used in lino_book.projects.events.

class lino.core.dashboard.DashboardItem(name, header_level=2, min_count=1)

Bases: lino.core.permissions.Permittable

Base class for all dashboard items.

name

The name used to reference this item in Widget.item_name.

width

The width in percent of total available width.

min_count

Hide this item if there are less than min_count rows.

render(ar)

Yield a list of etree html elements

render_request(ar, sar)

Render the given table action request. ar is the incoming request (the one which displays the dashboard), sar is the table we want to show (a child of ar).

This is a helper function for shared use by ActorItem and RequestItem.

class lino.core.dashboard.ActorItem(actor, **kwargs)

Bases: lino.core.dashboard.DashboardItem

A dashboard item which simply renders a given actor. The actor should be a table, other usage is untested.

Usage examples: - lino_xl.lib.blogs - lino_book.projects.events

header_level

The header level.

render(ar)

Render this table to the dashboard.

class lino.core.dashboard.RequestItem(sar, **kwargs)

Bases: lino.core.dashboard.DashboardItem

Experimentally used in lino_book.projects.events.