{% if has_listed_versions %}

{{ distro_tag(amo.RELEASE_CHANNEL_LISTED)}} {{ _('Listing visibility') }}

{% set owner = check_addon_ownership(request, addon, dev=True) %}

{% if not waffle.switch('mixed-listed-unlisted') %} {% endif %}
{% set latest_listed_version=addon.find_latest_version(channel=amo.RELEASE_CHANNEL_LISTED) %} {% set current_version=addon.current_version %} {% if latest_listed_version or current_version %}

{{ distro_tag(amo.RELEASE_CHANNEL_LISTED)}} {{ _('Listed versions') }}

{% endif %} {% if current_version %}
{{ version_details(current_version, full_info=(not latest_listed_version or latest_listed_version == current_version)) }}
{{ _('Currently on AMO') }} {{ _('Status') }} {{ _('Validation') }} {{ _('Delete/Disable') }}
{% endif %} {% if latest_listed_version and latest_listed_version != current_version %}
{{ version_details(latest_listed_version, full_info=True) }}
{{ _('Next version of this add-on') }} {{ _('Status') }} {{ _('Validation') }} {{ _('Delete/Disable') }}
{% endif %}

{{ _('Older versions') }}

{% else %} {% if not waffle.switch('mixed-listed-unlisted') %}

{{ _('Why can\'t I switch to Listed?') }}

{{ _('Due to technical limitations, you need to delete your entire add-on and resubmit it using this AMO account in order to switch your add-on to listed. The process is described in detail in this documentation.').format( link='https://developer.mozilla.org/en-US/Add-ons/Distribution') }}

{% endif %}

{{ _('All versions') }}

{% endif %}
{% if addon.status != amo.STATUS_DISABLED %}{# i.e. Admin disabled #}
{% if waffle.switch('step-version-upload') %} {% set version_upload_url = url('devhub.submit.version', addon.slug) %} {% else %} {% set version_upload_url = '#' %} {% endif %} {{ _('Upload a New Version') }}
{% endif %} {% for version in versions.object_list %} {% if version != current_version and version != latest_listed_version %} {{ version_details(version) }} {% endif %} {% endfor %}
{{ _('Version') }} {{ _('Status') }} {{ _('Validation') }} {{ _('Delete/Disable') }}
{% if versions.paginator.num_pages > 1 %} {% endif %}
{% if check_addon_ownership(request, addon) and addon.can_be_deleted() %}

{{ _('Delete Add-on') }}

{% trans %} Deleting your add-on will permanently delete all versions and files you have submitted for this add-on, listed or not. The add-on ID will continue to be linked to your account, so others won't be able to submit versions using the same ID. {% endtrans %}

{{ _('Delete Add-on') }}
{% endif %}