Skip to content

Commit

Permalink
Themes 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 264fa34 commit cf923eb
Show file tree
Hide file tree
Showing 8 changed files with 59 additions and 49 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/themes-admin/compare/v1.8.0...v1.9.0) (2021-01-07)

### Features

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

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

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ The following dependencies need to be installed for Themes 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) |
| [admin](https://github.com/flextype-plugins/icon) | >=1.0.0 | [download](https://github.com/flextype-plugins/admin/releases) |
| [twig](https://github.com/flextype-plugins/twig) | >=2.0.0 | [download](https://github.com/flextype-plugins/twig/releases) |
| [admin](https://github.com/flextype-plugins/icon) | >=2.0.0 | [download](https://github.com/flextype-plugins/admin/releases) |
| [form](https://github.com/flextype-plugins/form) | >=1.0.0 | [download](https://github.com/flextype-plugins/form/releases) |
| [site](https://github.com/flextype-plugins/site) | >=1.0.0 | [download](https://github.com/flextype-plugins/site/releases) |
| [acl](https://github.com/flextype-plugins/site) | >=1.0.0 | [download](https://github.com/flextype-plugins/acl/releases) |
Expand Down
4 changes: 2 additions & 2 deletions dependencies.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
use function Flextype\Component\I18n\__;

// Add Admin Navigation
flextype('registry')->set('plugins.admin.settings.navigation.extends.themes', ['title' => __('themes_admin_themes'),'icon' => 'fas fa-palette', 'link' => flextype('router')->pathFor('admin.themes.index')]);
flextype('registry')->set('plugins.admin.settings.navigation.extends.themes', ['title' => __('themes_admin_themes'), 'icon' => ['name' => 'palette', 'set' => 'fontawesome|solid'], 'link' => flextype('router')->pathFor('admin.themes.index')]);

$_flextype_menu = (flextype('registry')->has('plugins.admin.settings.flextype_menu')) ? flextype('registry')->get('plugins.admin.settings.flextype_menu') : [];

Expand All @@ -30,4 +30,4 @@

flextype('registry')->set('plugins.admin.settings.flextype_menu',
array_merge($_flextype_menu,
[0 => ['link' => ['url' => $site_url, 'title' => __('themes_admin_view_site'), 'is_external' => true, 'icon' => 'fas fa-globe']]]));
[0 => ['link' => ['url' => $site_url, 'title' => __('themes_admin_view_site'), 'is_external' => true, 'icon' => ['name' => 'globe', 'set' => 'fontawesome|solid'] ]]]));
8 changes: 5 additions & 3 deletions plugin.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: Themes Admin
version: 1.8.0
version: 1.9.0
description: Themes Admin plugin to manage site themes for the website frontend.
icon: fas fa-paint-brush
icon:
name: paint-brush
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'
site: '>=1.0.0'
Expand Down
18 changes: 9 additions & 9 deletions templates/extends/themes/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
{% for key, theme in themes_list %}
<tr>
<td class="w-1 text-center {% if key == flextype.registry.get('plugins.site.settings.theme') %}{% else %}opacity-50{% endif %}">
<i class="icon">{{ icon('fas fa-palette') }}</i>
<i class="icon">{{ icon('palette', 'fontawesome|solid') }}</i>
</td>
<td class="pl-0 {% if key == flextype.registry.get('plugins.site.settings.theme') %}{% else %}opacity-50{% endif %}">
<a href="{{ path_for('admin.themes.templates.index') }}?theme={{ key }}">{{ theme.manifest.name }}</a>
<a href="{{ urlFor('admin.themes.templates.index') }}?theme={{ key }}">{{ theme.manifest.name }}</a>
</td>
<td class="{% if key == flextype.registry.get('plugins.site.settings.theme') %}{% else %}opacity-50{% endif %}">{{ theme.manifest.description }}</td>
<td class="{% if key == flextype.registry.get('plugins.site.settings.theme') %}{% else %}opacity-50{% endif %}">
Expand All @@ -37,7 +37,7 @@
<td class="{% if key == flextype.registry.get('plugins.site.settings.theme') %}{% else %}opacity-50{% endif %}">{{ theme.manifest.version }}</td>
<td class="text-right">
<button type="button" class="js-dropdown-btn" data-dropdown="dropdown-{{ key }}">
<i class="icon">{{ icon('fas fa-ellipsis-h') }}</i>
<i class="icon">{{ icon('ellipsis-h', 'fontawesome|solid') }}</i>
</button>
<div id="dropdown-{{ key }}" class="dropdown">
{% if key == flextype.registry.get('plugins.site.settings.theme') %}
Expand All @@ -47,13 +47,13 @@
<i class="icon icon--white mr-3">{{ icon('far fa-star') }}</i>
{{ tr('themes_admin_activate') }}</a>
{% endif %}
<a class="dropdown__item" href="{{ path_for('admin.themes.information') }}?id={{ key }}">
<i class="icon icon--white mr-3">{{ icon('fas fa-info-circle') }}</i>
<a class="dropdown__item" href="{{ urlFor('admin.themes.information') }}?id={{ key }}">
<i class="icon icon--white mr-3">{{ icon('info-circle', 'fontawesome|solid') }}</i>
{{ tr('themes_admin_information') }}</a>
<a class="dropdown__item" href="{{ path_for('admin.themes.settings') }}?id={{ key }}">
<i class="icon icon--white mr-3">{{ icon('fas fa-cog') }}</i>
<a class="dropdown__item" href="{{ urlFor('admin.themes.settings') }}?id={{ key }}">
<i class="icon icon--white mr-3">{{ icon('cog', 'fontawesome|solid') }}</i>
{{ tr('themes_admin_settings') }}</a>
<form id="activate-theme-id-{{ key }}" action="{{ path_for('admin.themes.activateProcess') }}" method="POST" style="display: none;">
<form id="activate-theme-id-{{ key }}" action="{{ urlFor('admin.themes.activateProcess') }}" method="POST" style="display: none;">
{{ csrf() }}
<input type="hidden" name="theme-id" value="{{ key }}">
<input type="hidden" name="theme-status" value="true">
Expand All @@ -67,7 +67,7 @@
{% else %}
<div class="text-center flex justify-center items-center h-full">
<div>
<i class="icon icon--4xl">{{ icon('fas fa-palette') }}</i>
<i class="icon icon--4xl">{{ icon('palette', 'fontawesome|solid') }}</i>
<h3 class="text-2xl pt-4 pb-8">{{ tr('themes_admin_you_have_no_themes') }}</h3>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion templates/extends/themes/templates/add.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<div class="button-dropdown">
<input type="submit" id="create" name="create" value="{{ tr('themes_admin_create') }}" class="button">
<a href="javascript:;" class="button js-dropdown-btn" data-dropdown="dropdown-list-create-new-template">
<i class="icon icon--white">{{ icon('fas fa-sort-down') }}</i>
<i class="icon icon--white">{{ icon('sort-down', 'fontawesome|solid') }}</i>
</a>
<div id="dropdown-list-create-new-template" class="dropdown">
<input type="submit" id="create-and-edit" name="create-and-edit" value="{{ tr('themes_admin_create_and_edit') }}" class="dropdown__item">
Expand Down
48 changes: 24 additions & 24 deletions templates/extends/themes/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,39 +21,39 @@
{% for template in templates_list %}
<tr>
<td class="w-1 text-center">
<i class="icon">{{ icon('far fa-file-code') }}</i>
<i class="icon">{{ icon('file-code', 'fontawesome|regular') }}</i>
</td>
<td class="pl-0">
<a href="{{ path_for('admin.themes.templates.edit') }}?id={{ template.basename }}&type=template&theme={{ theme }}">{{ template.basename }}</a>
<a href="{{ urlFor('admin.themes.templates.edit') }}?id={{ template.basename }}&type=template&theme={{ theme }}">{{ template.basename }}</a>
</td>
<td>{{ tr('themes_admin_template') }}</td>
<td class="text-right">
<button type="button" class="js-dropdown-btn" data-dropdown="dropdown-{{ template.basename }}">
<i class="icon">{{ icon('fas fa-ellipsis-h') }}</i>
<i class="icon">{{ icon('ellipsis-h', 'fontawesome|solid') }}</i>
</button>
<div id="dropdown-{{ template.basename }}" class="dropdown">
<a class="dropdown__item" href="{{ path_for('admin.themes.templates.edit') }}?id={{ template.basename }}&type=template&theme={{ theme }}">
<i class="icon icon--white mr-3">{{ icon('fas fa-edit') }}</i>
<a class="dropdown__item" href="{{ urlFor('admin.themes.templates.edit') }}?id={{ template.basename }}&type=template&theme={{ theme }}">
<i class="icon icon--white mr-3">{{ icon('edit', 'fontawesome|solid') }}</i>
{{ tr('themes_admin_edit') }}</a>
<a class="dropdown__item" href="{{ path_for('admin.themes.templates.rename') }}?id={{ template.basename }}&type=template&theme={{ theme }}">
<i class="icon icon--white mr-3">{{ icon('fas fa-font') }}</i>
<a class="dropdown__item" href="{{ urlFor('admin.themes.templates.rename') }}?id={{ template.basename }}&type=template&theme={{ theme }}">
<i class="icon icon--white mr-3">{{ icon('font', 'fontawesome|solid') }}</i>
{{ tr('themes_admin_rename') }}</a>
<a class="dropdown__item" href="javascript:;" onclick="event.preventDefault();
document.getElementById('duplicate-template-id-{{ template.basename }}').submit();">
<i class="icon icon--white mr-3">{{ icon('fas fa-copy') }}</i>
<i class="icon icon--white mr-3">{{ icon('copy', 'fontawesome|solid') }}</i>
{{ tr('themes_admin_duplicate') }}</a>
<div class="dropdown__divider"></div>
<a class="dropdown__item" href="javascript:;" onclick="event.preventDefault();
deleteTemplate('{{ template.basename }}', {{ 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('themes_admin_delete') }}</a>
<form id="duplicate-template-id-{{ template.basename }}" action="{{ path_for('admin.themes.templates.duplicateProcess') }}" method="POST" style="display: none;">
<form id="duplicate-template-id-{{ template.basename }}" action="{{ urlFor('admin.themes.templates.duplicateProcess') }}" method="POST" style="display: none;">
{{ csrf() }}
<input type="hidden" name="template-id" value="{{ template.basename }}">
<input type="hidden" name="type" value="template">
<input type="hidden" name="theme" value="{{ theme }}">
</form>
<form id="delete-template-id-{{ template.basename }}" action="{{ path_for('admin.themes.templates.deleteProcess') }}" method="POST" style="display: none;">
<form id="delete-template-id-{{ template.basename }}" action="{{ urlFor('admin.themes.templates.deleteProcess') }}" method="POST" style="display: none;">
{{ csrf() }}
<input type="hidden" name="template-id" value="{{ template.basename }}">
<input type="hidden" name="type" value="template">
Expand All @@ -68,39 +68,39 @@
{% for partial in partials_list %}
<tr>
<td class="w-1 text-center">
<i class="icon">{{ icon('far fa-file-code') }}</i>
<i class="icon">{{ icon('file-code', 'fontawesome|regular') }}</i>
</td>
<td class="pl-0">
<a href="{{ path_for('admin.themes.templates.edit') }}?id={{ partial.basename }}&type=partial&theme={{ theme }}">{{ partial.basename }}</a>
<a href="{{ urlFor('admin.themes.templates.edit') }}?id={{ partial.basename }}&type=partial&theme={{ theme }}">{{ partial.basename }}</a>
</td>
<td>{{ tr('themes_admin_partial') }}</td>
<td class="text-right">
<button type="button" class="js-dropdown-btn" data-dropdown="dropdown-{{ partial.basename }}">
<i class="icon">{{ icon('fas fa-ellipsis-h') }}</i>
<i class="icon">{{ icon('ellipsis-h', 'fontawesome|solid') }}</i>
</button>
<div id="dropdown-{{ partial.basename }}" class="dropdown">
<a class="dropdown__item" href="{{ path_for('admin.themes.templates.edit') }}?id={{ partial.basename }}&type=partial&theme={{ theme }}">
<i class="icon icon--white mr-3">{{ icon('fas fa-edit') }}</i>
<a class="dropdown__item" href="{{ urlFor('admin.themes.templates.edit') }}?id={{ partial.basename }}&type=partial&theme={{ theme }}">
<i class="icon icon--white mr-3">{{ icon('edit', 'fontawesome|solid') }}</i>
{{ tr('themes_admin_edit') }}</a>
<a class="dropdown__item" href="{{ path_for('admin.themes.templates.rename') }}?id={{ partial.basename }}&type=partial&theme={{ theme }}">
<i class="icon icon--white mr-3">{{ icon('fas fa-font') }}</i>
<a class="dropdown__item" href="{{ urlFor('admin.themes.templates.rename') }}?id={{ partial.basename }}&type=partial&theme={{ theme }}">
<i class="icon icon--white mr-3">{{ icon('font', 'fontawesome|solid') }}</i>
{{ tr('themes_admin_rename') }}</a>
<a class="dropdown__item" href="javascript:;" onclick="event.preventDefault();
document.getElementById('duplicate-partial-id-{{ partial.basename }}').submit();">
<i class="icon icon--white mr-3">{{ icon('fas fa-copy') }}</i>
<i class="icon icon--white mr-3">{{ icon('copy', 'fontawesome|solid') }}</i>
{{ tr('themes_admin_duplicate') }}</a>
<div class="dropdown__divider"></div>
<a class="dropdown__item" href="javascript:;" onclick="event.preventDefault();
deletePartial('{{ partial.basename }}', {{ 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('themes_admin_delete') }}</a>
<form id="duplicate-partial-id-{{ partial.basename }}" action="{{ path_for('admin.themes.templates.duplicateProcess') }}" method="POST" style="display: none;">
<form id="duplicate-partial-id-{{ partial.basename }}" action="{{ urlFor('admin.themes.templates.duplicateProcess') }}" method="POST" style="display: none;">
{{ csrf() }}
<input type="hidden" name="partial-id" value="{{ partial.basename }}">
<input type="hidden" name="type" value="partial">
<input type="hidden" name="theme" value="{{ theme }}">
</form>
<form id="delete-partial-id-{{ partial.basename }}" action="{{ path_for('admin.themes.templates.deleteProcess') }}" method="POST" style="display: none;">
<form id="delete-partial-id-{{ partial.basename }}" action="{{ urlFor('admin.themes.templates.deleteProcess') }}" method="POST" style="display: none;">
{{ csrf() }}
<input type="hidden" name="partial-id" value="{{ partial.basename }}">
<input type="hidden" name="type" value="partial">
Expand All @@ -116,9 +116,9 @@
{% else %}
<div class="flex justify-center items-center text-center h-full">
<div>
<i class="icon icon--4xl">{{ icon('fas fa-layer-group') }}</i>
<i class="icon icon--4xl">{{ icon('layer-group', 'fontawesome|solid') }}</i>
<h3 class="text-2xl pt-4 pb-8">{{ tr('themes_admin_you_have_not_created_any_templates_yet') }}</h3>
<a href="{{ path_for('admin.themes.templates.add') }}" class="button">{{ tr('themes_admin_create_new_template') }}</a>
<a href="{{ urlFor('admin.themes.templates.add') }}" class="button">{{ tr('themes_admin_create_new_template') }}</a>
</div>
</div>
{% endif %}
Expand Down
Loading

0 comments on commit cf923eb

Please sign in to comment.