diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2020-03-09 23:16:05 +0100 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2020-03-09 23:16:05 +0100 |
commit | 3ab6290d4994b33cdbf831523938cdb18a13bf49 (patch) | |
tree | 685980f53aaa3eda4e27ddfc7032554f55528e57 /newspipe/templates/feed_list_per_categories.html | |
parent | Improved method to detect current version of the Newspipe instance. (diff) | |
download | newspipe-3ab6290d4994b33cdbf831523938cdb18a13bf49.tar.gz newspipe-3ab6290d4994b33cdbf831523938cdb18a13bf49.tar.bz2 newspipe-3ab6290d4994b33cdbf831523938cdb18a13bf49.zip |
Refactoring the backend.
Diffstat (limited to 'newspipe/templates/feed_list_per_categories.html')
-rw-r--r-- | newspipe/templates/feed_list_per_categories.html | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/newspipe/templates/feed_list_per_categories.html b/newspipe/templates/feed_list_per_categories.html new file mode 100644 index 00000000..34d10ddd --- /dev/null +++ b/newspipe/templates/feed_list_per_categories.html @@ -0,0 +1,52 @@ +<div class="row"> + <div class="col-md-8"> + <form class="form-inline"> + <div class="form-group"> + <label>Filter per category</label> + <select class="form-control" id="category-select" name="category_id"> + <option value="0">All</option> + {% for category in user.categories %} + <option value="{{category.id}}" {% if category.id==selected_category_id %}selected{% endif %}>{{ category.name }}</option> + {% endfor %} + </select> + <button type="submit" class="btn btn-primary mb-2">OK</button> + </div> + </form> + </div> +</div> + +<br /> + +<div class="table-responsive"> + <table id="table-feeds" class="table table-striped"> + <thead> + <tr> + <th>#</th> + <th>{{ _('Title') }}</th> + <th>{{ _('Site') }}</th> + </tr> + </thead> + <tbody> + {% for feed in feeds %} + <tr> + <td>{{ loop.index }}</td> + <td>{% if feed.icon_url %}<img src="{{ url_for('icon.icon', url=feed.icon_url) }}" width="16px" /> {% endif %} <a href="{{ url_for('feed.feed_pub', feed_id=feed.id) }}">{{ feed.title }}</a></td> + <td><a href="{{ feed.site_link }}">{{ feed.site_link }}</a></td> + </tr> + {% endfor %} + </tbody> + </table> +</div> +<script> +$(document).ready(function() { + $('#table-feeds').DataTable( { + responsive: true, + columnDefs: [ + { + bSortable: false, + targets: [0] + } + ] + }); +}); +</script> |