lib.itmens/catalog/templates/_item_card.html

40 lines
1.2 KiB
HTML

{% load i18n %}
{% load duration %}
{% if allow_embed and item.get_embed_link %}
<div class="item player">
<hgroup>
<h5>
<a href="{{ item.url }}">{{ item.display_title }}</a>
<small>
{% if not hide_category %}<span class="category">[{{ item.category.label }}]</span>{% endif %}
<span class="site-list">
{% for res in item.external_resources.all %}
<a href="{{ res.url }}" class="{{ res.site_name }}">{{ res.site_label }}</a>
{% endfor %}
</span>
</small>
</h5>
</hgroup>
<iframe src="{{ item.get_embed_link }}"
frameborder="0"
allowtransparency="true"
allow="encrypted-media"
style="width:100%;
height:120px;
margin-top:0.5em"></iframe>
</div>
{% else %}
<div class="item">
<div class="cover">
<a href="{{ item.url }}">
<img src="{{ item.cover_image_url|default:default_cover_url|relative_uri }}"
alt="cover" />
</a>
</div>
<div>
{% with "_item_card_metadata_"|add:item.class_name|add:".html" as template %}
{% include template %}
{% endwith %}
</div>
</div>
{% endif %}