From 263d9202e317d2655f3c1f6376b440ce76f5cf44 Mon Sep 17 00:00:00 2001 From: uldisrudzitis Date: Thu, 10 Sep 2026 18:39:17 +0300 Subject: [PATCH 01/17] Movie simple inline text editor to angular --- _api_app/app/Shop/shoppingCart.twig | 66 +-- .../Entries/SectionEntryRenderService.php | 3 + .../Sections/Entries/_entryContents.twig | 2 +- .../Sites/Sections/Entries/_entryTitle.twig | 2 +- .../Sections/Entries/shop/_cartTitle.twig | 2 +- .../shop/_productAttributesEditor.twig | 4 +- .../Sections/SectionTemplateRenderService.php | 10 +- .../app/Sites/SitesHeaderRenderService.php | 4 +- _api_app/app/Sites/sitesHeader.twig | 2 +- editor/angular.json | 10 +- editor/src/app/app.module.ts | 4 + .../inline-edit-overlay.component.ts | 157 ++++++ .../inline-edit/inline-edit-path.resolver.ts | 39 ++ .../inline-edit/inline-edit.service.ts | 493 ++++++++++++++++++ editor/src/app/preview/preview.component.ts | 3 + .../src/app/render/template-render.service.ts | 8 +- .../render/twig-template-render.service.ts | 7 +- editor/src/app/render/twig-templates.ts | 78 +-- .../src/app/shop/shop-cart-render.service.ts | 102 ++-- .../app/sites/sites-header-render.service.ts | 4 +- engine/css/editor.css.php | 4 + engine/js/BertaEditorBase.js | 113 ---- engine/js/ng/templates/multisite.html | 26 - engine/js/ng/templates/sections.html | 35 -- 24 files changed, 883 insertions(+), 295 deletions(-) create mode 100644 editor/src/app/preview/inline-edit/inline-edit-overlay.component.ts create mode 100644 editor/src/app/preview/inline-edit/inline-edit-path.resolver.ts create mode 100644 editor/src/app/preview/inline-edit/inline-edit.service.ts delete mode 100644 engine/js/ng/templates/multisite.html delete mode 100644 engine/js/ng/templates/sections.html diff --git a/_api_app/app/Shop/shoppingCart.twig b/_api_app/app/Shop/shoppingCart.twig index 810b5e676..e3063483d 100644 --- a/_api_app/app/Shop/shoppingCart.twig +++ b/_api_app/app/Shop/shoppingCart.twig @@ -18,7 +18,7 @@
{% if isEditMode %} - {{ tableHeadTitle.content }} + {% if tableHeadTitle.content %}{{ tableHeadTitle.content }}{% else %} title {% endif %}
{% else %} {{ tableHeadTitle.content }} @@ -30,7 +30,7 @@
{% if isEditMode %} - {{ tableHeadQuantity.content }} + {% if tableHeadQuantity.content %}{{ tableHeadQuantity.content }}{% else %} quantity {% endif %}
{% else %} {{ tableHeadQuantity.content }} @@ -39,7 +39,7 @@
{% if isEditMode %} - {{ tableHeadPrice.content }} + {% if tableHeadPrice.content %}{{ tableHeadPrice.content }}{% else %} price {% endif %}
{% else %} {{ tableHeadPrice.content }} @@ -48,7 +48,7 @@
{% if isEditMode %} - {{ tableHeadSum.content }} + {% if tableHeadSum.content %}{{ tableHeadSum.content }}{% else %} sum {% endif %}
{% else %} {{ tableHeadSum.content }} @@ -78,7 +78,7 @@
{% if isEditMode %} - {{ promoCode.content }} + {% if promoCode.content %}{{ promoCode.content }}{% else %} Promo code {% endif %}
{% else %} {{ promoCode.content }} @@ -87,7 +87,7 @@ {% if isEditMode %} - {{ promoButton.content }} + {% if promoButton.content %}{{ promoButton.content }}{% else %} OK {% endif %} {% else %} @@ -131,7 +131,7 @@ {% if isEditMode %} - {{ discount.content }} + {% if discount.content %}{{ discount.content }}{% else %} discount {% endif %} {% else %} {{ discount.content }} @@ -146,7 +146,7 @@
{% if isEditMode %} - {{ total.content }} + {% if total.content %}{{ total.content }}{% else %} total {% endif %}
{% else %} {{ total.content }} @@ -154,7 +154,7 @@ {% if isEditMode %} - {{ includedVat.content }} + {% if includedVat.content %}{{ includedVat.content }}{% else %} incl vat {% endif %} {% endif %} @@ -177,7 +177,7 @@

{% if isEditMode %} - {{ legalPerson.content }} + {% if legalPerson.content %}{{ legalPerson.content }}{% else %} legal person {% endif %} {% else %} @@ -188,7 +188,7 @@

@@ -318,7 +318,7 @@

- {{ shippingAddressHeader.content }} + {% if shippingAddressHeader.content %}{{ shippingAddressHeader.content }}{% else %} shipping address {% endif %}
@@ -326,7 +326,7 @@
{% else %} {{ nameSurname.content }} @@ -341,7 +341,7 @@
{% else %} {{ address.content }} @@ -356,7 +356,7 @@