From 116751e4bab183b3cca93ab13f7f4f21c752be4e Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 24 Apr 2012 23:22:23 -0500 Subject: Rename mirror country fields to country_old in prep for normalization We're going to move to using ISO 2 character codes via django countries, so start by moving the old data out of the way first. Signed-off-by: Dan McGee --- templates/public/download.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'templates/public') diff --git a/templates/public/download.html b/templates/public/download.html index 67c70be1..fbadb7c0 100644 --- a/templates/public/download.html +++ b/templates/public/download.html @@ -160,9 +160,9 @@ {% for mirror_url in mirror_url_list %} - {% ifchanged mirror_url.mirror.country %} + {% ifchanged mirror_url.mirror.country_old %} - {{mirror_url.mirror.country}} + {{mirror_url.mirror.country_old}} {% endifchanged %} {% ifchanged mirror_url.mirror.name %} -- cgit v1.2.3-2-g168b From 640e0f58645a7fd07f3c6185d9583b4d218e2468 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Wed, 25 Apr 2012 01:32:57 -0500 Subject: Finish django countries implementation * Add a migration to drop the old countries field. * Update all templates/views/utility methods to point at the new country field and dereference it as necessary. * Add the flags images to a few views where it makes sense. * Cleanup the download page layout quite a bit. * Bump the mirror status JSON version to 3; add country_code attribute. Signed-off-by: Dan McGee --- templates/public/download.html | 43 ++++++++++++++++-------------------------- 1 file changed, 16 insertions(+), 27 deletions(-) (limited to 'templates/public') diff --git a/templates/public/download.html b/templates/public/download.html index fbadb7c0..4d75268a 100644 --- a/templates/public/download.html +++ b/templates/public/download.html @@ -77,7 +77,7 @@ Download - Downloads and installs packages versions via FTP for absolute freshness. + Downloads and installs packages versions via mirrors for absolute freshness. @@ -131,10 +131,10 @@ title="Release Engineering ISO feedback">Feedback -

HTTP/FTP Direct Downloads

+

HTTP Direct Downloads

In addition to the BitTorrent links above, install images can also be - downloaded via HTTP or FTP from the mirror sites listed below. Please + downloaded via HTTP from the mirror sites listed below. Please ensure the download image matches the checksum from the md5sums.txt or sha1sums.txt file in the same directory as the image.

@@ -150,30 +150,19 @@ {% cache 600 download-mirrors %} - - - - - - - - - - - - -

Server Location

Download

- {% for mirror_url in mirror_url_list %} - {% ifchanged mirror_url.mirror.country_old %} -
{{mirror_url.mirror.country_old}} - {% endifchanged %} - {% ifchanged mirror_url.mirror.name %} -
{{mirror_url.mirror.name}} - {% endifchanged %} - {{mirror_url.protocol.protocol|upper}} - {% endfor %} -
+
+ {% regroup mirror_urls by real_country as grouped_urls %} + {% for country in grouped_urls %} + {% if country.grouper %}
{{ country.grouper.name }}
+ {% else %}
Worldwide
{% endif %} + + {% endfor %} +
{% endcache %} {% endwith %} -- cgit v1.2.3-2-g168b From 9616aec563baff19898c5a3185bc2011734544cb Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Thu, 26 Apr 2012 12:05:57 -0500 Subject: Add empty 'alt' attribute for all country flag images These are all used purely for decoration, and the country name itself is right next to the flag image, so we can safely mark these as "invisible" to screen readers, text browsers, etc. Signed-off-by: Dan McGee --- templates/public/download.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'templates/public') diff --git a/templates/public/download.html b/templates/public/download.html index 4d75268a..f57e565a 100644 --- a/templates/public/download.html +++ b/templates/public/download.html @@ -153,7 +153,7 @@
{% regroup mirror_urls by real_country as grouped_urls %} {% for country in grouped_urls %} - {% if country.grouper %}
{{ country.grouper.name }}
+ {% if country.grouper %}
{{ country.grouper.name }}
{% else %}
Worldwide
{% endif %}
    {% for mirror_url in country.list %} -- cgit v1.2.3-2-g168b From 104aec272669e496b8c6892d3437fb8412960595 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Thu, 26 Apr 2012 12:47:52 -0500 Subject: Add migration to auto-populate developer countries, display flags Add a quick and dirty migration to derive country info from the developer-provided timezone, and display the flag next to the location if we have it available on the clocks and developer profiles pages. Signed-off-by: Dan McGee --- templates/public/developer_list.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'templates/public') diff --git a/templates/public/developer_list.html b/templates/public/developer_list.html index 83c62952..37b35b82 100644 --- a/templates/public/developer_list.html +++ b/templates/public/developer_list.html @@ -51,7 +51,7 @@ {% if prof.yob %}{{ prof.yob }}{% endif %} Location: - {{ prof.location }} + {% if dev.userprofile.country %}{{ dev.userprofile.country.name }} {% endif %}{{ prof.location }} Languages: {{ prof.languages }} -- cgit v1.2.3-2-g168b From 5f22f4266cd978b4fd80cafb2201e39acaeef3fc Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Thu, 26 Apr 2012 14:17:03 -0500 Subject: Developer list styles updates * Make the developer name more prominent in dividing the blocks * Reduce the in-your-faceness of the elements in every section * Other small tweaks Signed-off-by: Dan McGee --- templates/public/developer_list.html | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'templates/public') diff --git a/templates/public/developer_list.html b/templates/public/developer_list.html index 37b35b82..00d93a50 100644 --- a/templates/public/developer_list.html +++ b/templates/public/developer_list.html @@ -18,11 +18,9 @@ +

    {{ dev.get_full_name }}{% if prof.latin_name %} ({{ prof.latin_name}}){% endif %}

    - - - -- cgit v1.2.3-2-g168b From fbbcc8534a25d3e78ef3a319c8aeb127bc5085f0 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Thu, 26 Apr 2012 14:44:52 -0500 Subject: Add hover header links to the developer profiles pages This is a lot like you can see in the Python API documentation, and makes it easy to copy a link to a given place on a page. Signed-off-by: Dan McGee --- templates/public/developer_list.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'templates/public') diff --git a/templates/public/developer_list.html b/templates/public/developer_list.html index 00d93a50..376ab433 100644 --- a/templates/public/developer_list.html +++ b/templates/public/developer_list.html @@ -17,8 +17,8 @@ Image for {{ prof.alias }}
    Name:{{ dev.get_full_name }}{% if prof.latin_name %} ({{ prof.latin_name}}){% endif %}
    Alias: {{ prof.alias }}
    - -

    {{ dev.get_full_name }}{% if prof.latin_name %} ({{ prof.latin_name}}){% endif %}

    +

    {{ dev.get_full_name }}{% if prof.latin_name %} ({{ prof.latin_name}}){% endif %} + ΒΆ

    -- cgit v1.2.3-2-g168b
    Alias: