regluit/frontend/templates/manage_ebooks.html

77 lines
2.6 KiB
HTML
Raw Normal View History

{% extends 'basedocumentation.html' %}
2016-05-11 14:41:50 +00:00
{% block extra_extra_head %}
{{ block.super }}
<link rel="stylesheet" href="{{ jquery_ui_theme }}" type="text/css" media="screen">
<script type="text/javascript" src="{{ jquery_ui_home }}" ></script>
2016-08-26 16:27:48 +00:00
<script type="text/javascript">
onload = function(){
var urlInput = document.getElementById('id_url');
var formatInput = document.getElementById('id_format');
2017-10-31 01:13:38 +00:00
var fileInput = document.getElementById('id_file');
2016-08-26 16:27:48 +00:00
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'
};
};
2017-10-31 01:13:38 +00:00
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'
};
};
2016-08-26 16:27:48 +00:00
};
2016-08-26 16:27:48 +00:00
</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 %}
2017-07-27 14:33:13 +00:00
OCLC: <a href="https://www.worldcat.org/oclc/{{ edition.oclc }}">{{ edition.oclc }}</a><br />
{% endif %}
{% include 'edition_upload.html' %}
2015-09-21 20:19:31 +00:00
{% 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 %}