regluit/frontend/templates/libraryauth/edit.html

97 lines
4.4 KiB
HTML
Raw Normal View History

2015-04-28 03:24:02 +00:00
{% extends 'basedocumentation.html' %}
2016-05-11 14:41:50 +00:00
{% block title %} Library Admin {% endblock %}
{% block extra_extra_head %}
2014-04-10 17:15:08 +00:00
{{ block.super }}
<link rel="stylesheet" href="/static/css/ui-lightness/jquery-ui-1.8.16.custom.css" type="text/css" media="screen">
.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 %}
2013-12-02 15:12:22 +00:00
<h2>Configure {{ library }}</h2>
{% else %}
<h2>Add a Library to Unglue.it</h2>
2013-12-12 15:52:42 +00:00
<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 %}
2013-12-15 07:33:16 +00:00
<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 %}
2013-12-12 15:52:42 +00:00
<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>
2013-12-02 15:12:22 +00:00
{% if library.pk %}
2013-12-02 15:28:58 +00:00
<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 %}
2015-04-28 03:24:02 +00:00
<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>
2013-12-02 15:28:58 +00:00
{% ifequal request.user library.user %}
2013-12-15 07:33:16 +00:00
<li> <i>You are logged in as the library user ( {{ library.user }} ).</i> You can...</li>
2015-04-28 03:24:02 +00:00
<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>
2013-12-02 15:28:58 +00:00
{% else %}
{% ifequal request.user library.owner %}
2015-04-28 03:24:02 +00:00
<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>
2013-12-02 15:28:58 +00:00
{% 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>
2013-12-02 15:12:22 +00:00
{% 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>
2013-12-12 15:52:42 +00:00
<h2>More info</h2>
2015-04-28 03:24:02 +00:00
<ul><li><a href="{% url 'libraries' %}">Unglue.it libraries</a></li></ul>
{% endblock %}