{# This file is part of the Sonata package. (c) Thomas Rabaix For the full copyright and license information, please view the LICENSE file that was distributed with this source code. #} {% extends 'SonataAdminBundle:CRUD:base_edit.html.twig' %} {% block stylesheets %} {{ parent() }} {% endblock %} {% block sonata_admin_content %}
{% if object.id %}
{% block sonata_media_show_reference %}

{{ 'title.media_preview'|trans({}, 'SonataMediaBundle') }}

{% if sonata_media.pixlr and sonata_media.pixlr.isEditable(object) %}
{% endif %}
{% media object, 'reference' with {'width': null, 'height': null, 'class': 'img-responsive img-rounded'} %}
{% for name, format in sonata_media.pool.formatNamesByContext(object.context) %} {% endfor %}
{{ 'label.size'|trans({}, 'SonataMediaBundle') }} {{ object.width|number_format_decimal }}px x {{ object.height|number_format_decimal }}px {% if object.size > 0 %}({{ object.size|number_format_decimal }}o){% endif %}
{{ 'label.content_type'|trans({}, 'SonataMediaBundle') }} {{ object.contenttype }}
{{ 'label.cdn'|trans({}, 'SonataMediaBundle') }} {% if object.cdnisflushable %} {{ 'label.to_be_flushed'|trans({}, 'SonataMediaBundle') }} {% else %} {{ 'label.flushed_at'|trans({}, 'SonataMediaBundle') }} {{ object.cdnflushat|date }} {% endif %}
{{ 'label.protected_download_url'|trans({}, 'SonataMediaBundle') }} {{ 'label.protected_download_url_notice'|trans({}, 'SonataMediaBundle') }} {{ sonata_media.pool.downloadSecurity(object).description|raw }}
reference
{{ name }}
{% endblock sonata_media_show_reference %}
{% endif %}
{# Renders the form #} {{ parent() }}
{% if sonata_media.pixlr and sonata_media.pixlr.isEditable(object) %} {% endif %} {% endblock sonata_admin_content %}