~cedric/newspipe

ref: 3ab30e029adedbd7e652552c6da1eafbeadb40cd newspipe/newspipe/templates/feed_list_per_categories.html -rw-r--r-- 1.6 KiB
3ab30e02Cédric Bonhomme chg: [ui] improved article_pub template. 1 year, 4 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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" />&nbsp;{% 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>