Here is the modification for a customizable dashboard system
- One current core file to be modified: /admin/dashboard.php
- One folder to be added to the root folder: /dashboards
- In this new folder dashboards the build in widgets would be placed there
- For custom dashboard, developer should create a folder named dashboards in his extension folder then put here a file named custom_dashboards.php. To add new dashboard and widgets would require this file' contents like this:
$dashboard->addWidget(DA_HRM, 997, _('Widget name 1'), WIDGET_HALF);
$dashboard->addWidget(DA_HRM, 998, _('Widget name 2'), WIDGET_HALF);
$dashboard->addWidget(DA_HRM, 999, _('Widget name 3'), WIDGET_FULL);
This is a rough sketch for what I have proposed.
Following this method users can decide which widget, chart would be shown on their dashboard.
I have been doing this by simulating the Report System.
Jquery and any Js, charts libraries could be included later
ps: also need few more new css lines
border-bottom: 1px solid #DDD;
padding: 5px 0;
border: 1px solid #DDD;
padding: 0 10px;
margin: 10px 0;
width: calc(100% - 40px);
width: calc(50% - 30px);
margin-left: 20px ;