regluit/frontend/templates/edition_upload.html

31 lines
1.9 KiB
HTML
Raw Normal View History

2015-04-28 03:24:02 +00:00
{% load url from future %}<div class="clearfix">
{% if edition.ebook_form %}
2014-03-12 23:32:56 +00:00
{% if show_ebook_form %}
<div id="add_ebook">
2015-03-10 18:19:05 +00:00
{% if alert %}<div class="yikes">{{alert}}</div>{% endif %}
{% if edition.ebooks.all.0 %}
<h2>eBooks for this Edition</h2>
2015-03-10 18:19:05 +00:00
{% for ebook in edition.ebooks.all %}
2015-04-28 03:24:02 +00:00
<a href="{% url 'download_ebook' ebook.id %}">{{ ebook.format }}</a> {{ebook.rights}} at {{ebook.provider}}. Downloaded {{ ebook.download_count }} times.<br />
{% endfor %}
{% endif %}
<h2>Add an eBook for this Edition:</h2>
<span>If you know that this edition is available as a public domain or Creative Commons ebook, you can enter the link here and "unglue" it. Right now, we're only accepting URLs that point to Internet Archive, Wikisources, Wikibooks, Hathitrust, Project Gutenberg, raw files at Github, or Google Books.</span>
<form method="POST" action="#add_ebook">
{% csrf_token %}{{ edition.ebook_form.edition.errors }}{{ edition.ebook_form.edition }}{{ edition.ebook_form.user.errors }}{{ edition.ebook_form.user }}{{ edition.ebook_form.provider.errors }}{{ edition.ebook_form.provider }}
{{ edition.ebook_form.url.errors }}<span>URL: {{ edition.ebook_form.url }}</span><br />
{{ edition.ebook_form.format.errors }}<span>File Format: {{ edition.ebook_form.format }}</span>&nbsp;&nbsp;&nbsp;
{{ edition.ebook_form.rights.errors }}<span>License: {{ edition.ebook_form.rights }}</span><br />
<input type="submit" name="add_ebook" value="add ebook" />
</form>
</div>
{% else %}
2014-03-13 12:39:58 +00:00
<div> Adding ebook links is disabled for this work.</div>
2014-03-12 23:32:56 +00:00
{% endif %}
{% endif %}
</div>