dashboard : customizable dashboard¶
lino.modlib.dashboard plugin adds functionality for letting the
users customize their dashboard.
As explained in The main window you can define a sequence of dashboard items for your application. Lino renders these dashboard items quite intelligently: they don't appear if the table contains no data or if the user has no permission to see it. But the dashboard items of an application are hard-coded and apply to all users.
This is a tested document. The following instructions are used for initialization:
>>> import lino >>> lino.startup('lino_book.projects.team.settings.doctests') >>> from lino.api.doctest import * >>> from django.db.models import Q
Which means that code snippets in this document are tested using the
lino_book.projects.team demo project.
>>> user = rt.models.users.User.objects.get(username="robin") >>> pprint(list(settings.SITE.get_dashboard_items(user))) ... [lino_xl.lib.cal.ui.MyTasks, <class 'lino.core.dashboard.ActorItem'>(cal.MyEntries,header_level=2,min_count=None), lino_xl.lib.cal.ui.MyOverdueAppointments, lino_xl.lib.cal.ui.MyUnconfirmedAppointments, lino_xl.lib.calview.ui.DailyPlanner, lino.modlib.comments.ui.RecentComments, lino_xl.lib.tickets.ui.MyTickets, lino_xl.lib.tickets.ui.MySites, lino_xl.lib.tickets.ui.TicketsToTriage, lino_xl.lib.tickets.ui.MyTicketsToWork, lino_xl.lib.tickets.ui.TicketsNeedingMyFeedback, lino_xl.lib.tickets.ui.MyTicketsNeedingFeedback, lino_xl.lib.working.ui.WorkedHours, lino.modlib.notify.models.MyMessages, lino_xl.lib.groups.models.MyGroups, lino_xl.lib.ledger.ui.JournalsOverview]
As long as a user didn't populate their dashboard, the list ist empty and they will get all the dashboard items provided by the application.
Click the ⚡ button in order to populate the table.
Now you can hide individual items and change their order.