mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-02 03:16:11 +01:00
broke out notifications into ‘locations’ in data
This commit is contained in:
@@ -831,11 +831,15 @@ class AdminController extends AdminBaseController
|
||||
}
|
||||
|
||||
// do we need to force a reload
|
||||
$refresh = (bool) ($this->data['refresh'] ?? false);
|
||||
$refresh = (bool) ($this->data['refresh'] ?? true);
|
||||
|
||||
try {
|
||||
$notifications = $this->admin->getNotifications($refresh);
|
||||
$notification_data = $this->grav['twig']->processTemplate('partials/notification-block.html.twig', ['notifications' => $notifications]);
|
||||
|
||||
|
||||
foreach ($notifications as $type => $type_notifications) {
|
||||
$notification_data[$type] = $this->grav['twig']->processTemplate('partials/notification-block.html.twig', ['notifications' => $type_notifications]);
|
||||
}
|
||||
|
||||
$json_response = [
|
||||
'status' => 'success',
|
||||
|
||||
Reference in New Issue
Block a user