Skip to content

Commit

Permalink
(Grav GitSync) Automatic Commit from Ruth Cheesley
Browse files Browse the repository at this point in the history
  • Loading branch information
RCheesley committed Aug 17, 2022
1 parent 7a05f51 commit 185310f
Show file tree
Hide file tree
Showing 742 changed files with 77,186 additions and 81,598 deletions.
10 changes: 5 additions & 5 deletions plugins/admin/.editorconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# EditorConfig is awesome: http://EditorConfig.org
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true
Expand All @@ -10,8 +10,8 @@ end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 4

# 2 space indentation
[*.{yaml,.yml}]
indent_size = 2

# 4 space indentation
[*.php]
indent_size = 4
1 change: 1 addition & 0 deletions plugins/admin/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ tests/_support/_generated/*
tests/cache/*
tests/error.log
/crowdin.yaml
.vscode
133 changes: 133 additions & 0 deletions plugins/admin/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,136 @@
# v1.10.35
## 08/04/2022

1. [](#improved)
* Improvements in CodeMirror editor in RTL mode [#359](https://github.com/getgrav/grav-plugin-admin/issues/359), [#2297](https://github.com/getgrav/grav-plugin-admin/pull/2297)

# v1.10.34
## 06/22/2022

1. [](#improved)
* Exposed `UriToMarkdown` util (`Grav.default.Utils.UriToMarkdown`) in admin, to convert links/images
1. [](#bugfix)
* Fixed `Latest Page Updates` permissions [#2294](https://github.com/getgrav/grav-plugin-admin/pull/2294)

# v1.10.33.1
## 04/25/2022

1. [](#bugfix)
* Reverted [PR#2265](https://github.com/getgrav/grav-plugin-admin/pull/2265) as it broke sections output

# v1.10.33
## 04/25/2022

1. [](#new)
* Require **Form 6.0.1**
2. [](#improved)
* Added support for a single `field:` vs `fields:` in element form field to store a single value to the option field
* Allow new media collapser logic to configure different cookie storage name location via `data-storage-location`
1. [](#bugfix)
* Fixed nested element form fields
* Fixed `columns` and `column` fields with `.dotted` variables inside to ignore columns and column names
* Fixed initial elements state not being restored

# v1.10.32
## 03/28/2022

1. [](#new)
* Require **Grav 1.7.32**, **Form 6.0.0**, **Login 3.7.0**, **Email 3.1.6** and **Flex Objects 1.2.0**
2. [](#improved)
* List field: Support for default values other than key/value [#2255](https://github.com/getgrav/grav-plugin-admin/issues/2255)
* Added question icon to admin fields with help text [#2261](https://github.com/getgrav/grav-plugin-admin/issues/2261)
3. [](#bugfix)
* Fix nested `toggleable`: originalValue now checks with `??` instead of `is defined`

# v1.10.31
## 03/14/2022

1. [](#new)
* Added new local Multiavatar (local generation). **This will be default in Grav 1.8**
2. [](#bugfix)
* Patch `collection.js` [#2235](https://github.com/getgrav/grav-plugin-admin/issues/2235)

# v1.10.30.2
## 02/09/2022

2. [](#bugfix)
* Fixed regression preventing new `elements` field from saving its state

# v1.10.30.1
## 02/09/2022

1. [](#improved)
* List field items will now require confirmation before getting deleted

# v1.10.30
## 02/07/2022

1. [](#new)
* Require **Grav 1.7.30**
* Updated SCSS compiler to v1.10
* PageMedia can now be collapsed and thumbnails previewed smaller, in order to save room on the page. Selection will be remembered.
* DEPRECATED: Admin field `pages_list_display_field` is no longer available as an option [#2191](https://github.com/getgrav/grav-plugin-admin/issues/2191)
* When listing installable themes/plugins, it is now possible to sort them by [Premium](https://getgrav.org/premium)
2. [](#improved)
* Updated JavaScript dependencies
* Cleaned up JavaScript unused dependencies and warnings
* Removed unused style assets
* Plugins list rows now properly highlight on hover, no more guessing when wanting to disable a plugin!
3. [](#bugfix)
* Fixed `elements` field when it's used inside `list` field
* Fixed issue uploading non-images media when Resolution setting enabled in Admin [#2172](https://github.com/getgrav/grav-plugin-admin/issues/2172)
* Prevent fields from being toggled incorrectly by adding originalValue to childs of fieldset. [#2218](https://github.com/getgrav/grav-plugin-admin/pull/2218)
* Fixed persistent focus on Folder field when Adding page (Safari) [#2209](https://github.com/getgrav/grav-plugin-admin/issues/2209)
* Fixed performance of Plugins / Themes sort in the installation table
* Fixed list field with key/value pairs throwing an exception due to bad value [#2199](https://github.com/getgrav/grav-plugin-admin/issues/2199)
* Fixed disabling/enabling plugin from the list breaking the plugin configuration

# v1.10.29
## 01/28/2022

1. [](#new)
* Require **Grav 1.7.29**
3. [](#improved)
* Made path handling unicode-safe, use new `Utils::basename()` and `Utils::pathinfo()` everywhere

# v1.10.28
## 01/24/2022

1. [](#bugfix)
* Clean file names before displaying errors/metadata modals
* Recompiled JS for production [#2225](https://github.com/getgrav/grav-plugin-admin/issues/2225)

# v1.10.27
## 01/12/2022

1. [](#new)
* Support for `YubiKey OTP` 2-Factor authenticator
* New `elements` container field that shows/hides children fields based on boolean trigger value
* Requires Grav `v1.7.27` and Login `v3.6.2`
2. [](#improved)
* Added new asset language strings

# v1.10.26.1
## 01/03/2022

3. [](#bugfix)
* Fixed an issue with missing files reference by cached autoloader

# v1.10.26
## 01/03/2022

2. [](#improved)
* Updated SCSS compiler to v1.9 and other vendor libraries
* Fixed various deprecation warnings
* Localized dialog buttons and icons [#2207](https://github.com/getgrav/grav-plugin-admin/pull/2207)
* Updated copyright year

# v1.10.25
## 11/16/2021

3. [](#bugfix)
* Fixed unescaped messages in JSON responses

# v1.10.24
## 10/26/2021

Expand Down
6 changes: 3 additions & 3 deletions plugins/admin/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Grav Standard Administration Panel Plugin

This **admin plugin** for [Grav](http://github.com/getgrav/grav) is an HTML user interface that provides a convenient way to configure Grav and easily create and modify pages. This will remain a totally optional plugin, and is not in any way required or needed to use Grav effectively. In fact, the admin provides an intentionally limited view to ensure it remains easy to use and not overwhelming. I'm sure power users will still prefer to work with the configuration files directly.
This **admin plugin** for [Grav](https://github.com/getgrav/grav) is an HTML user interface that provides a convenient way to configure Grav and easily create and modify pages. This will remain a totally optional plugin, and is not in any way required or needed to use Grav effectively. In fact, the admin provides an intentionally limited view to ensure it remains easy to use and not overwhelming. I'm sure power users will still prefer to work with the configuration files directly.

![](assets/admin-dashboard.png)

Expand Down Expand Up @@ -33,7 +33,7 @@ This **admin plugin** for [Grav](http://github.com/getgrav/grav) is an HTML user

We have tested internally, but we hope to use this public beta phase to identify, isolate, and fix issues related to the plugin to ensure it is as solid and reliable as possible.

For **live chatting**, please use the dedicated [Slack Chat Room](https://getgrav.org/slack) for discussions directly related to Grav.
For **live chatting**, please use the dedicated [Discord Chat Room](https://getgrav.org/discord) for discussions directly related to Grav.

For **bugs, features, improvements**, please ensure you [create issues in the admin plugin GitHub repository](https://github.com/getgrav/grav-plugin-admin).

Expand Down Expand Up @@ -99,7 +99,7 @@ By default, you can access the admin by pointing your browser to `http://yoursit
# Standard Free & Paid Pro Versions

If you have been following the [blog](http://getgrav.org/blog), [Twitter](https://twitter.com/getgrav), [Slack chat](https://getgrav.org/slack), etc., you probably already know now that our intention is to provide two versions of this plugin.
If you have been following the [blog](https://getgrav.org/blog), [Twitter](https://twitter.com/getgrav), [Discord chat](https://getgrav.org/discord), etc., you probably already know now that our intention is to provide two versions of this plugin.

The **standard free version**, is very powerful, and has more functionality than most commercial flat-file CMS systems.

Expand Down
25 changes: 14 additions & 11 deletions plugins/admin/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ public static function getSubscribedEvents()
{
return [
'onPluginsInitialized' => [
['autoload', 100001],
['setup', 100000],
['onPluginsInitialized', 1001]
],
Expand Down Expand Up @@ -119,6 +118,12 @@ public function getFormFieldTypes()
'list' => [
'array' => true
],
'elements' => [
'input@' => true
],
'element' => [
'input@' => false
],
'file' => [
'array' => true,
'media_field' => true,
Expand Down Expand Up @@ -170,8 +175,6 @@ public function getFormFieldTypes()
}

/**
* [onPluginsInitialized:100000] Composer autoload.
*
* @return ClassLoader
*/
public function autoload(): ClassLoader
Expand Down Expand Up @@ -452,11 +455,11 @@ public function onPagesInitialized()
$legacyController = true;
}

/** @var UserInterface $user */
$user = $this->grav['user'];

// Replace page service with admin.
if (empty($this->grav['page'])) {
/** @var UserInterface $user */
$user = $this->grav['user'];

$this->grav['page'] = function () use ($user) {
$page = new Page();

Expand All @@ -480,7 +483,7 @@ public function onPagesInitialized()
Admin::DEBUG && Admin::addDebugMessage("Admin page: {$this->template}");

$page->init(new \SplFileInfo(__DIR__ . "/pages/admin/{$this->template}.md"));
$page->slug(basename($this->template));
$page->slug(Utils::basename($this->template));

return $page;
}
Expand All @@ -501,7 +504,7 @@ public function onPagesInitialized()
Admin::DEBUG && Admin::addDebugMessage("Admin page: plugin {$plugin->name}/{$this->template}");

$page->init(new \SplFileInfo($path));
$page->slug(basename($this->template));
$page->slug(Utils::basename($this->template));

return $page;
}
Expand All @@ -525,7 +528,7 @@ public function onPagesInitialized()
$error_file = $this->grav['locator']->findResource('plugins://admin/pages/admin/error.md');
$page = new Page();
$page->init(new \SplFileInfo($error_file));
$page->slug(basename($this->route));
$page->slug(Utils::basename($this->route));
$page->routable(true);
}

Expand All @@ -537,7 +540,7 @@ public function onPagesInitialized()
$login_file = $this->grav['locator']->findResource('plugins://admin/pages/admin/login.md');
$page = new Page();
$page->init(new \SplFileInfo($login_file));
$page->slug(basename($this->route));
$page->slug(Utils::basename($this->route));
unset($this->grav['page']);
$this->grav['page'] = $page;
}
Expand Down Expand Up @@ -1304,7 +1307,7 @@ public static function themeOptions()
$options = [];
$theme_files = glob(__dir__ . '/themes/grav/css/codemirror/themes/*.css');
foreach ($theme_files as $theme_file) {
$theme = basename(basename($theme_file, '.css'));
$theme = Utils::basename(Utils::basename($theme_file, '.css'));
$options[$theme] = Inflector::titleize($theme);
}
}
Expand Down
1 change: 0 additions & 1 deletion plugins/admin/admin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ session:
edit_mode: normal
frontend_preview_target: inline
show_github_msg: true
pages_list_display_field: title
admin_icons: line-awesome
enable_auto_updates_check: true
notifications:
Expand Down
20 changes: 7 additions & 13 deletions plugins/admin/blueprints.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
name: Admin Panel
slug: admin
type: plugin
version: 1.10.24
version: 1.10.35
description: Adds an advanced administration panel to manage your site
icon: empire
author:
name: Team Grav
email: [email protected]
url: http://getgrav.org
url: https://getgrav.org
homepage: https://github.com/getgrav/grav-plugin-admin
keywords: admin, plugin, manager, panel
bugs: https://github.com/getgrav/grav-plugin-admin/issues
docs: https://github.com/getgrav/grav-plugin-admin/blob/develop/README.md
license: MIT

dependencies:
- { name: grav, version: '>=1.7.24' }
- { name: form, version: '>=5.1.0' }
- { name: login, version: '>=3.5.0' }
- { name: email, version: '>=3.1.0' }
- { name: flex-objects, version: '>=1.1.0' }
- { name: grav, version: '>=1.7.32' }
- { name: form, version: '>=6.0.1' }
- { name: login, version: '>=3.7.0' }
- { name: email, version: '>=3.1.6' }
- { name: flex-objects, version: '>=1.2.0' }

form:
validation: loose
Expand Down Expand Up @@ -202,12 +202,6 @@ form:
type: bool
help: PLUGIN_ADMIN.SHOW_GITHUB_LINK_HELP

pages_list_display_field:
type: text
size: small
label: PLUGIN_ADMIN.PAGES_LIST_DISPLAY_FIELD
help: PLUGIN_ADMIN.PAGES_LIST_DISPLAY_FIELD_HELP

enable_auto_updates_check:
type: toggle
label: PLUGIN_ADMIN.AUTO_UPDATES
Expand Down
6 changes: 3 additions & 3 deletions plugins/admin/classes/plugin/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -980,7 +980,7 @@ public function getConfigurationData($type, array $post = null)
$obj->file = $file;
$obj->page = $pages->get(dirname($obj->path));

$fileInfo = pathinfo($obj->title);
$fileInfo = Utils::pathinfo($obj->title);
$filename = str_replace(['@3x', '@2x'], '', $fileInfo['filename']);
if (isset($fileInfo['extension'])) {
$filename .= '.' . $fileInfo['extension'];
Expand Down Expand Up @@ -1979,7 +1979,7 @@ public function getPage($path)
$page = $path ? $pages->find($path, true) : $pages->root();

if (!$page) {
$slug = basename($path);
$slug = Utils::basename($path);

if ($slug === '') {
return null;
Expand Down Expand Up @@ -2407,7 +2407,7 @@ public function getLogFiles()
/**
* Get changelog for a given GPM package based on slug
*
* @param null $slug
* @param string|null $slug
* @return array
*/
public function getChangelog($slug = null)
Expand Down
Loading

0 comments on commit 185310f

Please sign in to comment.