lib.itmens/catalog/templates/_item_card_metadata_base.html
2023-10-22 17:46:34 -04:00

59 lines
1.7 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{% 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 %}
<a href="{{ res.url }}" class="{{ res.site_name }}">{{ res.site_label }}</a>
{% 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 %}
<div>
{% if not hide_brief %}{{ item.brief | linebreaksbr }}{% endif %}
</div>
{% endblock full %}
</div>
{% if show_tags %}
<div class="tag-list solo-hidden">
{% 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>