~cedric/newspipe

ref: 3ab30e029adedbd7e652552c6da1eafbeadb40cd newspipe/newspipe/templates/user_stream.html -rw-r--r-- 2.3 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
{% extends "layout.html" %}
{% block content %}
<div class="container">
    <div class="row">
        <div class="col">
            <form class="form-inline">
                <div class="form-group">
                    <label>Filter per category</label>&nbsp;
                    <select class="form-control" id="category-select" name="category_id">
                        <option  value="0">All</option>
                        {% for cur_category in user.categories %}
                            <option value="{{cur_category.id}}" {% if cur_category.id==category.id %}selected{% endif %}>{{ cur_category.name }}</option>
                        {% endfor %}
                    </select>
                    &nbsp;<button type="submit" class="btn btn-primary">OK</button>
                </div>
            </form>
        </div>
    </div>

    <br /><br />

    {% if category %}
    <div class="row">
        <div class="col">
            <p class="lead">Articles from the category <a href="{{ url_for('user.profile_public', nickname=user.nickname, category_id=category.id) }}">{{ category.name }}</a></p>
        </div>
    </div>
    {% endif %}

    <div class="row">
        <div class="col">
            {{ pagination.info }}
        </div>
    </div>

    <div class="row">
       <div class="col">
           {{ pagination.links }}
       </div>
   </div>

    <div class="table-responsive">
        <table id="table-feeds" class="table table-striped">
            <thead>
                <tr>
                    <th>#</th>
                    <th>{{ _('Title') }}</th>
                    <th>{{ _('Published at') }}</th>
                </tr>
            </thead>
            <tbody>
            {% for article in articles %}
                <tr>
                    <td>{{ loop.index }}</td>
                    <td><img src="{{ url_for('icon.icon', url=article.source.icon_url) }}" width="16px" />
                        <a href="{{ url_for('article.article_pub', article_id=article.id) }}">{{ article.title }}</a>
                    </td>
                    <td>{{ article.date }}</td>
                </tr>
            {% endfor %}
            </tbody>
        </table>
    </div>

    <div class="row">
       <div class="col">
           {{ pagination.links }}
       </div>
   </div>
</div><!-- /.container -->
{% endblock %}