|
@@ -179,26 +179,7 @@ function notification_cron($time){
|
|
Plugin::need('notification/Notification');
|
|
Plugin::need('notification/Notification');
|
|
Notification::clear();
|
|
Notification::clear();
|
|
}
|
|
}
|
|
-/*
|
|
|
|
-function notification_widget(&$widgets){
|
|
|
|
- Plugin::need('dashboard/DashboardWidget');
|
|
|
|
-
|
|
|
|
- $modelWidget = new DashboardWidget();
|
|
|
|
- $modelWidget->model = 'notification';
|
|
|
|
- $modelWidget->title = 'Notification';
|
|
|
|
- $modelWidget->options[] = array('function'=>'window.location = \'index.php?module=notification\';','icon'=>'fa-eye','title'=>'Toutes les notifications');
|
|
|
|
- $modelWidget->icon = 'fas fa-bell';
|
|
|
|
- $modelWidget->background = '#ffbe5c';
|
|
|
|
- $modelWidget->load = 'action.php?action=notification_widget_load';
|
|
|
|
- $modelWidget->configure = 'action.php?action=notification_widget_configure';
|
|
|
|
- $modelWidget->configure_callback = 'notification_widget_configure_save';
|
|
|
|
- $modelWidget->js = [Plugin::url().'/js/widget.js?v='.time()];
|
|
|
|
- $modelWidget->css = [Plugin::url().'/css/widget.css?v=1'.time()];
|
|
|
|
- $modelWidget->description = "Affiche les dernières alertes des catégories de notification sélectionnées";
|
|
|
|
-
|
|
|
|
- $widgets[] = $modelWidget;
|
|
|
|
-}
|
|
|
|
-*/
|
|
|
|
|
|
+
|
|
Plugin::addHook('widget',function(&$models){
|
|
Plugin::addHook('widget',function(&$models){
|
|
|
|
|
|
$model = new DashboardWidget();
|
|
$model = new DashboardWidget();
|