Skip to content

Commit 5e02a10

Browse files
committed
Admin 1.8.0
1 parent 0b85758 commit 5e02a10

File tree

30 files changed

+226
-238
lines changed

30 files changed

+226
-238
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
<a name="1.8.0"></a>
2+
# [1.8.0](https://github.com/flextype-plugins/admin) (2021-01-07)
3+
4+
### Features
5+
6+
* **core** update code base for new Twig 2.0.0
7+
* **core** update code base for new Icon 2.0.0
8+
19
<a name="1.7.1"></a>
210
# [1.7.1](https://github.com/flextype-plugins/admin) (2021-01-03)
311

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ The following dependencies need to be installed for Form Admin Plugin.
1515
| Item | Version | Download |
1616
|---|---|---|
1717
| [flextype](https://github.com/flextype/flextype) | 0.9.15 | [download](https://github.com/flextype/flextype/releases) |
18-
| [twig](https://github.com/flextype-plugins/twig) | >=1.0.0 | [download](https://github.com/flextype-plugins/twig/releases) |
18+
| [twig](https://github.com/flextype-plugins/twig) | >=2.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) |
2121
| [jquery](https://github.com/flextype-plugins/jquery) | >=1.0.0 | [download](https://github.com/flextype-plugins/jquery/releases) |
22-
| [icon](https://github.com/flextype-plugins/icon) | >=1.0.0 | [download](https://github.com/flextype-plugins/icon/releases) |
22+
| [icon](https://github.com/flextype-plugins/icon) | >=2.0.0 | [download](https://github.com/flextype-plugins/icon/releases) |
2323
| [acl](https://github.com/flextype-plugins/acl) | >=1.0.0 | [download](https://github.com/flextype-plugins/acl/releases) |
2424
| [accounts-admin](https://github.com/flextype-plugins/accounts-admin) | >=1.0.0 | [download](https://github.com/flextype-plugins/accounts-admin/releases) |
2525
| [phpmailer](https://github.com/flextype-plugins/phpmailer) | >=1.0.0 | [download](https://github.com/flextype-plugins/phpmailer/releases) |

app/Controllers/ApiAccessController.php

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,6 @@
1818

1919
class ApiAccessController
2020
{
21-
22-
/**
23-
* __construct
24-
*/
25-
public function __construct()
26-
{
27-
28-
}
29-
3021
/**
3122
* Access Index page
3223
*
@@ -57,7 +48,7 @@ public function index(Request $request, Response $response) : Response
5748
'link' => flextype('router')->pathFor('admin.api.index'),
5849
'title' => __('admin_api'),
5950
],
60-
'api_Access' => [
51+
'api_access' => [
6152
'link' => flextype('router')->pathFor('admin.api_access.index'),
6253
'title' => __('admin_access'),
6354
'active' => true

app/Controllers/ApiController.php

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,6 @@
1818

1919
class ApiController
2020
{
21-
/**
22-
* __construct
23-
*/
24-
public function __construct()
25-
{
26-
27-
}
28-
2921
/**
3022
* Index page for API's
3123
*
@@ -42,27 +34,27 @@ public function index(Request $request, Response $response) : Response
4234
'api_list' => [
4335
'entries' => [
4436
'title' => __('admin_entries'),
45-
'icon' => 'fas fa-database'
37+
'icon' => ['name' => 'database', 'set' => 'fontawesome|solid'],
4638
],
4739
'registry' => [
4840
'title' => __('admin_registry'),
49-
'icon' => 'fas fa-archive'
41+
'icon' => ['name' => 'archive', 'set' => 'fontawesome|solid'],
5042
],
5143
'images' => [
5244
'title' => __('admin_images'),
53-
'icon' => 'far fa-images'
45+
'icon' => ['name' => 'images', 'set' => 'fontawesome|solid'],
5446
],
5547
'files' => [
5648
'title' => __('admin_files'),
57-
'icon' => 'fas fa-file'
49+
'icon' => ['name' => 'file', 'set' => 'fontawesome|solid'],
5850
],
5951
'folders' => [
6052
'title' => __('admin_folders'),
61-
'icon' => 'fas fa-folder'
53+
'icon' => ['name' => 'folder', 'set' => 'fontawesome|solid'],
6254
],
6355
'access' => [
6456
'title' => __('admin_access'),
65-
'icon' => 'fas fa-user-shield'
57+
'icon' => ['name' => 'user-shield', 'set' => 'fontawesome|solid'],
6658
],
6759
],
6860
'links' => [

app/Controllers/ApiFilesController.php

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

1919
class ApiFilesController
2020
{
21-
22-
/**
23-
* __construct
24-
*/
25-
public function __construct()
26-
{
27-
28-
}
29-
3021
/**
3122
* files Index page
3223
*

app/Controllers/EntriesController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -997,7 +997,7 @@ public function uploadMediaFileProcess(Request $request, Response $response) : R
997997
*/
998998
public function getMediaList(string $id, bool $path = false) : array
999999
{
1000-
$base_url = \Slim\Http\Uri::createFromEnvironment(new \Slim\Http\Environment($_SERVER))->getBaseUrl();
1000+
$baseUrl = \Slim\Http\Uri::createFromEnvironment(new \Slim\Http\Environment($_SERVER))->getBaseUrl();
10011001
$files = [];
10021002

10031003
if (!Filesystem::has(PATH['project'] . '/media/entries/' . $id)) {
@@ -1009,7 +1009,7 @@ public function getMediaList(string $id, bool $path = false) : array
10091009
if (strpos($file, strtolower($file_ext), 1)) {
10101010
if ($file !== 'entry.md') {
10111011
if ($path) {
1012-
$files[$base_url . '/' . $id . '/' . $file] = $base_url . '/' . $id . '/' . $file;
1012+
$files[$baseUrl . '/' . $id . '/' . $file] = $baseUrl . '/' . $id . '/' . $file;
10131013
} else {
10141014
$files[$file] = $file;
10151015
}

dependencies.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
I18n::$locale = flextype('registry')->get('flextype.settings.locale');
2020

2121
// Add Admin Navigation
22-
flextype('registry')->set('plugins.admin.settings.navigation.content.entries', ['title' => __('admin_entries'), 'icon' => 'fas fa-database', 'link' => flextype('router')->pathFor('admin.entries.index')]);
23-
flextype('registry')->set('plugins.admin.settings.navigation.extends.plugins', ['title' => __('admin_plugins'),'icon' => 'fas fa-plug', 'link' => flextype('router')->pathFor('admin.plugins.index')]);
24-
flextype('registry')->set('plugins.admin.settings.navigation.system.tools', ['title' => __('admin_tools'),'icon' => 'fas fa-toolbox', 'link' => flextype('router')->pathFor('admin.tools.index')]);
25-
flextype('registry')->set('plugins.admin.settings.navigation.system.api', ['title' => __('admin_api'),'icon' => 'fas fa-network-wired', 'link' => flextype('router')->pathFor('admin.api.index')]);
22+
flextype('registry')->set('plugins.admin.settings.navigation.content.entries', ['title' => __('admin_entries'), 'icon' => ['name' => 'database', 'set' => 'fontawesome|solid'], 'link' => flextype('router')->pathFor('admin.entries.index')]);
23+
flextype('registry')->set('plugins.admin.settings.navigation.extends.plugins', ['title' => __('admin_plugins'),'icon' => ['name' => 'plug', 'set' => 'fontawesome|solid'], 'link' => flextype('router')->pathFor('admin.plugins.index')]);
24+
flextype('registry')->set('plugins.admin.settings.navigation.system.tools', ['title' => __('admin_tools'),'icon' => ['name' => 'toolbox', 'set' => 'fontawesome|solid'], 'link' => flextype('router')->pathFor('admin.tools.index')]);
25+
flextype('registry')->set('plugins.admin.settings.navigation.system.api', ['title' => __('admin_api'),'icon' => ['name' => 'network-wired', 'set' => 'fontawesome|solid'], 'link' => flextype('router')->pathFor('admin.api.index')]);
2626

2727
/**
2828
* Add Assets

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Admin",
3-
"version": "1.7.1",
3+
"version": "1.8.0",
44
"description": "Admin theme for Flextype",
55
"homepage": "https://flextype.org",
66
"author": "Sergey Romanenko",

plugin.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
name: Admin
2-
version: 1.7.1
2+
version: 1.8.0
33
description: Admin Panel plugin for Flextype.
4-
icon: fab fa-fort-awesome
4+
icon:
5+
name: fort-awesome
6+
set: "fontawesome|brands"
57
author:
68
name: Sergey Romanenko
79
@@ -15,8 +17,8 @@ license: MIT
1517

1618
dependencies:
1719
flextype: 0.9.15
18-
twig: '>=1.0.0'
19-
icon: '>=1.0.0'
20+
twig: '>=2.0.0'
21+
icon: '>=2.0.0'
2022
form: '>=1.0.0'
2123
form-admin: '>=1.0.0'
2224
jquery: '>=1.0.0'

templates/content/entries/add.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
<div class="button-dropdown">
4646
<input type="submit" id="create" name="create" value="{{ tr('admin_create') }}" class="button">
4747
<a href="javascript:;" class="button js-dropdown-btn" data-dropdown="dropdown-list-create-new-entry">
48-
<i class="icon icon--white">{{ icon('fas fa-sort-down') }}</i>
48+
<i class="icon icon--white">{{ icon('sort-down', 'fontawesome|solid') }}</i>
4949
</a>
5050
<div id="dropdown-list-create-new-entry" class="dropdown">
5151
<input type="submit" id="create-and-edit" name="create-and-edit" value="{{ tr('admin_create_and_edit') }}" class="dropdown__item">

0 commit comments

Comments
 (0)