2020-03-28 22:06:16 +00:00
|
|
|
{% extends 'layout.html' %}
|
2020-03-30 00:02:17 +00:00
|
|
|
{% load humanize %}
|
2020-03-28 22:06:16 +00:00
|
|
|
{% block content %}
|
2020-09-30 03:36:43 +00:00
|
|
|
<div class="block">
|
|
|
|
<div class="level">
|
2020-11-09 20:06:44 +00:00
|
|
|
<h1 class="title level-left">
|
2020-09-30 03:36:43 +00:00
|
|
|
Edit "{{ book.title }}"
|
2020-11-09 20:06:44 +00:00
|
|
|
</h1>
|
2020-09-30 03:36:43 +00:00
|
|
|
<div class="level-right">
|
|
|
|
<a href="/book/{{ book.id }}">
|
|
|
|
<span class="edit-link icon icon-close">
|
2020-09-30 22:10:37 +00:00
|
|
|
<span class="is-sr-only">Close</span>
|
2020-09-30 03:36:43 +00:00
|
|
|
</span>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-11-09 20:35:18 +00:00
|
|
|
<div>
|
|
|
|
<p>Added: {{ book.created_date | naturaltime }}</p>
|
|
|
|
<p>Updated: {{ book.updated_date | naturaltime }}</p>
|
2020-12-22 17:26:40 +00:00
|
|
|
<p>Last edited by: <a href="{{ book.last_edited_by.remote_id }}">{{ book.last_edited_by.display_name }}</a></p>
|
2020-03-30 00:02:17 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-03-28 22:06:16 +00:00
|
|
|
|
2020-12-22 17:26:40 +00:00
|
|
|
{% if form.non_field_errors %}
|
2020-11-24 21:25:28 +00:00
|
|
|
<div class="block">
|
2020-12-22 17:26:40 +00:00
|
|
|
<p class="notification is-danger">{{ form.non_field_errors }}</p>
|
2020-11-24 21:25:28 +00:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
2020-11-24 21:37:35 +00:00
|
|
|
|
2020-11-11 05:34:26 +00:00
|
|
|
<form class="block" name="edit-book" action="/edit-book/{{ book.id }}" method="post" enctype="multipart/form-data">
|
2020-03-30 00:02:17 +00:00
|
|
|
{% csrf_token %}
|
2020-12-22 17:26:40 +00:00
|
|
|
<input type="hidden" name="last_edited_by" value="{{ request.user.id }}">
|
2020-09-30 03:36:43 +00:00
|
|
|
<div class="columns">
|
2020-11-24 21:37:35 +00:00
|
|
|
<div class="column">
|
|
|
|
<h2 class="title is-4">Metadata</h2>
|
2020-12-22 17:26:40 +00:00
|
|
|
<p class="fields is-grouped"><label class="label" for="id_title">Title:</label> {{ form.title }} </p>
|
2020-11-24 21:37:35 +00:00
|
|
|
{% for error in form.title.errors %}
|
|
|
|
<p class="help is-danger">{{ error | escape }}</p>
|
|
|
|
{% endfor %}
|
2020-12-22 17:26:40 +00:00
|
|
|
<p class="fields is-grouped"><label class="label" for="id_subtitle">Subtitle:</label> {{ form.subtitle }} </p>
|
2020-11-24 21:37:35 +00:00
|
|
|
{% for error in form.subtitle.errors %}
|
|
|
|
<p class="help is-danger">{{ error | escape }}</p>
|
|
|
|
{% endfor %}
|
2020-12-22 17:26:40 +00:00
|
|
|
<p class="fields is-grouped"><label class="label" for="id_description">Description:</label> {{ form.description }} </p>
|
2020-11-24 21:37:35 +00:00
|
|
|
{% for error in form.description.errors %}
|
|
|
|
<p class="help is-danger">{{ error | escape }}</p>
|
|
|
|
{% endfor %}
|
2020-12-22 17:26:40 +00:00
|
|
|
<p class="fields is-grouped"><label class="label" for="id_series">Series:</label> {{ form.series }} </p>
|
2020-11-24 21:37:35 +00:00
|
|
|
{% for error in form.series.errors %}
|
|
|
|
<p class="help is-danger">{{ error | escape }}</p>
|
|
|
|
{% endfor %}
|
2020-12-22 17:26:40 +00:00
|
|
|
<p class="fields is-grouped"><label class="label" for="id_series_number">Series number:</label> {{ form.series_number }} </p>
|
2020-11-24 21:37:35 +00:00
|
|
|
{% for error in form.series_number.errors %}
|
|
|
|
<p class="help is-danger">{{ error | escape }}</p>
|
|
|
|
{% endfor %}
|
2020-12-22 17:26:40 +00:00
|
|
|
<p class="fields is-grouped"><label class="label" for="id_first_published_date">First published date:</label> {{ form.first_published_date }} </p>
|
2020-11-24 21:37:35 +00:00
|
|
|
{% for error in form.first_published_date.errors %}
|
|
|
|
<p class="help is-danger">{{ error | escape }}</p>
|
|
|
|
{% endfor %}
|
2020-12-22 17:26:40 +00:00
|
|
|
<p class="fields is-grouped"><label class="label" for="id_published_date">Published date:</label> {{ form.published_date }} </p>
|
2020-11-24 21:37:35 +00:00
|
|
|
{% for error in form.published_date.errors %}
|
|
|
|
<p class="help is-danger">{{ error | escape }}</p>
|
|
|
|
{% endfor %}
|
2020-09-30 03:36:43 +00:00
|
|
|
</div>
|
2020-03-30 00:02:17 +00:00
|
|
|
|
2020-09-30 03:36:43 +00:00
|
|
|
<div class="column">
|
2020-11-09 20:35:18 +00:00
|
|
|
<div class="columns">
|
|
|
|
<div class="column is-narrow">
|
|
|
|
{% include 'snippets/book_cover.html' with book=book size="small" %}
|
|
|
|
</div>
|
|
|
|
<div class="column is-narrow">
|
|
|
|
<div class="block">
|
|
|
|
<h2 class="title is-4">Cover</h2>
|
|
|
|
<p>{{ form.cover }} </p>
|
2020-11-24 21:37:35 +00:00
|
|
|
{% for error in form.cover.errors %}
|
|
|
|
<p class="help is-danger">{{ error | escape }}</p>
|
|
|
|
{% endfor %}
|
2020-11-09 20:35:18 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-09-30 03:36:43 +00:00
|
|
|
</div>
|
2020-03-30 00:02:17 +00:00
|
|
|
|
2020-09-30 03:36:43 +00:00
|
|
|
<div class="block">
|
2020-11-09 20:35:18 +00:00
|
|
|
<h2 class="title is-4">Physical Properties</h2>
|
2020-12-22 17:26:40 +00:00
|
|
|
<p class="fields is-grouped"><label class="label" for="id_physical_format">Format:</label> {{ form.physical_format }} </p>
|
2020-11-24 21:37:35 +00:00
|
|
|
{% for error in form.physical_format.errors %}
|
|
|
|
<p class="help is-danger">{{ error | escape }}</p>
|
|
|
|
{% endfor %}
|
|
|
|
{% for error in form.physical_format.errors %}
|
|
|
|
<p class="help is-danger">{{ error | escape }}</p>
|
|
|
|
{% endfor %}
|
|
|
|
|
2020-12-22 17:26:40 +00:00
|
|
|
<p class="fields is-grouped"><label class="label" for="id_pages">Pages:</label> {{ form.pages }} </p>
|
2020-11-24 21:37:35 +00:00
|
|
|
{% for error in form.pages.errors %}
|
|
|
|
<p class="help is-danger">{{ error | escape }}</p>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="block">
|
|
|
|
<h2 class="title is-4">Book Identifiers</h2>
|
2020-12-22 17:26:40 +00:00
|
|
|
<p class="fields is-grouped"><label class="label" for="id_isbn_13">ISBN 13:</label> {{ form.isbn_13 }} </p>
|
2020-11-24 21:37:35 +00:00
|
|
|
{% for error in form.isbn_13.errors %}
|
|
|
|
<p class="help is-danger">{{ error | escape }}</p>
|
|
|
|
{% endfor %}
|
2020-12-22 17:26:40 +00:00
|
|
|
<p class="fields is-grouped"><label class="label" for="id_isbn_10">ISBN 10:</label> {{ form.isbn_10 }} </p>
|
2020-11-24 21:37:35 +00:00
|
|
|
{% for error in form.isbn_10.errors %}
|
|
|
|
<p class="help is-danger">{{ error | escape }}</p>
|
|
|
|
{% endfor %}
|
2020-12-22 17:26:40 +00:00
|
|
|
<p class="fields is-grouped"><label class="label" for="id_openlibrary_key">Openlibrary key:</label> {{ form.openlibrary_key }} </p>
|
2020-11-24 21:37:35 +00:00
|
|
|
{% for error in form.openlibrary_key.errors %}
|
|
|
|
<p class="help is-danger">{{ error | escape }}</p>
|
|
|
|
{% endfor %}
|
2021-01-05 00:42:28 +00:00
|
|
|
<p class="fields is-grouped"><label class="label" for="id_librarything_key">OCLC Number:</label> {{ form.oclc_number }} </p>
|
|
|
|
{% for error in form.oclc_number.errors %}
|
2020-11-24 21:37:35 +00:00
|
|
|
<p class="help is-danger">{{ error | escape }}</p>
|
|
|
|
{% endfor %}
|
2021-01-05 00:42:28 +00:00
|
|
|
<p class="fields is-grouped"><label class="label" for="id_asin">ASIN:</label> {{ form.asin }} </p>
|
|
|
|
{% for error in form.ASIN.errors %}
|
2020-11-24 21:37:35 +00:00
|
|
|
<p class="help is-danger">{{ error | escape }}</p>
|
|
|
|
{% endfor %}
|
2020-09-30 03:36:43 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-04-02 15:44:53 +00:00
|
|
|
</div>
|
|
|
|
|
2020-09-30 03:36:43 +00:00
|
|
|
<div class="block">
|
|
|
|
<button class="button is-primary" type="submit">Save</button>
|
2020-11-09 20:10:37 +00:00
|
|
|
<a class="button" href="/book/{{ book.id }}">Cancel</a>
|
2020-04-04 20:46:10 +00:00
|
|
|
</div>
|
2020-03-30 00:02:17 +00:00
|
|
|
</form>
|
2020-03-28 22:06:16 +00:00
|
|
|
|
|
|
|
{% endblock %}
|