added collection crumbs and related search (bug 735162)
This commit is contained in:
Родитель
6b11cf554a
Коммит
c7590f1c53
|
@ -2,6 +2,8 @@
|
|||
|
||||
{% set range = view.range %}
|
||||
|
||||
{% set c = collection if collection %}
|
||||
|
||||
{% block bodyclass %}
|
||||
statistics
|
||||
{{ 'waffle-site-events' if waffle.switch('site-events') else '' }}
|
||||
|
@ -17,8 +19,8 @@
|
|||
{# L10n: {0} is an add-on name, {1} is an app name (like Firefox) #}
|
||||
{% if addon %}
|
||||
{{ _('{0} :: Statistics Dashboard :: Add-ons for {1}')|f(addon.name, request.APP.pretty) }}
|
||||
{% elif collection %}
|
||||
{{ _('{0} :: Statistics Dashboard')|f(collection.name) }}
|
||||
{% elif c %}
|
||||
{{ _('{0} :: Statistics Dashboard')|f(c.name) }}
|
||||
{% else %}
|
||||
{{ _('Statistics Dashboard :: Add-ons for {0}')|f(request.APP.pretty) }}
|
||||
{% endif %}
|
||||
|
@ -74,8 +76,12 @@
|
|||
{{ impala_breadcrumbs([(addon.type_url(), amo.ADDON_TYPES[addon.type]),
|
||||
(addon.get_url_path(), addon.name),
|
||||
(link, _('Statistics'))]) }}
|
||||
{% elif c %}
|
||||
{{ impala_breadcrumbs([(url('collections.list'), _('Collections')),
|
||||
(url('collections.user', c.author.username), c.author.name),
|
||||
(c.get_url_path(), c.name), (None, _('Statistics'))]) }}
|
||||
{% else %}
|
||||
{{ impala_breadcrumbs([(link, _('Statistics'))]) if not collection }}
|
||||
{{ impala_breadcrumbs([(link, _('Statistics'))]) }}
|
||||
{% endif %}
|
||||
{# TODO: Replace above line with this --> once we serve the extension home. { breadcrumbs([(addon.type.get_url_path(), amo.ADDON_TYPES[addon.type_id])]) } #}
|
||||
<hgroup>
|
||||
|
@ -84,8 +90,8 @@
|
|||
{# L10n: {0} is an add-on name #}
|
||||
{{ _('Statistics for {0}')|f(addon.name) }}
|
||||
</h1>
|
||||
{% elif collection %}
|
||||
<h1>{{ _('Statistics for {0}')|f(collection.name) }}</h1>
|
||||
{% elif c %}
|
||||
<h1>{{ _('Statistics for {0}')|f(c.name) }}</h1>
|
||||
{% else %}
|
||||
<h1>
|
||||
{{ _('Statistics Dashboard') }}
|
||||
|
@ -100,8 +106,8 @@
|
|||
<div class="secondary">
|
||||
{% if addon %}
|
||||
{{ report_menu(request, report, obj=addon) }}
|
||||
{% elif collection %}
|
||||
{{ report_menu(request, report, obj=collection) }}
|
||||
{% elif c %}
|
||||
{{ report_menu(request, report, obj=c) }}
|
||||
{% else %}
|
||||
{{ report_menu(request, report) }}
|
||||
{% endif %}
|
||||
|
|
|
@ -519,9 +519,9 @@ def collection_report(request, username, slug, report):
|
|||
c = get_collection(request, username, slug)
|
||||
stats_base_url = c.stats_url()
|
||||
view = get_report_view(request)
|
||||
|
||||
return jingo.render(request, 'stats/reports/%s.html' % report,
|
||||
{'collection': c,
|
||||
'search_cat': 'collections',
|
||||
'report': report,
|
||||
'view': view,
|
||||
'username': username,
|
||||
|
|
Загрузка…
Ссылка в новой задаче