{% extends "admin/change_list.html" %} {% load admin_static i18n %} {% block extrastyle %} {{ block.super }} {% if youtube_results %} {% endif %} {% endblock %} {% block javascripts %} {{ block.super }} {% if youtube_results %} {% endif %} {% endblock %} {% block object-tools-items %} {% include "filebrowser/include_exstensions.html" %} {{ block.super }} {% endblock %} {% block result_list %} {{ block.super }} {% if youtube_results %}
{% for youtube_result in youtube_results %} {% with youtube_result.result as youtube %} {% with youtube_result.form as youtube_form %} {% endwith %} {% endwith %} {% empty %} {% endfor %}
{% if prev_page_token %} {% endif %} {% if next_page_token %} {% endif %}
Move to Library
Name
Preview
{{ youtube.snippet.title }} {% include "filebrowser/iframe.html" with link="https://youtube.com/embed/"|add:youtube.id.videoId width=240 height=180 %}
{% trans "No videos found" %}
{% endif %} {% endblock %} {% block content %} {{ block.super }} {# Need to move forms from youtube widget to diffrent place #} {# b'coz in results list they will be inside changelist form #} {% if youtube_results %} {% for youtube_result in youtube_results %} {% with youtube_result.result as youtube %} {% with youtube_result.form as youtube_form %}
{% csrf_token %} {{ youtube_form }}
{% endwith %} {% endwith %} {% endfor %} {% endif %} {% endblock %}