mirror of
				https://gitlab.com/animath/si/plateforme.git
				synced 2025-11-04 02:12:05 +01:00 
			
		
		
		
	Add extra access to juries
This commit is contained in:
		@@ -125,6 +125,20 @@
 | 
			
		||||
                        <a class="nav-link" href="{% url "tournament:pools" %}"><i class="fas fa-swimming-pool"></i> {% trans "Pools" %}</a>
 | 
			
		||||
                    </li>
 | 
			
		||||
                {% endif %}
 | 
			
		||||
 | 
			
		||||
                {% if not user.is_authenticated and request.session.extra_access_token %}
 | 
			
		||||
                    {# Juries can access to pool data without logging in. #}
 | 
			
		||||
                    <li class="nav-item active">
 | 
			
		||||
                        <a class="nav-link" href="{% url "tournament:all_solutions" %}"><i class="fas fa-lightbulb"></i> {% trans "Solutions" %}</a>
 | 
			
		||||
                    </li>
 | 
			
		||||
                    <li class="nav-item active">
 | 
			
		||||
                        <a class="nav-link" href="{% url "tournament:all_syntheses" %}"><i class="fas fa-feather"></i> {% trans "Syntheses" %}</a>
 | 
			
		||||
                    </li>
 | 
			
		||||
                    <li class="nav-item active">
 | 
			
		||||
                        <a class="nav-link" href="{% url "tournament:pools" %}"><i class="fas fa-swimming-pool"></i> {% trans "Pools" %}</a>
 | 
			
		||||
                    </li>
 | 
			
		||||
                {% endif %}
 | 
			
		||||
 | 
			
		||||
                <li class="nav-item active">
 | 
			
		||||
                    <a class="nav-link" href="https://www.helloasso.com/associations/animath/formulaires/5/widget"><i
 | 
			
		||||
                            class="fas fa-hand-holding-heart"></i> {% trans "Make a gift" %}</a>
 | 
			
		||||
 
 | 
			
		||||
@@ -61,13 +61,12 @@
 | 
			
		||||
                {% trans "Templates for syntheses are available here:" %}
 | 
			
		||||
                <a data-turbolinks="false" href="{% static "Fiche synthèse.pdf" %}">PDF</a> -- <a data-turbolinks="false" href="{% static "Fiche synthèse.tex" %}">TEX</a>
 | 
			
		||||
            </div>
 | 
			
		||||
            {% if user.organizes %}
 | 
			
		||||
            {% if user.organizes or not user.is_authenticated %}
 | 
			
		||||
                <ul>
 | 
			
		||||
                    {% for synthesis in pool.syntheses.all %}
 | 
			
		||||
                        <li><a data-turbolinks="false" href="{{ synthesis.file.url }}">{{ synthesis }}</a></li>
 | 
			
		||||
                    {% endfor %}
 | 
			
		||||
                </ul>
 | 
			
		||||
                </div>
 | 
			
		||||
                <div class="card-footer text-center">
 | 
			
		||||
                    <form method="post">
 | 
			
		||||
                        {% csrf_token %}
 | 
			
		||||
@@ -75,6 +74,7 @@
 | 
			
		||||
                    </form>
 | 
			
		||||
                </div>
 | 
			
		||||
            {% endif %}
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
    <hr>
 | 
			
		||||
@@ -82,4 +82,13 @@
 | 
			
		||||
    <div class="text-center">
 | 
			
		||||
        <a class="btn btn-block btn-primary" href="{% url "tournament:pools" %}">{% trans "Pool list" %}</a>
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
    {% if user.organizes or not user.is_authenticated %}
 | 
			
		||||
        <hr>
 | 
			
		||||
        <div class="alert alert-warning">
 | 
			
		||||
            {% trans "Give this link to juries to access this page (warning: should stay confidential and only given to juries of this pool):" %}<br>
 | 
			
		||||
            <a href="{% url "tournament:pool_detail" pk=pool.pk %}?extra_access_token={{ pool.extra_access_token }}">
 | 
			
		||||
                https://{{ request.get_host }}{% url "tournament:pool_detail" pk=pool.pk %}?extra_access_token={{ pool.extra_access_token }}</a>
 | 
			
		||||
        </div>
 | 
			
		||||
    {% endif %}
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user