Skip to content

Commit

Permalink
Revert "Factorize the nav template code in a template of its own"
Browse files Browse the repository at this point in the history
This reverts commit 832dbf6.

Blocks that are inside included templates aren't overriden (see
pallets/jinja#243)
  • Loading branch information
magopian committed Aug 17, 2015
1 parent b69f669 commit eee4e35
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 23 deletions.
24 changes: 23 additions & 1 deletion templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,29 @@
{% block site_header %}
{% include "tabzilla.html" %}
<div class="amo-header">
{% include "base_nav.html" %}
<nav id="aux-nav" role="navigation" class="menu-nav c">
<ul>
{% if not settings.READ_ONLY %}
{% include "impala/user_login.html" %}
{% endif %}
{% block aux_nav %}
<li>
<a href="#" id="other-apps"
title="{{ _('Find add-ons for other applications') }}">
{{ _('Other Applications') }}</a>
<ul class="other-apps">
{% for app in amo.APP_USAGE %}
{% if app != request.APP and app != amo.MOBILE %}
<li id="app-{{ app.short }}" class="{{ app.short }}">
<a href="{{ locale_url(app.short) }}">{{ app.pretty }}</a>
</li>
{% endif %}
{% endfor %}
</ul>
</li>
{% endblock aux_nav %}
</ul>
</nav>
{% block header_search %}
<div class="header-search" role="search">
{% block search_form %}
Expand Down
21 changes: 0 additions & 21 deletions templates/base_nav.html

This file was deleted.

22 changes: 21 additions & 1 deletion templates/impala/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,27 @@
{% block site_header %}
{% include "tabzilla.html" %}
<div class="amo-header">
{% include "base_nav.html" %}
<nav id="aux-nav" role="navigation" class="menu-nav c">
<ul>
{% if not settings.READ_ONLY %}
{% include "impala/user_login.html" %}
{% endif %}
{% block aux_nav %}
<li>
<a href="#" id="other-apps" title="{{ _('Find add-ons for other applications') }}">{{ _('Other Applications') }}</a>
<ul class="other-apps">
{% for app in amo.APP_USAGE %}
{% if app != request.APP and app != amo.MOBILE %}
<li id="app-{{ app.short }}" class="{{ app.short }}">
<a href="{{ locale_url(app.short) }}">{{ app.pretty }}</a>
</li>
{% endif %}
{% endfor %}
</ul>
</li>
{% endblock aux_nav %}
</ul>
</nav>
<div class="header-search" role="search">
{% block search_form %}
{# Get this in scope. #}
Expand Down

0 comments on commit eee4e35

Please sign in to comment.