Merge branch '1.10' of github.com:getgrav/grav-plugin-admin into 1.10

This commit is contained in:
Andy Miller
2020-01-29 13:05:04 -07:00
3 changed files with 16 additions and 0 deletions

View File

@@ -2,6 +2,7 @@
## mm/dd/2020
1. [](#new)
* Added message to dashboard to install Flex Objects plugin if it is missing
* Updated `permissions` field to use new `$grav['permissions']`
* DEPRECATED `onAdminRegisterPermissions` event, use `PermissionsRegisterEvent::class` event instead
* DEPRECATED `Admin::setPermissions()` and `Admin::addPermissions()`, use `PermissionsRegisterEvent::class` event instead

View File

@@ -34,6 +34,9 @@
<div class="dashboard-notifications-container"></div>
{% endif %}
{# System notifications, cannot be turned off #}
{% include 'partials/dashboard-problems.html.twig' %}
<div id="admin-dashboard">
{% if grav.twig.plugins_hooked_dashboard_widgets_top %}
{% for widget in grav.twig.plugins_hooked_dashboard_widgets_top %}

View File

@@ -0,0 +1,12 @@
{% if authorize(['admin.plugins', 'admin.super']) and grav['flex_objects'] is null %}
<div id="info" class="dashboard-item">
<div class="secondary-accent default-box-shadow">
<h1>Admin plugin dependency is missing</h1>
<p><strong>Admin</strong> requires <strong>Flex Objects</strong> plugin for managing <strong>User Accounts</strong> and <strong>Pages</strong>. Without the Flex Objects plugin Admin falls back to the old behavior, which is missing a lot of new features.</p>
<p>After installing Flex Objects plugin, this message will disappear. If you still prefer using the old way, it is still possible by entering the <strong>Flex Objects</strong> plugin settings and disabling those <strong>Directories</strong> which you do not want to be using.</p>
<p>Please install and enable <strong><a href="{{ admin_route('/plugins/flex-objects') }}">Flex Objects</a></strong> plugin.</p>
</div>
</div>
{% endif %}