{#
Inserts a stepped progress indicator for the new package form. Each stage can
have one of three states, "uncomplete", "complete" and "active".

stages - A list of states for each of the three stages. Missing stages default
         to "uncomplete".

Example:

    {% snippet 'package/snippets/stages.html', stages=['active'] %}
    {% snippet 'package/snippets/stages.html', stages=['complete', 'active'] %}
    {% snippet 'package/snippets/stages.html', stages=['active', 'complete'] %}

#}
{% set s1 = stages[0] or 'active' %}
{% set s2 = stages[1] or 'uncomplete' %}
{% if s1 != 'uncomplete' %}{% set class = 'stage-1' %}{% endif %}
{% if s2 != 'uncomplete' %}{% set class = 'stage-2' %}{% endif %}

<ol class="stages {{ class }}">
  <li class="first {{ s1 }}">
    {% if s1 != 'complete' %}
      <span class="highlight">{{ _('Create ' + dataset_type) }}</span>
    {% else %}
      <button class="highlight" name="save" value="go-dataset" type="submit">{{ _('Create ' + dataset_type) }}</button>
    {% endif %}
  </li>
  <li class="last {{ s2 }}">
    {% if s2 != 'complete' %}
      <span class="highlight">{{ _('Add files') }}</span>
    {% else %}
      {% if s1 == 'active' %}
        {# stage 1 #}
        <button class="highlight" name="save" value="go-resources" type="submit">{{ _('Add files') }}</button>
      {% else %}
        {% link_for _('Add files'), named_route='dataset.new', class_="highlight" %}
      {% endif %}
    {% endif %}
  </li>
</ol>
