From ffe491466a3c9b7096e32d263fd5b35bf3415559 Mon Sep 17 00:00:00 2001 From: François Schmidts Date: Thu, 2 Jul 2015 14:16:14 +0200 Subject: basic UI to maniuplate filters --- pyaggr3g470r/static/js/feed.js | 22 ++++++++ pyaggr3g470r/templates/article.html | 2 +- pyaggr3g470r/templates/edit_feed.html | 23 ++++++++ pyaggr3g470r/templates/layout.html | 1 + pyaggr3g470r/views/feed.py | 103 ++++++++++++++++++---------------- 5 files changed, 101 insertions(+), 50 deletions(-) create mode 100644 pyaggr3g470r/static/js/feed.js diff --git a/pyaggr3g470r/static/js/feed.js b/pyaggr3g470r/static/js/feed.js new file mode 100644 index 00000000..b1e3110e --- /dev/null +++ b/pyaggr3g470r/static/js/feed.js @@ -0,0 +1,22 @@ +$('.container').on('click', '#add-feed-filter-row', function() { + $('#filters-container').append( + '
' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + '
'); +}); +$('.container').on('click', '.del-feed-filter-row', function() { + $(this).parent().remove(); +}); diff --git a/pyaggr3g470r/templates/article.html b/pyaggr3g470r/templates/article.html index 92014599..97fb3fbf 100644 --- a/pyaggr3g470r/templates/article.html +++ b/pyaggr3g470r/templates/article.html @@ -16,7 +16,7 @@ {% endif %} {% if article.readed %} - {% else %} + {% else %} {% endif %}
{{ article.date | datetime }}
diff --git a/pyaggr3g470r/templates/edit_feed.html b/pyaggr3g470r/templates/edit_feed.html index a56238d5..22aab58b 100644 --- a/pyaggr3g470r/templates/edit_feed.html +++ b/pyaggr3g470r/templates/edit_feed.html @@ -37,6 +37,29 @@ +
+ + {% if feed %} + {% for filter_ in feed.filters or [] %} +
+ + + + + +
+ {% endfor %} + {% endif %} +
{{ form.submit(class_="btn btn-default") }} diff --git a/pyaggr3g470r/templates/layout.html b/pyaggr3g470r/templates/layout.html index c66cce3e..fcdbee32 100644 --- a/pyaggr3g470r/templates/layout.html +++ b/pyaggr3g470r/templates/layout.html @@ -153,6 +153,7 @@ +