lib.itmens/catalog/templates/_item_card_metadata_base.html

60 lines
1.7 KiB
HTML
Raw Normal View History

2023-06-09 02:23:15 -04:00
{% load highlight %}
{% load humanize %}
{% load i18n %}
<hgroup>
<h5>
<a href="{{ item.url }}">
{% if request.GET.q %}
{{ item.display_title | highlight:request.GET.q }}
{% else %}
{{ item.display_title }}
{% endif %}
</a>
<small>
{% if item.year %}({{ item.year }}){% endif %}
{% if not hide_category %}<span class="category">[{{ item.category.label }}]</span>{% endif %}
<span class="site-list">
{% for res in item.external_resources.all %}
2023-07-20 21:59:49 -04:00
<a href="{{ res.url }}" class="{{ res.site_name }}">{{ res.site_label }}</a>
2023-06-09 02:23:15 -04:00
{% endfor %}
</span>
</small>
</h5>
<small>
{% if item.subtitle %}<span>{{ item.subtitle }}</span>{% endif %}
{% if item.orig_title %}
<span>
{{ item.orig_title }}
{% if item.season_number %}Season {{ item.season_number }}{% endif %}
</span>
{% endif %}
{% if item.parent_item %}
<span>所属{{ item.parent_item.type.label }}<a href="{{ item.parent_item.url }}">{{ item.parent_item.title }}</a></span>
{% endif %}
</small>
</hgroup>
<div>
<div class="brief">
{% block brief %}
{% endblock brief %}
</div>
<div class="full">
{% block full %}
2023-06-09 10:52:44 -04:00
<div>
{% if not hide_brief %}{{ item.brief | linebreaksbr }}{% endif %}
</div>
2023-06-09 02:23:15 -04:00
{% endblock full %}
</div>
{% if show_tags %}
<div class="tag-list solo-hidden">
2023-06-09 02:23:15 -04:00
{% for tag in item.tags %}
{% if forloop.counter <= 5 %}
<span>
<a href="{% url 'catalog:search' %}?tag={{ tag }}">{{ tag }}</a>
</span>
{% endif %}
{% endfor %}
</div>
{% endif %}
</div>