-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add update page with headers #41
Conversation
loic425
commented
Sep 18, 2024
•
edited
Loading
edited
src/BootstrapAdminUi/templates/shared/crud/update/content/header/breadcrumbs.html.twig
Show resolved
Hide resolved
@@ -2,9 +2,14 @@ | |||
|
|||
{% 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(#} |
There was a problem hiding this comment.
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 %} |
There was a problem hiding this comment.
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 %} |
There was a problem hiding this comment.
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