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

This commit is contained in:
Andy Miller
2016-05-03 10:37:58 -06:00
8 changed files with 49 additions and 38 deletions

View File

@@ -7,6 +7,9 @@
* Fixed UI issue with Backup / Update buttons positioning * Fixed UI issue with Backup / Update buttons positioning
* Tweaked placeholders color in login/new user panels [#542](https://github.com/getgrav/grav-plugin-admin/issues/542) * Tweaked placeholders color in login/new user panels [#542](https://github.com/getgrav/grav-plugin-admin/issues/542)
1. [](#bugfix) 1. [](#bugfix)
* Fix some untranslated strings
* Fix the version information after updating Grav from Admin
* Fix a Twig autoescape issue on Plugins descriptions
* Fix for showing empty drop-down with only one supported language [#522](https://github.com/getgrav/grav-plugin-admin/issues/522) * Fix for showing empty drop-down with only one supported language [#522](https://github.com/getgrav/grav-plugin-admin/issues/522)
* Fix for visibility toggle on new page not working [#551](https://github.com/getgrav/grav-plugin-admin/issues/551) * Fix for visibility toggle on new page not working [#551](https://github.com/getgrav/grav-plugin-admin/issues/551)

View File

@@ -684,7 +684,10 @@ class AdminPlugin extends Plugin
'NOTHING_TO_SAVE', 'NOTHING_TO_SAVE',
'FILE_UNSUPPORTED', 'FILE_UNSUPPORTED',
'FILE_ERROR_ADD', 'FILE_ERROR_ADD',
'FILE_ERROR_UPLOAD' 'FILE_ERROR_UPLOAD',
'DROP_FILES_HERE_TO_UPLOAD',
'DELETE',
'INSERT'
]; ];
foreach($strings as $string) { foreach($strings as $string) {

View File

@@ -220,7 +220,6 @@ PLUGIN_ADMIN:
DEFAULT: "Default" DEFAULT: "Default"
PAGE_MEDIA: "Page Media" PAGE_MEDIA: "Page Media"
OPTIONS: "Options" OPTIONS: "Options"
PUBLISHING: "Publishing"
PUBLISHED: "Published" PUBLISHED: "Published"
PUBLISHED_HELP: "By default, a page is published unless you explicitly set published: false or via a publish_date being in the future, or unpublish_date in the past" PUBLISHED_HELP: "By default, a page is published unless you explicitly set published: false or via a publish_date being in the future, or unpublish_date in the past"
DATE: "Date" DATE: "Date"
@@ -525,3 +524,9 @@ PLUGIN_ADMIN:
FRONTMATTER_IGNORE_FIELDS_HELP: "Certain frontmatter fields may contain Twig but should not be processed, such as 'forms'" FRONTMATTER_IGNORE_FIELDS_HELP: "Certain frontmatter fields may contain Twig but should not be processed, such as 'forms'"
PACKAGE_X_INSTALLED_SUCCESSFULLY: "Package %s installed successfully" PACKAGE_X_INSTALLED_SUCCESSFULLY: "Package %s installed successfully"
NEEDS_GRAV_1_1: "<i class=\"fa fa-exclamation-triangle\"></i> <strong>You are running Grav v%s</strong>. You must update to the latest <strong>Grav v1.1.x</strong> release in order to ensure compatibility. This may require switching to <strong>Testing GPM releases</strong> in the System configuration." NEEDS_GRAV_1_1: "<i class=\"fa fa-exclamation-triangle\"></i> <strong>You are running Grav v%s</strong>. You must update to the latest <strong>Grav v1.1.x</strong> release in order to ensure compatibility. This may require switching to <strong>Testing GPM releases</strong> in the System configuration."
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"
CANNOT_ADD_MEDIA_FILES_PAGE_NOT_SAVED: "You cannot add media files until you save the page. Just click 'Save' on top"
DROP_FILES_HERE_TO_UPLOAD: "Drop files here to upload"
INSERT: "Insert"

View File

@@ -33,6 +33,7 @@ Dropzone.confirm = (question, accepted, rejected) => {
const DropzoneMediaConfig = { const DropzoneMediaConfig = {
createImageThumbnails: { thumbnailWidth: 150 }, createImageThumbnails: { thumbnailWidth: 150 },
addRemoveLinks: false, addRemoveLinks: false,
dictDefaultMessage: translations.PLUGIN_ADMIN.DROP_FILES_HERE_TO_UPLOAD,
dictRemoveFileConfirmation: '[placeholder]', dictRemoveFileConfirmation: '[placeholder]',
previewTemplate: ` previewTemplate: `
<div class="dz-preview dz-file-preview"> <div class="dz-preview dz-file-preview">
@@ -45,8 +46,8 @@ const DropzoneMediaConfig = {
<div class="dz-success-mark"><span>✔</span></div> <div class="dz-success-mark"><span>✔</span></div>
<div class="dz-error-mark"><span>✘</span></div> <div class="dz-error-mark"><span>✘</span></div>
<div class="dz-error-message"><span data-dz-errormessage></span></div> <div class="dz-error-message"><span data-dz-errormessage></span></div>
<a class="dz-remove" href="javascript:undefined;" data-dz-remove>Delete</a> <a class="dz-remove" href="javascript:undefined;" data-dz-remove>${translations.PLUGIN_ADMIN.DELETE}</a>
<a class="dz-insert" href="javascript:undefined;" data-dz-insert>Insert</a> <a class="dz-insert" href="javascript:undefined;" data-dz-insert>${translations.PLUGIN_ADMIN.INSERT}</a>
</div>`.trim() </div>`.trim()
}; };

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,7 +1,6 @@
{% set value = (value is null ? field.default : value) %} {% set value = (value is null ? field.default : value) %}
{% set siblings = data.parent.children.visible %} {% set siblings = data.parent.children.visible %}
<div class="form-field grid pure-g"> <div class="form-field grid pure-g">
<div class="form-label block size-1-3 pure-u-1-3"> <div class="form-label block size-1-3 pure-u-1-3">
<label> <label>
@@ -23,9 +22,9 @@
name="{{ (scope ~ field.name)|fieldName }}" name="{{ (scope ~ field.name)|fieldName }}"
value="{{ canReorder ? value : '' }}" /> value="{{ canReorder ? value : '' }}" />
{% if data.parent.header.content.items %} {% if data.parent.header.content.items %}
<span class="note">Parent setting order, ordering disabled</span> <span class="note">{{ "PLUGIN_ADMIN.ORDERING_DISABLED_BECAUSE_PARENT_SETTING_ORDER"|tu }}</span>
{% elseif not data.visible %} {% elseif not data.visible %}
<span class="note">Page is not visible, ordering disabled</span> <span class="note">{{ "PLUGIN_ADMIN.ORDERING_DISABLED_BECAUSE_PAGE_NOT_VISIBLE"|tu }}</span>
{% endif %} {% endif %}
{% if siblings|length < 200 %} {% if siblings|length < 200 %}
@@ -35,7 +34,7 @@
{% endfor %} {% endfor %}
</ul> </ul>
{% else %} {% else %}
<span class="note">Ordering via the admin is unsupported because there are more than 200 siblings</span> <span class="note">{{ "PLUGIN_ADMIN.ORDERING_DISABLED_BECAUSE_TOO_MANY_SIBLINGS"|tu }}</span>
{% endif %} {% endif %}
</div> </div>
</div> </div>

View File

@@ -15,7 +15,7 @@
<div class="form-field"> <div class="form-field">
<div class="form-label"> <div class="form-label">
<label> <label>
You cannot add media files until you save the page. Just click 'Save' on top {{ "PLUGIN_ADMIN.CANNOT_ADD_MEDIA_FILES_PAGE_NOT_SAVED"|tu }}
</label> </label>
</div> </div>
</div> </div>