mirror of
				https://gitlab.com/animath/si/plateforme.git
				synced 2025-11-04 08:22:10 +01:00 
			
		
		
		
	@@ -144,10 +144,10 @@ document.addEventListener('DOMContentLoaded', () => {
 | 
				
			|||||||
            let poolListId = `recap-${tournament.id}-round-${round}-pool-list`
 | 
					            let poolListId = `recap-${tournament.id}-round-${round}-pool-list`
 | 
				
			||||||
            let poolList = document.getElementById(poolListId)
 | 
					            let poolList = document.getElementById(poolListId)
 | 
				
			||||||
            if (poolList === null) {
 | 
					            if (poolList === null) {
 | 
				
			||||||
                let li = document.createElement('li')
 | 
					                let div = document.createElement('div')
 | 
				
			||||||
                li.id = `recap-${tournament.id}-round-${round}`
 | 
					                div.id = `recap-${tournament.id}-round-${round}`
 | 
				
			||||||
                li.classList.add('list-group-item')
 | 
					                div.classList.add('col-md-6', 'px-3', 'py-3')
 | 
				
			||||||
                li.setAttribute('data-tournament', tournament.id)
 | 
					                div.setAttribute('data-tournament', tournament.id)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                let title = document.createElement('strong')
 | 
					                let title = document.createElement('strong')
 | 
				
			||||||
                title.textContent = 'Tour ' + round
 | 
					                title.textContent = 'Tour ' + round
 | 
				
			||||||
@@ -156,8 +156,8 @@ document.addEventListener('DOMContentLoaded', () => {
 | 
				
			|||||||
                poolList.id = poolListId
 | 
					                poolList.id = poolListId
 | 
				
			||||||
                poolList.classList.add('list-group', 'list-group-flush')
 | 
					                poolList.classList.add('list-group', 'list-group-flush')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                li.append(title, poolList)
 | 
					                div.append(title, poolList)
 | 
				
			||||||
                roundList.append(li)
 | 
					                roundList.append(div)
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            let c = 1
 | 
					            let c = 1
 | 
				
			||||||
@@ -168,7 +168,7 @@ document.addEventListener('DOMContentLoaded', () => {
 | 
				
			|||||||
                if (teamList === null) {
 | 
					                if (teamList === null) {
 | 
				
			||||||
                    let li = document.createElement('li')
 | 
					                    let li = document.createElement('li')
 | 
				
			||||||
                    li.id = `recap-${tournament.id}-round-${round}-pool-${poule.letter}`
 | 
					                    li.id = `recap-${tournament.id}-round-${round}-pool-${poule.letter}`
 | 
				
			||||||
                    li.classList.add('list-group-item')
 | 
					                    li.classList.add('list-group-item', 'px-3', 'py-3')
 | 
				
			||||||
                    li.setAttribute('data-tournament', tournament.id)
 | 
					                    li.setAttribute('data-tournament', tournament.id)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    let title = document.createElement('strong')
 | 
					                    let title = document.createElement('strong')
 | 
				
			||||||
@@ -250,7 +250,7 @@ document.addEventListener('DOMContentLoaded', () => {
 | 
				
			|||||||
                    if (pouleTable === null) {
 | 
					                    if (pouleTable === null) {
 | 
				
			||||||
                        // Create table
 | 
					                        // Create table
 | 
				
			||||||
                        let card = document.createElement('div')
 | 
					                        let card = document.createElement('div')
 | 
				
			||||||
                        card.classList.add('card')
 | 
					                        card.classList.add('card', 'my-3')
 | 
				
			||||||
                        tablesRoundDiv.append(card)
 | 
					                        tablesRoundDiv.append(card)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                        let cardHeader = document.createElement('div')
 | 
					                        let cardHeader = document.createElement('div')
 | 
				
			||||||
@@ -395,16 +395,16 @@ document.addEventListener('DOMContentLoaded', () => {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        function updateActiveRecap(round, pool, team) {
 | 
					        function updateActiveRecap(round, pool, team) {
 | 
				
			||||||
            document.querySelectorAll(`li.list-group-item-primary[data-tournament="${tournament.id}"]`)
 | 
					            document.querySelectorAll(`div.text-bg-secondary[data-tournament="${tournament.id}"]`)
 | 
				
			||||||
                .forEach(elem => elem.classList.remove('list-group-item-primary'))
 | 
					                .forEach(elem => elem.classList.remove('text-bg-secondary'))
 | 
				
			||||||
            document.querySelectorAll(`li.list-group-item-success[data-tournament="${tournament.id}"]`)
 | 
					            document.querySelectorAll(`li.list-group-item-success[data-tournament="${tournament.id}"]`)
 | 
				
			||||||
                .forEach(elem => elem.classList.remove('list-group-item-success'))
 | 
					                .forEach(elem => elem.classList.remove('list-group-item-success'))
 | 
				
			||||||
            document.querySelectorAll(`li.list-group-item-info[data-tournament="${tournament.id}"]`)
 | 
					            document.querySelectorAll(`li.list-group-item-info[data-tournament="${tournament.id}"]`)
 | 
				
			||||||
                .forEach(elem => elem.classList.remove('list-group-item-info'))
 | 
					                .forEach(elem => elem.classList.remove('list-group-item-info'))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            let roundLi = document.getElementById(`recap-${tournament.id}-round-${round}`)
 | 
					            let roundDiv = document.getElementById(`recap-${tournament.id}-round-${round}`)
 | 
				
			||||||
            if (roundLi !== null)
 | 
					            if (roundDiv !== null)
 | 
				
			||||||
                roundLi.classList.add('list-group-item-primary')
 | 
					                roundDiv.classList.add('text-bg-secondary')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            let poolLi = document.getElementById(`recap-${tournament.id}-round-${round}-pool-${pool}`)
 | 
					            let poolLi = document.getElementById(`recap-${tournament.id}-round-${round}-pool-${pool}`)
 | 
				
			||||||
            if (poolLi !== null)
 | 
					            if (poolLi !== null)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -23,7 +23,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
<div id="draw-content-{{ tournament.id }}" class="{% if not tournament.draw %}d-none{% endif %}">
 | 
					<div id="draw-content-{{ tournament.id }}" class="{% if not tournament.draw %}d-none{% endif %}">
 | 
				
			||||||
    <div class="container">
 | 
					    <div class="container">
 | 
				
			||||||
        <div class="card col-md-12">
 | 
					        <div class="card col-md-12 my-3">
 | 
				
			||||||
            <div class="card-header">
 | 
					            <div class="card-header">
 | 
				
			||||||
                <h2>{% trans "Last dices" %}</h2>
 | 
					                <h2>{% trans "Last dices" %}</h2>
 | 
				
			||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
@@ -44,7 +44,7 @@
 | 
				
			|||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
        <div class="row">
 | 
					        <div class="row">
 | 
				
			||||||
            <div class="col-md-3">
 | 
					            <div class="col-md-5 my-3">
 | 
				
			||||||
                <div class="card">
 | 
					                <div class="card">
 | 
				
			||||||
                    <div class="card-header">
 | 
					                    <div class="card-header">
 | 
				
			||||||
                        Recap
 | 
					                        Recap
 | 
				
			||||||
@@ -55,17 +55,17 @@
 | 
				
			|||||||
                        {% endif %}
 | 
					                        {% endif %}
 | 
				
			||||||
                    </div>
 | 
					                    </div>
 | 
				
			||||||
                    <div class="card-body">
 | 
					                    <div class="card-body">
 | 
				
			||||||
                        <ul id="recap-{{ tournament.id }}-round-list" class="list-group list-group-flush">
 | 
					                        <div id="recap-{{ tournament.id }}-round-list" class="row">
 | 
				
			||||||
                            {% for round in tournament.draw.round_set.all %}
 | 
					                            {% for round in tournament.draw.round_set.all %}
 | 
				
			||||||
                                <li id="recap-{{ tournament.id }}-round-{{ round.number }}"
 | 
					                                <div id="recap-{{ tournament.id }}-round-{{ round.number }}"
 | 
				
			||||||
                                    class="list-group-item {% if tournament.draw.current_round == round %} list-group-item-primary{% endif %}"
 | 
					                                     class="col-md-6 px-3 py-3 {% if tournament.draw.current_round == round %} text-bg-secondary{% endif %}"
 | 
				
			||||||
                                    data-tournament="{{ tournament.id }}">
 | 
					                                     data-tournament="{{ tournament.id }}">
 | 
				
			||||||
                                    <strong>{{ round }}</strong>
 | 
					                                    <strong>{{ round }}</strong>
 | 
				
			||||||
                                    <ul id="recap-{{ tournament.id }}-round-{{ round.number }}-pool-list"
 | 
					                                    <ul id="recap-{{ tournament.id }}-round-{{ round.number }}-pool-list"
 | 
				
			||||||
                                        class="list-group list-group-flush">
 | 
					                                        class="list-group list-group-flush">
 | 
				
			||||||
                                        {% for pool in round.pool_set.all %}
 | 
					                                        {% for pool in round.pool_set.all %}
 | 
				
			||||||
                                            <li id="recap-{{ tournament.id }}-round-{{ round.number }}-pool-{{ pool.get_letter_display }}"
 | 
					                                            <li id="recap-{{ tournament.id }}-round-{{ round.number }}-pool-{{ pool.get_letter_display }}"
 | 
				
			||||||
                                                class="list-group-item {% if tournament.draw.current_round.current_pool == pool %} list-group-item-success{% endif %}"
 | 
					                                                class="list-group-item px-3 py-3 {% if tournament.draw.current_round.current_pool == pool %} list-group-item-success{% endif %}"
 | 
				
			||||||
                                                data-tournament="{{ tournament.id }}">
 | 
					                                                data-tournament="{{ tournament.id }}">
 | 
				
			||||||
                                                <strong>{% trans "pool"|capfirst %} {{ pool }}</strong>
 | 
					                                                <strong>{% trans "pool"|capfirst %} {{ pool }}</strong>
 | 
				
			||||||
                                                <ul id="recap-{{ tournament.id }}-round-{{ round.number }}-pool-{{ pool.get_letter_display }}-team-list"
 | 
					                                                <ul id="recap-{{ tournament.id }}-round-{{ round.number }}-pool-{{ pool.get_letter_display }}-team-list"
 | 
				
			||||||
@@ -94,13 +94,13 @@
 | 
				
			|||||||
                                            </li>
 | 
					                                            </li>
 | 
				
			||||||
                                        {% endfor %}
 | 
					                                        {% endfor %}
 | 
				
			||||||
                                    </ul>
 | 
					                                    </ul>
 | 
				
			||||||
                                </li>
 | 
					                                </div>
 | 
				
			||||||
                            {% endfor %}
 | 
					                            {% endfor %}
 | 
				
			||||||
                        </ul>
 | 
					                        </div>
 | 
				
			||||||
                    </div>
 | 
					                    </div>
 | 
				
			||||||
                </div>
 | 
					                </div>
 | 
				
			||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
            <div class="col-md-9">
 | 
					            <div class="col-md-7 my-3">
 | 
				
			||||||
                <div class="card">
 | 
					                <div class="card">
 | 
				
			||||||
                    <div class="card-body">
 | 
					                    <div class="card-body">
 | 
				
			||||||
                        <div id="messages-{{ tournament.id }}" class="alert alert-info">
 | 
					                        <div id="messages-{{ tournament.id }}" class="alert alert-info">
 | 
				
			||||||
@@ -163,7 +163,7 @@
 | 
				
			|||||||
                    <div id="tables-{{ tournament.id }}-round-{{ round.number }}" class="card-body">
 | 
					                    <div id="tables-{{ tournament.id }}-round-{{ round.number }}" class="card-body">
 | 
				
			||||||
                        {% for pool in round.pool_set.all %}
 | 
					                        {% for pool in round.pool_set.all %}
 | 
				
			||||||
                            {% if pool.teamdraw_set.count %}
 | 
					                            {% if pool.teamdraw_set.count %}
 | 
				
			||||||
                                <div class="card">
 | 
					                                <div class="card my-3">
 | 
				
			||||||
                                    <div class="card-header">
 | 
					                                    <div class="card-header">
 | 
				
			||||||
                                        <h3>
 | 
					                                        <h3>
 | 
				
			||||||
                                            {% trans "pool"|capfirst %} {{ pool }}
 | 
					                                            {% trans "pool"|capfirst %} {{ pool }}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user