blob: 69a91d8c108276770a7927b9edadb6c65b98f92b (
plain) (
blame)
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
|
{% extends "base.html" %}
{% from "bootstrap5/pagination.html" import render_pagination %}
{% block content %}
<div class="d-flex justify-content-between align-items-center mb-3">
<h1 class="mb-0">Sources</h1>
<span class="text-body-secondary">{{ sources.total }} sources</span>
</div>
{% if sources.items %}
<div class="table-responsive">
<table class="table table-bordered table-striped table-hover align-middle">
<thead>
<tr>
<th scope="col">Path</th>
<th scope="col">URL</th>
<th scope="col">Webmentions</th>
<th scope="col">Revision</th>
<th scope="col">Created</th>
<th scope="col">Last seen</th>
<th scope="col">Status</th>
</tr>
</thead>
<tbody>
{% for source in sources %}
<tr>
<td class="text-nowrap">
<a href="{{ url_for('root.sent_source', identifier=source.uuid) }}">{{ source.path }}</a>
</td>
<td class="text-break">
<a href="{{ source.url }}">{{ source.url }}</a>
</td>
<td>{{ source.sent_webmentions | length }}</td>
<td>{{ source.revision }}</td>
<td class="text-nowrap">
<time datetime="{{ source.created_at.isoformat() }}">
{{ source.created_at.strftime("%Y-%m-%d %H:%M:%S") }}
</time>
</td>
<td class="text-nowrap">
<time datetime="{{ source.last_seen_at.isoformat() }}">
{{ source.last_seen_at.strftime("%Y-%m-%d %H:%M:%S") }}
</time>
</td>
<td>
{% if source.deleted_at is none %}
<span class="badge text-bg-success">Active</span>
{% else %}
<span class="badge text-bg-danger">Deleted</span>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% if sources.pages > 1 %}
<div class="mt-3">{{ render_pagination(sources) }}</div>
{% endif %}
{% else %}
<p class="text-body-secondary">No Webmention sources have been discovered yet.</p>
{% endif %}
{% endblock %}
|