]> git.ipfire.org Git - ipfire.org.git/blob - templates/modules/mirrors-table.html
Major update of the webapp.
[ipfire.org.git] / templates / modules / mirrors-table.html
1 <table class="table table-striped">
2 {% for mirror in mirrors %}
3 <tr>
4 <td class="ac">
5 {% if mirror.country_code %}
6 <img src="{{ static_url("images/flags/%s.png" % mirror.country_code.lower()) }}" alt="{{ mirror.country_code }}" />
7 <br>
8 {% if mirror.country_name %}
9 <abbr title="{{ mirror.country_name }}">{{ mirror.country_code }}</abbr>
10 {% else %}
11 {{ mirror.country_code }}
12 {% end %}
13 {% if mirror in preferred_mirrors %}*{% end %}
14 {% end %}
15 </td>
16
17 {% if mirror.state == "UP" %}
18 <td style="background-color: green;">
19 &nbsp;
20 </td>
21 {% elif mirror.state == "DOWN" %}
22 <td style="background-color: red;">
23 &nbsp;
24 </td>
25 {% elif mirror.state == "OUTOFSYNC" %}
26 <td style="background-color: yellow;">
27 &nbsp;
28 </td>
29 {% else %}
30 <td style="background-color: grey;">
31 &nbsp; {{ mirror.state }}
32 </td>
33 {% end %}
34 <td>
35 {% if mirror.state in ("OUTOFSYNC", "DOWN") %}
36 <span class="text-error pull-right">
37 {{ _("Last update: %s") % locale.format_date(mirror.last_update, relative=True) }}
38 </span>
39 {% end %}
40
41 <a href="/mirror/{{ mirror.hostname }}">{{ mirror.hostname }}</a>
42 <br>{{ mirror.owner }}
43 </td>
44 </tr>
45 {% end %}
46 </table>