Merge branch 'release/1.9.5'

This commit is contained in:
Andy Miller
2019-06-14 13:54:21 -06:00
12 changed files with 51 additions and 16 deletions

8
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1,8 @@
# These are supported funding model platforms
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: grav
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
custom: # Replace with a single custom sponsorship URL

View File

@@ -1,3 +1,12 @@
# v1.9.5
## 06/14/2019
1. [](#improved)
* Display error message if GPM class fails to initialize
* Better append/prepend logic that was breaking some layouts
* Default `backups` to an array if used outside of tools
* PSR 7 fixes
# v1.9.4
## 05/09/2019

View File

@@ -39,7 +39,7 @@ For **bugs, features, improvements**, please ensure you [create issues in the ad
# Installation
First ensure you are running the latest **Grav 0.9.34 or later**. This is required for the admin plugin to run properly (`-f` forces a refresh of the GPM index).
First ensure you are running the latest **Grav 1.6.7 or later**. This is required for the admin plugin to run properly (`-f` forces a refresh of the GPM index).
```
$ bin/gpm selfupgrade -f

View File

@@ -22,6 +22,7 @@ widgets:
pages:
show_parents: both
show_modular: true
parents_levels: "2"
session:
timeout: 1800
warnings:

View File

@@ -1,5 +1,5 @@
name: Admin Panel
version: 1.9.4
version: 1.9.5
testing: false
description: Adds an advanced administration panel to manage your site
icon: empire

View File

@@ -892,6 +892,7 @@ class Admin
try {
$this->gpm = new GPM();
} catch (\Exception $e) {
$this->setMessage($e->getMessage(), 'error');
}
}
@@ -1446,7 +1447,7 @@ class Admin
public function adminNiceTime($date, $long_strings = true)
{
if (empty($date)) {
return $this->translate('GRAV.NICETIME.NO_DATE_PROVIDED', null, true);
return $this->translate('GRAV.NICETIME.NO_DATE_PROVIDED', null);
}
if ($long_strings) {
@@ -1486,17 +1487,17 @@ class Admin
// check validity of date
if (empty($unix_date)) {
return $this->translate('GRAV.NICETIME.BAD_DATE', null, true);
return $this->translate('GRAV.NICETIME.BAD_DATE', null);
}
// is it future date or past date
if ($now > $unix_date) {
$difference = $now - $unix_date;
$tense = $this->translate('GRAV.NICETIME.AGO', null, true);
$tense = $this->translate('GRAV.NICETIME.AGO', null);
} else {
$difference = $unix_date - $now;
$tense = $this->translate('GRAV.NICETIME.FROM_NOW', null, true);
$tense = $this->translate('GRAV.NICETIME.FROM_NOW', null);
}
$len = count($lengths) - 1;
@@ -1518,7 +1519,7 @@ class Admin
}
}
$periods[$j] = $this->translate('GRAV.'.$periods[$j], null, true);
$periods[$j] = $this->translate('GRAV.'.$periods[$j], null);
return "{$difference} {$periods[$j]} {$tense}";
}

View File

@@ -16,7 +16,7 @@
"support": {
"issues": "https://github.com/getgrav/grav-plugin-admin/issues",
"irc": "https://chat.getgrav.org",
"forum": "https://getgrav.org/forum",
"forum": "https://discourse.getgrav.org",
"docs": "https://github.com/getgrav/grav-plugin-admin/blob/master/README.md"
},
"require": {

View File

@@ -819,3 +819,7 @@ PLUGIN_ADMIN:
EXTRA_ARGUMENTS: "Extra Arguments"
DEFAULT_LANG: "Override Default Language"
DEFAULT_LANG_HELP: "Default is the first supported language. This can be overridden by setting this option but it must be one of the supported languages"
DEBUGGER_PROVIDER: "Debugger Provider"
DEBUGGER_PROVIDER_HELP: "Default is PHP Debug Bar, but Clockwork browser extension provides for a less intrusive approach"
DEBUGGER_DEBUGBAR: "PHP Debug Bar"
DEBUGGER_CLOCKWORK: "Clockwork Browser Extension"

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -90,8 +90,7 @@ form {
.form-input-addon {
display: flex;
min-width: 43px;
padding: 0 10px;
padding: 0 5px;
justify-content: center;
align-items: center;
@@ -317,12 +316,26 @@ form {
}
}
.x-small, .x-small.form-input-addon-wrapper input {
.x-small {
max-width: 5rem !important;
&.form-input-addon-wrapper {
max-width: inherit !important;
input {
max-width: 5rem !important;
}
}
}
.small, .small.form-input-addon-wrapper input {
.small {
max-width: 10rem !important;
&.form-input-addon-wrapper {
max-width: inherit !important;
input {
max-width: 10rem !important;
}
}
}
.medium, .medium.form-input-addon-wrapper input {

View File

@@ -13,10 +13,9 @@
{% if backups|count == 0 %}
<tr>
<td colspan="5" class="error" style="text-align: center;">{{ "PLUGIN_ADMIN.BACKUPS_NOT_GENERATED"|tu }}</td>
</tr>
{% else %}
{% for backup in backups %}
{% for backup in backups|default([]) %}
{% set encoded_name = backup.filename|base64_encode|url_encode %}
{% set backup_delete = delete_url|replace({'%BACKUP_FILE': encoded_name}) %}
<tr>