doab-check/doab_check/templates/provider.html

64 lines
1.8 KiB
HTML
Raw Normal View History

2023-03-02 22:40:34 +00:00
<html>
<head>
<title>DOAB Hosts</title>
{% include "basestyle.html" %}
2023-03-02 22:40:34 +00:00
</head>
<body>
{% include "header.html" %}
<main class="section oapen-topic oapen-main">
<div class="container">
<div class="content">
2023-03-02 22:40:34 +00:00
<h2>
2023-04-27 21:05:29 +00:00
Link Checking for
{{provider.provider}} ({{provider.link_count}} links)
2023-03-02 22:40:34 +00:00
</h2>
2023-04-27 21:05:29 +00:00
<h3>Summary</h3>
<table>
<tr>
<th>HTTP Code</th>
<th>number</th>
<th></th>
2023-04-27 21:05:29 +00:00
</tr>
{% for code in codes %}
<tr {% if code.recent_check__return_code != 200 %} style="color:red"{% endif %}>
<td> {{ code.recent_check__return_code }} </td>
2023-09-06 21:26:35 +00:00
<td> <a href="#code{{ code.recent_check__return_code }}">{{ code.recent_check__return_code__count }}</a>
2023-09-07 18:47:34 +00:00
<td>{% if code.recent_check__return_code != 200 %}
<a href="{% url 'fixing' %}#code{{ code.recent_check__return_code }}">how to fix</a>
{% endif %}</td>
2023-04-27 21:05:29 +00:00
</tr>
2023-04-27 21:24:55 +00:00
{% empty %}
<tr><td colspan=2>None of the active links for {{ provider.provider }} have been checked.</td>
2023-04-27 21:05:29 +00:00
{% endfor %}
</table>
<h3>Checked links by status</h3>
2023-03-02 22:40:34 +00:00
<ul>
{% for codeobj in codes %}
{% with code=codeobj.recent_check__return_code %}
<h3{% if code != 200 %} style="color:red"{% endif %} id="code{{ code }}"> {{ code }}</h3>
{% for link in codeobj.links %}
2023-09-06 21:26:35 +00:00
{% with title=link.title %}
{% ifchanged title %}<div class='itemtitle'>{{ title }}</div>{% endifchanged %}
<div class='itemlink'><a href="{{ link.url }}">{{ link.url }}</a></div>
<a href="{% url 'link' link.id %}">[full info]</a>
<table class="checked">
<tr>
<td>Last checked: {{ link.recent_check.created }}</td>
<td {%if code != 200 %} style="color:red"{% endif %}>{{ code }}</td>
<td>{{ link.recent_check.content_type }}</td>
</tr>
</table>
{% if forloop.counter == 1000 %} Can't display more than 1000 links {% endif %}
{% endwith %}
2023-03-02 22:40:34 +00:00
{% endfor %}
{% endwith %}
2023-03-02 22:40:34 +00:00
{% endfor %}
</div>
</div>
</main>
2023-03-02 22:40:34 +00:00
</body>
</html>