mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-05-06 08:55:36 +02:00
[WIP] Notifications (#599)
Adds a new notifications feature to the Admin plugin. It will now lookup notifications which are set up on getgrav.org and will inform users, and also alert for new updates and provide awareness on various topics. Also fixes issue with Array field in `value_only` mode, improperly displaying the key when novalue was set, and fixes issue with drag handlers in Array not showing/hiding properly (#950) Updated FontAwesome to 4.6.3
This commit is contained in:
@@ -607,6 +607,13 @@ class AdminPlugin extends Plugin
|
||||
// Initialize admin class.
|
||||
require_once __DIR__ . '/classes/admin.php';
|
||||
|
||||
// Autoload classes
|
||||
$autoload = __DIR__ . '/vendor/autoload.php';
|
||||
if (!is_file($autoload)) {
|
||||
throw new \Exception('Login Plugin failed to load. Composer dependencies not met.');
|
||||
}
|
||||
require_once $autoload;
|
||||
|
||||
// Check for required plugins
|
||||
if (!$this->grav['config']->get('plugins.login.enabled') || !$this->grav['config']->get('plugins.form.enabled') || !$this->grav['config']->get('plugins.email.enabled')) {
|
||||
throw new \RuntimeException('One of the required plugins is missing or not enabled');
|
||||
@@ -759,6 +766,8 @@ class AdminPlugin extends Plugin
|
||||
{
|
||||
$this->grav['twig']->plugins_hooked_dashboard_widgets_top[] = ['template' => 'dashboard-maintenance'];
|
||||
$this->grav['twig']->plugins_hooked_dashboard_widgets_top[] = ['template' => 'dashboard-statistics'];
|
||||
$this->grav['twig']->plugins_hooked_dashboard_widgets_top[] = ['template' => 'dashboard-notifications'];
|
||||
$this->grav['twig']->plugins_hooked_dashboard_widgets_top[] = ['template' => 'dashboard-feed'];
|
||||
$this->grav['twig']->plugins_hooked_dashboard_widgets_main[] = ['template' => 'dashboard-pages'];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user