mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-03 11:55:52 +01:00
Updated deprecated $page->modular() method calls to $page->isModule()
This commit is contained in:
@@ -5,6 +5,7 @@
|
|||||||
* Added support for hiding parts of admin by `Deny` permissions (`Flex Users` only)
|
* Added support for hiding parts of admin by `Deny` permissions (`Flex Users` only)
|
||||||
1. [](#improved)
|
1. [](#improved)
|
||||||
* Improved `permissions` field to add support for displaying calculated permissions
|
* Improved `permissions` field to add support for displaying calculated permissions
|
||||||
|
* Grav 1.7: Updated deprecated `$page->modular()` method calls to `$page->isModule()`
|
||||||
1. [](#bugfix)
|
1. [](#bugfix)
|
||||||
* Fixed `permissions` field with nested permissions
|
* Fixed `permissions` field with nested permissions
|
||||||
|
|
||||||
|
|||||||
@@ -1777,7 +1777,7 @@ class Admin
|
|||||||
$header['body_classes'] = 'modular';
|
$header['body_classes'] = 'modular';
|
||||||
}
|
}
|
||||||
|
|
||||||
$name = $page->modular() ? str_replace('modular/', '', $data['name']) : $data['name'];
|
$name = $page->isModule() ? str_replace('modular/', '', $data['name']) : $data['name'];
|
||||||
$page->name($name . '.md');
|
$page->name($name . '.md');
|
||||||
|
|
||||||
// Fire new event to allow plugins to manipulate page frontmatter
|
// Fire new event to allow plugins to manipulate page frontmatter
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
{% for p in pcol %}
|
{% for p in pcol %}
|
||||||
{% set description = (not p.page ? "PLUGIN_ADMIN.FOLDER"|tu ~ ' • ' : "PLUGIN_ADMIN.PAGE"|tu ~ ' • ') ~
|
{% set description = (not p.page ? "PLUGIN_ADMIN.FOLDER"|tu ~ ' • ' : "PLUGIN_ADMIN.PAGE"|tu ~ ' • ') ~
|
||||||
(p.modular ? "PLUGIN_ADMIN.MODULAR"|tu ~ ' • ' : '') ~
|
(p.isModule ? "PLUGIN_ADMIN.MODULAR"|tu ~ ' • ' : '') ~
|
||||||
(p.routable ? "PLUGIN_ADMIN.ROUTABLE"|tu ~ ' • ' : "PLUGIN_ADMIN.NON_ROUTABLE"|tu ~ ' • ') ~
|
(p.routable ? "PLUGIN_ADMIN.ROUTABLE"|tu ~ ' • ' : "PLUGIN_ADMIN.NON_ROUTABLE"|tu ~ ' • ') ~
|
||||||
(p.visible ? "PLUGIN_ADMIN.VISIBLE"|tu ~ ' • ' : "PLUGIN_ADMIN.NON_VISIBLE"|tu ~ ' • ') ~
|
(p.visible ? "PLUGIN_ADMIN.VISIBLE"|tu ~ ' • ' : "PLUGIN_ADMIN.NON_VISIBLE"|tu ~ ' • ') ~
|
||||||
(p.published ? "PLUGIN_ADMIN.PUBLISHED"|tu ~ ' • ' : "PLUGIN_ADMIN.NON_PUBLISHED"|tu ~ ' • ') %}
|
(p.published ? "PLUGIN_ADMIN.PUBLISHED"|tu ~ ' • ' : "PLUGIN_ADMIN.NON_PUBLISHED"|tu ~ ' • ') %}
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
<li class="page-item" data-nav-id="{{ p.route }}">
|
<li class="page-item" data-nav-id="{{ p.route }}">
|
||||||
<div class="row page-item__row">
|
<div class="row page-item__row">
|
||||||
<span class="page-item__toggle" {{ p.children(0).count > 0 ? 'data-toggle="children"' : ''}}>
|
<span class="page-item__toggle" {{ p.children(0).count > 0 ? 'data-toggle="children"' : ''}}>
|
||||||
<i class="page-icon fa fa-fw fa-circle-o {{ p.children(0).count > 0 ? 'children-closed' : ''}} {{ p.modular ? 'modular' : (not p.routable ? 'not-routable' : (not p.visible ? 'not-visible' : (not p.page ? 'folder' : ''))) }}"></i>
|
<i class="page-icon fa fa-fw fa-circle-o {{ p.children(0).count > 0 ? 'children-closed' : ''}} {{ p.isModule ? 'modular' : (not p.routable ? 'not-routable' : (not p.visible ? 'not-visible' : (not p.page ? 'folder' : ''))) }}"></i>
|
||||||
</span>
|
</span>
|
||||||
<div class="page-item__content">
|
<div class="page-item__content">
|
||||||
<div class="page-item__content-name">
|
<div class="page-item__content-name">
|
||||||
@@ -110,7 +110,7 @@
|
|||||||
{% set title = "PLUGIN_ADMIN.PAGES"|tu %}
|
{% set title = "PLUGIN_ADMIN.PAGES"|tu %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% set modular = context.modular ? 'modular_' : '' %}
|
{% set modular = context.isModule ? 'modular_' : '' %}
|
||||||
{% set warn = config.plugins.admin.warnings.delete_page %}
|
{% set warn = config.plugins.admin.warnings.delete_page %}
|
||||||
{% set secure_delete = config.plugins.admin.warnings.secure_delete %}
|
{% set secure_delete = config.plugins.admin.warnings.secure_delete %}
|
||||||
{% set page_lang = context.language %}
|
{% set page_lang = context.language %}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<li class="page-item" data-nav-id="{{ p.route }}">
|
<li class="page-item" data-nav-id="{{ p.route }}">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<span {{ p.children(0).count > 0 ? 'data-toggle="children"' : ''}} class="hint--bottom">
|
<span {{ p.children(0).count > 0 ? 'data-toggle="children"' : ''}} class="hint--bottom">
|
||||||
<i class="page-icon fa fa-fw fa-circle-o {{ p.children(0).count > 0 ? 'children-closed' : ''}} {{ p.modular ? 'modular' : (not p.routable ? 'not-routable' : (not p.visible ? 'not-visible' : (not p.page ? 'folder' : ''))) }}"></i>
|
<i class="page-icon fa fa-fw fa-circle-o {{ p.children(0).count > 0 ? 'children-closed' : ''}} {{ p.isModule ? 'modular' : (not p.routable ? 'not-routable' : (not p.visible ? 'not-visible' : (not p.page ? 'folder' : ''))) }}"></i>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span data-hint="{{ p.header.routes.default ?: p.route }}" class="hint--bottom">
|
<span data-hint="{{ p.header.routes.default ?: p.route }}" class="hint--bottom">
|
||||||
|
|||||||
Reference in New Issue
Block a user