{% load i18n %}

<div class="widget-asset" data-api="{{ link|safe }}" data-title="{{ object.user_filename }}" data-tags="{{ asset_tags }}">
	<div class="widget-asset-preview" style="background-image:url({{ object.file.admin_url }})"></div>
	<div class="widget-asset-actions">
		{{ hidden_input }}
		{% if add_link %}
		<a class="button" target="_blank" href="{{ add_link }}">Upload New</a>
		{% endif %}

        {% if required_tags %}<span class="label">Tagged: {{ required_tags }}</span>{% endif %}
        {% if sizes %}
            <ul class="crops-list" data-base-link="{{ base_api_link }}" >
            {% for each in sizes %}
                <li data-crop-link="{{ each.post_link }}">
                	<span class="name">{{ each.name }}</span>
                	<span class="size">{% if each.width %}{{ each.width }}{% else %}??{% endif %}x{% if each.height %}{{ each.height }}{% else %}??{% endif %}px</span>
                	<a href="#" class="button crop-link">Edit Crop</a>
                </li>
            {% endfor %}
            </ul>
        {% endif %}
	</div>
</div>
