Skip to content

Commit

Permalink
Merge pull request sonata-project#3414 from sonata-project/revert-341…
Browse files Browse the repository at this point in the history
…0-bool

Revert ec1558e
  • Loading branch information
rande committed Nov 10, 2015
2 parents ec1558e + 39bf5ee commit f5f4ff1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions Resources/views/CRUD/show_boolean.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ file that was distributed with this source code.
{% block field %}
{% spaceless %}
{% if value %}
<span class="label label-success">{%- trans from 'SonataAdminBundle' %}label_type_yes{% endtrans -%}</span>
<i class="fa fa-check-circle-o"></i>
{%- trans from 'SonataAdminBundle' %}label_type_yes{% endtrans -%}
{% else %}
<span class="label label-danger">{%- trans from 'SonataAdminBundle' %}label_type_no{% endtrans -%}</span>
<i class="fa fa-ban"></i>
{%- trans from 'SonataAdminBundle' %}label_type_no{% endtrans -%}
{% endif %}
{% endspaceless %}
{% endblock %}
6 changes: 3 additions & 3 deletions Tests/Twig/Extension/SonataAdminExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -507,8 +507,8 @@ public function getRenderViewElementTests()
array('<th>Data</th> <td> GBP 51.23456 </td>', 'currency', 51.23456, array('currency' => 'GBP')),
array('<th>Data</th> <td> [1 => First] <br> [2 => Second] </td>', 'array', array(1 => 'First', 2 => 'Second'), array('safe' => false)),
array('<th>Data</th> <td> [1 => First] [2 => Second] </td>', 'array', array(1 => 'First', 2 => 'Second'), array('safe' => false, 'inline' => true)),
array('<th>Data</th> <td><span class="label label-success">yes</span></td>', 'boolean', true, array()),
array('<th>Data</th> <td><span class="label label-danger">no</span></td>', 'boolean', false, array()),
array('<th>Data</th> <td><i class="fa fa-check-circle-o"></i>yes</td>', 'boolean', true, array()),
array('<th>Data</th> <td><i class="fa fa-ban"></i>no</td>', 'boolean', false, array()),
array('<th>Data</th> <td> Delete </td>', 'trans', 'action_delete', array('safe' => false, 'catalogue' => 'SonataAdminBundle')),
array('<th>Data</th> <td>Status1</td>', 'choice', 'Status1', array('safe' => false)),
array('<th>Data</th> <td>Alias1</td>', 'choice', 'Status1', array('safe' => false, 'choices' => array('Status1' => 'Alias1', 'Status2' => 'Alias2', 'Status3' => 'Alias3'))),
Expand Down Expand Up @@ -602,7 +602,7 @@ public function getRenderViewElementTests()
array('<th>Data</th> <td> </td>', 'currency', new NoValueException(), array('currency' => 'EUR')),
array('<th>Data</th> <td> </td>', 'currency', new NoValueException(), array('currency' => 'GBP')),
array('<th>Data</th> <td> </td>', 'array', new NoValueException(), array('safe' => false)),
array('<th>Data</th> <td><span class="label label-danger">no</span></td>', 'boolean', new NoValueException(), array()),
array('<th>Data</th> <td><i class="fa fa-ban"></i>no</td>', 'boolean', new NoValueException(), array()),
array('<th>Data</th> <td> </td>', 'trans', new NoValueException(), array('safe' => false, 'catalogue' => 'SonataAdminBundle')),
array('<th>Data</th> <td></td>', 'choice', new NoValueException(), array('safe' => false, 'choices' => array())),
array('<th>Data</th> <td></td>', 'choice', new NoValueException(), array('safe' => false, 'choices' => array(), 'multiple' => true)),
Expand Down

0 comments on commit f5f4ff1

Please sign in to comment.