show_datetime.html.twig 552 B

12345678910111213141516171819202122
  1. {#
  2. This file is part of the Sonata package.
  3. (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
  4. For the full copyright and license information, please view the LICENSE
  5. file that was distributed with this source code.
  6. #}
  7. {% extends 'SonataAdminBundle:CRUD:base_show_field.html.twig' %}
  8. {% block field %}
  9. {%- if value is empty -%}
  10. &nbsp;
  11. {%- elseif field_description.options.format is defined -%}
  12. {{ value|date(field_description.options.format) }}
  13. {%- else -%}
  14. {{ value|date }}
  15. {%- endif -%}
  16. {% endblock %}