regluit/frontend/templates/new_edition.html

58 lines
2.4 KiB
HTML
Raw Normal View History

{% extends "basedocumentation.html" %}
{% block extra_extra_head %}
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/themes/ui-lightness/jquery-ui.css" type="text/css" media="screen">
{{ form.media.css }}
<script type="text/javascript" src="{{ jquery_home }}"></script>
<script type="text/javascript" src="{{ jquery_ui_home }}" ></script>
{{ form.media.js }}
{% endblock %}
{% block doccontent %}
{% if edition.pk %}
<h2>Edit Edition {{edition.pk}}</h2>
{% else %}
<h2>Create New Edition</h2>
{% endif %}
<form method="POST" action="#">
{% csrf_token %}
{{ form.work }}
<div>
Title: {{ form.title.errors }}{{ form.title }}<br />
Authors:<ul>
{% if edition.pk and edition.authors %}
{% for author in edition.authors.all %}
<li>{{ author.name }}</li>
{% endfor %}
{% endif %}
{% for author in edition.new_author_names %}
<li>{{ author }}<input type="hidden" name="new_author" value="{{ author }}" /></li>
{% endfor %}
</ul>
Add an Author: {{ form.add_author.errors }}{{ form.add_author }}
<input type="submit" name="add_author_submit" value="Add Author" id="submit_author"><br />
Language: {{ form.language.errors }}{{ form.language }}<br />
ISBN: {{ form.isbn_13.errors }}{{ form.isbn_13 }}<br />
Description: <br />{{ form.description.errors }}{{ form.description }}<br />
Publisher: {{ form.publisher.errors }}{{ form.publisher }}<br />
Publish Date: {{ form.publication_date.errors }}{{ form.publication_date }}<br />
Public Domain?: {{ form.public_domain.errors }}{{ form.public_domain }}<br />
Subjects:<ul>
{% if edition.work.subjects %}
{% for subject in edition.work.subjects.all %}
<li>{{ subject.name }}</li>
{% endfor %}
{% endif %}
{% for new_subject in edition.new_subjects %}
<li>{{ new_subject }}<input type="hidden" name="new_subject" value="{{ new_subject }}" /></li>
{% endfor %}
</ul>
Add a Subject: {{ form.add_subject.errors }}{{ form.add_subject }}
<input type="submit" name="add_subject_submit" value="Add Subject" id="submit_subject"><br />
Cover Image (Small): {{ form.cover_image.errors }}{{ form.cover_image }}{{ form.cover_image.help_text }}<br />
</div>
<input type="submit" name="create_new_edition" value="{% if edition.pk %}Save Edits{% else %}Create Edition{% endif %}" id="submit">
</form>
{% endblock %}