{# Steps below HAS_ADDON don't have an addon associated. Once we have an addon we can't go back below that line. #} {% set HAS_ADDON = 3 %} {# List of steps: (text, class). A class of 'all' means the step is relevant to listed or unlisted addons, a class of 'listed' means it's only relevant to listed addons, not unlisted ones. #} {% set NAV = ((_('Getting Started'), 'all'), (_('Upload your add-on'), 'all'), (_('Describe your add-on'), 'all'), (_('Add images'), 'listed'), (_('Select a license'), 'listed'), (_("You're done!"), 'all')) %} {% set MAX = 6 %} {% set BASE = 'devhub.submit.%s' %}

{{ _('Submission Process') }}

    {% for text, class in NAV %}
  1. {% if step.current < HAS_ADDON %} {# 1. Don't link to future steps. 2. If step 1 is complete (agreement accepted), don't link to it. #} {% if loop.index > step.current or (loop.index == 1 and step.current > 1)%} {{ text }} {% else %} {{ text }} {% endif %} {% else %} {# 1. We have an addon, so don't link to non-addon steps. 2. Don't link steps above the max step the addon has reached. 3. If step.max == MAX the addon is done, so we only show the final page. #} {% if loop.index < HAS_ADDON or loop.index > step.max or step.max == MAX %} {{ text }} {% else %} {{ text }} {% endif %} {% endif %}
  2. {% endfor %}