96 lines
4.4 KiB
HTML
96 lines
4.4 KiB
HTML
{% extends "basedocumentation.html" %}
|
|
{% block title %} Library Admin {% endblock %}
|
|
{% block extra_extra_head %}
|
|
<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">
|
|
<style type="text/css">
|
|
.group-border {
|
|
border: solid #edf3f4;
|
|
border-width: 2px;
|
|
padding: 10px;
|
|
border-radius: 10px;
|
|
}
|
|
</style>
|
|
{{ form.media.css }}
|
|
<script type="text/javascript" src="{{ jquery_ui_home }}" ></script>
|
|
|
|
{{ form.media.js }}
|
|
{% endblock %}
|
|
|
|
{% block doccontent %}
|
|
{% if library.pk %}
|
|
<h2>Configure {{ library }}</h2>
|
|
{% else %}
|
|
<h2>Add a Library to Unglue.it</h2>
|
|
<p> By creating a library on Unglue.it, you'll be able to:</p>
|
|
<ol>
|
|
<li>Purchase "buy-to-unglue" ebook licenses for your library.</li>
|
|
<li>Allow library users to borrow "buy-to-unglue" ebooks.</li>
|
|
<li>Allow library users to purchase "buy-to-unglue" ebooks for your library.</li>
|
|
<li>Manage lists of unglued and public domain ebooks for your users.</li>
|
|
</ol>
|
|
{% endif %}
|
|
<p>{{ status }}</p>
|
|
<div class="group-border">
|
|
<form method="POST" action="#" class="std_form">
|
|
{% csrf_token %}
|
|
{{ form.work }}
|
|
{{ form.non_field_errors }}
|
|
<div>
|
|
<p><b>Library Name</b>: {{ form.name.errors }}{{ form.name }}</p>
|
|
{% if form.instance.user %}
|
|
<p><b>Library Username</b>: {{ form.instance.user }}</p>
|
|
<p><b>Library Email</b>: {{ form.instance.user.email }}</p>
|
|
{% else %}
|
|
<p><b>Library Username</b>: {{ form.username.errors }}{{ form.username }} This will be the Unglue.it username for the library. You ( <i>{{ request.user }}</i> ) will be able to log in as the library to do things like setting links making book lists.</p>
|
|
<p><b>Library Email</b>: {{ form.email.errors }}{{ form.email }} The notification address for the library.</p>
|
|
|
|
{% endif %}
|
|
<p><b>Library User Verification Method</b>: {{ form.backend.errors }}{{ form.backend }}</p>
|
|
<p>You'll be able to configure user verification once you've added the library.</p>
|
|
</div>
|
|
<input type="submit" name="create_new_library" value="{% if library.pk %}Save Edits{% else %}Create A Library{% endif %}" id="submit">
|
|
</form>
|
|
</div>
|
|
{% if library.pk %}
|
|
<h2>Settings for {{ library }}</h2>
|
|
<ul class="terms">
|
|
{% if library.approved %}
|
|
<li> This library has been approved by Unglue.it staff.</li>
|
|
{% else %}
|
|
<li> This library has not yet been approved by Unglue.it staff. Please make sure that a <a href="https://www.docracy.com/0_uyw26qv9c/unglue-it-library-license-agreement">library agreement</a> has been executed.</li>
|
|
{% endif %}
|
|
<li> Go to <a href="{% url library library.user %}">{{ library }}'s page</a></li>
|
|
<li> Go to <a href="{% url supporter library.user %}"><i>{{ library.user }}</i>'s user page</a></li>
|
|
{% ifequal request.user library.user %}
|
|
<li> <i>You are logged in as the library user ( {{ library.user }} ).</i> You can...</li>
|
|
<li> ... edit the <a href="{% url supporter library.user %}#edit">Profile Settings</a> or ... </li>
|
|
<li> ... <a href="{% url manage_account %}">configure</a> the library's account</li>
|
|
{% else %}
|
|
{% ifequal request.user library.owner %}
|
|
<li> To set links and tagline, configure the account, and build book lists for {{ library }}, first <br /> <br /><a class="fakeinput" href="{% url library_login library.id %}">log in as {{ library.user }}</a></li>
|
|
{% else %}
|
|
<li> <i>{{ library.owner }}</i> is authorized to set links and tagline, configure the account, and build book lists for {{ library }}.</li>
|
|
{% endifequal %}
|
|
{% endifequal %}
|
|
</ul>
|
|
{% endif %}
|
|
{% if backend_admin_forms %}
|
|
<h2>User Verification Setup</h2>
|
|
<div class="group-border">
|
|
{% include form.instance.help_template %}
|
|
{% for backend_admin_form in backend_admin_forms %}
|
|
<form method="POST" action="#">
|
|
{% csrf_token %}
|
|
<span class="std_form">{{ backend_admin_form }}</span>
|
|
<input type="hidden" name="id" value="{{backend_admin_form.instance.id}}" />
|
|
<input type="submit" name="backend_submit" value="Save User Verifier" id="auth_submit_{{backend_admin_form.instance.id}}" />
|
|
<input type="submit" name="backend_delete" value="Delete" id="auth_delete_{{backend_admin_form.instance.id}}" />
|
|
</form>
|
|
<br />
|
|
{% endfor %}
|
|
{% endif %}
|
|
</div>
|
|
<h2>More info</h2>
|
|
<ul><li><a href="{% url libraries %}">Unglue.it libraries</a></li></ul>
|
|
{% endblock %}
|