mirror of
https://gitlab.com/animath/si/plateforme-corres2math.git
synced 2025-06-21 15:18:23 +02:00
Render solution video in a modal
This commit is contained in:
@ -26,15 +26,11 @@
|
||||
{% if current_phase.phase_number == 1 or participation.solution.link == "" %}
|
||||
<button class="btn btn-primary" data-toggle="modal" data-target="#uploadVideoModal">{% trans "Upload" %}</button>
|
||||
{% endif %}
|
||||
{% if participation.solution.link %}
|
||||
<button class="btn btn-info" data-toggle="modal" data-target="#displayVideoModal">{% trans "Display" %}</button>
|
||||
{% endif %}
|
||||
</dd>
|
||||
</dl>
|
||||
{% if participation.solution.platform == "youtube" %}
|
||||
{% include "participation/youtube_iframe.html" with youtube_code=participation.solution.youtube_code %}
|
||||
{% elif participation.solution %}
|
||||
<div class="alert alert-danger">
|
||||
{% trans "This video platform is not supported yet." %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -43,6 +39,9 @@
|
||||
{% trans "Upload" as modal_button %}
|
||||
{% url "participation:upload_video" pk=participation.solution_id as modal_action %}
|
||||
{% include "base_modal.html" with modal_id="uploadVideo" %}
|
||||
{% trans "Display solution" as modal_title %}
|
||||
{% trans "This video platform is not supported yet." as unsupported_platform %}
|
||||
{% include "base_modal.html" with modal_id="displayVideo" modal_action="" modal_button="" modal_additional_class="modal-lg" modal_content=participation.solution.as_iframe|default:unsupported_platform %}
|
||||
{% endblock %}
|
||||
|
||||
{% block extrajavascript %}
|
||||
|
Reference in New Issue
Block a user