diff --git a/helper.py b/helper.py
index 472762fd9..95b2a54a0 100644
--- a/helper.py
+++ b/helper.py
@@ -7,6 +7,8 @@
import json
import markdown
import re
+
+import product_details
import settings
import sys
import translate
@@ -470,6 +472,33 @@ def get_form_assembly_localization_url(ctx):
return "https://mozillafoundation.tfaforms.net/wForms/3.11/js/localization-{locale}.js?v=75513df1680ccc55e2c889a1b1dff356256982a6".format(locale=fa_locale)
+@jinja2.pass_context
+def get_outdated_versions(ctx):
+ """ Get a JSON str of versions and dates of the last released minor version for outdated versions. """
+ versions = product_details.thunderbird_desktop.list_releases()
+ last_stable_release = {}
+ last_safe_release = float(settings.LAST_SAFE_VERSION)
+
+ for version in versions:
+ # major is a float, minor is a string
+ major_version = version[0]
+ minor_versions = version[1]['minor']
+
+ if len(minor_versions) > 0:
+ last_version = minor_versions[-1]
+ else:
+ last_version = str(major_version)
+
+ # Don't include safe versions
+ if major_version >= last_safe_release:
+ continue
+
+ release_date = product_details.thunderbird_desktop.get_release_date(last_version)
+ last_stable_release[major_version] = release_date
+
+ return json.dumps(last_stable_release)
+
+
def is_calendarific_free_tier():
"""Returns if we're expecting to use the Calendarific free tier"""
try:
diff --git a/settings.py b/settings.py
index e3afda17d..adeb38637 100644
--- a/settings.py
+++ b/settings.py
@@ -170,6 +170,7 @@
'privacy.notices.websites': 'https://www.mozilla.org/privacy/websites/#data-tools',
'privacy.notices.thunderbird': 'https://www.mozilla.org/privacy/thunderbird/',
'support': 'https://support.mozilla.org/products/thunderbird/',
+ 'support.old-version-upgrade': 'https://support.mozilla.org/kb/upgrading-older-version-thunderbird',
'thunderbird.about': '/about',
'thunderbird.about.our-mission-statement': '/about#our-mission-statement',
'thunderbird.careers': '/careers',
@@ -387,3 +388,5 @@
'US': ('United States', 'en'),
'VN': ('Vietnam', 'vi'),
}
+
+LAST_SAFE_VERSION = 102
\ No newline at end of file
diff --git a/start-page/_base-resp.html b/start-page/_base-resp.html
index f7d280b91..fbb4c525e 100644
--- a/start-page/_base-resp.html
+++ b/start-page/_base-resp.html
@@ -10,6 +10,7 @@
{% filter striptags|e %}{% block title %}{% endblock %}{% endfilter %}
{{ l10n_css() }}
+ {% block additional_head %}{% endblock %}
diff --git a/start-page/outdated/index.html b/start-page/outdated/index.html
index 93aec03f9..94d35cf5b 100644
--- a/start-page/outdated/index.html
+++ b/start-page/outdated/index.html
@@ -1,81 +1,122 @@
{# This Source Code Form is subject to the terms of the Mozilla Public
- # License, v. 2.0. If a copy of the MPL was not distributed with this
- # file, You can obtain one at http://mozilla.org/MPL/2.0/. -#}
-
-
-
-
-
-
- {% block title %}{{ _('Your Thunderbird is Not Up-to-Date!') }}{% endblock %}
- {{ l10n_css() }}
-
-
-
-
-
-
-
-
{{ self.title() }}
-
{{ _('Your version, $vers, is no longer a supported Thunderbird release and hasn’t received updates in at least $mon months.') }}
{{ _('For more information, please check this support article on upgrading old versions.')|format(support_url='https://support.mozilla.org/en-US/products/thunderbird') }}
-
-
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/. -#}
+
+{% extends "_base-resp.html" %}
+
+{% block channel %}release{% endblock %}
+{% block title %}{{ _('Your Thunderbird is Not Up-to-Date!') }}{% endblock %}
+
+{% block additional_head %}
+
+{% endblock %}
+
+{% block main %}
+
+
+
{{ svg('warning') }} {{ self.title() }}
+
{{ _('Thunderbird $vers is no longer supported and hasn’t received security updates in at least $time.') }}
{{ _('For more information, please check this
+ support article on upgrading old versions.')|format(support_url=url('support.old-version-upgrade')) }}
+