mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-15 21:31:26 +00:00
125 lines
6.3 KiB
HTML
125 lines
6.3 KiB
HTML
{% extends 'layout.html' %}
|
|
{% load i18n %}
|
|
{% load humanize %}
|
|
|
|
{% block title %}{% trans "Edit Book" %}{% endblock %}
|
|
|
|
{% block content %}
|
|
<header class="block">
|
|
<h1 class="title level-left">
|
|
Edit "{{ book.title }}"
|
|
</h1>
|
|
<div>
|
|
<p>{% trans "Added:" %} {{ book.created_date | naturaltime }}</p>
|
|
<p>{% trans "Updated:" %} {{ book.updated_date | naturaltime }}</p>
|
|
<p>{% trans "Last edited by:" %} <a href="{{ book.last_edited_by.remote_id }}">{{ book.last_edited_by.display_name }}</a></p>
|
|
</div>
|
|
</header>
|
|
|
|
{% if form.non_field_errors %}
|
|
<div class="block">
|
|
<p class="notification is-danger">{{ form.non_field_errors }}</p>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<form class="block" name="edit-book" action="{{ book.local_path }}/edit" method="post" enctype="multipart/form-data">
|
|
{% csrf_token %}
|
|
<input type="hidden" name="last_edited_by" value="{{ request.user.id }}">
|
|
<div class="columns">
|
|
<div class="column">
|
|
<h2 class="title is-4">{% trans "Metadata" %}</h2>
|
|
<p class="fields is-grouped"><label class="label" for="id_title">{% trans "Title:" %}</label> {{ form.title }} </p>
|
|
{% for error in form.title.errors %}
|
|
<p class="help is-danger">{{ error | escape }}</p>
|
|
{% endfor %}
|
|
<p class="fields is-grouped"><label class="label" for="id_subtitle">{% trans "Subtitle:" %}</label> {{ form.subtitle }} </p>
|
|
{% for error in form.subtitle.errors %}
|
|
<p class="help is-danger">{{ error | escape }}</p>
|
|
{% endfor %}
|
|
<p class="fields is-grouped"><label class="label" for="id_description">{% trans "Description:" %}</label> {{ form.description }} </p>
|
|
{% for error in form.description.errors %}
|
|
<p class="help is-danger">{{ error | escape }}</p>
|
|
{% endfor %}
|
|
<p class="fields is-grouped"><label class="label" for="id_series">{% trans "Series:" %}</label> {{ form.series }} </p>
|
|
{% for error in form.series.errors %}
|
|
<p class="help is-danger">{{ error | escape }}</p>
|
|
{% endfor %}
|
|
<p class="fields is-grouped"><label class="label" for="id_series_number">{% trans "Series number:" %}</label> {{ form.series_number }} </p>
|
|
{% for error in form.series_number.errors %}
|
|
<p class="help is-danger">{{ error | escape }}</p>
|
|
{% endfor %}
|
|
<p class="fields is-grouped"><label class="label" for="id_first_published_date">{% trans "First published date:" %}</label> {{ form.first_published_date }} </p>
|
|
{% for error in form.first_published_date.errors %}
|
|
<p class="help is-danger">{{ error | escape }}</p>
|
|
{% endfor %}
|
|
<p class="fields is-grouped"><label class="label" for="id_published_date">{% trans "Published date:" %}</label> {{ form.published_date }} </p>
|
|
{% for error in form.published_date.errors %}
|
|
<p class="help is-danger">{{ error | escape }}</p>
|
|
{% endfor %}
|
|
</div>
|
|
|
|
<div class="column">
|
|
<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">{% trans "Cover" %}</h2>
|
|
<p>{{ form.cover }}</p>
|
|
{% for error in form.cover.errors %}
|
|
<p class="help is-danger">{{ error | escape }}</p>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="block">
|
|
<h2 class="title is-4">{% trans "Physical Properties" %}</h2>
|
|
<p class="fields is-grouped"><label class="label" for="id_physical_format">{% trans "Format:" %}</label> {{ form.physical_format }} </p>
|
|
{% 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 %}
|
|
|
|
<p class="fields is-grouped"><label class="label" for="id_pages">{% trans "Pages:" %}</label> {{ form.pages }} </p>
|
|
{% for error in form.pages.errors %}
|
|
<p class="help is-danger">{{ error | escape }}</p>
|
|
{% endfor %}
|
|
</div>
|
|
|
|
<div class="block">
|
|
<h2 class="title is-4">{% trans "Book Identifiers" %}</h2>
|
|
<p class="fields is-grouped"><label class="label" for="id_isbn_13">{% trans "ISBN 13:" %}</label> {{ form.isbn_13 }} </p>
|
|
{% for error in form.isbn_13.errors %}
|
|
<p class="help is-danger">{{ error | escape }}</p>
|
|
{% endfor %}
|
|
<p class="fields is-grouped"><label class="label" for="id_isbn_10">{% trans "ISBN 10:" %}</label> {{ form.isbn_10 }} </p>
|
|
{% for error in form.isbn_10.errors %}
|
|
<p class="help is-danger">{{ error | escape }}</p>
|
|
{% endfor %}
|
|
<p class="fields is-grouped"><label class="label" for="id_openlibrary_key">{% trans "Openlibrary key:" %}</label> {{ form.openlibrary_key }} </p>
|
|
{% for error in form.openlibrary_key.errors %}
|
|
<p class="help is-danger">{{ error | escape }}</p>
|
|
{% endfor %}
|
|
<p class="fields is-grouped"><label class="label" for="id_librarything_key">{% trans "OCLC Number:" %}</label> {{ form.oclc_number }} </p>
|
|
{% for error in form.oclc_number.errors %}
|
|
<p class="help is-danger">{{ error | escape }}</p>
|
|
{% endfor %}
|
|
<p class="fields is-grouped"><label class="label" for="id_asin">{% trans "ASIN:" %}</label> {{ form.asin }} </p>
|
|
{% for error in form.ASIN.errors %}
|
|
<p class="help is-danger">{{ error | escape }}</p>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="block">
|
|
<button class="button is-primary" type="submit">{% trans "Save" %}</button>
|
|
<a class="button" href="/book/{{ book.id }}">{% trans "Cancel" %}</a>
|
|
</div>
|
|
</form>
|
|
|
|
{% endblock %}
|