{% load i18n wagtailadmin_tags %} {% include "wagtailadmin/shared/header.html" with title=title icon=icon merged=1 %} {# TODO: drop data-wmtabs and the tabs.js include when a better tabs framework is in place #} {# See https://github.com/wagtail/wagtail/issues/8408. #}
{% if uploadforms %} {# Both auth and video forms are powered by the same media form, so use one of them #} {% if uploadforms.video %} {{ uploadforms.video.media.js }} {{ uploadforms.video.media.css }} {% else %} {{ uploadforms.audio.media.js }} {{ uploadforms.audio.media.css }} {% endif %}
{# Using nice-padding and full width class until the modal header is restyled #}
{% trans "Search" as search_text %} {% include 'wagtailadmin/shared/tabs/tab_nav_link.html' with tab_id='search' title=search_text %} {% if uploadforms.audio %} {% trans "Upload Audio" as upload_audio_text %} {% if uploadforms.audio.errors and media_type == 'audio' %} {% include 'wagtailadmin/shared/tabs/tab_nav_link.html' with tab_id='upload-audio' title=upload_audio_text errors_count=uploadforms.audio.errors|length %} {% else %} {% include 'wagtailadmin/shared/tabs/tab_nav_link.html' with tab_id='upload-audio' title=upload_audio_text %} {% endif %} {% endif %} {% if uploadforms.video %} {% trans "Upload Video" as upload_video_text %} {% if uploadforms.video.errors and media_type == 'video' %} {% include 'wagtailadmin/shared/tabs/tab_nav_link.html' with tab_id='upload-video' title=upload_video_text errors_count=uploadforms.video.errors|length %} {% else %} {% include 'wagtailadmin/shared/tabs/tab_nav_link.html' with tab_id='upload-video' title=upload_video_text %} {% endif %} {% endif %}
{% endif %}
{% if uploadforms %} {% for form_type, uploadform in uploadforms.items %} {% endfor %} {% endif %}