Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Resources/views/CRUD/list__select.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ file that was distributed with this source code.
{% extends admin.getTemplate('base_list_field') %}

{% block field %}
<a class="btn btn-default" href="{{ admin.generateObjectUrl('edit', object) }}">
<a class="btn btn-default" href="{{ admin.generateObjectUrl('list', object) }}">
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.

Why are you passing the object to the route? A list route doesn't need this @sergiostrampelli

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.

this looks correct to me and this isn't changed by @sergiostrampelli , he only changed the route itselt

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

i think that was the point of the comment. when the route is changed to the list route, the list route does not need the object.

when is this block used? the problem i see with changing this from edit to list is that we now don't link to the edit view of a specific object, but instead to the list of objects which is less convenient. can we find a better solution for the problem? is it maybe more of a documentation issue that we need to explain what to overwrite when removing/renaming the edit route?

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.

i think that was the point of the comment. when the route is changed to the list route, the list route does not need the object.

i think you are right

<i class="glyphicon glyphicon-arrow-right"></i>
{{ 'list_select'|trans({}, 'SonataAdminBundle') }}
</a>
Expand Down