{% import 'Comitium5DesignerBundle:Common/macro:asset.html.twig' as asset %}
<div id="library-asset-{{ entity.id }}"
     class="cs-library-asset cs-selectable"
     data-id-content="{{ entity.id }}"
     data-width="{{ entity.metadata.width|default }}"
     data-height="{{ entity.metadata.height|default }}"
     data-title-content="{{ entity.title|e }}"
     data-edit-url="{{ edit_asset_url(designer.cs_backend_url, entity.locale, entity.id, app.user) }}">
    {% set locales = get_locales() %}
    <a href="javascript:void(0);" class="thumbnail asset-image">
        {% if entity.usages %}
            <span class="img-uses" title="{{ 'cs_assets.meta_info.content'|transchoice(entity.usages, {'%count%' : entity.usages }) }}">
                <span>{{ entity.usages }}</span>
            </span>
        {% endif %}
        <img class="test" src="{{ asset.print_thumbnail(entity, type) }}" alt="{{ entity.title }}"/>
        <span>{{ entity.title }}</span>
        {% for locale in locales %}
{#            {% set title = "" %}#}
{#            {% for lang in entity.getLangs %}#}
{#                {% if lang.locale.code == locale.code %}#}
{#                    {% set title = lang.title|default("")  %}#}
{#                {% endif %}#}
{#            {% endfor %}#}
            <div data-lang-code="{{ locale.code }}" data-lang-name="{{ locale.name }}" data-entity-title="{{ entity.titles[locale.code] }}" data-default="{{ entity.locale }}" ></div>
        {% endfor %}
    </a>
</div>
