mirror of
https://gitlab.com/animath/si/plateforme-corres2math.git
synced 2025-06-21 11:18:23 +02:00
Define the received participation
This commit is contained in:
@ -46,8 +46,13 @@
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<dl class="row">
|
||||
<dt class="col-md-8 text-right">{% trans "Team that received your solution:" %}</dt>
|
||||
<dd class="col-md-4">{{ participation.sent_participation|default:any }}</dd>
|
||||
<dt class="col-xl-5 text-right">{% trans "Team that received your solution:" %}</dt>
|
||||
<dd class="col-md-5">{{ participation.sent_participation.team|default:any }}</dd>
|
||||
{% if user.registration.is_admin %}
|
||||
<dd class="col-xs-2">
|
||||
<button class="btn btn-primary">{% trans "Change" %}</button>
|
||||
</dd>
|
||||
{% endif %}
|
||||
</dl>
|
||||
|
||||
{% if current_phase.phase_number == 2 %}
|
||||
@ -82,8 +87,13 @@
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<dl class="row">
|
||||
<dt class="col-md-8 text-right">{% trans "Team that sent you their solution:" %}</dt>
|
||||
<dd class="col-md-4">{{ participation.received_participation|default:any }}</dd>
|
||||
<dt class="col-xl-5 text-right">{% trans "Team that sent you their solution:" %}</dt>
|
||||
<dd class="col-md-5">{{ participation.received_participation.team|default:any }}</dd>
|
||||
{% if user.registration.is_admin %}
|
||||
<dd class="col-xs-2">
|
||||
<button class="btn btn-primary" data-toggle="modal" data-target="#defineReceivedParticipationModal">{% trans "Change" %}</button>
|
||||
</dd>
|
||||
{% endif %}
|
||||
</dl>
|
||||
|
||||
{# TODO Display solution #}
|
||||
@ -110,6 +120,13 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if user.registration.is_admin %}
|
||||
{% trans "Define received video" as modal_title %}
|
||||
{% trans "Update" as modal_button %}
|
||||
{% url "participation:participation_receive_participation" pk=participation.pk as modal_action %}
|
||||
{% include "base_modal.html" with modal_id="defineReceivedParticipation" %}
|
||||
{% endif %}
|
||||
|
||||
{% trans "Upload video" as modal_title %}
|
||||
{% trans "Upload" as modal_button %}
|
||||
{% url "participation:upload_video" pk=participation.solution_id as modal_action %}
|
||||
@ -122,6 +139,13 @@
|
||||
{% block extrajavascript %}
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
{% if user.registration.is_admin %}
|
||||
$('button[data-target="#defineReceivedParticipationModal"]').click(function() {
|
||||
let modalBody = $("#defineReceivedParticipationModal div.modal-body");
|
||||
if (!modalBody.html().trim())
|
||||
modalBody.load("{% url "participation:participation_receive_participation" pk=participation.pk %} #form-content");
|
||||
});
|
||||
{% endif %}
|
||||
$('button[data-target="#uploadSolutionModal"]').click(function() {
|
||||
let modalBody = $("#uploadSolutionModal div.modal-body");
|
||||
if (!modalBody.html().trim())
|
||||
|
@ -0,0 +1,14 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% load crispy_forms_filters i18n %}
|
||||
|
||||
{% block content %}
|
||||
<form method="post">
|
||||
<div id="form-content">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
</div>
|
||||
<button class="btn btn-primary" type="submit">{% trans "Update" %}</button>
|
||||
</form>
|
||||
{% endblock content %}
|
||||
|
Reference in New Issue
Block a user