regluit/frontend/templates/manage_ebooks.html

77 lines
2.6 KiB
HTML

{% extends 'basedocumentation.html' %}
{% block extra_extra_head %}
{{ block.super }}
<link rel="stylesheet" href="/static/css/ui-lightness/jquery-ui-1.8.16.custom.css" type="text/css" media="screen">
<script type="text/javascript" src="{{ jquery_ui_home }}" ></script>
<script type="text/javascript">
onload = function(){
var urlInput = document.getElementById('id_url');
var formatInput = document.getElementById('id_format');
var fileInput = document.getElementById('id_file');
urlInput.oninput = function(){
if(urlInput.value.endsWith('.pdf')){
formatInput.value = 'pdf'
}
else if(urlInput.value.endsWith('.epub')){
formatInput.value = 'epub'
}
else if(urlInput.value.endsWith('.mobi')){
formatInput.value = 'mobi'
}
else if(urlInput.value.endsWith('.html')){
formatInput.value = 'html'
};
};
fileInput.onchange = function(){
if(fileInput.value.endsWith('.pdf')){
formatInput.value = 'pdf'
}
else if(fileInput.value.endsWith('.epub')){
formatInput.value = 'epub'
}
else if(fileInput.value.endsWith('.mobi')){
formatInput.value = 'mobi'
}
else if(fileInput.value.endsWith('.html')){
formatInput.value = 'html'
};
};
};
</script>
{% endblock %}
{% block doccontent %}
<h2>Add Ebook Links for <a href="{% url 'work' edition.work_id %}">{{ edition.work.title }}</a></h2>
{% if edition.publisher %}
Publisher: <a href="{% url 'bypubname_list' edition.publisher_name.id %}">{{edition.publisher}}</a><br />
{% endif %}
{% if edition.publication_date %}
Published: {{ edition.publication_date }}<br />
{% endif %}
{% if edition.isbn_13 %}
ISBN: <span itemprop="isbn">{{ edition.isbn_13 }}</span><br />
{% endif %}
{% if edition.oclc %}
OCLC: <a href="https://www.worldcat.org/oclc/{{ edition.oclc }}">{{ edition.oclc }}</a><br />
{% endif %}
{% include 'edition_upload.html' %}
{% if request.user.is_staff %}
<h2>More Edition Management</h2>
<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>
<div><a href="{% url 'feature' edition.work_id %}">Feature this work today</a></div>
<div><a href="{% url 'new_edition' edition.work_id edition.id %}">Edit the edition</a></div>
{% endif %}
<br />
{% endblock %}