From b8c23a00b8b1d4ce93c52253a758301e07e4534e Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Sat, 27 Jun 2020 00:54:26 +0200 Subject: chg: [template] Minor improvements and fixed to the edit_feed.html template. --- newspipe/static/js/feed.js | 26 ++++++++++----- newspipe/templates/admin/create_user.html | 26 +++++++-------- newspipe/templates/edit_feed.html | 53 ++++++++++++++++++++----------- 3 files changed, 64 insertions(+), 41 deletions(-) diff --git a/newspipe/static/js/feed.js b/newspipe/static/js/feed.js index 23e509f4..e51e423f 100644 --- a/newspipe/static/js/feed.js +++ b/newspipe/static/js/feed.js @@ -1,29 +1,39 @@ var node = document.getElementById('add-feed-filter-row'); if (node != null) { node.onclick = function() { - document.getElementById('filters-container').innerHTML = - '
' + document.getElementById('filters-container').innerHTML += + '
' + + '
' + ' ' - + ' ' + ' ' + ' ' + ' ' - + ' ' - + ' ' + + '
' + + '
' + + ' ' - + ' ' + ' ' + ' ' + ' ' - + '
'; + + '
' + + '

'; } } var nodes = document.getElementsByClassName('del-feed-filter-row'); Array.prototype.map.call(nodes, function(node) { node.onclick = function() { - node.parentNode.remove(); + node.parentNode.parentNode.remove(); } }) diff --git a/newspipe/templates/admin/create_user.html b/newspipe/templates/admin/create_user.html index 8844f987..04d9d631 100644 --- a/newspipe/templates/admin/create_user.html +++ b/newspipe/templates/admin/create_user.html @@ -4,23 +4,21 @@ {% endblock %} {% block content %}
-
-

{{ message | safe }}

-
- {{ form.hidden_tag() }} +

{{ message | safe }}

+ + {{ form.hidden_tag() }} - {{ form.nickname.label }} - {{ form.nickname(class_="form-control") }} {% for error in form.nickname.errors %} {{ error }}
{% endfor %} + {{ form.nickname.label }} + {{ form.nickname(class_="form-control") }} {% for error in form.nickname.errors %} {{ error }}
{% endfor %} - {{ form.password.label }} - {{ form.password(class_="form-control") }} {% for error in form.password.errors %} {{ error }}
{% endfor %} + {{ form.password.label }} + {{ form.password(class_="form-control") }} {% for error in form.password.errors %} {{ error }}
{% endfor %} - {{ form.automatic_crawling.label }} - {{ form.automatic_crawling(class_="form-control") }} {% for error in form.automatic_crawling.errors %} {{ error }}
{% endfor %} + {{ form.automatic_crawling.label }} + {{ form.automatic_crawling(class_="form-control") }} {% for error in form.automatic_crawling.errors %} {{ error }}
{% endfor %} -
- {{ form.submit(class_="btn btn-primary") }} -
-
+
+ {{ form.submit(class_="btn btn-primary") }} +
{% endblock %} diff --git a/newspipe/templates/edit_feed.html b/newspipe/templates/edit_feed.html index 41de789d..8d3cec4a 100644 --- a/newspipe/templates/edit_feed.html +++ b/newspipe/templates/edit_feed.html @@ -2,18 +2,18 @@ {% block content %}

{{ action }}

-
+ {{ form.hidden_tag() }}

Enter the URL of the website or the URL of the feed (RSS/ATOM).

-
+
{{ form.site_link(class_="form-control", size="100%") }}
{% for error in form.site_link.errors %} {{ error }}
{% endfor %}
-
+
{{ form.link(class_="form-control", size="100%") }} @@ -21,7 +21,7 @@ {% for error in form.link.errors %} {{ error }}
{% endfor %}
-
+
{{ form.submit(class_="btn btn-primary") }}
@@ -67,40 +67,55 @@
-
- -
-
- {{ _("Here you can define actions to perform on newly retrieved items.") }} -
-
-
- +
+ +
+
+

{{ _("Filters") }}

+
+ {{ _("Here you can define actions to perform on newly retrieved items.") }}
+ +
-
+ +
+ +
{% if feed %} {% for filter_ in feed.filters or [] %} -
+
+
- +
+
- -
+

{% endfor %} {% endif %}
- + +
+
{{ form.submit(class_="btn btn-primary") }} -- cgit