aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r/templates
diff options
context:
space:
mode:
authorFrançois Schmidts <francois.schmidts@gmail.com>2015-07-02 14:16:14 +0200
committerFrançois Schmidts <francois.schmidts@gmail.com>2015-07-02 16:48:48 +0200
commitffe491466a3c9b7096e32d263fd5b35bf3415559 (patch)
tree09fc4103d02b78c8655e97a5dc0f351175253d93 /pyaggr3g470r/templates
parentredoing home page in a more 'bootstrapy' way (diff)
downloadnewspipe-ffe491466a3c9b7096e32d263fd5b35bf3415559.tar.gz
newspipe-ffe491466a3c9b7096e32d263fd5b35bf3415559.tar.bz2
newspipe-ffe491466a3c9b7096e32d263fd5b35bf3415559.zip
basic UI to maniuplate filters
Diffstat (limited to 'pyaggr3g470r/templates')
-rw-r--r--pyaggr3g470r/templates/article.html2
-rw-r--r--pyaggr3g470r/templates/edit_feed.html23
-rw-r--r--pyaggr3g470r/templates/layout.html1
3 files changed, 25 insertions, 1 deletions
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 %}
<a href="#"><i class="glyphicon glyphicon-unchecked readed" title="{{ _('Mark this article as unread') }}"></i></a>
- {% else %}
+ {% else %}
<a href="#"><i class="glyphicon glyphicon-check readed" title="{{ _('Mark this article as read') }}"></i></a>
{% endif %}
<h6>{{ article.date | datetime }}</h6>
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 @@
</div>
</div>
</div>
+ <div class="form-group" id="filters-container">
+ <label class="col-sm-3 control-label">{{ _("Filters") }} <input value="+" type="button" id="add-feed-filter-row" /></label>
+ {% if feed %}
+ {% for filter_ in feed.filters or [] %}
+ <div class="col-sm-9">
+ <input value="-" type="button" class="del-feed-filter-row" />
+ <select name="type">
+ <option value="simple match" {% if filter_.get("type") == "simple match" %}selected{% endif %}>{{ _("simple match") }}</option>
+ <option value="regex" {% if filter_.get("type") == "regex" %}selected{% endif %}>{{ _("regex") }}</option>
+ </select/>
+ <input type="text" value="{{ filter_.get("pattern") }}" size="50%" name="pattern" />
+ <select name="action_on">
+ <option value="match" {% if filter_.get("action on") == "match" %}selected{% endif %}>{{ _("match") }}</option>
+ <option value="no match" {% if filter_.get("action on") == "no match" %}selected{% endif %}>{{ _("no match") }}</option>
+ </select/>
+ <select name="action">
+ <option value="mark as read" {% if filter_.get("action") == "mark as read" %}selected{% endif %}>{{ _("mark as read") }}</option>
+ <option value="mark as favorite" {% if filter_.get("action") == "mark as favorite" %}selected{% endif %}>{{ _("mark as favorite") }}</option>
+ </select/>
+ </div>
+ {% endfor %}
+ {% endif %}
+ </div>
<div class="form-group">
<div class="col-sm-offset-3 col-sm-9">
{{ 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 @@
<script type="text/javascript" src="{{ url_for('static', filename = 'js/jquery.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename = 'js/bootstrap.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename = 'js/articles.js') }}"></script>
+ <script type="text/javascript" src="{{ url_for('static', filename = 'js/feed.js') }}"></script>
<script type="text/javascript" class="source">
var filter_ = {% if filter_ %}"{{ filter_ }}"{% else %}undefined{% endif %};
if (filter_ == undefined) {
bgstack15