2021-01-30 23:35:07 +13:00
|
|
|
|
{% extends "core/base.html" %}
|
2020-08-27 13:44:06 +12:00
|
|
|
|
|
|
|
|
|
{% load static %}
|
2020-07-28 15:26:45 +12:00
|
|
|
|
{% load i18n %}
|
2019-04-23 11:07:39 +12:00
|
|
|
|
|
2020-07-28 15:26:45 +12:00
|
|
|
|
{% block breadcrumbs %}
|
|
|
|
|
<div class="breadcrumbs">
|
|
|
|
|
<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
|
|
|
|
|
{% if title %} › {{ title }}{% endif %}
|
|
|
|
|
</div>
|
|
|
|
|
{% endblock %}
|
2020-07-02 05:23:59 +12:00
|
|
|
|
|
2020-08-27 13:44:06 +12:00
|
|
|
|
{% block extra_head %}
|
|
|
|
|
<link rel="stylesheet" href="{% static 'add.css' %}" />
|
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
|
|
{% block body %}
|
2021-03-27 21:30:15 +13:00
|
|
|
|
<div style="max-width: 1440px; margin: auto; float: none">
|
2020-07-28 15:26:45 +12:00
|
|
|
|
<br/><br/>
|
|
|
|
|
{% if stdout %}
|
|
|
|
|
<h1>Add new URLs to your archive: results</h1>
|
|
|
|
|
<pre id="stdout">
|
|
|
|
|
{{ stdout | safe }}
|
|
|
|
|
<br/><br/>
|
|
|
|
|
</pre>
|
|
|
|
|
<br/>
|
|
|
|
|
<center>
|
|
|
|
|
<a href="/add" id="submit"> Add more URLs ➕</a>
|
|
|
|
|
</center>
|
|
|
|
|
{% else %}
|
2021-10-29 16:31:54 +13:00
|
|
|
|
<div id="in-progress" style="display: none;">
|
|
|
|
|
<center><h3>Adding URLs to index and running archive methods...</h3>
|
|
|
|
|
<br/>
|
|
|
|
|
<div class="loader"></div>
|
|
|
|
|
<br/>
|
|
|
|
|
Check the server log or the <a href="/admin/core/archiveresult/?o=-1">Log</a> page for progress...
|
|
|
|
|
</center>
|
|
|
|
|
</div>
|
2020-08-29 02:58:32 +12:00
|
|
|
|
<form id="add-form" method="POST" class="p-form">{% csrf_token %}
|
2020-07-28 15:26:45 +12:00
|
|
|
|
<h1>Add new URLs to your archive</h1>
|
|
|
|
|
<br/>
|
|
|
|
|
{{ form.as_p }}
|
|
|
|
|
<center>
|
|
|
|
|
<button role="submit" id="submit"> Add URLs and archive ➕</button>
|
|
|
|
|
</center>
|
2020-07-02 05:29:56 +12:00
|
|
|
|
</form>
|
2020-07-28 15:26:45 +12:00
|
|
|
|
<br/><br/><br/>
|
|
|
|
|
<center id="delay-warning" style="display: none">
|
2021-04-01 20:32:06 +13:00
|
|
|
|
<small>(it's safe to leave this page, adding will continue in the background)</small>
|
2020-07-28 15:26:45 +12:00
|
|
|
|
</center>
|
2020-10-04 08:57:55 +13:00
|
|
|
|
{% if absolute_add_path %}
|
|
|
|
|
<center id="bookmarklet">
|
|
|
|
|
<p>Bookmark this link to quickly add to your archive:
|
2021-04-17 00:24:51 +12:00
|
|
|
|
<a href="javascript:void(window.open('{{ absolute_add_path }}?url='+encodeURIComponent(document.location.href)));">Add to ArchiveBox</a></p>
|
2020-10-04 08:57:55 +13:00
|
|
|
|
</center>
|
|
|
|
|
{% endif %}
|
2020-07-28 15:26:45 +12:00
|
|
|
|
<script>
|
|
|
|
|
document.getElementById('add-form').addEventListener('submit', function(event) {
|
2021-10-29 16:31:54 +13:00
|
|
|
|
document.getElementById('in-progress').style.display = 'block'
|
|
|
|
|
document.getElementById('add-form').style.display = 'none'
|
|
|
|
|
document.getElementById('delay-warning').style.display = 'block'
|
2020-07-28 15:26:45 +12:00
|
|
|
|
return true
|
|
|
|
|
})
|
|
|
|
|
</script>
|
|
|
|
|
{% endif %}
|
|
|
|
|
</div>
|
|
|
|
|
{% endblock %}
|
2020-07-02 05:23:59 +12:00
|
|
|
|
|
2021-01-29 17:15:05 +13:00
|
|
|
|
{% block footer %}{% endblock %}
|
|
|
|
|
|
2020-07-28 15:26:45 +12:00
|
|
|
|
{% block sidebar %}{% endblock %}
|