{# 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. #} {% block sonata_media_type_widget %}
{% if value is not null and value.providerReference %} {% if sonata_admin_enabled is defined and sonata_admin_enabled and sonata_admin.admin is not same as(false) %} {{ value.name }} {% else %} {{ value.name }} {% endif %} {% else %} {{ 'no_linked_media'|trans({}, 'SonataMediaBundle') }} {% endif %}
{{ 'widget_headline_information'|trans({}, 'SonataMediaBundle') }}
{{ 'link_media'|trans({}, 'SonataMediaBundle') }}
{% if value is not null and value.providerReference %}
{{ sonata_thumbnail(value, 'admin', {'class': 'img-polaroid media-object'}) }}
{% else %}
{% endif %}
{% if value is not null and value.providerReference %} {{ 'widget_label_type'|trans({}, 'SonataMediaBundle') }}: {{ value.providerName|trans({}, 'SonataMediaBundle') }}
{{ 'widget_label_context'|trans({}, 'SonataMediaBundle') }}: {{ value.context|trans({}, 'SonataMediaBundle') }} {% else %} {{ 'widget_label_type'|trans({}, 'SonataMediaBundle') }}: {{ form.vars['provider']|trans({}, 'SonataMediaBundle') }}
{{ 'widget_label_context'|trans({}, 'SonataMediaBundle') }}: {{ form.vars['context']|trans({}, 'SonataMediaBundle') }} {% endif %}
{{ block('form_widget') }}
{% endblock sonata_media_type_widget %}