mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-05 20:57:12 +00:00
[DX] Break footer menu and shipment general templates into smaller hooks 2.2 (#19056)
Some checks failed
Continuous Integration (Minimal) / Static checks (push) Has been cancelled
Continuous Integration (Minimal) / Tests (MariaDB) (push) Has been cancelled
Continuous Integration (Minimal) / Tests (MySQL) (push) Has been cancelled
Continuous Integration (Minimal) / Javascript Tests (MySQL) (push) Has been cancelled
Continuous Integration (Minimal) / Tests (PostgreSQL) (push) Has been cancelled
Continuous Integration (Minimal) / Frontend (push) Has been cancelled
Continuous Integration (Minimal) / Packages (push) Has been cancelled
Some checks failed
Continuous Integration (Minimal) / Static checks (push) Has been cancelled
Continuous Integration (Minimal) / Tests (MariaDB) (push) Has been cancelled
Continuous Integration (Minimal) / Tests (MySQL) (push) Has been cancelled
Continuous Integration (Minimal) / Javascript Tests (MySQL) (push) Has been cancelled
Continuous Integration (Minimal) / Tests (PostgreSQL) (push) Has been cancelled
Continuous Integration (Minimal) / Frontend (push) Has been cancelled
Continuous Integration (Minimal) / Packages (push) Has been cancelled
| Q | A |-----------------|----- | Branch? | 2.2 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | | Related tickets | | License | MIT <!-- - Bug fixes must be submitted against the 2.2 branch - Features and deprecations must be submitted against the 2.3 branch - Make sure that the correct base branch is set To be sure you are not breaking any Backward Compatibilities, check the documentation: https://docs.sylius.com/en/latest/book/organization/backward-compatibility-promise.html -->
This commit is contained in:
commit
f8a27841f2
25 changed files with 140 additions and 58 deletions
|
|
@ -228,6 +228,17 @@ sylius_twig_hooks:
|
|||
template: '@SyliusAdmin/order/show/content/sections/shipments/item/actions.html.twig'
|
||||
priority: 0
|
||||
|
||||
'sylius_admin.order.show.content.sections.shipments.item.general':
|
||||
method:
|
||||
template: '@SyliusAdmin/order/show/content/sections/shipments/item/general/method.html.twig'
|
||||
priority: 200
|
||||
shipped_at:
|
||||
template: '@SyliusAdmin/order/show/content/sections/shipments/item/general/shipped_at.html.twig'
|
||||
priority: 100
|
||||
tracking:
|
||||
template: '@SyliusAdmin/order/show/content/sections/shipments/item/general/tracking.html.twig'
|
||||
priority: 0
|
||||
|
||||
'sylius_admin.order.show.content.sections.shipments.item.actions':
|
||||
ship:
|
||||
component: 'sylius_admin:shipment:ship_form'
|
||||
|
|
|
|||
|
|
@ -1,20 +1,3 @@
|
|||
{% set shipment = hookable_metadata.context.shipment %}
|
||||
|
||||
<td class="px-3 py-2 text-nowrap">
|
||||
<div class="py-2">
|
||||
<strong {{ sylius_test_html_attribute('shipment-method') }}>{{ shipment.method.name }}</strong>
|
||||
<div class="text-secondary">{{ ux_icon('tabler:world') }} {{ shipment.method.zone }}</div>
|
||||
</div>
|
||||
{% if shipment.shippedAt is not empty %}
|
||||
<div class="text-secondary-emphasis">
|
||||
<strong>{{ 'sylius.ui.shipped_at'|trans }}:</strong>
|
||||
<span {{ sylius_test_html_attribute('shipped-at-date') }}>{{ shipment.shippedAt|date('d-m-Y H:i:s') }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if shipment.state == 'shipped' and shipment.tracking is not empty %}
|
||||
<div class="text-secondary-emphasis">
|
||||
<strong>{{ 'sylius.ui.tracking_code'|trans }}:</strong>
|
||||
<span>{{ shipment.tracking }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% hook 'general' %}
|
||||
</td>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
{% set shipment = hookable_metadata.context.shipment %}
|
||||
|
||||
<div class="py-2">
|
||||
<strong {{ sylius_test_html_attribute('shipment-method') }}>{{ shipment.method.name }}</strong>
|
||||
<div class="text-secondary">{{ ux_icon('tabler:world') }} {{ shipment.method.zone }}</div>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
{% set shipment = hookable_metadata.context.shipment %}
|
||||
|
||||
{% if shipment.shippedAt is not empty %}
|
||||
<div class="text-secondary-emphasis">
|
||||
<strong>{{ 'sylius.ui.shipped_at'|trans }}:</strong>
|
||||
<span {{ sylius_test_html_attribute('shipped-at-date') }}>{{ shipment.shippedAt|date('d-m-Y H:i:s') }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
{% set shipment = hookable_metadata.context.shipment %}
|
||||
|
||||
{% if shipment.state == 'shipped' and shipment.tracking is not empty %}
|
||||
<div class="text-secondary-emphasis">
|
||||
<strong>{{ 'sylius.ui.tracking_code'|trans }}:</strong>
|
||||
<span>{{ shipment.tracking }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
|
@ -175,6 +175,69 @@ sylius_twig_hooks:
|
|||
template: '@SyliusShop/shared/layout/base/footer/content/copy.html.twig'
|
||||
priority: 0
|
||||
|
||||
'sylius_shop.base.footer.content.menu':
|
||||
informational_links:
|
||||
template: '@SyliusShop/shared/layout/base/footer/content/menu/informational_links.html.twig'
|
||||
priority: 100
|
||||
help_links:
|
||||
template: '@SyliusShop/shared/layout/base/footer/content/menu/help_links.html.twig'
|
||||
priority: 0
|
||||
|
||||
'sylius_shop.base.footer.content.menu.informational_links':
|
||||
about:
|
||||
template: '@SyliusShop/shared/layout/base/footer/content/menu/informational_links/about.html.twig'
|
||||
priority: 300
|
||||
terms_and_conditions:
|
||||
template: '@SyliusShop/shared/layout/base/footer/content/menu/informational_links/terms_and_conditions.html.twig'
|
||||
priority: 200
|
||||
privacy_policy:
|
||||
template: '@SyliusShop/shared/layout/base/footer/content/menu/informational_links/privacy_policy.html.twig'
|
||||
priority: 100
|
||||
contact_us:
|
||||
template: '@SyliusShop/shared/layout/base/footer/content/menu/informational_links/contact_us.html.twig'
|
||||
priority: 0
|
||||
|
||||
'sylius_shop.base.footer.content.menu.help_links':
|
||||
faq:
|
||||
template: '@SyliusShop/shared/layout/base/footer/content/menu/help_links/faq.html.twig'
|
||||
priority: 200
|
||||
delivery_and_shipping:
|
||||
template: '@SyliusShop/shared/layout/base/footer/content/menu/help_links/delivery_and_shipping.html.twig'
|
||||
priority: 100
|
||||
returns_policy:
|
||||
template: '@SyliusShop/shared/layout/base/footer/content/menu/help_links/returns_policy.html.twig'
|
||||
priority: 0
|
||||
|
||||
'sylius_shop.base.footer.content.payment_methods':
|
||||
providers:
|
||||
template: '@SyliusShop/shared/layout/base/footer/content/payment_methods/providers.html.twig'
|
||||
priority: 100
|
||||
social_media:
|
||||
template: '@SyliusShop/shared/layout/base/footer/content/payment_methods/social_media.html.twig'
|
||||
priority: 0
|
||||
|
||||
'sylius_shop.base.footer.content.payment_methods.providers':
|
||||
paypal:
|
||||
template: '@SyliusShop/shared/layout/base/footer/content/payment_methods/providers/paypal.html.twig'
|
||||
priority: 200
|
||||
adyen:
|
||||
template: '@SyliusShop/shared/layout/base/footer/content/payment_methods/providers/adyen.html.twig'
|
||||
priority: 100
|
||||
mollie:
|
||||
template: '@SyliusShop/shared/layout/base/footer/content/payment_methods/providers/mollie.html.twig'
|
||||
priority: 0
|
||||
|
||||
'sylius_shop.base.footer.content.payment_methods.social_media':
|
||||
instagram:
|
||||
template: '@SyliusShop/shared/layout/base/footer/content/payment_methods/social_media/instagram.html.twig'
|
||||
priority: 200
|
||||
facebook:
|
||||
template: '@SyliusShop/shared/layout/base/footer/content/payment_methods/social_media/facebook.html.twig'
|
||||
priority: 100
|
||||
x:
|
||||
template: '@SyliusShop/shared/layout/base/footer/content/payment_methods/social_media/x.html.twig'
|
||||
priority: 0
|
||||
|
||||
'sylius_shop.base.offcanvas':
|
||||
cart:
|
||||
component: 'sylius_shop:cart:widget:offcanvas'
|
||||
|
|
|
|||
|
|
@ -1,20 +1,5 @@
|
|||
<div class="col-12 col-lg-6 order-lg-2">
|
||||
<div class="row">
|
||||
<div class="col-12 col-sm-6">
|
||||
<nav aria-label="{{ 'sylius.ui.footer_informational_links'|trans }}" class="nav flex-column">
|
||||
<a class="nav-link" href="#">About</a>
|
||||
<a class="nav-link" href="#">Terms and Conditions</a>
|
||||
<a class="nav-link" href="#">Privacy Policy</a>
|
||||
<a class="nav-link" href="{{ path('sylius_shop_contact_request') }}">Contact us</a>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6">
|
||||
<nav aria-label="{{ 'sylius.ui.footer_help_links'|trans }}" class="nav flex-column mb-5">
|
||||
<a class="nav-link" href="#">FAQ</a>
|
||||
<a class="nav-link" href="#">Delivery & Shipping</a>
|
||||
<a class="nav-link" href="#">Returns Policy</a>
|
||||
</nav>
|
||||
</div>
|
||||
{% hook 'menu' %}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
<div class="col-12 col-sm-6">
|
||||
<nav aria-label="{{ 'sylius.ui.footer_help_links'|trans }}" class="nav flex-column mb-5">
|
||||
{% hook 'help_links' %}
|
||||
</nav>
|
||||
</div>
|
||||
|
|
@ -0,0 +1 @@
|
|||
<a class="nav-link" href="#">Delivery & Shipping</a>
|
||||
|
|
@ -0,0 +1 @@
|
|||
<a class="nav-link" href="#">FAQ</a>
|
||||
|
|
@ -0,0 +1 @@
|
|||
<a class="nav-link" href="#">Returns Policy</a>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<div class="col-12 col-sm-6">
|
||||
<nav aria-label="{{ 'sylius.ui.footer_informational_links'|trans }}" class="nav flex-column">
|
||||
{% hook 'informational_links' %}
|
||||
</nav>
|
||||
</div>
|
||||
|
|
@ -0,0 +1 @@
|
|||
<a class="nav-link" href="#">About</a>
|
||||
|
|
@ -0,0 +1 @@
|
|||
<a class="nav-link" href="{{ path('sylius_shop_contact_request') }}">Contact us</a>
|
||||
|
|
@ -0,0 +1 @@
|
|||
<a class="nav-link" href="#">Privacy Policy</a>
|
||||
|
|
@ -0,0 +1 @@
|
|||
<a class="nav-link" href="#">Terms and Conditions</a>
|
||||
|
|
@ -1,27 +1,4 @@
|
|||
<div class="col-12 text-center col-md-6 order-md-4 text-md-start col-lg-3 order-lg-4 text-lg-center">
|
||||
<div class="mb-3 fw-medium">Payment methods:</div>
|
||||
|
||||
<div class="row g-2 mb-4">
|
||||
<div class="col-4">
|
||||
<a href="https://sylius.com/partner/paypal/" target="_blank" class="d-block border rounded p-2">
|
||||
<img class="img-fluid" src="{{ asset('build/shop/images/paypal-logo.svg', 'shop') }}" width="100%" height="100%" alt="PayPal" />
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<a href="https://sylius.com/partner/adyen/" target="_blank" class="d-block border rounded p-2">
|
||||
<img class="img-fluid" src="{{ asset('build/shop/images/adyen-logo.svg', 'shop') }}" width="100%" height="100%" alt="Adyen" />
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<a href="https://sylius.com/partner/mollie/" target="_blank" class="d-block border rounded p-2">
|
||||
<img class="img-fluid" src="{{ asset('build/shop/images/mollie-logo.svg', 'shop') }}" width="100%" height="100%" alt="Mollie" />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="d-flex justify-content-center justify-content-md-start justify-content-lg-center gap-3 mb-5">
|
||||
<a class="link-reset" href="https://www.instagram.com/sylius.team/" target="_blank" aria-label="instagram logo">{{ ux_icon('tabler:brand-instagram', { class: 'icon icon-md' }) }}</a>
|
||||
<a class="link-reset" href="https://www.facebook.com/SyliusEcommerce/" target="_blank" aria-label="facebook logo">{{ ux_icon('tabler:brand-facebook', { class: 'icon icon-md' }) }}</a>
|
||||
<a class="link-reset" href="https://x.com/Sylius" target="_blank" aria-label="x logo">{{ ux_icon('tabler:brand-x', { class: 'icon icon-md' }) }}</a>
|
||||
</div>
|
||||
{% hook 'payment_methods' %}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
<div class="row g-2 mb-4">
|
||||
{% hook 'providers' %}
|
||||
</div>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<div class="col-4">
|
||||
<a href="https://sylius.com/partner/adyen/" target="_blank" class="d-block border rounded p-2">
|
||||
<img class="img-fluid" src="{{ asset('build/shop/images/adyen-logo.svg', 'shop') }}" width="100%" height="100%" alt="Adyen" />
|
||||
</a>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<div class="col-4">
|
||||
<a href="https://sylius.com/partner/mollie/" target="_blank" class="d-block border rounded p-2">
|
||||
<img class="img-fluid" src="{{ asset('build/shop/images/mollie-logo.svg', 'shop') }}" width="100%" height="100%" alt="Mollie" />
|
||||
</a>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<div class="col-4">
|
||||
<a href="https://sylius.com/partner/paypal/" target="_blank" class="d-block border rounded p-2">
|
||||
<img class="img-fluid" src="{{ asset('build/shop/images/paypal-logo.svg', 'shop') }}" width="100%" height="100%" alt="PayPal" />
|
||||
</a>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
<div class="d-flex justify-content-center justify-content-md-start justify-content-lg-center gap-3 mb-5">
|
||||
{% hook 'social_media' %}
|
||||
</div>
|
||||
|
|
@ -0,0 +1 @@
|
|||
<a class="link-reset" href="https://www.facebook.com/SyliusEcommerce/" target="_blank" aria-label="facebook logo">{{ ux_icon('tabler:brand-facebook', { class: 'icon icon-md' }) }}</a>
|
||||
|
|
@ -0,0 +1 @@
|
|||
<a class="link-reset" href="https://www.instagram.com/sylius.team/" target="_blank" aria-label="instagram logo">{{ ux_icon('tabler:brand-instagram', { class: 'icon icon-md' }) }}</a>
|
||||
|
|
@ -0,0 +1 @@
|
|||
<a class="link-reset" href="https://x.com/Sylius" target="_blank" aria-label="x logo">{{ ux_icon('tabler:brand-x', { class: 'icon icon-md' }) }}</a>
|
||||
Loading…
Add table
Reference in a new issue