{% load dlux_tags %}
{% if active_tab == 'images' %}
{% csrf_token %} {{ image_form.file }} {% if image_form.non_field_errors %}
{{ image_form.non_field_errors }}
{% endif %} {% if image_form.file.errors %}
{{ image_form.file.errors }}
{% endif %}
{{ DLUX_STRINGS.asset_images_title|default:'Saved images' }}
{{ images|length }}
{% for asset in images %}
{% if asset.url %}{{ asset.title }}{% endif %}
{{ asset.slug }}
{{ DLUX_STRINGS.asset_kind_image|default:'Image' }}

{{ asset.filename }} · {{ asset.size_bytes }} B{% if asset.width %} · {{ asset.width }}×{{ asset.height }}{% endif %}

{% if asset.usage_report %}

{{ DLUX_STRINGS.asset_used_by|default:'Used by' }}: {% for relation, items in asset.usage_report.items %}{{ relation }} ({{ items|length }}){% if not forloop.last %}, {% endif %}{% endfor %}

{% else %}

{{ DLUX_STRINGS.asset_unused|default:'Not currently referenced' }}

{% endif %}
{% empty %}
{{ DLUX_STRINGS.asset_images_empty|default:'No saved images yet.' }}
{% endfor %}
{% else %}
{% csrf_token %} {% if font_form.non_field_errors %}
{{ font_form.non_field_errors }}
{% endif %}
{{ font_form.title }}{{ font_form.title.errors }}
{{ font_form.font_label }}{{ font_form.font_label.errors }}
{{ font_form.font_slug }}{{ font_form.font_slug.errors }}
{{ font_form.font_family }}{{ font_form.font_family.errors }}
{{ font_form.font_weight }}{{ font_form.font_weight.errors }}
{{ font_form.font_style }}{{ font_form.font_style.errors }}
{{ font_form.file }}{{ font_form.file.errors }}
{{ DLUX_STRINGS.asset_fonts_title|default:'Registered fonts' }}
{{ managed_fonts|length }}
{% for font in managed_fonts %}
{{ font.label }}
{{ font.family }}
{{ font.slug }}
{% for variant in font.variants.all %} {% endfor %}
{{ DLUX_STRINGS.asset_field_font_weight|default:'Weight' }}{{ DLUX_STRINGS.asset_field_font_style|default:'Style' }}{{ DLUX_STRINGS.asset_field_file|default:'File' }}{{ DLUX_STRINGS.asset_size|default:'Size' }}
{{ variant.weight }}{{ variant.get_style_display }}{{ variant.asset.filename }}{{ variant.asset.size_bytes }} B
{% empty %}
{{ DLUX_STRINGS.asset_fonts_empty|default:'No registered fonts yet.' }}
{% endfor %}
{% endif %}