Skip to content

Commit 0d1de9e

Browse files
committed
Merge branch 'master' into dev
2 parents 295a941 + 400a10f commit 0d1de9e

File tree

21 files changed

+77
-121
lines changed

21 files changed

+77
-121
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
<a name="1.6.0"></a>
2+
# [1.6.0](https://github.com/flextype-plugins/admin) (2020-12-29)
3+
4+
### Features
5+
6+
* **core** update code base for new Flextype 0.9.14
7+
* **core** Moving to PHP 7.4
8+
* **core** use new TWIG Plugin 1.7.0
9+
110
<a name="1.5.0"></a>
211
# [1.5.0](https://github.com/flextype-plugins/admin) (2020-12-20)
312

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
![preview](https://github.com/flextype-plugins/admin/raw/dev/preview.png)
44

55
<p align="center">
6-
<a href="https://github.com/flextype-plugins/admin/releases"><img alt="Version" src="https://img.shields.io/github/release/flextype-plugins/admin.svg?label=version&color=black"></a> <a href="https://github.com/flextype-plugins/admin"><img src="https://img.shields.io/badge/license-MIT-blue.svg?color=black" alt="License"></a> <a href="https://github.com/flextype-plugins/admin"><img src="https://img.shields.io/github/downloads/flextype-plugins/admin/total.svg?color=black" alt="Total downloads"></a> <a href="https://github.com/flextype/flextype"><img src="https://img.shields.io/badge/Flextype-0.9.13-green.svg?color=black" alt="Flextype"></a> <a href="https://crowdin.com/project/flextype-plugin-admin"><img src="https://d322cqt584bo4o.cloudfront.net/flextype-plugin-admin/localized.svg?color=black" alt="Crowdin"></a> <a href="https://scrutinizer-ci.com/g/flextype-plugins/admin?branch=dev&color=black"><img src="https://img.shields.io/scrutinizer/g/flextype-plugins/admin.svg?branch=dev&color=black" alt="Quality Score"></a> <a href=""><img src="https://img.shields.io/discord/423097982498635778.svg?logo=discord&colorB=728ADA&label=Discord%20Chat" alt="Discord"></a>
6+
<a href="https://github.com/flextype-plugins/admin/releases"><img alt="Version" src="https://img.shields.io/github/release/flextype-plugins/admin.svg?label=version&color=black"></a> <a href="https://github.com/flextype-plugins/admin"><img src="https://img.shields.io/badge/license-MIT-blue.svg?color=black" alt="License"></a> <a href="https://github.com/flextype-plugins/admin"><img src="https://img.shields.io/github/downloads/flextype-plugins/admin/total.svg?color=black" alt="Total downloads"></a> <a href="https://github.com/flextype/flextype"><img src="https://img.shields.io/badge/Flextype-0.9.14-green.svg?color=black" alt="Flextype"></a> <a href="https://crowdin.com/project/flextype-plugin-admin"><img src="https://d322cqt584bo4o.cloudfront.net/flextype-plugin-admin/localized.svg?color=black" alt="Crowdin"></a> <a href="https://scrutinizer-ci.com/g/flextype-plugins/admin?branch=dev&color=black"><img src="https://img.shields.io/scrutinizer/g/flextype-plugins/admin.svg?branch=dev&color=black" alt="Quality Score"></a> <a href=""><img src="https://img.shields.io/discord/423097982498635778.svg?logo=discord&colorB=728ADA&label=Discord%20Chat" alt="Discord"></a>
77
</p>
88

99
Admin Panel plugin for Flextype.
@@ -14,7 +14,7 @@ The following dependencies need to be installed for Form Admin Plugin.
1414

1515
| Item | Version | Download |
1616
|---|---|---|
17-
| [flextype](https://github.com/flextype/flextype) | 0.9.13 | [download](https://github.com/flextype/flextype/releases) |
17+
| [flextype](https://github.com/flextype/flextype) | 0.9.14 | [download](https://github.com/flextype/flextype/releases) |
1818
| [twig](https://github.com/flextype-plugins/twig) | >=1.0.0 | [download](https://github.com/flextype-plugins/twig/releases) |
1919
| [form](https://github.com/flextype-plugins/form) | >=1.0.0 | [download](https://github.com/flextype-plugins/form/releases) |
2020
| [form-admin](https://github.com/flextype-plugins/form-admin) | >=1.0.0 | [download](https://github.com/flextype-plugins/form-admin/releases) |

app/Controllers/EntriesController.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,6 @@
1414

1515
class EntriesController
1616
{
17-
/**
18-
* __construct
19-
*/
20-
public function __construct()
21-
{
22-
23-
}
24-
2517
/**
2618
* Get Entry ID
2719
*

app/Controllers/SettingsController.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,6 @@
1515

1616
class SettingsController
1717
{
18-
19-
/**
20-
* __construct
21-
*/
22-
public function __construct()
23-
{
24-
25-
}
26-
2718
/**
2819
* Index page
2920
*

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"issues": "https://github.com/flextype/issues"
1717
},
1818
"require": {
19-
"php": ">=7.3.0",
19+
"php": ">=7.4.0",
2020
"flextype-components/number" : "*",
2121
"flextype-components/arrays" : "3.0.1",
2222
"flextype-components/filesystem": "2.0.8"
@@ -25,7 +25,7 @@
2525
"apcu-autoloader": true,
2626
"optimize-autoloader": true,
2727
"platform": {
28-
"php": "7.3.0"
28+
"php": "7.4.0"
2929
}
3030
},
3131
"autoload": {

dependencies.php

Lines changed: 12 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -50,50 +50,15 @@
5050
array_merge($_admin_js,
5151
['project/plugins/admin/assets/dist/js/admin-vendor-build.min.js']));
5252

53-
flextype()->container()['DashboardController'] = static function () {
54-
return new DashboardController();
55-
};
56-
57-
flextype()->container()['SettingsController'] = static function () {
58-
return new SettingsController();
59-
};
60-
61-
flextype()->container()['PluginsController'] = static function () {
62-
return new PluginsController();
63-
};
64-
65-
flextype()->container()['EntriesController'] = static function () {
66-
return new EntriesController();
67-
};
68-
69-
flextype()->container()['ToolsController'] = static function () {
70-
return new ToolsController();
71-
};
72-
73-
flextype()->container()['ApiController'] = static function () {
74-
return new ApiController();
75-
};
76-
77-
flextype()->container()['ApiEntriesController'] = static function () {
78-
return new ApiEntriesController();
79-
};
80-
81-
flextype()->container()['ApiFilesController'] = static function () {
82-
return new ApiFilesController();
83-
};
84-
85-
flextype()->container()['ApiFoldersController'] = static function () {
86-
return new ApiFoldersController();
87-
};
88-
89-
flextype()->container()['ApiImagesController'] = static function () {
90-
return new ApiImagesController();
91-
};
92-
93-
flextype()->container()['ApiAccessController'] = static function () {
94-
return new ApiAccessController();
95-
};
96-
97-
flextype()->container()['ApiRegistryController'] = static function () {
98-
return new ApiRegistryController();
99-
};
53+
flextype()->container()['DashboardController'] = fn() => new DashboardController();
54+
flextype()->container()['SettingsController'] = fn() => new SettingsController();
55+
flextype()->container()['PluginsController'] = fn() => new PluginsController();
56+
flextype()->container()['EntriesController'] = fn() => new EntriesController();
57+
flextype()->container()['ToolsController'] = fn() => new ToolsController();
58+
flextype()->container()['ApiController'] = fn() => new ApiController();
59+
flextype()->container()['ApiEntriesController'] = fn() => new ApiEntriesController();
60+
flextype()->container()['ApiFilesController'] = fn() => new ApiFilesController();
61+
flextype()->container()['ApiFoldersController'] = fn() => new ApiFoldersController();
62+
flextype()->container()['ApiImagesController'] = fn() => new ApiImagesController();
63+
flextype()->container()['ApiAccessController'] = fn() => new ApiAccessController();
64+
flextype()->container()['ApiRegistryController'] = fn() => new ApiRegistryController();

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "Admin",
33
"version": "1.5.0",
44
"description": "Admin theme for Flextype",
5-
"homepage": "http://flextype.org",
5+
"homepage": "https://flextype.org",
66
"author": "Sergey Romanenko",
77
"license": "MIT",
88
"keywords": [

plugin.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Admin
2-
version: 1.5.0
2+
version: 1.6.0
33
description: Admin Panel plugin for Flextype.
44
icon: fab fa-fort-awesome
55
author:
@@ -14,7 +14,7 @@ keywords: admin, panel, manager
1414
license: MIT
1515

1616
dependencies:
17-
flextype: 0.9.13
17+
flextype: 0.9.14
1818
twig: '>=1.0.0'
1919
icon: '>=1.0.0'
2020
form: '>=1.0.0'

settings.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ entries:
1515
accept_file_types: gif, jpg, jpeg, png, ico, zip, tgz, txt, md, doc, docx, pdf, epub, xls, xlsx, ppt, pptx, mp3, ogg, wav, m4a, mp4, m4v, ogv, wmv, avi, webm, svg
1616

1717
# Admin plugin priority
18-
priority: 90
18+
priority: 50
1919

2020
# Admin flextype menu
2121
flextype_menu: []

templates/content/entries/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
<td class="w-1 text-center {% if entry.visibility == 'hidden' or entry.visibility == 'draft' or entry.routable == false %}opacity-50{% endif %}">
2626
{% if entry.fieldset %}
2727
{% set fieldset_path = PATH_PROJECT ~ '/fieldsets' ~ '/' ~ entry.fieldset ~ '.yaml' %}
28-
{% if filesystem_has(fieldset_path) %}
29-
{% set fieldset = yaml_decode(filesystem_read(fieldset_path)) %}
28+
{% if filesystem().file(fieldset_path).exists() %}
29+
{% set fieldset = flextype.serializers.yaml.decode(filesystem().file(fieldset_path).get()) %}
3030
{% if fieldset.icon %}
3131
<i class="icon">{{ icon(fieldset.icon) }}</i>
3232
{% else %}
@@ -42,7 +42,7 @@
4242
<td class="pl-0 {% if entry.visibility == 'hidden' or entry.visibility == 'draft' or entry.routable == false %}opacity-50{% endif %}">
4343
<a href="{% if entry.has_children %}{{ path_for('admin.entries.index') }}?id={{ entry.id }}{% else %}{{ path_for('admin.entries.edit') }}?id={{ entry.id }}&type=editor{% endif %}">
4444
{% if entry.fieldset %}
45-
{% if filesystem_has(fieldset_path) %}
45+
{% if filesystem().file(fieldset_path).exists() %}
4646
{% if fieldset.default_field %}
4747
{% if entry[fieldset.default_field] != '' %}
4848
{{ entry[fieldset.default_field] }}

0 commit comments

Comments
 (0)