mirror of
				https://gitlab.com/animath/si/plateforme.git
				synced 2025-11-04 13:52:17 +01:00 
			
		
		
		
	Restructure add juree page
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
		@@ -1,47 +0,0 @@
 | 
			
		||||
{% extends "base.html" %}
 | 
			
		||||
 | 
			
		||||
{% load crispy_forms_tags %}
 | 
			
		||||
{% load i18n %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
    <div class="alert alert-info">
 | 
			
		||||
        <p>
 | 
			
		||||
            {% trans "You can here register juries for the pool." %}
 | 
			
		||||
            {% trans "Be careful: this form register new users. To add existing users into the jury, please use this form:" %}
 | 
			
		||||
            <button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#updatePoolModal">{% trans "Update pool" %}</button>
 | 
			
		||||
        </p>
 | 
			
		||||
        <p>
 | 
			
		||||
            {% trans "For now, the registered juries for the tournament are:" %}
 | 
			
		||||
            <ul>
 | 
			
		||||
                {% for jury in pool.juries.all %}
 | 
			
		||||
                    <li>{{ jury.user.first_name }} {{ jury.user.last_name }} (<a class="alert-link" href="mailto:{{ jury.user.email }}">{{ jury.user.email }}</a>)</li>
 | 
			
		||||
                {% empty %}
 | 
			
		||||
                    <li><i>{% trans "There is no jury yet." %}</i></li>
 | 
			
		||||
                {% endfor %}
 | 
			
		||||
            </ul>
 | 
			
		||||
        </p>
 | 
			
		||||
    </div>
 | 
			
		||||
    {% crispy form %}
 | 
			
		||||
 | 
			
		||||
    <hr>
 | 
			
		||||
 | 
			
		||||
    <div class="row text-center">
 | 
			
		||||
    <a href="{% url 'participation:pool_detail' pk=pool.pk %}" class="btn btn-secondary">
 | 
			
		||||
        <i class="fas fa-arrow-left"></i> {% trans "Back to pool detail" %}
 | 
			
		||||
    </a>
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
    {% trans "Update pool" as modal_title %}
 | 
			
		||||
    {% trans "Update" as modal_button %}
 | 
			
		||||
    {% url "participation:pool_update" pk=pool.pk as modal_action %}
 | 
			
		||||
    {% include "base_modal.html" with modal_id="updatePool" %}
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 | 
			
		||||
{% block extrajavascript %}
 | 
			
		||||
    <script>
 | 
			
		||||
        document.addEventListener('DOMContentLoaded', () => {
 | 
			
		||||
            initModal("updatePool", "{% url "participation:pool_update" pk=pool.pk %}")
 | 
			
		||||
        })
 | 
			
		||||
    </script>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 | 
			
		||||
@@ -28,7 +28,7 @@
 | 
			
		||||
                <dt class="col-sm-3">{% trans "Juries:" %}</dt>
 | 
			
		||||
                <dd class="col-sm-9">
 | 
			
		||||
                    {{ pool.juries.all|join:", " }}
 | 
			
		||||
                    <a class="badge rounded-pill text-bg-info" href="{% url 'participation:pool_add_jurys' pk=pool.pk %}">
 | 
			
		||||
                    <a class="badge rounded-pill text-bg-info" href="{% url 'participation:pool_jury' pk=pool.pk %}">
 | 
			
		||||
                        <i class="fas fa-plus"></i> {% trans "Add jurys" %}
 | 
			
		||||
                    </a>
 | 
			
		||||
                </dd>
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										47
									
								
								participation/templates/participation/pool_jury.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										47
									
								
								participation/templates/participation/pool_jury.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,47 @@
 | 
			
		||||
{% extends "base.html" %}
 | 
			
		||||
 | 
			
		||||
{% load crispy_forms_tags crispy_forms_filters %}
 | 
			
		||||
{% load i18n %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
    <hr>
 | 
			
		||||
 | 
			
		||||
    {% for jury in pool.juries.all %}
 | 
			
		||||
        <div class="row my-3">
 | 
			
		||||
            <div class="col-md-3">
 | 
			
		||||
                <input type="text" class="form-control" value="{{ jury.user.first_name }}" disabled>
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="col-md-3">
 | 
			
		||||
                <input type="text" class="form-control" value="{{ jury.user.last_name }}" disabled>
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="col-md-5">
 | 
			
		||||
                <input type="email" class="form-control" value="{{ jury.user.email }}" disabled>
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="col-md-1">
 | 
			
		||||
                <a href="{% url 'participation:pool_remove_jury' pk=pool.pk  jury_id=jury.id %}" class="btn btn-danger">
 | 
			
		||||
                    Retirer
 | 
			
		||||
                </a>
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
    {% endfor %}
 | 
			
		||||
 | 
			
		||||
    {{ form|as_crispy_errors }}
 | 
			
		||||
    {% crispy form %}
 | 
			
		||||
 | 
			
		||||
    <hr>
 | 
			
		||||
 | 
			
		||||
    <div class="row text-center">
 | 
			
		||||
        <a href="{% url 'participation:pool_detail' pk=pool.pk %}" class="btn btn-secondary">
 | 
			
		||||
            <i class="fas fa-arrow-left"></i> {% trans "Back to pool detail" %}
 | 
			
		||||
        </a>
 | 
			
		||||
    </div>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 | 
			
		||||
{% block extrajavascript %}
 | 
			
		||||
    <script>
 | 
			
		||||
        document.addEventListener('DOMContentLoaded', () => {
 | 
			
		||||
            initModal("updatePool", "{% url "participation:pool_update" pk=pool.pk %}")
 | 
			
		||||
        })
 | 
			
		||||
    </script>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user