1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2025-02-06 12:13:01 +00:00

Send synthesis button

This commit is contained in:
Yohann D'ANELLO 2020-11-01 20:53:41 +01:00
parent 1392b50db1
commit 82f8d61eb7
2 changed files with 107 additions and 38 deletions

View File

@ -75,7 +75,15 @@
{% endblocktrans %} {% endblocktrans %}
</div> </div>
{% elif current_phase.phase_number == 4 %} {% elif current_phase.phase_number == 4 %}
{# TODO View synthesis #} <dl class="row">
<dt class="col-xl-5 text-right">{% trans "Synthesis from the other team:" %}</dt>
<dd class="col-sm-7"><a href="{{ participation.received_participation.synthesis.link|default:"#" }}"{% if participation.received_participation.synthesis.link %} target="_blank"{% endif %}>
{{ participation.received_participation.synthesis.link|default:novideo }}</a>
{% if participation.received_participation.synthesis.link %}
<button class="btn btn-info" data-toggle="modal" data-target="#displayOtherSynthesisModal">{% trans "Display" %}</button>
{% endif %}
</dd>
</dl>
{% endif %} {% endif %}
</div> </div>
</div> </div>
@ -99,7 +107,7 @@
<dd class="col-sm-7"><a href="{{ participation.received_participation.solution.link|default:"#" }}"{% if participation.received_participation.solution.link %} target="_blank"{% endif %}> <dd class="col-sm-7"><a href="{{ participation.received_participation.solution.link|default:"#" }}"{% if participation.received_participation.solution.link %} target="_blank"{% endif %}>
{{ participation.received_participation.solution.link|default:novideo }}</a> {{ participation.received_participation.solution.link|default:novideo }}</a>
{% if participation.received_participation.solution.link %} {% if participation.received_participation.solution.link %}
<button class="btn btn-info" data-toggle="modal" data-target="#displaySolutionModal">{% trans "Display" %}</button> <button class="btn btn-info" data-toggle="modal" data-target="#displayOtherSolutionModal">{% trans "Display" %}</button>
{% endif %} {% endif %}
</dd> </dd>
@ -137,7 +145,19 @@
{% endblocktrans %} {% endblocktrans %}
</div> </div>
{% elif current_phase.phase_number == 4 %} {% elif current_phase.phase_number == 4 %}
{# TODO Send synthesis #} <div id="solution-container">
<dl class="row">
{% trans "No video sent" as novideo %}
<dt class="col-sm-5 text-right">{% trans "Your synthesis of the exchange:" %}</dt>
<dd class="col-sm-7"><a href="{{ participation.synthesis.link|default:"#" }}"{% if participation.synthesis.link %} target="_blank"{% endif %}>
{{ participation.synthesis.link|default:novideo }}</a>
<button class="btn btn-primary" data-toggle="modal" data-target="#uploadSynthesisModal">{% trans "Upload" %}</button>
{% if participation.synthesis.link %}
<button class="btn btn-info" data-toggle="modal" data-target="#displaySynthesisModal">{% trans "Display" %}</button>
{% endif %}
</dd>
</dl>
</div>
{% endif %} {% endif %}
</dl> </dl>
</div> </div>
@ -162,6 +182,7 @@
{% trans "Upload" as modal_button %} {% trans "Upload" as modal_button %}
{% url "participation:upload_video" pk=participation.solution_id as modal_action %} {% url "participation:upload_video" pk=participation.solution_id as modal_action %}
{% include "base_modal.html" with modal_id="uploadSolution" %} {% include "base_modal.html" with modal_id="uploadSolution" %}
{% trans "Display solution" as modal_title %} {% trans "Display solution" as modal_title %}
{% trans "This video platform is not supported yet." as unsupported_platform %} {% trans "This video platform is not supported yet." as unsupported_platform %}
{% include "base_modal.html" with modal_id="displaySolution" modal_action="" modal_button="" modal_additional_class="modal-lg" modal_content=participation.solution.as_iframe|default:unsupported_platform %} {% include "base_modal.html" with modal_id="displaySolution" modal_action="" modal_button="" modal_additional_class="modal-lg" modal_content=participation.solution.as_iframe|default:unsupported_platform %}
@ -171,7 +192,7 @@
{% if participation.received_participation.solution.link %} {% if participation.received_participation.solution.link %}
{% trans "Display solution" as modal_title %} {% trans "Display solution" as modal_title %}
{% trans "This video platform is not supported yet." as unsupported_platform %} {% trans "This video platform is not supported yet." as unsupported_platform %}
{% include "base_modal.html" with modal_id="displaySolution" modal_action="" modal_button="" modal_additional_class="modal-lg" modal_content=participation.received_participation.solution.as_iframe|default:unsupported_platform %} {% include "base_modal.html" with modal_id="displayOtherSolution" modal_action="" modal_button="" modal_additional_class="modal-lg" modal_content=participation.received_participation.solution.as_iframe|default:unsupported_platform %}
{% endif %} {% endif %}
{% endif %} {% endif %}
@ -201,6 +222,25 @@
{% endwith %} {% endwith %}
{% endfor %} {% endfor %}
{% endif %} {% endif %}
{% if current_phase.phase_number >= 4 %}
{% if participation.received_participation.synthesis.link %}
{% trans "Display synthesis" as modal_title %}
{% trans "This video platform is not supported yet." as unsupported_platform %}
{% include "base_modal.html" with modal_id="displayOtherSynthesis" modal_action="" modal_button="" modal_additional_class="modal-lg" modal_content=participation.received_participation.synthesis.as_iframe|default:unsupported_platform %}
{% endif %}
{% trans "Upload video" as modal_title %}
{% trans "Upload" as modal_button %}
{% url "participation:upload_video" pk=participation.synthesis_id as modal_action %}
{% include "base_modal.html" with modal_id="uploadSynthesis" %}
{% if participation.synthesis.link %}
{% trans "Display synthesis" as modal_title %}
{% trans "This video platform is not supported yet." as unsupported_platform %}
{% include "base_modal.html" with modal_id="displaySynthesis" modal_action="" modal_button="" modal_additional_class="modal-lg" modal_content=participation.synthesis.as_iframe|default:unsupported_platform %}
{% endif %}
{% endif %}
{% endblock %} {% endblock %}
{% block extrajavascript %} {% block extrajavascript %}
@ -247,6 +287,14 @@
if (!modalBody.html().trim()) if (!modalBody.html().trim())
modalBody.load("{% url "participation:upload_video" pk=participation.solution_id %} #form-content"); modalBody.load("{% url "participation:upload_video" pk=participation.solution_id %} #form-content");
}); });
{% if current_phase.phase_number == 4 %}
$('button[data-target="#uploadSynthesisModal"]').click(function() {
let modalBody = $("#uploadSynthesisModal div.modal-body");
if (!modalBody.html().trim())
modalBody.load("{% url "participation:upload_video" pk=participation.synthesis_id %} #form-content");
});
{% endif %}
}); });
</script> </script>
{% endblock %} {% endblock %}

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Corres2math\n" "Project-Id-Version: Corres2math\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-10-31 22:13+0100\n" "POT-Creation-Date: 2020-11-01 20:50+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Yohann D'ANELLO <yohann.danello@animath.fr>\n" "Last-Translator: Yohann D'ANELLO <yohann.danello@animath.fr>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -250,23 +250,23 @@ msgstr "vidéos"
msgid "question" msgid "question"
msgstr "question" msgstr "question"
#: apps/participation/models.py:256 #: apps/participation/models.py:259
msgid "phase number" msgid "phase number"
msgstr "phase" msgstr "phase"
#: apps/participation/models.py:261 #: apps/participation/models.py:264
msgid "phase description" msgid "phase description"
msgstr "description" msgstr "description"
#: apps/participation/models.py:265 #: apps/participation/models.py:268
msgid "start date of the given phase" msgid "start date of the given phase"
msgstr "début de la phase" msgstr "début de la phase"
#: apps/participation/models.py:270 #: apps/participation/models.py:273
msgid "end date of the given phase" msgid "end date of the given phase"
msgstr "fin de la phase" msgstr "fin de la phase"
#: apps/participation/models.py:288 #: apps/participation/models.py:291
msgid "" msgid ""
"Phase {phase_number:d} starts on {start:%Y-%m-%d %H:%M} and ends on {end:%Y-" "Phase {phase_number:d} starts on {start:%Y-%m-%d %H:%M} and ends on {end:%Y-"
"%m-%d %H:%M}" "%m-%d %H:%M}"
@ -274,11 +274,11 @@ msgstr ""
"Phase {phase_number:d} démarrant le {start:%d/%m/%Y %H:%M} et finissant le " "Phase {phase_number:d} démarrant le {start:%d/%m/%Y %H:%M} et finissant le "
"{end:%d/%m/%Y %H:%M}" "{end:%d/%m/%Y %H:%M}"
#: apps/participation/models.py:292 #: apps/participation/models.py:295
msgid "phase" msgid "phase"
msgstr "phase" msgstr "phase"
#: apps/participation/models.py:293 #: apps/participation/models.py:296
msgid "phases" msgid "phases"
msgstr "phases" msgstr "phases"
@ -316,16 +316,19 @@ msgid "Chosen problem:"
msgstr "Problème choisi :" msgstr "Problème choisi :"
#: apps/participation/templates/participation/participation_detail.html:22 #: apps/participation/templates/participation/participation_detail.html:22
#: apps/participation/templates/participation/participation_detail.html:150
msgid "No video sent" msgid "No video sent"
msgstr "Pas de vidéo envoyée" msgstr "Pas de vidéo envoyée"
#: apps/participation/templates/participation/participation_detail.html:23 #: apps/participation/templates/participation/participation_detail.html:23
#: apps/participation/templates/participation/participation_detail.html:98 #: apps/participation/templates/participation/participation_detail.html:106
msgid "Proposed solution:" msgid "Proposed solution:"
msgstr "Solution proposée :" msgstr "Solution proposée :"
#: apps/participation/templates/participation/participation_detail.html:27 #: apps/participation/templates/participation/participation_detail.html:27
#: apps/participation/templates/participation/participation_detail.html:162 #: apps/participation/templates/participation/participation_detail.html:154
#: apps/participation/templates/participation/participation_detail.html:182
#: apps/participation/templates/participation/participation_detail.html:235
#: apps/participation/templates/participation/upload_video.html:11 #: apps/participation/templates/participation/upload_video.html:11
#: apps/registration/templates/registration/upload_photo_authorization.html:18 #: apps/registration/templates/registration/upload_photo_authorization.html:18
#: apps/registration/templates/registration/user_detail.html:78 #: apps/registration/templates/registration/user_detail.html:78
@ -333,7 +336,9 @@ msgid "Upload"
msgstr "Téléverser" msgstr "Téléverser"
#: apps/participation/templates/participation/participation_detail.html:30 #: apps/participation/templates/participation/participation_detail.html:30
#: apps/participation/templates/participation/participation_detail.html:102 #: apps/participation/templates/participation/participation_detail.html:83
#: apps/participation/templates/participation/participation_detail.html:110
#: apps/participation/templates/participation/participation_detail.html:156
msgid "Display" msgid "Display"
msgstr "Afficher" msgstr "Afficher"
@ -346,8 +351,8 @@ msgid "Team that received your solution:"
msgstr "Équipe qui a reçu votre solution :" msgstr "Équipe qui a reçu votre solution :"
#: apps/participation/templates/participation/participation_detail.html:53 #: apps/participation/templates/participation/participation_detail.html:53
#: apps/participation/templates/participation/participation_detail.html:94 #: apps/participation/templates/participation/participation_detail.html:102
#: apps/participation/templates/participation/participation_detail.html:118 #: apps/participation/templates/participation/participation_detail.html:126
msgid "Change" msgid "Change"
msgstr "Modifier" msgstr "Modifier"
@ -380,15 +385,19 @@ msgstr ""
"client Element dédié : <a href=\"https://element.correspondances-maths.fr" "client Element dédié : <a href=\"https://element.correspondances-maths.fr"
"\">element.correpondances-maths.fr</a>" "\">element.correpondances-maths.fr</a>"
#: apps/participation/templates/participation/participation_detail.html:86 #: apps/participation/templates/participation/participation_detail.html:79
msgid "Synthesis from the other team:"
msgstr "Synthèse de l'autre équipe :"
#: apps/participation/templates/participation/participation_detail.html:94
msgid "Received solution" msgid "Received solution"
msgstr "Solution reçue" msgstr "Solution reçue"
#: apps/participation/templates/participation/participation_detail.html:90 #: apps/participation/templates/participation/participation_detail.html:98
msgid "Team that sent you their solution:" msgid "Team that sent you their solution:"
msgstr "Équipe qui vous a envoyé leur solution :" msgstr "Équipe qui vous a envoyé leur solution :"
#: apps/participation/templates/participation/participation_detail.html:108 #: apps/participation/templates/participation/participation_detail.html:116
msgid "" msgid ""
"You received a solution about the same problem that you treated from another " "You received a solution about the same problem that you treated from another "
"team. You are now encouraged to see the video, then to ask from 3 to 6 " "team. You are now encouraged to see the video, then to ask from 3 to 6 "
@ -400,11 +409,11 @@ msgstr ""
"vidéo, puis à poser 3 à 6 questions à propos de la vidéo. Après cela, vous " "vidéo, puis à poser 3 à 6 questions à propos de la vidéo. Après cela, vous "
"serez invités à échanger avec l'autre équipe à propos de la solution." "serez invités à échanger avec l'autre équipe à propos de la solution."
#: apps/participation/templates/participation/participation_detail.html:125 #: apps/participation/templates/participation/participation_detail.html:133
msgid "Add a question" msgid "Add a question"
msgstr "Ajouter une question" msgstr "Ajouter une question"
#: apps/participation/templates/participation/participation_detail.html:130 #: apps/participation/templates/participation/participation_detail.html:138
#, python-format #, python-format
msgid "" msgid ""
"You sent your questions to the other team about their solution. When they " "You sent your questions to the other team about their solution. When they "
@ -423,13 +432,17 @@ msgstr ""
"client Element dédié : <a href=\"https://element.correspondances-maths.fr" "client Element dédié : <a href=\"https://element.correspondances-maths.fr"
"\">element.correpondances-maths.fr</a>" "\">element.correpondances-maths.fr</a>"
#: apps/participation/templates/participation/participation_detail.html:150 #: apps/participation/templates/participation/participation_detail.html:151
msgid "Your synthesis of the exchange:"
msgstr "Votre synthèse de l'échange :"
#: apps/participation/templates/participation/participation_detail.html:170
msgid "Define received video" msgid "Define received video"
msgstr "Définir la vidéo reçue" msgstr "Définir la vidéo reçue"
#: apps/participation/templates/participation/participation_detail.html:151 #: apps/participation/templates/participation/participation_detail.html:171
#: apps/participation/templates/participation/participation_detail.html:156 #: apps/participation/templates/participation/participation_detail.html:176
#: apps/participation/templates/participation/participation_detail.html:189 #: apps/participation/templates/participation/participation_detail.html:210
#: apps/participation/templates/participation/phase_form.html:11 #: apps/participation/templates/participation/phase_form.html:11
#: apps/participation/templates/participation/phase_list.html:18 #: apps/participation/templates/participation/phase_list.html:18
#: apps/participation/templates/participation/receive_participation_form.html:11 #: apps/participation/templates/participation/receive_participation_form.html:11
@ -443,46 +456,54 @@ msgstr "Définir la vidéo reçue"
msgid "Update" msgid "Update"
msgstr "Modifier" msgstr "Modifier"
#: apps/participation/templates/participation/participation_detail.html:155 #: apps/participation/templates/participation/participation_detail.html:175
msgid "Define team that receives your video" msgid "Define team that receives your video"
msgstr "Définir l'équipe qui recevra votre vidéo" msgstr "Définir l'équipe qui recevra votre vidéo"
#: apps/participation/templates/participation/participation_detail.html:161 #: apps/participation/templates/participation/participation_detail.html:181
#: apps/participation/templates/participation/participation_detail.html:234
msgid "Upload video" msgid "Upload video"
msgstr "Envoyer la vidéo" msgstr "Envoyer la vidéo"
#: apps/participation/templates/participation/participation_detail.html:165 #: apps/participation/templates/participation/participation_detail.html:186
#: apps/participation/templates/participation/participation_detail.html:172 #: apps/participation/templates/participation/participation_detail.html:193
msgid "Display solution" msgid "Display solution"
msgstr "Afficher la solution" msgstr "Afficher la solution"
#: apps/participation/templates/participation/participation_detail.html:166 #: apps/participation/templates/participation/participation_detail.html:187
#: apps/participation/templates/participation/participation_detail.html:173 #: apps/participation/templates/participation/participation_detail.html:194
#: apps/participation/templates/participation/participation_detail.html:230
#: apps/participation/templates/participation/participation_detail.html:241
msgid "This video platform is not supported yet." msgid "This video platform is not supported yet."
msgstr "La plateforme de cette vidéo n'est pas encore supportée." msgstr "La plateforme de cette vidéo n'est pas encore supportée."
#: apps/participation/templates/participation/participation_detail.html:179 #: apps/participation/templates/participation/participation_detail.html:200
msgid "Add question" msgid "Add question"
msgstr "Ajouter une question" msgstr "Ajouter une question"
#: apps/participation/templates/participation/participation_detail.html:180 #: apps/participation/templates/participation/participation_detail.html:201
msgid "Add" msgid "Add"
msgstr "Ajouter" msgstr "Ajouter"
#: apps/participation/templates/participation/participation_detail.html:186 #: apps/participation/templates/participation/participation_detail.html:207
#: apps/participation/templates/participation/participation_detail.html:197 #: apps/participation/templates/participation/participation_detail.html:218
#: apps/participation/templates/participation/question_confirm_delete.html:14 #: apps/participation/templates/participation/question_confirm_delete.html:14
msgid "Delete" msgid "Delete"
msgstr "Supprimer" msgstr "Supprimer"
#: apps/participation/templates/participation/participation_detail.html:188 #: apps/participation/templates/participation/participation_detail.html:209
msgid "Update question" msgid "Update question"
msgstr "Modifier la question" msgstr "Modifier la question"
#: apps/participation/templates/participation/participation_detail.html:196 #: apps/participation/templates/participation/participation_detail.html:217
msgid "Delete question" msgid "Delete question"
msgstr "Supprimer la question" msgstr "Supprimer la question"
#: apps/participation/templates/participation/participation_detail.html:229
#: apps/participation/templates/participation/participation_detail.html:240
msgid "Display synthesis"
msgstr "Afficher la synthèse"
#: apps/participation/templates/participation/phase_list.html:10 #: apps/participation/templates/participation/phase_list.html:10
#: templates/base.html:68 templates/base.html:70 templates/base.html:217 #: templates/base.html:68 templates/base.html:70 templates/base.html:217
msgid "Calendar" msgid "Calendar"