Skip to content

Commit

Permalink
[SonataExtraBundle] Generict action don't always have an object
Browse files Browse the repository at this point in the history
  • Loading branch information
mpoiriert committed Oct 16, 2024
1 parent e858ee3 commit f7b79c5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{% set object = object|default(null) %}
{% for action in item.action.actions %}
<li>
<a class="sonata-action-element" href="{{ action.generateUrl(admin, object) }}">
{% if action.icon %}
<i class="{{ action.icon }}" aria-hidden="true"></i>
{% endif %}
{{ action|translate_label }}
</a>
</li>
<li>
<a class="sonata-action-element" href="{{ action.generateUrl(admin, object) }}">
{% if action.icon %}
<i class="{{ action.icon }}" aria-hidden="true"></i>
{% endif %}
{{ action|translate_label }}
</a>
</li>
{% endfor %}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{% set object = object|default(null) %}
{% if admin.hasAccess(actions.action.name, object) %}
{% for action in actions.action.actions %}
<a class="btn btn-sm btn-default" href="{{ action.generateUrl(admin, object) }}">
Expand Down

0 comments on commit f7b79c5

Please sign in to comment.