|
@@ -23,6 +23,7 @@ class DashboardWidget extends Entity{
|
|
public $description;
|
|
public $description;
|
|
public $label;
|
|
public $label;
|
|
public $content;
|
|
public $content;
|
|
|
|
+ public $uid;
|
|
|
|
|
|
|
|
|
|
public const MODEL_NEW = 'new';
|
|
public const MODEL_NEW = 'new';
|
|
@@ -93,6 +94,7 @@ class DashboardWidget extends Entity{
|
|
$clock->content = '<div class="text-center m-auto">13:37</div>';
|
|
$clock->content = '<div class="text-center m-auto">13:37</div>';
|
|
$clock->width = 3;
|
|
$clock->width = 3;
|
|
$clock->height = 3;
|
|
$clock->height = 3;
|
|
|
|
+ $clock->uid = 'clock';
|
|
$models['clock'] = $clock;
|
|
$models['clock'] = $clock;
|
|
|
|
|
|
|
|
|
|
@@ -101,13 +103,15 @@ class DashboardWidget extends Entity{
|
|
$newModel->headerBackground = 'rgb(0, 123, 255)';
|
|
$newModel->headerBackground = 'rgb(0, 123, 255)';
|
|
$newModel->description = 'Type de widget non défini';
|
|
$newModel->description = 'Type de widget non défini';
|
|
$newModel->label = 'Nouveau widget';
|
|
$newModel->label = 'Nouveau widget';
|
|
- $newModel->content = '<div class="text-center m-auto">Cliquez sur l\'icone <i class="fas fa-ellipsis-v text-muted mx-1"></i> en haut à droite pour configurer votre widget</div>';
|
|
|
|
|
|
+ $newModel->content = '<small class="text-center m-auto text-muted">Veuillez configurer votre widget</small>';
|
|
$newModel->width = 3;
|
|
$newModel->width = 3;
|
|
$newModel->height = 2;
|
|
$newModel->height = 2;
|
|
|
|
+ $newModel->uid = self::MODEL_NEW;
|
|
$models[self::MODEL_NEW] = $newModel;
|
|
$models[self::MODEL_NEW] = $newModel;
|
|
|
|
|
|
foreach($models as $model){
|
|
foreach($models as $model){
|
|
if(!isset($model->model)) continue;
|
|
if(!isset($model->model)) continue;
|
|
|
|
+ if(empty($model->label)) $model->label = 'Sans titre';
|
|
$models[$model->model] = $model;
|
|
$models[$model->model] = $model;
|
|
}
|
|
}
|
|
if(!isset($slug)) return $models;
|
|
if(!isset($slug)) return $models;
|