mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-06 13:25:46 +01:00
Merge branch 'develop' of github.com:getgrav/grav-plugin-admin into develop
This commit is contained in:
@@ -421,6 +421,10 @@ class AdminPlugin extends Plugin
|
|||||||
$locator = $this->grav['locator'];
|
$locator = $this->grav['locator'];
|
||||||
|
|
||||||
foreach ($plugins as $plugin) {
|
foreach ($plugins as $plugin) {
|
||||||
|
if ($this->config->get("plugins.{$plugin->name}.enabled") !== true) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
$path = $locator->findResource("user://plugins/{$plugin->name}/admin/pages/{$self->template}.md");
|
$path = $locator->findResource("user://plugins/{$plugin->name}/admin/pages/{$self->template}.md");
|
||||||
|
|
||||||
if ($path) {
|
if ($path) {
|
||||||
|
|||||||
@@ -37,8 +37,10 @@ export default class Form {
|
|||||||
$(global).on('keydown', function(event) {
|
$(global).on('keydown', function(event) {
|
||||||
var key = String.fromCharCode(event.which).toLowerCase();
|
var key = String.fromCharCode(event.which).toLowerCase();
|
||||||
if (((event.ctrlKey && !event.altKey) || event.metaKey) && key === 's') {
|
if (((event.ctrlKey && !event.altKey) || event.metaKey) && key === 's') {
|
||||||
event.preventDefault();
|
if (!event.shiftKey) {
|
||||||
saveTask.click();
|
event.preventDefault();
|
||||||
|
saveTask.click();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1566,5 +1566,9 @@ body .bootstrap-datetimepicker-widget {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.permission-container {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
// Range-field
|
// Range-field
|
||||||
@import "template/modules/input-range";
|
@import "template/modules/input-range";
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
data-collection-nosort
|
data-collection-nosort
|
||||||
{% endif %}>
|
{% endif %}>
|
||||||
{% if field.fields %}
|
{% if field.fields %}
|
||||||
{% set collapsible = field.fields|count > 1 and (field.collapsible is not defined or field.collapsible) %}
|
{% set collapsible = field.fields|length > 1 and (field.collapsible is not defined or field.collapsible) %}
|
||||||
{% for key, val in value %}
|
{% for key, val in value %}
|
||||||
{% set itemName = name ? name ~ '.' ~ key : key %}
|
{% set itemName = name ? name ~ '.' ~ key : key %}
|
||||||
<li data-collection-item="{{ itemName }}" data-collection-key="{{ key }}" class="{{ not collapsible or field.collapsed ? 'collection-collapsed' : '' }}">
|
<li data-collection-item="{{ itemName }}" data-collection-key="{{ key }}" class="{{ not collapsible or field.collapsed ? 'collection-collapsed' : '' }}">
|
||||||
|
|||||||
@@ -122,7 +122,7 @@
|
|||||||
|
|
||||||
{% for key, add_modal in config.plugins.admin.add_modals %}
|
{% for key, add_modal in config.plugins.admin.add_modals %}
|
||||||
{% if add_modal.show_in|defined('bar') == 'bar' %}
|
{% if add_modal.show_in|defined('bar') == 'bar' %}
|
||||||
<a class="button {{ add_modal.link_classes }}" href="#modal-add_modal-{{ key }}" data-remodal-target="modal-add_modal-{{ key }}"><i class="fa fa-plus"></i> {{ add_modal.label }}</a>
|
<a class="button {{ add_modal.link_classes }}" href="#modal-add_modal-{{ key }}" data-remodal-target="modal-add_modal-{{ key }}"><i class="fa fa-plus"></i> {{ add_modal.label|tu }}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
@@ -141,7 +141,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% for key, add_modal in config.plugins.admin.add_modals %}
|
{% for key, add_modal in config.plugins.admin.add_modals %}
|
||||||
{% if add_modal.show_in|defined('bar') == 'dropdown' %}
|
{% if add_modal.show_in|defined('bar') == 'dropdown' %}
|
||||||
<li><a class="button {{ add_modal.link_classes }}" href="#modal-add_modal-{{ key }}" data-remodal-target="modal-add_modal-{{ key }}">{{ add_modal.label }}</a></li>
|
<li><a class="button {{ add_modal.link_classes }}" href="#modal-add_modal-{{ key }}" data-remodal-target="modal-add_modal-{{ key }}">{{ add_modal.label|tu }}</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
Reference in New Issue
Block a user