Upgrade to 3.7.0

This commit is contained in:
Bastian Allgeier
2022-06-27 10:02:22 +02:00
parent 0751a6510d
commit 1c22148d7b
674 changed files with 5052 additions and 3082 deletions

11
kirby/config/fields/structure.php Normal file → Executable file
View File

@@ -106,6 +106,7 @@ return [
},
'columns' => function () {
$columns = [];
$mobile = 0;
if (empty($this->columns)) {
foreach ($this->fields as $field) {
@@ -133,6 +134,10 @@ return [
continue;
}
if (($columnProps['mobile'] ?? false) === true) {
$mobile++;
}
$columns[$columnName] = array_merge($columnProps, [
'type' => $field['type'],
'label' => $field['label'] ?? $field['name']
@@ -140,6 +145,12 @@ return [
}
}
// make the first column visible on mobile
// if no other mobile columns are defined
if ($mobile === 0) {
$columns[array_key_first($columns)]['mobile'] = true;
}
return $columns;
}
],