feat(main): Groups and blocks

This commit is contained in:
2026-08-10 16:13:15 +02:00
parent 6aff506cd6
commit 635c13a0ed
39 changed files with 1188 additions and 237 deletions
@@ -1,25 +1,25 @@
{% import '@PrestaShop/Admin/macros.html.twig' as ps %}
{% form_theme customHtmlForm '@PrestaShop/Admin/TwigTemplateForm/prestashop_ui_kit.html.twig' %}
{% form_theme customHtmlBlockForm '@PrestaShop/Admin/TwigTemplateForm/prestashop_ui_kit.html.twig' %}
{% block customhtml_form_block %}
{% block customhtmlblock_form_block %}
<div class="card">
{{ form_start(customHtmlForm) }}
{{ form_start(customHtmlBlockForm) }}
<div class="card-header">
<h3 class="card-header-title">
{{ 'Custom HTML Block'|trans({}, 'Modules.Wscustomhtml.Admin') }}
</h3>
</div>
<div class="card-body">
{{ form_rest(customHtmlForm) }}
{{ form_rest(customHtmlBlockForm) }}
</div>
<div class="card-footer">
<a href="{{ path('customhtml_index') }}" class="btn btn-outline-secondary">
<a href="{{ path('customhtmlblock_index') }}" class="btn btn-outline-secondary">
{{ 'Cancel'|trans({}, 'Admin.Actions') }}
</a>
<button class="btn btn-primary float-right">
{{ 'Save'|trans({}, 'Admin.Actions') }}
</button>
</div>
{{ form_end(customHtmlForm) }}
{{ form_end(customHtmlBlockForm) }}
</div>
{% endblock %}
@@ -0,0 +1,30 @@
{% import '@PrestaShop/Admin/macros.html.twig' as ps %}
{% form_theme customHtmlGroupForm '@PrestaShop/Admin/TwigTemplateForm/prestashop_ui_kit.html.twig' %}
{% block customhtmlgroup_form_block %}
<div class="card">
{{ form_start(customHtmlGroupForm) }}
<div class="card-header">
<h3 class="card-header-title">
{{ 'Custom HTML Group'|trans({}, 'Modules.Wscustomhtml.Admin') }}
</h3>
</div>
<div class="card-body">
{{ form_rest(customHtmlGroupForm) }}
</div>
<div class="card-footer">
<a href="{{ path('customhtmlgroup_index') }}" class="btn btn-outline-secondary">
{{ 'Cancel'|trans({}, 'Admin.Actions') }}
</a>
{% if idCustomHtmlGroup is defined %}
<a href="{{ path('customhtmlblock_create', {'idGroup': idCustomHtmlGroup}) }}" class="btn btn-outline-primary">
{{ 'Add block'|trans({}, 'Modules.Wscustomhtml.Admin') }}
</a>
{% endif %}
<button class="btn btn-primary float-right">
{{ 'Save'|trans({}, 'Admin.Actions') }}
</button>
</div>
{{ form_end(customHtmlGroupForm) }}
</div>
{% endblock %}