Skip to content

Commit

Permalink
Review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgibson committed Nov 1, 2024
1 parent 51de894 commit 0189c06
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 deletions.
15 changes: 9 additions & 6 deletions bedrock/firefox/templates/firefox/all/download.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,15 @@ <h2 {% if not (product and platform and locale) %} class="c-step-name t-step-dis
</a>
</p>
{% endif %}
<p class="c-step-download mzp-u-body-sm">{{ ftl('firefox-all-note-unsupported') }}</p>
<p>
<a href="{{ download_esr_115_url }}" class="download-link mzp-c-button mzp-t-product mzp-t-secondary mzp-t-xl c-download-button" data-download-version="{{ platform }}" data-cta-text="Download Now">
{{ ftl('firefox-all-download-esr-115') }} {{ icon_download|safe }}
</a>
</p>
{# ESR 115 issue: 15083 #}
{% if download_esr_115_url %}
<p class="c-step-download mzp-u-body-sm">{{ ftl('firefox-all-note-unsupported') }}</p>
<p>
<a href="{{ download_esr_115_url }}" class="download-link mzp-c-button mzp-t-product mzp-t-secondary mzp-t-xl c-download-button" data-download-version="{{ platform }}" data-cta-text="Download Now">
{{ ftl('firefox-all-download-esr-115') }} {{ icon_download|safe }}
</a>
</p>
{% endif %}
{% else %}
{# All other desktop releases #}
<p class="c-step-download">
Expand Down
17 changes: 10 additions & 7 deletions bedrock/firefox/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,13 +337,16 @@ class MobileRelease:
context.update(
download_url=download_url,
)
if product_slug == "desktop-esr":
download_esr_115_url = list(filter(lambda b: b["locale"] == locale, firefox_desktop.get_filtered_full_builds("esr115")))[0]["platforms"][
platform
]["download_url"]
context.update(
download_esr_115_url=download_esr_115_url,
)
try:
if product_slug == "desktop-esr":
download_esr_115_url = list(filter(lambda b: b["locale"] == locale, firefox_desktop.get_filtered_full_builds("esr115")))[0][
"platforms"
][platform]["download_url"]
context.update(
download_esr_115_url=download_esr_115_url,
)
except IndexError:
pass
if product_slug == "desktop-esr" and esr_next_version:
try:
download_esr_next_url = list(filter(lambda b: b["locale"] == locale, firefox_desktop.get_filtered_full_builds("esr_next")))[0][
Expand Down

0 comments on commit 0189c06

Please sign in to comment.