Upgrade to 3.8.0

This commit is contained in:
Bastian Allgeier
2022-10-06 10:11:54 +02:00
parent a9ed4e45ca
commit 7d168aae58
332 changed files with 26337 additions and 21977 deletions

View File

@@ -5,7 +5,7 @@ use Kirby\Toolkit\I18n;
return function (array $props) {
$props['sections'] = [
'files' => [
'headline' => $props['headline'] ?? I18n::translate('files'),
'label' => $props['label'] ?? $props['headline'] ?? I18n::translate('files'),
'type' => 'files',
'layout' => $props['layout'] ?? 'cards',
'template' => $props['template'] ?? null,
@@ -17,6 +17,7 @@ return function (array $props) {
// remove global options
unset(
$props['headline'],
$props['label'],
$props['layout'],
$props['template'],
$props['image']

View File

@@ -10,7 +10,7 @@ return function ($props) {
if (is_string($props) === true) {
$props = [
'headline' => $props
'label' => $props
];
}
@@ -27,18 +27,18 @@ return function ($props) {
if ($pages !== false) {
$sidebar['pages'] = $section([
'headline' => I18n::translate('pages'),
'type' => 'pages',
'status' => 'all',
'layout' => 'list',
'label' => I18n::translate('pages'),
'type' => 'pages',
'status' => 'all',
'layout' => 'list',
], $pages);
}
if ($files !== false) {
$sidebar['files'] = $section([
'headline' => I18n::translate('files'),
'type' => 'files',
'layout' => 'list'
'label' => I18n::translate('files'),
'type' => 'files',
'layout' => 'list'
], $files);
}
}

View File

@@ -6,12 +6,12 @@ return function (array $props) {
// load the general templates setting for all sections
$templates = $props['templates'] ?? null;
$section = function ($headline, $status, $props) use ($templates) {
$section = function ($label, $status, $props) use ($templates) {
$defaults = [
'headline' => $headline,
'type' => 'pages',
'layout' => 'list',
'status' => $status
'label' => $label,
'type' => 'pages',
'layout' => 'list',
'status' => $status
];
if ($props === true) {
@@ -20,7 +20,7 @@ return function (array $props) {
if (is_string($props) === true) {
$props = [
'headline' => $props
'label' => $props
];
}