Create subdirectories for book view templates

This commit is contained in:
Mouse Reeve
2021-09-29 13:21:11 -07:00
parent f0e31f730a
commit 1e5a8dc3db
7 changed files with 0 additions and 0 deletions

View File

@ -0,0 +1,7 @@
{% extends 'snippets/filters_panel/filters_panel.html' %}
{% block filter_fields %}
{% include 'book/search_filter.html' %}
{% include 'book/language_filter.html' %}
{% include 'book/format_filter.html' %}
{% endblock %}

View File

@ -0,0 +1,52 @@
{% extends 'layout.html' %}
{% load i18n %}{% load utilities %}
{% block title %}{% blocktrans with book_title=work|book_title %}Editions of {{ book_title }}{% endblocktrans %}{% endblock %}
{% block content %}
<div class="block">
<h1 class="title">{% blocktrans with work_path=work.local_path work_title=work|book_title %}Editions of <a href="{{ work_path }}">"{{ work_title }}"</a>{% endblocktrans %}</h1>
</div>
{% include 'book/edition_filters.html' %}
<div class="block">
{% for book in editions %}
<div class="columns is-gapless mb-6">
<div class="column is-cover">
<a href="{{ book.local_path }}">
{% include 'snippets/book_cover.html' with size='medium' book=book cover_class='is-w-m is-h-m align to-l-mobile' %}
</a>
</div>
<div class="column my-3-mobile ml-3-tablet mr-auto">
<h2 class="title is-5 mb-1">
<a href="{{ book.local_path }}" class="has-text-black">
{{ book|book_title }}
</a>
</h2>
{% with book=book %}
<div class="columns is-multiline is-gapless ml-3-tablet">
<div class="column is-half">
{% include 'book/publisher_info.html' %}
</div>
<div class="column ml-3-tablet">
{% include 'book/book_identifiers.html' %}
</div>
</div>
{% endwith %}
</div>
<div class="column is-narrow">
{% include 'snippets/shelve_button/shelve_button.html' with book=book switch_mode=True right=True %}
</div>
</div>
{% endfor %}
</div>
<div>
{% include 'snippets/pagination.html' with page=editions path=request.path %}
</div>
{% endblock %}

View File

@ -0,0 +1,16 @@
{% extends 'snippets/filters_panel/filter_field.html' %}
{% load i18n %}
{% block filter %}
<label class="label is-block" for="id_format">{% trans "Format:" %}</label>
<div class="select">
<select id="id_format" name="format">
<option value="">{% trans "Any" %}</option>
{% for format in formats %}{% if format %}
<option value="{{ format }}" {% if request.GET.format == format %}selected{% endif %}>
{{ format|title }}
</option>
{% endif %}{% endfor %}
</select>
</div>
{% endblock %}

View File

@ -0,0 +1,16 @@
{% extends 'snippets/filters_panel/filter_field.html' %}
{% load i18n %}
{% block filter %}
<label class="label is-block" for="id_language">{% trans "Language:" %}</label>
<div class="select">
<select id="id_language" name="language">
<option value="">{% trans "Any" %}</option>
{% for language in languages %}
<option value="{{ language }}" {% if request.GET.language == language %}selected{% endif %}>
{{ language }}
</option>
{% endfor %}
</select>
</div>
{% endblock %}

View File

@ -0,0 +1,8 @@
{% extends 'snippets/filters_panel/filter_field.html' %}
{% load i18n %}
{% block filter %}
<label class="label" for="id_search">{% trans "Search editions" %}</label>
<input type="text" class="input" name="q" value="{{ request.GET.q|default:'' }}" id="id_search">
{% endblock %}