Skip to content

Commit

Permalink
bug #322 Fixed a problem when displaying the number of elements of Do…
Browse files Browse the repository at this point in the history
…ctrine collections (javiereguiluz)

This PR was merged into the master branch.

Discussion
----------

Fixed a problem when displaying the number of elements of Doctrine collections

Now when an associated Doctrine collection has zero elements, the backend displays a badge with the number "0".

This fixes #320

Commits
-------

f9090ac Fixed a problem when displaying the number of elements of associated Doctrine collections with zero elements (now the backend displays a badge with the number "0")
  • Loading branch information
javiereguiluz committed May 21, 2015
2 parents 452215e + f9090ac commit 8eba824
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Resources/views/default/field_association.html.twig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% if value is iterable and value|length > 1 %}
{% if value is iterable %}
<span class="badge">{{ value|length }}</span>
{% elseif link_parameters is defined %}
<a href="{{ path('admin', link_parameters) }}">{{ value|easyadmin_truncate }}</a>
Expand Down

0 comments on commit 8eba824

Please sign in to comment.