2015-04-28 03:24:02 +00:00
{% extends 'basedocumentation.html' %}
{% load url from future %}
2012-05-11 18:13:09 +00:00
{% block extra_extra_head %}
2014-04-10 17:15:08 +00:00
{{ block.super }}
2012-05-11 18:13:09 +00:00
< 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_ui_home }}" > < / script >
2013-04-13 14:59:11 +00:00
2012-05-11 18:13:09 +00:00
{{ form.media.js }}
{% endblock %}
{% block doccontent %}
2014-03-11 21:34:27 +00:00
{% if admin %}
{% if edition.pk %}
2015-04-28 03:24:02 +00:00
< h2 > Edit Edition / Add Ebook Links for < a href = "{% url 'work' edition.work.id %}" > {{ edition.work }}< / a > < / h2 >
2014-03-11 21:34:27 +00:00
{% else %}
< h2 > Create New Edition< / h2 >
{% endif %}
2012-05-11 18:13:09 +00:00
{% else %}
2014-04-30 01:07:24 +00:00
{% if edition.pk %}
2015-04-28 03:24:02 +00:00
< h2 > Add Ebook Links for < a href = "{% url 'work' edition.work.id %}" > {{ edition.work }}< / a > < / h2 >
2014-04-30 01:07:24 +00:00
{% endif %}
2012-05-11 18:13:09 +00:00
{% endif %}
2012-09-10 14:51:52 +00:00
2014-03-11 21:34:27 +00:00
{% if admin %}
2012-09-10 14:51:52 +00:00
< p > Title and ISBN 13 are required; the rest is optional, though a cover image link is strongly recommended.< / p >
2014-01-31 04:16:06 +00:00
< form enctype = "multipart/form-data" method = "POST" action = "#" >
2012-09-10 14:51:52 +00:00
{% csrf_token %}
{{ form.work }}
2013-05-13 21:32:30 +00:00
{{ form.non_field_errors }}
2012-09-10 14:51:52 +00:00
< div >
< p > < b > Title< / b > : {{ form.title.errors }}{{ form.title }}< / p >
2014-03-11 21:34:27 +00:00
< p > < b > Publisher Name< / b > : {{ form.publisher_name.errors }}{{ form.publisher_name }}< br / > (If you change this, click another form element before submitting)< / p >
2012-09-10 14:51:52 +00:00
< p >
< b > Authors< / b > :
2014-01-30 18:02:50 +00:00
{% if edition.pk and edition.authors or edition.new_author_names %}
2012-09-10 14:51:52 +00:00
< ul >
{% if edition.pk and edition.authors %}
{% for author in edition.authors.all %}
2015-01-13 01:20:52 +00:00
< li > {{ author.name }}< input type = "submit" name = "delete_author_{{ author.id }}" value = "x" class = "deletebutton" title = "delete author" > < / li >
2012-09-10 14:51:52 +00:00
{% endfor %}
{% endif %}
{% for author in edition.new_author_names %}
< li > {{ author }}< input type = "hidden" name = "new_author" value = "{{ author }}" / > < / li >
{% endfor %}
< / ul >
{% else %}
(None listed)
{% endif %}
< / p >
< p > < b > Add an Author< / b > (< I > Firstname Lastname< / I > ): {{ form.add_author.errors }}{{ form.add_author }}
< input type = "submit" name = "add_author_submit" value = "Add Author" id = "submit_author" > < / p >
< p > < b > Language< / b > : {{ form.language.errors }}{{ form.language }}< / p >
2013-04-13 14:59:11 +00:00
< h4 > Identifiers < / h4 >
{% if id_msg %} < span class = "errorlist" > {{ id_msg }} < / span > {% endif %}
< p > Enter 'delete' to remove the identifier. < / p >
< p > < b > ISBN-13< / b > : {{ form.isbn.errors }}{{ form.isbn }}< / p >
< p > < b > OCLC Number< / b > : {{ form.oclc.errors }}{{ form.oclc }}< / p >
< p > < b > Google Books ID< / b > : {{ form.goog.errors }}{{ form.goog }}< / p >
< p > < b > GoodReads ID< / b > : {{ form.gdrd.errors }}{{ form.gdrd }}< / p >
< p > < b > LibraryThing ID< / b > : {{ form.thng.errors }}{{ form.thng }}< / p >
2014-10-08 20:23:24 +00:00
{% if request.user.is_staff %}
< p > < b > HTTP ID< / b > : {{ form.http.errors }}{{ form.http }}< / p >
{% endif %}
2012-09-10 14:51:52 +00:00
< p > < b > Description< / b > : < br / >
{{ form.description.errors }}{{ form.description }}< br / >
2014-07-24 19:20:59 +00:00
(< i > {% if work.last_campaign %}
{% ifequal work.last_campaign.type 3 %}
This will appear in the Description tab on the book page.
{% else %}
The campaign pitch will override this description.
{% endifequal %}
{% else %}
This will appear in the Description tab on the book page.
{% endif %}
< / i > )< / p >
2014-01-31 04:16:06 +00:00
< p > < b > Publication Date< / b > (< I > four-digit year< / I > ): {{ form.publication_date.errors }}{{ form.publication_date }}< / p >
2012-09-10 14:51:52 +00:00
{% comment %}
this has been removed since there's no point in exposing subject functionality when we're not doing anything with it -- will just confuse people.
< p > < b > Subjects< / b > :
< ul >
2014-01-30 18:05:43 +00:00
{% if edition.work.pk and edition.work.subjects %}
2012-09-10 14:51:52 +00:00
{% 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 >
< b > Add a Subject< / b > : {{ form.add_subject.errors }}{{ form.add_subject }}
< input type = "submit" name = "add_subject_submit" value = "Add Subject" id = "submit_subject" > < / p >
{% endcomment %}
2014-01-31 04:16:06 +00:00
< p > < b > Cover Image< / b > : < br / >
{% if edition.cover_image %}
< img src = "{{edition.cover_image}}" / > < br / >
{% else %}
[ no cover specified for this edition ]< br / >
{% endif %}
{{ form.cover_image.errors }}{{ form.cover_image }}{{ form.cover_image.help_text }}
(< i > Enter a URL for an image, ideally 120px wide. < / i > )< br / >
OR...< br / >
{{ form.coverfile.errors }}{{ form.coverfile }}{{ form.coverfile.help_text }}
(< i > upload a cover image file, ideally 120px wide. < / i > )< br / >
< / p >
2012-09-10 14:51:52 +00:00
< / div >
< input type = "submit" name = "create_new_edition" value = "{% if edition.pk %}Save Edits{% else %}Create Edition{% endif %}" id = "submit" >
2012-05-11 18:13:09 +00:00
< / form >
2013-04-16 20:46:45 +00:00
{% if edition.work %}
2014-03-11 21:34:27 +00:00
2013-04-16 20:46:45 +00:00
< h2 > More Edition Management< / h2 >
2012-05-11 18:13:09 +00:00
2015-04-28 03:24:02 +00:00
< div > < a href = "{% url 'merge' edition.work.id %}" > Merge other works into this one< / a > < / div >
< div > < a href = "{% url 'work_editions' edition.work.id %}" > Remove editions from this work< / a > < / div >
2014-08-06 19:59:57 +00:00
{% if request.user.is_staff %}
2015-04-28 03:24:02 +00:00
< div > < a href = "{% url 'feature' edition.work.id %}" > Feature this work today< / a > < / div >
2014-08-06 19:59:57 +00:00
{% endif %}
< br / >
2014-03-11 21:34:27 +00:00
{% endif %}
{% else %}
{% if edition.work %}
{% include 'edition_display.html' %}
{% else %}
Sorry, there's no work specified.
{% endif %}
2013-04-16 20:46:45 +00:00
{% endif %}
2014-03-11 21:34:27 +00:00
{% include 'edition_upload.html' %}
2012-05-11 18:13:09 +00:00
2013-05-16 14:25:20 +00:00
{% endblock %}
2014-03-11 21:34:27 +00:00