mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-01-30 03:10:02 +01:00
Initial work
This commit is contained in:
@@ -246,6 +246,18 @@ form:
|
||||
title: Notifications
|
||||
underline: true
|
||||
|
||||
notifications.feed:
|
||||
type: toggle
|
||||
label: Feed Notifications
|
||||
highlight: 1
|
||||
default: 1
|
||||
options:
|
||||
1: PLUGIN_ADMIN.ENABLED
|
||||
0: PLUGIN_ADMIN.DISABLED
|
||||
validate:
|
||||
type: bool
|
||||
help: Display feed-based notifications
|
||||
|
||||
notifications.dashboard:
|
||||
type: toggle
|
||||
label: Dashboard Notifications
|
||||
|
||||
@@ -541,6 +541,7 @@ PLUGIN_ADMIN:
|
||||
ORDERING_DISABLED_BECAUSE_PARENT_SETTING_ORDER: "Parent setting order, ordering disabled"
|
||||
ORDERING_DISABLED_BECAUSE_PAGE_NOT_VISIBLE: "Page is not visible, ordering disabled"
|
||||
ORDERING_DISABLED_BECAUSE_TOO_MANY_SIBLINGS: "Ordering via the admin is unsupported because there are more than 200 siblings"
|
||||
ORDERING_DISABLED_BECAUSE_PAGE_NO_PREFIX: "Page ordering is disabled because <strong>Folder Numeric Prefix</strong> is not enabled"
|
||||
CANNOT_ADD_MEDIA_FILES_PAGE_NOT_SAVED: "NOTE: You cannot add media files until you save the page. Just click 'Save' on top"
|
||||
CANNOT_ADD_FILES_PAGE_NOT_SAVED: "NOTE: Page must be saved before you can upload files to it."
|
||||
DROP_FILES_HERE_TO_UPLOAD: "Drop your files here or <strong>click in this area</strong>"
|
||||
@@ -656,4 +657,4 @@ PLUGIN_ADMIN:
|
||||
ZIP_PACKAGE_NOT_FOUND: "ZIP package could not be found"
|
||||
GPM_OFFICIAL_ONLY: "Official GPM Only"
|
||||
GPM_OFFICIAL_ONLY_HELP: "Only allow direct installs from the official GPM repository only."
|
||||
NO_CHILD_TYPE: "No child type for this rawroute"
|
||||
NO_CHILD_TYPE: "No child type for this rawroute"
|
||||
|
||||
2
themes/grav/css-compiled/preset.css
vendored
2
themes/grav/css-compiled/preset.css
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
themes/grav/css-compiled/template.css
vendored
2
themes/grav/css-compiled/template.css
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -760,7 +760,8 @@ form {
|
||||
.note {
|
||||
background: inherit;
|
||||
}
|
||||
ul#ordering {
|
||||
ul.orderable {
|
||||
|
||||
li {
|
||||
border: 1px solid $form-border;
|
||||
background: lighten($content-bg, 2%);
|
||||
@@ -771,6 +772,10 @@ form {
|
||||
color: $form-field-text;
|
||||
}
|
||||
}
|
||||
|
||||
&.disabled li {
|
||||
opacity: 0.5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -434,7 +434,7 @@ textarea.frontmatter {
|
||||
|
||||
// Sortables
|
||||
.form-order-wrapper {
|
||||
ul#ordering {
|
||||
ul.orderable {
|
||||
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{% set value = (value is null ? field.default : value) %}
|
||||
{% set siblings = data.parent.children.visible %}
|
||||
{% set siblings = data.parent.children %}
|
||||
{% set canOrder = data.order %}
|
||||
|
||||
<div class="form-field grid pure-g">
|
||||
<div class="form-label block size-1-3 pure-u-1-3">
|
||||
@@ -14,25 +15,33 @@
|
||||
</div>
|
||||
<div class="form-data block size-2-3 pure-u-2-3">
|
||||
<div class="form-order-wrapper {{ field.size }}">
|
||||
{% set canReorder = not data.parent.header.content.items and data.visible %}
|
||||
|
||||
<input
|
||||
type="hidden"
|
||||
data-order
|
||||
{% if field.disabled or isDisabledToggleable %}disabled="disabled"{% endif %}
|
||||
name="{{ (scope ~ field.name)|fieldName }}"
|
||||
value="{{ canReorder ? value : '' }}" />
|
||||
{% if data.parent.header.content.items %}
|
||||
<span class="note">{{ "PLUGIN_ADMIN.ORDERING_DISABLED_BECAUSE_PARENT_SETTING_ORDER"|tu }}</span>
|
||||
{% elseif not data.visible %}
|
||||
<span class="note">{{ "PLUGIN_ADMIN.ORDERING_DISABLED_BECAUSE_PAGE_NOT_VISIBLE"|tu }}</span>
|
||||
{% if not canOrder %}
|
||||
<span class="note">{{ "PLUGIN_ADMIN.ORDERING_DISABLED_BECAUSE_PAGE_NO_PREFIX"|tu|raw }}</span>
|
||||
{% endif %}
|
||||
|
||||
{% if siblings|length < 200 %}
|
||||
<ul id="ordering" class="{{ field.classes }}">
|
||||
{% for page in siblings %}
|
||||
<li class="{% if page.order == value and canReorder %}drag-handle{% else %}ignore{% endif %}" data-id="{{ page.slug }}">{{ page.title|e }}</li>
|
||||
{% set sortable_count = 0 %}
|
||||
<ul id="ordering" class="orderable {{ field.classes }}">
|
||||
{% for page in siblings if page.order %}
|
||||
<li class="{% if page.order == value %}drag-handle{% else %}ignore{% endif %}" data-id="{{ page.slug }}">{{ page.title|e }}</li>
|
||||
{% set sortable_count = loop.index %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% if sortable_count < siblings|length %}
|
||||
<label>Unsortable Pages</label>
|
||||
<ul class="orderable disabled">
|
||||
{% for page in siblings if not page.order %}
|
||||
<li>{{ page.title|e }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<span class="note">{{ "PLUGIN_ADMIN.ORDERING_DISABLED_BECAUSE_TOO_MANY_SIBLINGS"|tu }}</span>
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user