diff --git a/apps/addons/templates/addons/home.html b/apps/addons/templates/addons/home.html index 496f524490..0c577ed63f 100644 --- a/apps/addons/templates/addons/home.html +++ b/apps/addons/templates/addons/home.html @@ -1,54 +1,18 @@ -{% extends "base_side_categories.html" %} +{% extends "impala/base_shared.html" %} {% block title %}{{ _('Add-ons for {0}')|f(request.APP.pretty) }}{% endblock %} {% block bodyclass %}home{% endblock %} -{% macro stats_text() %} - {% trans plural=downloads.count, count=downloads.count|numberfmt %} - {{ count }}add-on downloaded - {% pluralize %} - {{ count }}add-ons downloaded - {% endtrans %} -{% endmacro %} - -{% block site_stats %} -{% if downloads %} - {% if downloads.count > 0 %} -
- {% if settings.UNLINK_SITE_STATS %} - {{ stats_text() }} - {% else %} - - {{ stats_text() }} - - {% endif %} -
- {% endif %} -{% endif %} -{% endblock %} - {% set ext, extrss = url('browse.extensions'), url('browse.extensions.rss') %} {% set view_all = { 'featured': { - 'text': _('View all featured add-ons'), - 'link': url('browse.extensions')|urlparams(sort='featured'), + 'text': _('Featured Extensions'), 'feed': url('browse.featured.rss'), }, 'popular': { - 'text': _('View all popular add-ons'), - 'link': ext|urlparams(sort='popular'), - 'feed': extrss|urlparams(sort='popular'), - }, - 'new': { - 'text': _('View all newly created add-ons'), - 'link': ext|urlparams(sort='created'), - 'feed': extrss|urlparams(sort='created'), - }, - 'updated': { - 'text': _('View all recently updated add-ons'), - 'link': ext|urlparams(sort='updated'), - 'feed': extrss|urlparams(sort='updated'), + 'text': _('Popular Extensions'), + 'feed': extrss|urlparams(sort='users'), } } %} @@ -58,67 +22,68 @@ {# IT looks for this comment with nagios, don't remove it. #} -{% include "addons/collections_teaser.html" %} +
+ {{ side_nav(amo.ADDON_EXTENSION) }} +
-{% if is_mobile(request.APP) %} -

{{ _('Browse Mobile Add-ons') }}

-{% else %} -

{{ _('Browse Add-ons') }}

-{% endif %} - -
- + + {% endif %} + + {# Cache everything in one block since changes in each block are rare. #} + {% cache popular %} +
+

{{ _('Most Popular') }} + {{ _('All »') }} +

+ {{ popular|addon_toplist(src='hp-dl-mostpopular') }} +
+ +
+ {% if featured %} + + {% endif %} + {% if hotness %} +
+

{{ _('Up & Coming Extensions') }}

+ {{ hotness|addon_grid(src='hp-hc-upandcoming', + dl_src='hp-dl-upandcoming') }} +
+ {% endif %} + {% if personas %} + + {% endif %} + {% if collections %} + + {% endif %} +
+ {% endcache %} + -
- -

{{ _('Collections', 'addons_home_collections') }}

-

- {% trans %} - Collections are groups of related add-ons that anyone can create and share. - {% endtrans %} -

-

{{ _('Popular Collections') }}

- {% include "addons/collections_sidebar.html" %} -
{% endblock content %} -{% block under_categories %} - -
-

{{ _('Build a {0} Add-on')|f(request.APP.pretty) }}

-

{{ _('Find all the tools and resources you need to make your first add-on.') }}

-

{{ _('Visit the Developer Hub') }}

-
-{% endblock %} - {% block extrahead %} {% for feed in view_all.itervalues() %} - -
- {{ side_nav(amo.ADDON_EXTENSION) }} -
- -
- {% if request.APP == amo.FIREFOX %} -
-
-
    -
-
-
- {% endif %} - - {# Cache everything in one block since changes in each block are rare. #} - {% cache popular %} -
-

{{ _('Most Popular') }} - {{ _('All »') }} -

- {{ popular|addon_toplist(src='hp-dl-mostpopular') }} -
- -
- {% if featured %} - - {% endif %} - {% if hotness %} -
-

{{ _('Up & Coming Extensions') }}

- {{ hotness|addon_grid(src='hp-hc-upandcoming', - dl_src='hp-dl-upandcoming') }} -
- {% endif %} - {% if personas %} - - {% endif %} - {% if collections %} - - {% endif %} -
- {% endcache %} -
- -{% endblock content %} - -{% block extrahead %} -{% for feed in view_all.itervalues() %} - -{% endfor %} -{% endblock %} diff --git a/apps/addons/views.py b/apps/addons/views.py index f926c6c2de..4ac7ea0b24 100644 --- a/apps/addons/views.py +++ b/apps/addons/views.py @@ -357,7 +357,7 @@ def home(request): hotness = base.exclude(id__in=frozen).order_by('-hotness')[:18] personas = Addon.objects.featured(request.APP, request.LANG, amo.ADDON_PERSONA)[:18] - return jingo.render(request, 'addons/impala/home.html', + return jingo.render(request, 'addons/home.html', {'popular': popular, 'featured': featured, 'hotness': hotness, 'personas': personas, 'src': 'homepage', 'collections': collections})