regluit/frontend/templates/edition_uploads.html

102 lines
4.5 KiB
HTML

{% extends 'basedocumentation.html' %}
{% block doccontent %}
<div class="work_campaigns">
<b>Title</b>: <a href="{% url 'work' edition.work_id %}">{{ edition.title}}</a><br />
<b>Publisher</b> : {{ edition.publisher_name }}<br />
<b>Authors</b>:
<ul>
{% if edition.pk and edition.authors %}
{% for author in edition.authors.all %}
<li>{{ author.name }}</li>
{% endfor %}
{% endif %}
</ul>
<b>ISBN-13</b>: {{ edition.isbn_13 }}<br />
<b>OCLC Number</b>: {{ edition.oclc }}<br />
<b>Google Books ID</b>: {{ edition.googlebooks_id }}<br />
<b>GoodReads ID</b>: {{ edition.goodreads_id }}<br />
<b>LibraryThing ID</b>: {{ edition.librarything_id }}<br />
</div>
{% if edition.ebooks.all.0 %}
<h2>Active eBooks for this Work</h2>
{% for ebook in edition.work.ebooks %}
<a href="{% url 'download_ebook' ebook.id %}">{{ ebook.format }}</a> {{ebook.rights}} at {{ebook.provider}}.
{% if ebook.version_label %} {{ ebook.version_label }}. {% endif %} v{{ ebook.version_iter }}
Downloaded {{ ebook.download_count }} times since {{ ebook.created }}<br />
{% endfor %}
{% endif %}
{% if edition.ebook_files.all %}
<h2> Ebook Files for this Edition</h2>
<ul>
{% for ebook_file in edition.ebook_files.all %}
{% if ebook_file.file %}
<li>{% if ebook_file.active %}<span class="yikes">ACTIVE</span> {% elif ebook_file.ebook.active %} MIRROR {% endif %}<a href="{{ebook_file.file.url}}">{{ebook_file.file}}</a> created {{ebook_file.created}} {% if ebook_file.asking %}(This file has had the campaign 'ask' added.){% endif %}</li>
{% endif %}
{% endfor %}
</ul>
{% endif %}
{% if uploaded %}
<h2> Your file was successfully loaded. </h2>
{% ifequal edition.work.last_campaign.type 2 %}
{% if watermarked %}
<p> Reference id: <b>{{watermarked.referenceid}}</b></p>
<ul>
<li><a href="{{watermarked.download_link_epub}}">Processed epub for testing</a></li>
<li><a href="{{watermarked.download_link_mobi}}">Processed mobi (kindle) for testing</a></li>
</ul>
{% else %}{% if upload_error %}
<p>
<span class="yikes">Unfortunately, your file failed testing.</span>
The error(s) were: <pre>
{{ upload_error }}</pre>
</p>
{% endif %}{% endif %}
{% endifequal %}
{% ifequal edition.work.last_campaign.type 3 %}
{% if upload_error %}
<p><span class="yikes">Unfortunately, your file failed testing.</span>
The error(s) were: <pre>
{{ upload_error }}</pre></p>
{% endif %}
{% endifequal %}
{% endif %}
{{ upload_error }}
<h2>Upload Ebook files</h2>
{% ifequal edition.work.last_campaign.type 2 %}
<p>At this time, we accept only EPUB files for "Buy to Unglue" campaigns. Files for Kindle will be autogenerated.
{% endifequal %}
{% ifequal edition.work.last_campaign.type 3 %}
<p>You can upload PDF, EPUB and MOBI files for "Thanks for Ungluing" campaigns.
{% endifequal %}
For ePUB files, use the <a href=https://code.google.com/p/epubcheck/">epubcheck</a> tool to make sure everything will work properly.</p>
<form method="POST" action="#" enctype="multipart/form-data">
{% csrf_token %}
{{form.edition.errors}}{{form.edition}}
<p>{{form.format.errors}}Format: {{form.format}}</p>
<h3>Note on versions</h4>
<p>
If you want ebooks from two editions with the same format and provider to display, give them different version labels.
</p>
<span>Version Label (optional): {% if edition.work.versions %}
<select id='version_label'>
<option value=""> (no label) </option>
{% for vers in edition.work.versions %}<option value="{{ vers }}" >{{ vers }}</option>{% endfor %}
</select> or add a new version label:
{% endif %}
{{ form.new_version_label.errors }} {{ form.new_version_label }} </span> <br />
<p>{{form.file.errors}}Upload File: {{form.file}}</p>
<input type="submit" id="submit_file" value="submit ebook file">
</form>
<h2>More Edition Management</h2>
<div><a href="{% url 'new_edition' edition.work_id edition.id %}">Edit this edition</a></div>
{% if edition.work.last_campaign %}
<div><a href="{% url 'manage_campaign' edition.work.last_campaign.id %}">Manage this campaign</a></div>
{% endif %}
{% endblock %}