Skip to content

Add update page with headers - #41

Merged
loic425 merged 1 commit into
Sylius:mainfrom
loic425:add-update-page-with-headers
Sep 18, 2024
Merged

Add update page with headers#41
loic425 merged 1 commit into
Sylius:mainfrom
loic425:add-update-page-with-headers

Conversation

@loic425

@loic425 loic425 commented Sep 18, 2024

Copy link
Copy Markdown
Member

image

{% set configuration = hookable_metadata.context.configuration %}

{% set index_url = sylius_generate_redirect_path(app.request.headers.get('referer')|default(path(
{#{% set index_url = sylius_generate_redirect_path(app.request.headers.get('referer')|default(path(#}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't have the sylius_generate_redirect_path that should be added to Twig Extra.

@@ -0,0 +1,34 @@
{% from '@SyliusBootstrapAdminUi/shared/helper/breadcrumbs.html.twig' import breadcrumbs %}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General thought, many templates are almost identical between create/update pages, maybe some of them can be moved to /shared/crud/common/content/header/breadcrumbs and re-used by defining few variables

@@ -0,0 +1,18 @@
{% import '@SyliusBootstrapAdminUi/shared/helper/header.html.twig' as header %}

{% if hookable_metadata.context.metadata is defined and hookable_metadata.context.configuration is defined %}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once most of the UI will be done. we should review templates for repeatable boilerplace code and make some DX improvements to TwigHooks and other packages to cleanup templates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants