Welcome | Get started | Dive | Contribute | Topics | Reference | Changes | More
lino.core.dashboard¶
Defines the DashboardItem
class.
Classes
|
A dashboard item that simply renders a given actor. |
|
Base class for all dashboard items. |
|
Experimentally used in lino_book.projects.events. |
- class lino.core.dashboard.DashboardItem(name, header_level=2, min_count=1)¶
Bases:
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, **kwargs)¶
Yield a list of html chunks.
- render_request(ar, sar, **kwargs)¶
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
andRequestItem
.
- class lino.core.dashboard.ActorItem(actor, **kwargs)¶
Bases:
DashboardItem
A dashboard item that 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, **kwargs)¶
Render this table to the dashboard.
Do nothing if there is no data.
If
header_level
is not None, add a headerRender the table itself by calling
lino.core.requests.BaseRequest.show()
- class lino.core.dashboard.RequestItem(sar, **kwargs)¶
Bases:
DashboardItem
Experimentally used in lino_book.projects.events.