Skip to content

Commit

Permalink
Accounts Admin 1.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Awilum committed Jan 7, 2021
1 parent 5a4382b commit 72671fc
Show file tree
Hide file tree
Showing 11 changed files with 41 additions and 21 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
<a name="1.9.0"></a>
# [1.9.0](https://github.com/flextype-plugins/accounts-admin) (2021-01-07)

### Features

* **core** update code base for new Twig 2.0.0
* **core** update code base for new Icon 2.0.0

<a name="1.8.0"></a>
# [1.8.0](https://github.com/flextype-plugins/accounts-admin) (2021-01-03)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The following dependencies need to be installed for Accounts Admin Plugin.
| Item | Version | Download |
|---|---|---|
| [flextype](https://github.com/flextype/flextype) | 0.9.15 | [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) |
| [twig](https://github.com/flextype-plugins/twig) | >=2.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) |
| [admin](https://github.com/flextype-plugins/admin) | >=1.0.0 | [download](https://github.com/flextype-plugins/admin/releases) |
Expand Down
2 changes: 1 addition & 1 deletion dependencies.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@


// 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')]);
flextype('registry')->set('plugins.admin.settings.navigation.extends.accounts', ['title' => __('accounts_admin_accounts'), 'icon' => ['name' => 'users', 'set' => 'fontawesome|solid'], 'link' => flextype('router')->pathFor('admin.accounts.index')]);
4 changes: 3 additions & 1 deletion fieldsets/accounts-admin-add.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
title: Create New Account
default_field: title
icon: fas fa-user
icon:
name: user
set: "fontawesome|solid"
size: 4/12
hide: true
form:
Expand Down
4 changes: 3 additions & 1 deletion fieldsets/accounts-admin-edit.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
title: 'Edit Account'
default_field: title
icon: fas fa-user
icon:
name: user
set: "fontawesome|solid"
size: 4/12
hide: true
form:
Expand Down
4 changes: 3 additions & 1 deletion fieldsets/accounts-admin-login.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
title: Login
default_field: title
icon: fas fa-user
icon:
name: user
set: "fontawesome|solid"
size: 4/12
hide: true
form:
Expand Down
4 changes: 3 additions & 1 deletion fieldsets/accounts-admin-registration.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
title: Registration
default_field: title
icon: fas fa-user
icon:
name: user
set: "fontawesome|solid"
size: 4/12
hide: true
form:
Expand Down
4 changes: 3 additions & 1 deletion fieldsets/accounts-admin-reset-password.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
title: Reset Password
default_field: title
icon: fas fa-user
icon:
name: user
set: "fontawesome|solid"
size: 4/12
hide: true
form:
Expand Down
8 changes: 5 additions & 3 deletions plugin.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: Accounts Admin
version: 1.8.0
version: 1.9.0
description: Accounts Admin Plugin to manage users accounts in Flextype Admin Panel.
icon: fas fa-users
icon:
name: users
set: "fontawesome|solid"
author:
name: Sergey Romanenko
email: [email protected]
Expand All @@ -12,7 +14,7 @@ license: MIT

dependencies:
flextype: 0.9.15
twig: '>=1.0.0'
twig: '>=2.0.0'
admin: '>=1.0.0'
form: '>=1.0.0'
form-admin: '>=1.0.0'
Expand Down
16 changes: 8 additions & 8 deletions templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
{% for account in accounts_list %}
<tr>
<td class="w-1 text-center">
<i class="icon">{{ icon('fas fa-user') }}</i>
<i class="icon">{{ icon('user', 'fontawesome|solid') }}</i>
</td>
<td class="pl-0">
<a href="{{ path_for('admin.accounts.edit') }}?email={{ account.email }}">{{ account.email }}</a>
<a href="{{ urlFor('admin.accounts.edit') }}?email={{ account.email }}">{{ account.email }}</a>
</td>
<td>
{{ account.roles }}
Expand All @@ -35,18 +35,18 @@
</td>
<td class="text-right">
<button type="button" class="js-dropdown-btn" data-dropdown="dropdown-{{ account.email }}">
<i class="icon">{{ icon('fas fa-ellipsis-h') }}</i>
<i class="icon">{{ icon('ellipsis-h', 'fontawesome|solid') }}</i>
</button>
<div id="dropdown-{{ account.email }}" class="dropdown">
<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>
<a class="dropdown__item" href="{{ urlFor('admin.accounts.edit') }}?email={{ account.email }}">
<i class="icon icon--white mr-3">{{ icon('edit', 'fontawesome|solid') }}</i>
{{ tr('accounts_admin_edit') }}</a>
{% 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>
<i class="icon icon--white mr-3">{{ icon('trash-alt', 'fontawesome|solid') }}</i>
{{ tr('accounts_admin_delete') }}</a>
<form id="delete-account-email-{{ account.email }}" action="{{ path_for('admin.accounts.deleteProcess') }}" method="POST" style="display: none;">
<form id="delete-account-email-{{ account.email }}" action="{{ urlFor('admin.accounts.deleteProcess') }}" method="POST" style="display: none;">
{{ csrf() }}
<input type="hidden" name="account-email" value="{{ account.email }}">
</form>
Expand All @@ -60,7 +60,7 @@
{% else %}
<div class="text-center flex justify-center items-center h-full">
<div>
<i class="icon icon--4xl">{{ icon('fas fa-users') }}</i>
<i class="icon icon--4xl">{{ icon('users', 'fontawesome|solid') }}</i>
<h3 class="text-2xl pt-4 pb-8">{{ tr('accounts_admin_you_have_no_acccounts') }}</h3>
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions templates/partials/base.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{% extends "plugins/admin/templates/partials/base.html" %}

{% block admin_navigation_top_secondary %}
{% if is_current_path('admin.accounts.index') or
is_current_path('admin.accounts.edit') or
is_current_path('admin.accounts.add') %}
{% if isCurrentUrl('admin.accounts.index') or
isCurrentUrl('admin.accounts.edit') or
isCurrentUrl('admin.accounts.add') %}
/
<span class="pr-1 pl-1">{{ id }}</span>
{% endif %}
Expand Down

0 comments on commit 72671fc

Please sign in to comment.