2019-07-05 08:04:52 +00:00
|
|
|
{% extends "bookmarks/layout.html" %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
<div class="settings-page">
|
|
|
|
|
|
|
|
{# Import section #}
|
|
|
|
<section class="content-area">
|
|
|
|
<div class="content-area-header">
|
|
|
|
<h2>Import</h2>
|
|
|
|
</div>
|
|
|
|
<p>Import bookmarks and tags in the Netscape HTML format. This will execute a sync where new bookmarks are
|
|
|
|
added and existing ones are updated.</p>
|
2019-07-06 15:17:14 +00:00
|
|
|
<form method="post" enctype="multipart/form-data" action="{% url 'bookmarks:settings.import' %}">
|
2019-07-05 08:04:52 +00:00
|
|
|
{% csrf_token %}
|
|
|
|
<div class="form-group">
|
2019-07-07 07:22:55 +00:00
|
|
|
<div class="input-group col-8 col-md-12">
|
2019-07-05 08:04:52 +00:00
|
|
|
<input class="form-input" type="file" name="import_file">
|
|
|
|
<input type="submit" class="input-group-btn col-2 btn btn-primary" value="Upload">
|
|
|
|
</div>
|
|
|
|
{% if import_message %}
|
|
|
|
{% if import_message.level == DEFAULT_MESSAGE_LEVELS.SUCCESS %}
|
|
|
|
<div class="has-success">
|
|
|
|
{% endif %}
|
|
|
|
{% if import_message.level == DEFAULT_MESSAGE_LEVELS.ERROR %}
|
|
|
|
<div class="has-error">
|
|
|
|
{% endif %}
|
|
|
|
<p class="form-input-hint">
|
|
|
|
{{ import_message }}
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
{# Export section #}
|
|
|
|
<section class="content-area">
|
|
|
|
<div class="content-area-header">
|
|
|
|
<h2>Export</h2>
|
|
|
|
</div>
|
|
|
|
<p>Export all bookmarks in Netscape HTML format.</p>
|
2019-12-26 12:45:12 +00:00
|
|
|
<a class="btn btn-primary" href="{% url 'bookmarks:settings.export' %}">Download (.html)</a>
|
|
|
|
{% if export_error %}
|
|
|
|
<div class="has-error">
|
|
|
|
<p class="form-input-hint">
|
|
|
|
{{ export_error }}
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2019-07-05 08:04:52 +00:00
|
|
|
</section>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{% endblock %}
|