Skip to content

Commit

Permalink
Accounts Admin 1.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Awilum committed Dec 29, 2020
1 parent e71df11 commit 610d72c
Show file tree
Hide file tree
Showing 14 changed files with 27 additions and 30 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
<a name="1.7.0"></a>
# [1.7.0](https://github.com/flextype-plugins/accounts-admin) (2020-12-29)

### Features

* **core** update code base for new Flextype 0.9.14
* **core** Moving to PHP 7.4
* **core** use new TWIG Plugin 1.7.0
* **core** use new ACL Plugin 1.7.0

<a name="1.6.0"></a>
# [1.6.0](https://github.com/flextype-plugins/accounts-admin) (2020-12-20)

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<h1 align="center">Accounts Admin Plugin for <a href="http://flextype.org/">Flextype</a></h1>
<h1 align="center">Accounts Admin Plugin for <a href="https://flextype.org/">Flextype</a></h1>

<p align="center">
<a href="https://github.com/flextype-plugins/accounts-admin/releases"><img alt="Version" src="https://img.shields.io/github/release/flextype-plugins/accounts-admin.svg?label=version&color=black"></a> <a href="https://github.com/flextype-plugins/accounts-admin"><img src="https://img.shields.io/badge/license-MIT-blue.svg?color=black" alt="License"></a> <a href="https://github.com/flextype-plugins/accounts-admin"><img src="https://img.shields.io/github/downloads/flextype-plugins/accounts-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-accounts-admin"><img src="https://d322cqt584bo4o.cloudfront.net/flextype-plugin-accounts-admin/localized.svg?color=black" alt="Crowdin"></a> <a href="https://scrutinizer-ci.com/g/flextype-plugins/accounts-admin?branch=dev&color=black"><img src="https://img.shields.io/scrutinizer/g/flextype-plugins/accounts-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>
<a href="https://github.com/flextype-plugins/accounts-admin/releases"><img alt="Version" src="https://img.shields.io/github/release/flextype-plugins/accounts-admin.svg?label=version&color=black"></a> <a href="https://github.com/flextype-plugins/accounts-admin"><img src="https://img.shields.io/badge/license-MIT-blue.svg?color=black" alt="License"></a> <a href="https://github.com/flextype-plugins/accounts-admin"><img src="https://img.shields.io/github/downloads/flextype-plugins/accounts-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-accounts-admin"><img src="https://d322cqt584bo4o.cloudfront.net/flextype-plugin-accounts-admin/localized.svg?color=black" alt="Crowdin"></a> <a href="https://scrutinizer-ci.com/g/flextype-plugins/accounts-admin?branch=dev&color=black"><img src="https://img.shields.io/scrutinizer/g/flextype-plugins/accounts-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>
</p>

Accounts Admin Plugin to manage users accounts in Flextype Admin Panel.
Expand All @@ -12,7 +12,7 @@ The following dependencies need to be installed for Accounts Admin Plugin.

| Item | Version | Download |
|---|---|---|
| [flextype](https://github.com/flextype/flextype) | 0.9.13 | [download](https://github.com/flextype/flextype/releases) |
| [flextype](https://github.com/flextype/flextype) | 0.9.14 | [download](https://github.com/flextype/flextype/releases) |
| [twig](https://github.com/flextype-plugins/twig) | >=1.0.0 | [download](https://github.com/flextype-plugins/twig/releases) |
| [form](https://github.com/flextype-plugins/form) | >=1.0.0 | [download](https://github.com/flextype-plugins/form/releases) |
| [form-admin](https://github.com/flextype-plugins/form-admin) | >=1.0.0 | [download](https://github.com/flextype-plugins/form-admin/releases) |
Expand Down
13 changes: 0 additions & 13 deletions app/Controllers/AccountsAdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,6 @@
*/
class AccountsAdminController
{
/**
* Flextype Application
*/


/**
* __construct
*/
public function __construct()
{

}

/**
* Index page
*
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
"issues": "https://github.com/flextype-plugins/accounts-admin/issues"
},
"require": {
"php": ">=7.3.0",
"php": ">=7.4.0",
"flextype-components/arrays" : "3.0.1",
"flextype-components/filesystem": "2.0.8"
},
"config": {
"apcu-autoloader": true,
"optimize-autoloader": true,
"platform": {
"php": "7.3.0"
"php": "7.4.0"
}
},
"autoload": {
Expand Down
5 changes: 2 additions & 3 deletions dependencies.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@
use Flextype\Component\I18n\I18n;
use function Flextype\Component\I18n\__;


// Add Admin Navigation
flextype('registry')->set('plugins.admin.settings.navigation.extends.accounts', ['title' => __('accounts_admin_accounts'),'icon' => 'fas fa-users', 'link' => flextype('router')->pathFor('admin.accounts.index')]);

/**
* Add Accounts Admin Controller to Flextype container
*/
flextype()->container()['AccountsAdminController'] = static function () {
return new AccountsAdminController();
};
flextype()->container()['AccountsAdminController'] = fn() => new AccountsAdminController();
4 changes: 2 additions & 2 deletions plugin.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Accounts Admin
version: 1.6.0
version: 1.7.0
description: Accounts Admin Plugin to manage users accounts in Flextype Admin Panel.
icon: fas fa-users
author:
Expand All @@ -11,7 +11,7 @@ bugs: https://github.com/flextype-plugins/accounts-admin/issues
license: MIT

dependencies:
flextype: 0.9.13
flextype: 0.9.14
twig: '>=1.0.0'
admin: '>=1.0.0'
form: '>=1.0.0'
Expand Down
1 change: 1 addition & 0 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Flextype\Plugin\Acl\Middlewares\AclIsUserLoggedInRolesInMiddleware;

flextype()->group('/' . $admin_route . '/accounts', function () {
flextype()->get('/no-access', function() { return 'no-access'; })->setName('admin.accounts.no-access');
flextype()->get('/login', 'AccountsAdminController:login')->setName('admin.accounts.login');
flextype()->post('/login', 'AccountsAdminController:loginProcess')->setName('admin.accounts.loginProcess');
flextype()->get('/reset-password', 'AccountsAdminController:resetPassword')->setName('admin.accounts.resetPassword');
Expand Down
2 changes: 1 addition & 1 deletion settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
enabled: true

# Accounts Admin plugin priority
priority: 50
priority: 90

# Is super admin registered
supper_admin_registered: false
Expand Down
2 changes: 1 addition & 1 deletion templates/add.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% extends "plugins/accounts-admin/templates/partials/base.html" %}

{% block content %}
{{ form.render(yaml_decode(filesystem_read(PATH_PROJECT ~ '/fieldsets/accounts-admin-add.yaml')), {})|raw }}
{{ flextype.form.render(flextype.serializers.yaml.decode(filesystem().file(PATH_PROJECT ~ '/fieldsets/accounts-admin-add.yaml').get()), {})|raw }}
{% endblock %}
2 changes: 1 addition & 1 deletion templates/edit.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% extends "plugins/accounts-admin/templates/partials/base.html" %}

{% block content %}
{{ form.render(yaml_decode(filesystem_read(PATH_PROJECT ~ '/fieldsets/accounts-admin-edit.yaml')), profile)|raw }}
{{ flextype.form.render(flextype.serializers.yaml.decode(filesystem().file(PATH_PROJECT ~ '/fieldsets/accounts-admin-edit.yaml').get()), profile)|raw }}
{% endblock %}
2 changes: 1 addition & 1 deletion templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<a class="dropdown__item" href="{{ path_for('admin.accounts.edit') }}?email={{ account.email }}">
<i class="icon icon--white mr-3">{{ icon('fas fa-edit') }}</i>
{{ tr('accounts_admin_edit') }}</a>
{% if acl.getUserLoggedInEmail() != account.email %}
{% if flextype.acl.getUserLoggedInEmail() != account.email %}
<div class="dropdown__divider"></div>
<a class="dropdown__item" href="javascript:;" onclick="event.preventDefault(); deleteAccount('{{ account.email }}', {{ loop.index0 }});">
<i class="icon icon--white mr-3">{{ icon('fas fa-trash-alt') }}</i>
Expand Down
2 changes: 1 addition & 1 deletion templates/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
<h3>{{ __('accounts_admin_login') }}</h3>
</div>
<div style="display: flex; align-items: center; justify-content: center;">
{{ form.render(yaml_decode(filesystem_read(PATH_PROJECT ~ '/fieldsets/accounts-admin-login.yaml')), {})|raw }}
{{ flextype.form.render(flextype.serializers.yaml.decode(filesystem().file(PATH_PROJECT ~ '/fieldsets/accounts-admin-login.yaml').get()), {})|raw }}
</div>
{% endblock %}
2 changes: 1 addition & 1 deletion templates/registration.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
<h3>{{ __('accounts_admin_registration') }}</h3>
</div>
<div style="display: flex; align-items: center; justify-content: center;">
{{ form.render(yaml_decode(filesystem_read(PATH_PROJECT ~ '/fieldsets/accounts-admin-registration.yaml')), {})|raw }}
{{ flextype.form.render(flextype.serializers.yaml.decode(filesystem().file(PATH_PROJECT ~ '/fieldsets/accounts-admin-registration.yaml').get()), {})|raw }}
</div>
{% endblock %}
2 changes: 1 addition & 1 deletion templates/reset-password.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
<h3>{{ __('accounts_admin_reset_password') }}</h3>
</div>
<div style="display: flex; align-items: center; justify-content: center;">
{{ form.render(yaml_decode(filesystem_read(PATH_PROJECT ~ '/fieldsets/accounts-admin-reset-password.yaml')), {})|raw }}
{{ flextype.form.render(flextype.serializers.yaml.decode(filesystem().file(PATH_PROJECT ~ '/fieldsets/accounts-admin-reset-password.yaml').get()), {})|raw }}
</div>
{% endblock %}

0 comments on commit 610d72c

Please sign in to comment.