simplify contribution sources (bug #655857)
This commit is contained in:
Родитель
fb54e37b15
Коммит
508d5daae0
|
@ -64,7 +64,7 @@
|
|||
href="{{ addon.get_url_path() }}">{{ addon.name }}</a>
|
||||
</h3>
|
||||
<p>{{ addon.summary|truncate(80) }}</p>
|
||||
{{ install_button(addon, src='homepagepromo') }}
|
||||
{{ install_button(addon, src='browse') }}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
|
|
@ -208,7 +208,7 @@
|
|||
|
||||
{% if not addon.is_selfhosted() and version and show_actions %}
|
||||
<h3 id="releasenotes">{{ _('Release Notes', 'addons_display_release_notes') }}</h3>
|
||||
{{ version_detail(addon, version, src="addon-detail-version") }}
|
||||
{{ version_detail(addon, version, src="addon-detail") }}
|
||||
{% endif %}
|
||||
|
||||
{% if abuse_form %}
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
{% if page == "roadblock" and not addon.charity %}
|
||||
{% set msg = _('Before downloading this add-on, please consider supporting the '
|
||||
'development of this add-on by making a small contribution.') %}
|
||||
{% set src = "roadblock" %}
|
||||
{% else %}
|
||||
{% set msg = None %}
|
||||
{% endif %}
|
||||
|
|
|
@ -80,7 +80,7 @@
|
|||
<div class="addon-listing addon-listing-{{ filter.field }}">
|
||||
{% for key, addons in addon_sets.items() %}
|
||||
<div id="list-{{ key }}">
|
||||
{{ addon_listing_items_compact(addons, show_date=key, src='homepagebrowse') }}
|
||||
{{ addon_listing_items_compact(addons, show_date=key, src='browse') }}
|
||||
<div class="listing-footer">
|
||||
<a class="subscribe" href="{{ view_all[key]['feed'] }}">
|
||||
{{ _('Subscribe', 'addons_home_browse_subscribe') }}</a>
|
||||
|
|
|
@ -42,13 +42,13 @@
|
|||
<div id="addon-lists" class="slider">
|
||||
<div id="listing-featured" class="tab-pane selected">
|
||||
<ul id="list-featured" class="listview">
|
||||
{{ addon_listing_items_mobile(featured, src='homepagebrowse') }}
|
||||
{{ addon_listing_items_mobile(featured, src='browse') }}
|
||||
<li><a href="{{ url('browse.featured') }}">
|
||||
{{ _('View all Featured add-ons') }}</a></li>
|
||||
</ul>
|
||||
</div><div id="listing-popular" class="tab-pane">
|
||||
<ul id="list-popular" class="listview">
|
||||
{{ addon_listing_items_mobile(popular, sort='popular', src='homepagebrowse') }}
|
||||
{{ addon_listing_items_mobile(popular, sort='popular', src='browse') }}
|
||||
<li><a href="{{ url('browse.extensions')|urlparams(sort='popular') }}">
|
||||
{{ _('View all Popular add-ons') }}</a></li>
|
||||
</ul>
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
{% endif %}
|
||||
{% else %}
|
||||
{% if use_embedded %}
|
||||
<a href="{{ url('addons.detail', addon.slug) }}?src=direct#contribute-confirm" class="no-suggested-amount">{{ _('Support this add-on') }}</a>
|
||||
<a href="{{ url('addons.detail', addon.slug) }}?src=browse#contribute-confirm" class="no-suggested-amount">{{ _('Support this add-on') }}</a>
|
||||
{% else %}
|
||||
<a href="{{ base }}">{{ _('Support this add-on') }}</a>
|
||||
{% endif %}
|
||||
|
|
|
@ -126,7 +126,7 @@ def extension_detail(request, addon):
|
|||
'addons.detail', args=[addon.slug]))
|
||||
|
||||
# source tracking
|
||||
src = request.GET.get('src', 'addondetail')
|
||||
src = request.GET.get('src', 'addon-detail')
|
||||
|
||||
# get satisfaction only supports en-US
|
||||
lang = translation.to_locale(translation.get_language())
|
||||
|
@ -179,7 +179,7 @@ def impala_extension_detail(request, addon):
|
|||
'addons.detail', args=[addon.slug]))
|
||||
|
||||
# source tracking
|
||||
src = request.GET.get('src', 'addondetail')
|
||||
src = request.GET.get('src', 'addon-detail')
|
||||
|
||||
# get satisfaction only supports en-US
|
||||
lang = translation.to_locale(translation.get_language())
|
||||
|
@ -516,9 +516,9 @@ def developers(request, addon, page):
|
|||
if 'src' in request.GET:
|
||||
src = request.GET['src']
|
||||
else:
|
||||
src = {'developers': 'developers',
|
||||
'installed': 'meet-the-developer-post-install',
|
||||
'roadblock': 'meetthedeveloper_roadblock'}.get(page, None)
|
||||
src = {'developers': 'meet-developers',
|
||||
'installed': 'post-download',
|
||||
'roadblock': 'roadblock'}.get(page, None)
|
||||
|
||||
if addon.is_persona():
|
||||
raise http.Http404()
|
||||
|
|
|
@ -41,7 +41,7 @@ class UtilsTest(TestCase):
|
|||
d = api.utils.addon_to_dict(a)
|
||||
assert d['learnmore'].endswith('/addon/a3615/?src=api')
|
||||
d = api.utils.addon_to_dict(a, disco=True)
|
||||
u = '%s%s?src=discovery-personalrec' % (settings.SERVICES_URL,
|
||||
u = '%s%s?src=api' % (settings.SERVICES_URL,
|
||||
reverse('discovery.addons.detail', args=['a3615']))
|
||||
eq_(d['learnmore'], u)
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ def addon_to_dict(addon, disco=False):
|
|||
if disco:
|
||||
learnmore = settings.SERVICES_URL + reverse('discovery.addons.detail',
|
||||
args=[addon.slug])
|
||||
learnmore = urlparams(learnmore, src='discovery-personalrec')
|
||||
learnmore = urlparams(learnmore, src=src)
|
||||
else:
|
||||
learnmore = url(addon.get_url_path(), src=src)
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
{% cache addons %}
|
||||
<div class="featured listing">
|
||||
<div class="featured-inner">
|
||||
{{ addon_listing_items(addons, src="recommended") }}
|
||||
{{ addon_listing_items(addons, src="browse") }}
|
||||
</div>
|
||||
</div>
|
||||
{% endcache %}
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
<div class="addon-listing">
|
||||
<ul class="listview">
|
||||
{{ addon_listing_items_mobile(pager.object_list, src='search', sort=sort) }}
|
||||
{{ addon_listing_items_mobile(pager.object_list, src='browse', sort=sort) }}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{{ addon_listing_items(pager.object_list, show_date=sort, src='search') }}
|
||||
{{ addon_listing_items(pager.object_list, show_date=sort, src='browse') }}
|
||||
</div>
|
||||
|
||||
<div class="listing-footer">
|
||||
|
|
Загрузка…
Ссылка в новой задаче