{% if versions %}

<select onChange="window.location.href=this.value">
    <optgroup label="Releases">
        {%- for item in versions.releases %}
        <option
            value="{{ item.url|replace(latest_version.name, 'latest') }}"
            {% if item.name == current_version.name %}
            selected
            {% endif %}
        >
            {{ item.name }}
            {% if item.name == latest_version.name %}
            (latest)
            {% endif %}
        </option>
        {%- endfor %}
    </optgroup>
    <optgroup label="Development">
        {%- for item in versions.in_development %}
        <option
            value="{{ item.url }}"
            {% if item.name == current_version.name %}
            selected
            {% endif %}
        >
            {{ item.name }}
        </option>
        {%- endfor %}
    </optgroup>
</select>

{% endif %}
