summaryrefslogtreecommitdiffstats
path: root/templates/mirrors
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2013-01-16 00:36:17 -0600
committerDan McGee <dan@archlinux.org>2013-01-16 00:36:17 -0600
commit0b930fd92140858f4ad21e593feb057996af9b95 (patch)
treedcfb6220b0b7d8342b0072492b85407a71caf4f2 /templates/mirrors
parent1f9aef78f39c90191eddf2233c278086a15052de (diff)
downloadarchweb-0b930fd92140858f4ad21e593feb057996af9b95.tar.gz
archweb-0b930fd92140858f4ad21e593feb057996af9b95.zip
Convert all usages of flag icons to new spriterelease_2013-01-18
This uses a new template tag to avoid repeating construction of the necessary HTML element all over the place. The site should look exactly as it did before, except now you don't have to download 20+ images to see some pages. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'templates/mirrors')
-rw-r--r--templates/mirrors/mirror_details.html5
-rw-r--r--templates/mirrors/status.html5
-rw-r--r--templates/mirrors/status_table.html3
3 files changed, 10 insertions, 3 deletions
diff --git a/templates/mirrors/mirror_details.html b/templates/mirrors/mirror_details.html
index a56123ff..8ea6bbec 100644
--- a/templates/mirrors/mirror_details.html
+++ b/templates/mirrors/mirror_details.html
@@ -1,9 +1,12 @@
{% extends "base.html" %}
{% load static from staticfiles %}
{% load mirror_status %}
+{% load flags %}
{% block title %}Arch Linux - {{ mirror.name }} - Mirror Details{% endblock %}
+{% block head %}<link rel="stylesheet" type="text/css" href="{% static "flags/fam.css" %}" media="screen, projection" />{% endblock %}
+
{% block content %}
<div class="box">
@@ -90,7 +93,7 @@
<tr class="{% cycle 'odd' 'even' %}">
<td>{% if m_url.protocol.is_download %}<a href="{{ m_url.url }}">{{ m_url.url }}</a>{% else %}{{ m_url.url }}{% endif %}</td>
<td>{{ m_url.protocol }}</td>
- <td class="country">{% if m_url.country %}<img src="{{ m_url.country.flag }}" alt=""/> {% endif %}{{ m_url.country.name }}</td>
+ <td class="country">{% country_flag m_url.country %}{{ m_url.country.name }}</td>
<td>{{ m_url.has_ipv4|yesno|capfirst }}</td>
<td>{{ m_url.has_ipv6|yesno|capfirst }}</td>
<td>{{ m_url.last_sync|date:'Y-m-d H:i'|default:'unknown' }}</td>
diff --git a/templates/mirrors/status.html b/templates/mirrors/status.html
index ec2ae568..8d32d3fa 100644
--- a/templates/mirrors/status.html
+++ b/templates/mirrors/status.html
@@ -1,9 +1,12 @@
{% extends "base.html" %}
{% load static from staticfiles %}
{% load mirror_status %}
+{% load flags %}
{% block title %}Arch Linux - Mirror Status{% if tier != None %} - Tier {{ tier }}{% endif %}{% endblock %}
+{% block head %}<link rel="stylesheet" type="text/css" href="{% static "flags/fam.css" %}" media="screen, projection" />{% endblock %}
+
{% block content %}
<div id="mirrorstatus" class="box">
<h2>Mirror Status{% if tier != None %} - Tier {{ tier }}{% endif %}</h2>
@@ -88,7 +91,7 @@
{% spaceless %}<tr class="{% cycle 'odd' 'even' %}">
<td>{{ log.url__url }}</td>
<td>{{ log.url__protocol__protocol }}</td>
- <td class="country">{% if log.country %}<img src="{{ log.country.flag }}" alt=""/> {% endif %}{{ log.country.name }}</td>
+ <td class="country">{% country_flag log.country %}{{ log.country.name }}</td>
<td class="wrap">{{ log.error|linebreaksbr }}</td>
<td>{{ log.last_occurred|date:'Y-m-d H:i' }}</td>
<td>{{ log.error_count }}</td>
diff --git a/templates/mirrors/status_table.html b/templates/mirrors/status_table.html
index c7394de6..2dd7ef49 100644
--- a/templates/mirrors/status_table.html
+++ b/templates/mirrors/status_table.html
@@ -1,4 +1,5 @@
{% load mirror_status %}
+{% load flags %}
<table id="{{ table_id }}" class="results">
<thead>
<tr>
@@ -17,7 +18,7 @@
{% spaceless %}<tr class="{% cycle 'odd' 'even' %}">
<td>{{ m_url.url }}</td>
<td>{{ m_url.protocol }}</td>
- <td class="country">{% if m_url.country %}<img src="{{ m_url.country.flag }}" alt=""/> {% endif %}{{ m_url.country.name }}</td>
+ <td class="country">{% country_flag m_url.country %}{{ m_url.country.name }}</td>
<td>{{ m_url.completion_pct|percentage:1 }}</td>
<td>{{ m_url.delay|duration|default:'unknown' }}</td>
<td>{{ m_url.duration_avg|floatformat:2 }}</td>