Skip to content

Fix action templates with url option#259

Merged
loic425 merged 1 commit intoSylius:mainfrom
loic425:fix/action-templates
May 6, 2025
Merged

Fix action templates with url option#259
loic425 merged 1 commit intoSylius:mainfrom
loic425:fix/action-templates

Conversation

@loic425
Copy link
Copy Markdown
Member

@loic425 loic425 commented May 5, 2025

image

  • Fix action templates with a defined url when the default route does not exist
  • Add a disabled class when the path is empty

image

@loic425 loic425 force-pushed the fix/action-templates branch from 81e4a07 to bf62e63 Compare May 5, 2025 09:15
@loic425 loic425 changed the title Fix/action templates Fix action templates May 5, 2025
@loic425 loic425 changed the title Fix action templates Fix action templates with url option May 5, 2025
{% if options.link.url is defined %}
{% set path = options.link.url %}
{% else %}
{% set default_route = options.link.route|default(grid.requestConfiguration is defined ? grid.requestConfiguration.getRouteName('delete') : null) %}
Copy link
Copy Markdown
Member Author

@loic425 loic425 May 5, 2025

Choose a reason for hiding this comment

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

grid.requestConfiguration is defined only when using the GridViewFactory from the Resource bundle (using a ResourceGridView). It's not working with the GridViewFactory from the Grid bundle one (using a GridView).
We'll need that fix for the future Grid as Live component.

@loic425 loic425 force-pushed the fix/action-templates branch 3 times, most recently from e57bd32 to 4c3a187 Compare May 5, 2025 09:42
@loic425 loic425 force-pushed the fix/action-templates branch from 4c3a187 to 9a8f57a Compare May 5, 2025 12:56
GSadee added a commit to Sylius/Sylius that referenced this pull request May 6, 2025
| Q               | A
|-----------------|-----
| Branch?         | 2.0
| Bug fix?        | yes
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | mentioned in
Sylius/Stack#259
| License         | MIT

More details on related ticket.

<!--
 - Bug fixes must be submitted against the 1.14 or 2.0 branch
 - Features and deprecations must be submitted against the 2.1 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
-->
@loic425 loic425 merged commit d7b550b into Sylius:main May 6, 2025
6 checks passed
@loic425 loic425 deleted the fix/action-templates branch May 6, 2025 06:31
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