85 lines
		
	
	
	
		
			3.8 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			85 lines
		
	
	
	
		
			3.8 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <div style="overflow-x: auto;">
 | |
| <table class='vysledkovka'>
 | |
|     <tr class='border-b'>
 | |
|         <th class='border-r'>#
 | |
|         <th class='border-r'>Jméno
 | |
|             {% for p in problemy %}
 | |
|                 <th class='border-r' id="problem{{ forloop.counter0 }}">{# <a href="{{ p.verejne_url }}"> #}{{ p.kod_v_rocniku }}{# </a> #}
 | |
| 
 | |
|                     {# TODELETE #}
 | |
|                     {% for podproblemy in podproblemy_iter.next %}
 | |
|                         <th class='border-r podproblem{{ forloop.parentloop.counter0 }} podproblem'>{# <a href="{{ podproblemy.verejne_url }}"> #}{{ podproblemy.kod_v_rocniku }}{# </a> #}
 | |
|                     {% endfor %}
 | |
|                 {# TODELETE #}
 | |
| 
 | |
|             {% endfor %}
 | |
|         {% if ostatni %}<th class='border-r' id='problem{{ problemy | length }}'>Ostatní {% endif %}
 | |
| 
 | |
|         {# TODELETE #}
 | |
|         {% for podproblemy in podproblemy_iter.next %}
 | |
|             <th class='border-r podproblem{{ problemy | length }} podproblem'>{# <a href="{{ podproblemy.verejne_url }}"> #}{{ podproblemy.kod_v_rocniku }}{# </a> #}
 | |
|         {% endfor %}
 | |
|         {# TODELETE #}
 | |
| 
 | |
| 
 | |
|         <th class='border-r'>Za číslo
 | |
|         <th class='border-r'>Za ročník
 | |
|         <th class='border-r'>Odjakživa
 | |
|             {% for rv in radky_vysledkovky %}
 | |
|                 <tr>
 | |
|                     <td class='border-r'>{% autoescape off %}{{ rv.poradi }}{% endautoescape %}
 | |
|                     <th class='border-r'>
 | |
|                         {% if rv.titul %}
 | |
|                             {{ rv.titul }}<sup>MM</sup>
 | |
|                         {% endif %}
 | |
|                         {{ rv.resitel.osoba.plne_jmeno }}
 | |
|                         {% for b in rv.body_problemy_sezn %}
 | |
|                             <td class='border-r'>{{ b }}
 | |
| 
 | |
|                                 {# TODELETE #}
 | |
|                                 {% for body_podproblemu in rv.body_podproblemy_iter.next %}
 | |
|                                     <td class='border-r podproblem{{ forloop.parentloop.counter0 }} podproblem'>{{ body_podproblemu }}
 | |
|                                 {% endfor %}
 | |
|                             {# TODELETE #}
 | |
| 
 | |
|                         {% endfor %}
 | |
|                     <td class='border-r'>{{ rv.body_cislo }}
 | |
|                     <td class='border-r'><b>{{ rv.body_rocnik }}</b>
 | |
|                     <td class='border-r'>{{ rv.body_celkem_odjakziva }}
 | |
|                 </tr>
 | |
|             {% endfor %}
 | |
| </table>
 | |
| </div>
 | |
| 
 | |
| <p>Po kliknutí na políčko v záhlaví tabulky se u daného problému zobrazí (/skryje) detailní rozpis, za které podproblémy řešitelé dostali body.</p>
 | |
| 
 | |
| {# TODELETE #}
 | |
| <script>
 | |
|     {% for p in problemy %}
 | |
|         diplayed{{ forloop.counter0 }} = false;
 | |
|         $(".podproblem{{ forloop.counter0 }}").css("display", "none")
 | |
|         $("#problem{{ forloop.counter0 }}")[0].addEventListener('click', podproblem{{ forloop.counter0 }});
 | |
|         function podproblem{{ forloop.counter0 }}(event) {
 | |
|             diplayed{{ forloop.counter0 }} = !diplayed{{ forloop.counter0 }};
 | |
|             if (diplayed{{ forloop.counter0 }}) {
 | |
|                 $(".podproblem{{ forloop.counter0 }}").css("display", "");
 | |
|             } else {
 | |
|                 $(".podproblem{{ forloop.counter0 }}").css("display", "none");
 | |
|             }
 | |
|         }
 | |
|     {% endfor %}
 | |
|     {% if ostatni %}
 | |
|         diplayed{{ problemy | length }} = false;
 | |
|         $(".podproblem{{ problemy | length }}").css("display", "none")
 | |
|         $("#problem{{ problemy | length }}")[0].addEventListener('click', podproblem{{ problemy | length }});
 | |
|         function podproblem{{ problemy | length }}(event) {
 | |
|             diplayed{{ problemy | length }} = !diplayed{{ problemy | length }};
 | |
|             if (diplayed{{ problemy | length }}) {
 | |
|                 $(".podproblem{{ problemy | length }}").css("display", "");
 | |
|             } else {
 | |
|                 $(".podproblem{{ problemy | length }}").css("display", "none");
 | |
|             }
 | |
|         }
 | |
|     {% endif %}
 | |
| </script>
 | |
| {# TODELETE #}
 |