give everything a build id
This commit is contained in:
Родитель
822f7d7a8c
Коммит
c865421e09
|
@ -18,7 +18,7 @@
|
|||
<h2>{{ _('What are Add-ons?') }}</h2>
|
||||
<div class="column-wrapper">
|
||||
<div class="first column">
|
||||
<h3><img src="{{ MEDIA_URL }}img/amo2009/illustrations/extras.gif"
|
||||
<h3><img src="{{ media('img/amo2009/illustrations/extras.gif') }}"
|
||||
alt="{{ _('Extras') }}">
|
||||
</h3>
|
||||
<p>
|
||||
|
@ -29,7 +29,7 @@
|
|||
</p>
|
||||
</div>
|
||||
<div class="column">
|
||||
<h3><img src="{{ MEDIA_URL }}img/amo2009/illustrations/themes.gif"
|
||||
<h3><img src="{{ media('img/amo2009/illustrations/themes.gif') }}"
|
||||
alt="{{ _('Themes') }}">
|
||||
</h3>
|
||||
<p>
|
||||
|
@ -40,7 +40,7 @@
|
|||
</p>
|
||||
</div>
|
||||
<div class="column">
|
||||
<h3><img src="{{ MEDIA_URL }}img/amo2009/illustrations/install.gif"
|
||||
<h3><img src="{{ media('img/amo2009/illustrations/install.gif') }}"
|
||||
alt="{{ _('Install') }}">
|
||||
</h3>
|
||||
<p>
|
||||
|
|
|
@ -96,7 +96,7 @@
|
|||
|
||||
<div class="secondary collections-sidebar">
|
||||
<img alt="" width="100" height="125"
|
||||
src="{{ MEDIA_URL }}img/amo2009/illustrations/logo-collections-100x125.png">
|
||||
src="{{ media('img/amo2009/illustrations/logo-collections-100x125.png') }}">
|
||||
<h3><a href="{{ url('collections.list') }}">{{ _('Collections', 'addons_home_collections') }}</a></h3>
|
||||
<p>
|
||||
{% trans %}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
{% set appicon = 'firefox' if request.APP == amo.MOBILE else request.APP.short %}
|
||||
<a href="{{ url('home') }}"
|
||||
title="{{ _('Return to the {0} Add-ons homepage')|f(request.APP.pretty) }}">
|
||||
<img alt="{{ request.APP.pretty }}" src="{{ MEDIA_URL + 'img/zamboni/app_icons/' + appicon + '.png' }}">
|
||||
<img alt="{{ request.APP.pretty }}" src="{{ media('img/zamboni/app_icons/' + appicon + '.png') }}">
|
||||
{{ _('Mobile Add-ons') }}
|
||||
</a>
|
||||
</h1>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{# Bug 595561: testing QR codes for a couple addons.
|
||||
Image path is temporary for testing. #}
|
||||
<div id="addon-qr-code">
|
||||
<img src="{{ MEDIA_URL }}img/zamboni/qr_code_test/{{ addon.id }}.jpg"
|
||||
<img src="{{ media('img/zamboni/qr_code_test/' + addon.id + '.jpg') }}"
|
||||
alt="{{ _("QR code for add-on") }}" />
|
||||
{{ _("Want {0} on your mobile Firefox? Scan this QR code to install directly
|
||||
to your phone. (You'll need a QR reader. Search your phone's marketplace if
|
||||
|
|
|
@ -333,3 +333,16 @@ def recaptcha(context, form):
|
|||
@register.inclusion_tag('amo/mobile/sort_by.html')
|
||||
def mobile_sort_by(base_url, options, selected):
|
||||
return locals()
|
||||
|
||||
|
||||
@register.function
|
||||
@jinja2.contextfunction
|
||||
def media(context, url):
|
||||
"""Get a MEDIA_URL link with a cache buster querystring."""
|
||||
if url.endswith('.js'):
|
||||
build = context['BUILD_ID_JS']
|
||||
elif url.endswith('.css'):
|
||||
build = context['BUILD_ID_CSS']
|
||||
else:
|
||||
build = context['BUILD_ID_IMG']
|
||||
return context['MEDIA_URL'] + utils.urlparams(url, b=build)
|
||||
|
|
|
@ -18,7 +18,7 @@ allowed for these applications.
|
|||
{% for app in apps %}
|
||||
<div class="appversion prose">
|
||||
<h3>
|
||||
<img src="{{ MEDIA_URL }}img/amo2009/app-icons/small/{{ app.short }}.png">
|
||||
<img src="{{ media('img/amo2009/app-icons/small/' + app.short + '.png') }}">
|
||||
{{ app.pretty }}
|
||||
</h3>
|
||||
<ul>
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
<div>
|
||||
<h3>{{ _('Add-on Collector') }}</h3>
|
||||
<p>{% trans app=request.APP.pretty %}
|
||||
<img id="addon-collector-logo" src="{{ MEDIA_URL }}img/amo2009/illustrations/logo-collections-download-146x159.png"
|
||||
<img id="addon-collector-logo" src="{{ media('img/amo2009/illustrations/logo-collections-download-146x159.png') }}"
|
||||
width="146" height="159">
|
||||
Get updates on followed collections or manage your own collections directly
|
||||
from {{ app }} with this add-on.
|
||||
|
|
|
@ -129,5 +129,5 @@
|
|||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
<script src="{{ MEDIA_URL }}js/zamboni/themes.js"></script>
|
||||
<script src="{{ media('js/zamboni/themes.js') }}"></script>
|
||||
{% endblock %}
|
||||
|
|
|
@ -105,7 +105,7 @@
|
|||
{% endblock %}
|
||||
|
||||
{% block footer_extras %}
|
||||
<img class="footerlogo" src="{{ MEDIA_URL }}img/amo2009/developers/hub-logo-footer.png" alt="">
|
||||
<img class="footerlogo" src="{{ media('img/amo2009/developers/hub-logo-footer.png') }}" alt="">
|
||||
{% endblock %}
|
||||
|
||||
{% block outer_content %}{% include "messages.html" %}{% endblock %}
|
||||
|
|
|
@ -6,5 +6,5 @@
|
|||
value="{{ search_form.q.data or '' }}"
|
||||
placeholder="{{ _('Search developer documentation') }}">
|
||||
</span>
|
||||
<input type="image" class="submit go-button" src="{{ settings.MEDIA_URL }}img/zamboni/global/btn-search.png" title="{{ _('Search') }}">
|
||||
<input type="image" class="submit go-button" src="{{ media('img/zamboni/global/btn-search.png') }}" title="{{ _('Search') }}">
|
||||
</form>
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
data-recs-url="{{ url('discovery.recs') }}">
|
||||
<header>
|
||||
<section id="intro">
|
||||
<h1><img src="{{ MEDIA_URL }}img/zamboni/discovery_pane/logo-addons.png"
|
||||
<h1><img src="{{ media('img/zamboni/discovery_pane/logo-addons.png') }}"
|
||||
width="87" height="82">{{ _('What are Add-ons?') }}</h1>
|
||||
<p>
|
||||
{% trans %}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block extrahead %}
|
||||
<link rel="stylesheet" href="{{ MEDIA_URL }}css/zamboni/nick.css">
|
||||
<link rel="stylesheet" href="{{ media('css/zamboni/nick.css') }}">
|
||||
<link rel="stylesheet"
|
||||
href="{{ MEDIA_URL }}css/zamboni/jquery-ui/custom-1.7.2.css">
|
||||
href="{{ media('css/zamboni/jquery-ui/custom-1.7.2.css') }}">
|
||||
{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
|
@ -80,10 +80,10 @@ Nick's Special Featured Add-ons Page for {{ request.APP.pretty }}
|
|||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
<script src="{{ MEDIA_URL }}js/zamboni/jquery-ui/custom-1.7.2.min.js"></script>
|
||||
<script src="{{ MEDIA_URL }}js/zamboni/jquery.sparkline.min.js"></script>
|
||||
<script src="{{ MEDIA_URL }}js/zamboni/jquery.tablesorter.min.js"></script>
|
||||
<script src="{{ MEDIA_URL }}js/zamboni/nick.js"></script>
|
||||
<script src="{{ media('js/zamboni/jquery-ui/custom-1.7.2.min.js') }}"></script>
|
||||
<script src="{{ media('js/zamboni/jquery.sparkline.min.js') }}"></script>
|
||||
<script src="{{ media('js/zamboni/jquery.tablesorter.min.js') }}"></script>
|
||||
<script src="{{ media('js/zamboni/nick.js') }}"></script>
|
||||
<script>
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
{% set range = view.range %}
|
||||
|
||||
{% block extrahead %}
|
||||
<link rel="stylesheet" href="{{ MEDIA_URL }}css/legacy/stats.css"/>
|
||||
<link rel="stylesheet" href="{{ media('css/legacy/stats.css') }}"/>
|
||||
<link rel="stylesheet"
|
||||
href="{{ MEDIA_URL }}css/zamboni/jquery-ui/custom-1.7.2.css">
|
||||
href="{{ media('css/zamboni/jquery-ui/custom-1.7.2.css') }}">
|
||||
{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
|
@ -124,14 +124,14 @@
|
|||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
<script src="{{ MEDIA_URL }}js/zamboni/jquery-datepicker.js"></script>
|
||||
<script src="{{ MEDIA_URL }}js/zamboni/highcharts.src.js"></script>
|
||||
<script src="{{ media('js/zamboni/jquery-datepicker.js') }}"></script>
|
||||
<script src="{{ media('js/zamboni/highcharts.src.js') }}"></script>
|
||||
<!--[if IE]>
|
||||
<script src="{{ MEDIA_URL }}js/excanvas.compiled.js" type="text/javascript"></script>
|
||||
<script src="{{ media('js/excanvas.compiled.js" type="text/javascript') }}"></script>
|
||||
<![endif]-->
|
||||
<script src="{{ MEDIA_URL }}js/zamboni/stats/csv_keys.js"></script>
|
||||
<script src="{{ MEDIA_URL }}js/zamboni/stats/helpers.js"></script>
|
||||
<script src="{{ MEDIA_URL }}js/zamboni/stats/stats_manager.js"></script>
|
||||
<script src="{{ MEDIA_URL }}js/zamboni/stats/stats_tables.js"></script>
|
||||
<script src="{{ MEDIA_URL }}js/zamboni/stats/stats.js"></script>
|
||||
<script src="{{ media('js/zamboni/stats/csv_keys.js') }}"></script>
|
||||
<script src="{{ media('js/zamboni/stats/helpers.js') }}"></script>
|
||||
<script src="{{ media('js/zamboni/stats/stats_manager.js') }}"></script>
|
||||
<script src="{{ media('js/zamboni/stats/stats_tables.js') }}"></script>
|
||||
<script src="{{ media('js/zamboni/stats/stats.js') }}"></script>
|
||||
{% endblock %}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
{% from 'includes/forms.html' import required %}
|
||||
{% block extrahead %}
|
||||
{{ super() }}
|
||||
<link rel="stylesheet" href="{{ MEDIA_URL }}css/zamboni/admin-django.css">
|
||||
<link rel="stylesheet" href="{{ media('css/zamboni/admin-django.css') }}">
|
||||
{% endblock %}
|
||||
|
||||
{% block title %}{{ page_title('Add Blacklisted E-mail Domains') }}{% endblock %}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
{% from 'includes/forms.html' import required %}
|
||||
{% block extrahead %}
|
||||
{{ super() }}
|
||||
<link rel="stylesheet" href="{{ MEDIA_URL }}css/zamboni/admin-django.css">
|
||||
<link rel="stylesheet" href="{{ media('css/zamboni/admin-django.css') }}">
|
||||
{% endblock %}
|
||||
|
||||
{% block title %}{{ page_title('Add Blacklisted Usernames') }}{% endblock %}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
{% block title %}{{ page_title(_('Account Settings')) }}{% endblock %}
|
||||
|
||||
{% block extrahead %}
|
||||
<link rel="stylesheet" href="{{ MEDIA_URL }}css/zamboni/translations/trans.css">
|
||||
<link rel="stylesheet" href="{{ media('css/zamboni/translations/trans.css') }}">
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
|
|
@ -8,14 +8,14 @@
|
|||
|
||||
{% block extrahead %}
|
||||
<link rel="stylesheet" media="screen,projection,tv"
|
||||
href="{{ MEDIA_URL }}css/zamboni/admin-mozilla.css">
|
||||
href="{{ media('css/zamboni/admin-mozilla.css') }}">
|
||||
<link rel="stylesheet" media="screen,projection,tv"
|
||||
href="{{ MEDIA_URL }}css/developers.css">
|
||||
<link rel="stylesheet" href="{{ MEDIA_URL }}css/zamboni/translations/trans.css">
|
||||
href="{{ media('css/developers.css') }}">
|
||||
<link rel="stylesheet" href="{{ media('css/zamboni/translations/trans.css') }}">
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
<script src="{{ MEDIA_URL }}js/zamboni/tabs.js"></script>
|
||||
<script src="{{ media('js/zamboni/tabs.js') }}"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block navbar %}
|
||||
|
|
|
@ -14,7 +14,7 @@ them. See admin.django_to_jinja for more details.
|
|||
|
||||
{% templatetag openblock %} block extrahead {% templatetag closeblock %}
|
||||
{% templatetag openvariable %} super() {% templatetag closevariable %}
|
||||
<link rel="stylesheet" href="{{ MEDIA_URL}}css/zamboni/admin-django.css">
|
||||
<link rel="stylesheet" href="{{ media('css/zamboni/admin-django.css') }}">
|
||||
{% block extrastyle %}{% endblock %}
|
||||
{% block extrahead %}{% endblock %}
|
||||
{% templatetag openblock %} endblock {% templatetag closeblock %}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<title>{% block title %}{{ _('Mozilla Add-ons') }}{% endblock %}</title>
|
||||
|
||||
<link rel="shortcut icon" type="image/x-icon"
|
||||
href="{{ MEDIA_URL}}img/favicon.ico">
|
||||
href="{{ media('img/favicon.ico') }}">
|
||||
|
||||
{% block rss_feed %}{% endblock %}
|
||||
|
||||
|
@ -19,12 +19,12 @@
|
|||
|
||||
{% block site_css %}
|
||||
{{ css('zamboni/css') }}
|
||||
<!--[if IE]><link rel="stylesheet" href="{{ MEDIA_URL }}css/legacy/ie.css"><![endif]-->
|
||||
<!--[if IE 7]><link rel="stylesheet" href="{{ MEDIA_URL }}css/legacy/ie7.css"><![endif]-->
|
||||
<!--[if IE]><link rel="stylesheet" href="{{ media('css/legacy/ie.css') }}"><![endif]-->
|
||||
<!--[if IE 7]><link rel="stylesheet" href="{{ media('css/legacy/ie7.css') }}"><![endif]-->
|
||||
{% endblock %}
|
||||
|
||||
{% block extrahead %}{% endblock %}
|
||||
<noscript><link rel="stylesheet" href="{{ MEDIA_URL }}css/legacy/nojs.css"></noscript>
|
||||
<noscript><link rel="stylesheet" href="{{ media('css/legacy/nojs.css') }}"></noscript>
|
||||
</head>
|
||||
<body class="html-{{ DIR }} {{ request.APP.short }} moz-header-slim {% block bodyclass %}{% endblock %}"
|
||||
data-app="{{ request.APP.short }}"
|
||||
|
@ -137,14 +137,14 @@
|
|||
<div id="footer" role="contentinfo">
|
||||
<div class="section">
|
||||
{% block footer_extras %}
|
||||
<img class="footerlogo" src="{{ MEDIA_URL }}img/zamboni/footer-logo-med.png" alt="">
|
||||
<img class="footerlogo" src="{{ media('img/zamboni/footer-logo-med.png') }}" alt="">
|
||||
{% endblock %}
|
||||
{% include "footer.html" %}
|
||||
</div> {# section #}
|
||||
</div> {# footer #}
|
||||
{% endblock %}
|
||||
{# Webtrends Stats Tracking #}
|
||||
<script defer src="{{ MEDIA_URL }}js/webtrends/webtrends-v0.1.js"></script>
|
||||
<script defer src="{{ media('js/webtrends/webtrends-v0.1.js') }}"></script>
|
||||
<noscript>
|
||||
<img id="DCSIMG" width="1" height="1"
|
||||
src="https://statse.webtrendslive.com/dcso6de4r0000082npfcmh4rf_4b1e/njs.gif?dcsuri=/nojavascript&WT.js=No&WT.tv=8.6.2" />
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
{% macro heading(text, icon) -%}
|
||||
<a href="{{ url('home') }}"
|
||||
title="{{ _('Return to the {0} Add-ons homepage')|f(request.APP.pretty) }}">
|
||||
{{ text|f(MEDIA_URL + 'img/zamboni/app_icons/' + icon + '.png')|safe }}</a>
|
||||
{{ text|f(media('img/zamboni/app_icons/' + icon + '.png'))|safe }}</a>
|
||||
{%- endmacro %}
|
||||
{% if request.APP == amo.FIREFOX %}
|
||||
{{ heading(_('<img alt="Firefox" src="{0}"> Add-ons'), 'firefox') }}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<title>{% block title %}{{ _('Mozilla Add-ons') }}{% endblock %}</title>
|
||||
|
||||
<link rel="shortcut icon" type="image/x-icon"
|
||||
href="{{ MEDIA_URL}}img/favicon.ico">
|
||||
href="{{ media('img/favicon.ico') }}">
|
||||
|
||||
{% block rss_feed %}{% endblock %}
|
||||
|
||||
|
@ -39,7 +39,7 @@
|
|||
{% set appicon = 'firefox' if request.APP == amo.MOBILE else request.APP.short %}
|
||||
<a href="{{ url('home') }}"
|
||||
title="{{ _('Return to the {0} Add-ons homepage')|f(request.APP.pretty) }}">
|
||||
<img alt="{{ request.APP.pretty }}" src="{{ MEDIA_URL + 'img/zamboni/app_icons/' + appicon + '.png' }}">
|
||||
<img alt="{{ request.APP.pretty }}" src="{{ media('img/zamboni/app_icons/' + appicon + '.png') }}">
|
||||
{{ _('Mobile Add-ons') }}
|
||||
</a>
|
||||
</h1>
|
||||
|
@ -64,7 +64,7 @@
|
|||
{% endblock %}
|
||||
{% block js %}{% endblock %}
|
||||
{# Webtrends Stats Tracking #}
|
||||
<script defer src="{{ MEDIA_URL }}js/webtrends/webtrends-v0.1.js"></script>
|
||||
<script defer src="{{ media('js/webtrends/webtrends-v0.1.js') }}"></script>
|
||||
<noscript>
|
||||
<img id="DCSIMG" width="1" height="1"
|
||||
src="https://statse.webtrendslive.com/dcso6de4r0000082npfcmh4rf_4b1e/njs.gif?dcsuri=/nojavascript&WT.js=No&WT.tv=8.6.2" />
|
||||
|
|
|
@ -8,5 +8,5 @@
|
|||
{{ search_form.cat }}
|
||||
</span>
|
||||
<input id="search-button" type="image" class="submit" title="{{ _('Search') }}"
|
||||
src="{{ settings.MEDIA_URL }}img/zamboni/global/btn-search.png">
|
||||
src="{{ media('img/zamboni/global/btn-search.png') }}">
|
||||
</form>
|
||||
|
|
Загрузка…
Ссылка в новой задаче