2020-06-21 21:29:25 +02:00
|
|
|
<?php
|
2021-10-20 11:28:39 +02:00
|
|
|
$bookmarks = !empty($loggedUser->user_settings_by_name['ui.bookmarks']['value']) ? json_decode($loggedUser->user_settings_by_name['ui.bookmarks']['value'], true) : [];
|
2021-09-06 11:17:25 +02:00
|
|
|
?>
|
|
|
|
|
2021-10-18 13:28:26 +02:00
|
|
|
<h3>
|
|
|
|
<?= $this->Bootstrap->icon('bookmark', [
|
|
|
|
'class' => ['fa-fw']
|
|
|
|
]); ?>
|
|
|
|
<?= __('Bookmarks') ?>
|
|
|
|
</h3>
|
2021-09-06 11:17:25 +02:00
|
|
|
<div class="row">
|
2021-10-20 14:33:22 +02:00
|
|
|
<?php if (!empty($bookmarks)): ?>
|
2021-10-18 13:28:26 +02:00
|
|
|
<ul class="col-sm-12 col-md-10 col-l-8 col-xl-8 mb-3">
|
|
|
|
<?php foreach ($bookmarks as $bookmark) : ?>
|
|
|
|
<li class="list-group-item">
|
2021-10-18 13:43:51 +02:00
|
|
|
<a href="<?= h($bookmark['url']) ?>" class="w-bold">
|
2021-10-18 13:28:26 +02:00
|
|
|
<?= h($bookmark['label']) ?>
|
|
|
|
</a>
|
|
|
|
<span class="ms-3 fw-light"><?= h($bookmark['name']) ?></span>
|
|
|
|
</li>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
</ul>
|
2021-10-20 14:33:22 +02:00
|
|
|
<?php else: ?>
|
2021-10-18 13:28:26 +02:00
|
|
|
<p class="fw-light"><?= __('No bookmarks') ?></p>
|
|
|
|
<?php endif; ?>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<h3>
|
|
|
|
<?= $this->Bootstrap->icon('chart-bar', [
|
|
|
|
'class' => ['fa-fw']
|
|
|
|
]); ?>
|
|
|
|
<?= __('Activity') ?>
|
|
|
|
</h3>
|
|
|
|
<div class="row">
|
2021-11-12 15:40:03 +01:00
|
|
|
<?php foreach ($statistics as $modelName => $statisticForModel) : ?>
|
2021-09-18 10:22:59 +02:00
|
|
|
<div class="col-sm-6 col-md-5 col-l-4 col-xl-3 mb-3">
|
2021-09-06 11:17:25 +02:00
|
|
|
<?php
|
2021-10-18 13:28:26 +02:00
|
|
|
$exploded = explode('.', $modelName);
|
|
|
|
$modelForDisplay = $exploded[count($exploded) - 1];
|
|
|
|
$panelTitle = $this->Html->link(
|
|
|
|
h($modelForDisplay),
|
|
|
|
$this->Url->build([
|
|
|
|
'controller' => $modelForDisplay,
|
|
|
|
'action' => 'index',
|
|
|
|
]),
|
|
|
|
['class' => 'text-white text-decoration-none fw-light stretched-link']
|
|
|
|
);
|
|
|
|
echo $this->element('widgets/highlight-panel', [
|
|
|
|
'titleHtml' => $panelTitle,
|
2021-11-12 15:40:03 +01:00
|
|
|
'number' => $statisticForModel['created']['amount'],
|
|
|
|
'variation' => $statisticForModel['created']['variation'] ?? '',
|
|
|
|
'timeline' => $statisticForModel ?? []
|
2021-10-18 13:28:26 +02:00
|
|
|
]);
|
2021-09-06 11:17:25 +02:00
|
|
|
?>
|
|
|
|
</div>
|
|
|
|
<?php endforeach ?>
|
2021-10-20 14:33:22 +02:00
|
|
|
</div>
|