2022-12-15 17:29:35 -05:00
|
|
|
|
{% extends "item_base.html" %}
|
|
|
|
|
{% load static %}
|
|
|
|
|
{% load i18n %}
|
|
|
|
|
{% load l10n %}
|
|
|
|
|
{% load humanize %}
|
|
|
|
|
{% load admin_url %}
|
|
|
|
|
{% load mastodon %}
|
|
|
|
|
{% load oauth_token %}
|
|
|
|
|
{% load truncate %}
|
|
|
|
|
{% load strip_scheme %}
|
|
|
|
|
{% load thumb %}
|
|
|
|
|
|
2023-01-31 21:21:50 -05:00
|
|
|
|
{% block head %}
|
2022-12-25 13:45:24 -05:00
|
|
|
|
{% if item.author %}
|
|
|
|
|
<meta property="og:book:author" content="{% for author in item.author %}{{ author }}{% if not forloop.last %},{% endif %}{% endfor %}">
|
|
|
|
|
{% endif %}
|
|
|
|
|
{% if item.isbn %}
|
|
|
|
|
<meta property="og:book:isbn" content="{{ item.isbn }}">
|
|
|
|
|
{% endif %}
|
|
|
|
|
{% endblock %}
|
|
|
|
|
|
2022-12-15 17:29:35 -05:00
|
|
|
|
{% block details %}
|
|
|
|
|
<div class="entity-detail__fields">
|
|
|
|
|
<div class="entity-detail__rating">
|
|
|
|
|
{% if item.rating %}
|
2022-12-25 13:45:24 -05:00
|
|
|
|
<span class="entity-detail__rating-star rating-star" data-rating-score="{{ item.rating | floatformat:0 }}"></span>
|
|
|
|
|
<span class="entity-detail__rating-score"> {{ item.rating | floatformat:1 }} </span>
|
2022-12-15 17:29:35 -05:00
|
|
|
|
<small>({{ item.rating_count }}人评分)</small>
|
|
|
|
|
{% else %}
|
|
|
|
|
<span> {% trans '评分:评分人数不足' %}</span>
|
|
|
|
|
{% endif %}
|
|
|
|
|
</div>
|
|
|
|
|
<div>{% if item.isbn %}{% trans 'ISBN:' %}{{ item.isbn }}{% endif %}</div>
|
2023-01-10 09:39:00 -05:00
|
|
|
|
<div>{% if item.author %}{% trans '作者:' %}
|
|
|
|
|
{% for author in item.author %}
|
2022-12-15 17:29:35 -05:00
|
|
|
|
<span>{{ author }}</span>{% if not forloop.last %} / {% endif %}
|
|
|
|
|
{% endfor %}
|
|
|
|
|
{% endif %}</div>
|
|
|
|
|
<div>{% if item.pub_house %}{% trans '出版社:' %}{{ item.pub_house }}{% endif %}</div>
|
|
|
|
|
<div>{% if item.subtitle %}{% trans '副标题:' %}{{ item.subtitle }}{% endif %}</div>
|
|
|
|
|
<div>{% if item.translator %}{% trans '译者:' %}
|
|
|
|
|
{% for translator in item.translator %}
|
|
|
|
|
<span>{{ translator }}</span>{% if not forloop.last %} / {% endif %}
|
2023-01-23 16:31:30 -05:00
|
|
|
|
{% endfor %}
|
|
|
|
|
{% endif %}</div>
|
2022-12-15 17:29:35 -05:00
|
|
|
|
<div>{% if item.orig_title %}{% trans '原作名:' %}{{ item.orig_title }}{% endif %}</div>
|
|
|
|
|
<div>{% if item.language %}{% trans '语言:' %}{{ item.language }}{% endif %}</div>
|
|
|
|
|
<div>{%if item.pub_year %}{% trans '出版时间:' %}{{ item.pub_year }}{% trans '年' %}{% if item.pub_month %}{{ item.pub_month }}{% trans '月' %}{% endif %}{% endif %}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="entity-detail__fields">
|
|
|
|
|
|
|
|
|
|
<div>{% if item.binding %}{% trans '装帧:' %}{{ item.binding }}{% endif %}</div>
|
|
|
|
|
<div>{% if item.price %}{% trans '定价:' %}{{ item.price }}{% endif %}</div>
|
|
|
|
|
<div>{% if item.pages %}{% trans '页数:' %}{{ item.pages }}{% endif %}</div>
|
2022-12-16 01:08:10 -05:00
|
|
|
|
<div>{% if item.imprint %}{% trans '出品方:' %}{{ item.imprint }}{% endif %}</div>
|
2023-01-23 16:31:30 -05:00
|
|
|
|
{% if item.other_info %}
|
2022-12-15 17:29:35 -05:00
|
|
|
|
{% for k, v in item.other_info.items %}
|
|
|
|
|
<div>
|
|
|
|
|
{{ k }}:{{ v | urlize }}
|
|
|
|
|
</div>
|
|
|
|
|
{% endfor %}
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
|
2022-12-27 14:52:03 -05:00
|
|
|
|
{% if item.last_editor and item.last_editor.preference.show_last_edit %}
|
2023-01-01 23:50:57 -05:00
|
|
|
|
<div>{% trans '最近编辑者:' %}<a href="{% url 'journal:user_profile' item.last_editor.mastodon_username %}">{{ item.last_editor | default:"" }}</a></div>
|
2022-12-15 17:29:35 -05:00
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
<div>
|
2023-01-08 23:28:19 -05:00
|
|
|
|
{% if user.is_authenticated %}
|
|
|
|
|
<a href="{% url 'catalog:edit' item.url_path item.uuid %}">{% trans '编辑' %}{{ item.demonstrative }}</a>
|
|
|
|
|
{% endif %}
|
2022-12-15 17:29:35 -05:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{% block sidebar %}
|
2023-02-13 00:52:24 -05:00
|
|
|
|
{% with related_books=item.get_related_books %}
|
|
|
|
|
{% if related_books.count > 0 %}
|
2022-12-15 17:29:35 -05:00
|
|
|
|
<div class="aside-section-wrapper">
|
|
|
|
|
<div class="action-panel">
|
2023-04-17 21:43:20 -04:00
|
|
|
|
<div class="action-panel__label">{% trans '其它版本' %}</div>
|
2022-12-15 17:29:35 -05:00
|
|
|
|
<div >
|
2023-02-13 00:52:24 -05:00
|
|
|
|
{% for b in related_books %}
|
2022-12-15 17:29:35 -05:00
|
|
|
|
<p>
|
2023-01-01 23:50:57 -05:00
|
|
|
|
<a href="{{ b.url }}">{{ b.title }}</a>
|
2023-02-13 00:52:24 -05:00
|
|
|
|
<small>({{ b.pub_house | default:'' }} {{ b.pub_year | default:'' }})</small>
|
|
|
|
|
{% for res in b.external_resources.all %}
|
|
|
|
|
<a href="{{ res.url }}">
|
|
|
|
|
<span class="source-label source-label__{{ res.site_name }}">{{ res.site_name.label }}</span>
|
|
|
|
|
</a>
|
|
|
|
|
{% endfor %}
|
2022-12-15 17:29:35 -05:00
|
|
|
|
</p>
|
|
|
|
|
{% endfor %}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
{% endif %}
|
2023-02-13 00:52:24 -05:00
|
|
|
|
{% endwith %}
|
2022-12-15 17:29:35 -05:00
|
|
|
|
|
|
|
|
|
{% if item.isbn %}
|
|
|
|
|
<div class="aside-section-wrapper">
|
|
|
|
|
<div class="action-panel">
|
|
|
|
|
<div class="action-panel__label">{% trans '借阅或购买' %}</div>
|
|
|
|
|
<div class="action-panel__button-group">
|
2023-02-11 23:23:21 -05:00
|
|
|
|
<a class="action-panel__button" target="_blank" rel="noopener" href="https://www.worldcat.org/isbn/{{ item.isbn }}">{% trans 'WorldCat' %}</a>
|
|
|
|
|
<a class="action-panel__button" target="_blank" rel="noopener" href="https://openlibrary.org/search?isbn={{ item.isbn }}">{% trans 'Open Library' %}</a>
|
2022-12-15 17:29:35 -05:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
{% endif %}
|
|
|
|
|
{% endblock %}
|