From b42a28d51150343638259bd05fe8b9e06a3b1a14 Mon Sep 17 00:00:00 2001 From: gesang Date: Thu, 6 Mar 2025 18:38:59 +0100 Subject: [PATCH] custom template for books that add shadow library links --- custom/edition.custom.html | 179 +++++++++++++++++++++++++++++++++++++ 1 file changed, 179 insertions(+) create mode 100644 custom/edition.custom.html diff --git a/custom/edition.custom.html b/custom/edition.custom.html new file mode 100644 index 00000000..69ac024b --- /dev/null +++ b/custom/edition.custom.html @@ -0,0 +1,179 @@ +{% extends "item_base.html" %} +{% load static %} +{% load i18n %} +{% load l10n %} +{% load humanize %} +{% load mastodon %} +{% load strip_scheme %} +{% load thumb %} +{% block head %} + {% if item.author %} + + {% endif %} + {% if item.isbn %}{% endif %} +{% endblock %} +{% block details %} +
+ {% if item.isbn %} + {% trans 'ISBN' %}: {{ item.isbn }} + {% endif %} +
+
{% include '_people.html' with people=item.author role='author' max=5 %}
+
{% include '_people.html' with people=item.translator role='translator' max=5 %}
+
+ {% if item.format %} + {% trans 'book format' %}: {{ item.get_format_display }} + {% endif %} +
+
{% include '_people.html' with people=item.additional_title role='other title' max=99 %}
+
+ {% if item.pub_house %} + {% trans 'publishing house' %}: {{ item.pub_house }} + {% endif %} +
+
+ {% if item.imprint %} + {% trans 'imprint' %}: {{ item.imprint }} + {% endif %} +
+
+ {% if item.pub_year %} + {% trans 'publication date' %}: {{ item.pub_year }} + {% if item.pub_month %}-{{ item.pub_month }}{% endif %} + {% endif %} +
+
+ {% if item.series %} + {% trans 'series' %}: {{ item.series }} + {% endif %} +
+
{% include '_people.html' with people=item.language role='language' max=10 %}
+
+ {% if item.binding %} + {% trans 'binding' %}: {{ item.binding }} + {% endif %} +
+
+ {% if item.price %} + {% trans 'price' %}: {{ item.price }} + {% endif %} +
+
+ {% if item.pages %} + {% trans 'number of pages' %}: {{ item.pages }} + {% endif %} +
+ {% if item.other_info %} + {% for k, v in item.other_info.items %}
{{ k }}: {{ v|urlizetrunc:24 }}
{% endfor %} + {% endif %} +{% endblock %} +{% block content %} + {% if item.contents %} +
contents
+

{{ item.contents | linebreaksbr }}

+ {% endif %} + {% with related_books=item.sibling_items %} + {% if related_books.count > 0 %} +
+ + + + + + + + +
{% trans 'other editions' %}
+ +
+ {% endif %} + {% endwith %} +{% endblock %} +{% block left_sidebar %} + + {% if item.isbn %} +
+
+ {% trans 'Borrow or Buy' %} +
+
+ WorldCat +
+
+ Open Library +
+
+ + OAPEN +
+
+
+
+ {% endif %} +
+
+ Shadow Libraries + {% if item.isbn %} +
+ Search by ISBN:
+ Anna's Archive + | + Z-Library +
+ {% endif %} +
+ Search by title:
+ Anna's Archive + | + Z-Library +
+
+
+ dufs.itmens +
+{% endblock %}