Merge branch 'Petr'
This commit is contained in:
		
						commit
						f04bbfa03f
					
				
					 24 changed files with 167 additions and 54 deletions
				
			
		|  | @ -57,7 +57,16 @@ | |||
|       <div class='row'> | ||||
| 	    <div class='col-md-12' style=''> | ||||
| 	      <div id='menu'> | ||||
| 	        {% include "menu.html" %} | ||||
|           {# ============= MENU ============== #} | ||||
|           <ul> | ||||
|             <li class="{% block menu_uvod %}{% endblock %}"><a href="/co-je-MaM/uvod/">Co je M&M</a> | ||||
|             <li class="{% block menu_soustredeni %}{% endblock %}"><a href="{% url 'seminar_seznam_soustredeni' %}">Soustředění</a> | ||||
|             <li class="{% block menu_zadani %}{% endblock %}"><a href="/zadani/aktualni/">Zadání</a> | ||||
|             <li class="{% block menu_clanky %}{% endblock %}"><a href="/clanky/uvod/">Články</a> | ||||
|             <li class="{% block menu_archiv %}{% endblock %}"><a href="/archiv/cisla/">Archiv</a> | ||||
|             <li class="{% block menu_odevzdat %}{% endblock %}">{#<a href="/odevzdat-reseni/muj-ucet">#}Odeslat řešení{#</a>#} | ||||
|           </ul> | ||||
|           {# ======== KONEC MENU =============#} | ||||
| 	      </div> | ||||
| 	    </div> | ||||
| 	  </div> | ||||
|  |  | |||
|  | @ -14,21 +14,91 @@ | |||
| </div> | ||||
| {% endblock content %} | ||||
| 
 | ||||
| {# nahraj spravne submenu #} | ||||
| {% block submenu %} | ||||
|   {# co-je-MaM #} | ||||
|   {% if "/co-je-MaM/" in flatpage.url %} | ||||
|     {% if "/uvod/" in flatpage.url %} | ||||
|       {% with "uvod" as selected %} | ||||
|       {% include "seminar/cojemam/submenu.html" %} | ||||
|       {% endwith %} | ||||
|     {% elif "jak-resit" in flatpage.url %} | ||||
|       {% with "jak-resit" as selected %} | ||||
|       {% include "seminar/cojemam/submenu.html" %} | ||||
|       {% endwith %} | ||||
|     {% elif "FAQ" in flatpage.url %} | ||||
|       {% with "FAQ" as selected %} | ||||
|       {% include "seminar/cojemam/submenu.html" %} | ||||
|       {% endwith %} | ||||
|     {% else %} | ||||
|       {% include "seminar/cojemam/submenu.html" %} | ||||
|     {% endif %} | ||||
|   {% if "/soustredeni/" in flatpage.url %} | ||||
|     {% include "seminar/soustredeni/submenu.html" %} | ||||
|   {% endif %} | ||||
|   {# soustredeni #} | ||||
|   {% if "/soustredeni/" in flatpage.url %} | ||||
|     {% if "/pripravujeme/" in flatpage.url %} | ||||
|       {% with "pripravujeme" as selected %} | ||||
|       {% include "seminar/soustredeni/submenu.html" %} | ||||
|       {% endwith %} | ||||
|     {% else %} | ||||
|       {% with "uvod" as selected %} | ||||
|       {% include "seminar/soustredeni/submenu.html" %} | ||||
|       {% endwith %} | ||||
|     {% endif %} | ||||
|   {% endif %} | ||||
|   {# zadani #} | ||||
|   {% if "/zadani/" in flatpage.url %} | ||||
|     {% if "/ulohy/" in flatpage.url %} | ||||
|       {% with "ulohy" as selected %} | ||||
|       {% include "seminar/zadani/submenu.html" %} | ||||
|       {% endwith %} | ||||
|     {% elif "/aktualni-cislo/" in flatpage.url %} | ||||
|       {% with "aktualni-cislo" as selected %} | ||||
|       {% include "seminar/zadani/submenu.html" %} | ||||
|       {% endwith %} | ||||
|     {% elif "/vysledkove-listiny/" in flatpage.url %} | ||||
|       {% with "vysledkove-listiny" as selected %} | ||||
|       {% include "seminar/zadani/submenu.html" %} | ||||
|       {% endwith %} | ||||
|     {% else %} | ||||
|       {% include "seminar/zadani/submenu.html" %} | ||||
|     {% endif %} | ||||
|   {% endif %} | ||||
|   {# clanky #} | ||||
|   {% if "/clanky/" in flatpage.url %} | ||||
|     {% if "/uvod/" in flatpage.url %} | ||||
|       {% with "uvod" as selected %} | ||||
|       {% include "seminar/clanky/submenu.html" %} | ||||
|       {% endwith %} | ||||
|     {% elif "/org/" in flatpage.url %} | ||||
|       {% with "org" as selected %} | ||||
|       {% include "seminar/clanky/submenu.html" %} | ||||
|       {% endwith %} | ||||
|     {% elif "/resitel/" in flatpage.url %} | ||||
|       {% with "resitel" as selected %} | ||||
|       {% include "seminar/clanky/submenu.html" %} | ||||
|       {% endwith %} | ||||
|     {% else %} | ||||
|       {% include "seminar/clanky/submenu.html" %} | ||||
|     {% endif %} | ||||
|   {% endif %} | ||||
|   {# archiv #} | ||||
|   {% if "/archiv/" in flatpage.url %} | ||||
|     {% if "/ulohy/" in flatpage.url %} | ||||
|       {% with "ulohy" as selected %} | ||||
|       {% include "seminar/archiv/submenu.html" %} | ||||
|       {% endwith %} | ||||
|     {% else %} | ||||
|       {% include "seminar/archiv/submenu.html" %} | ||||
|     {% endif %} | ||||
|   {% endif %} | ||||
| {% endblock %} | ||||
| 
 | ||||
| {# zvirazneni menu #} | ||||
| {% block menu_uvod %}{% if "/co-je-MaM/" in flatpage.url %}selected{% endif %}{% endblock %} | ||||
| {% block menu_soustredeni %}{% if "/soustredeni/" in flatpage.url %}selected{% endif %}{% endblock %} | ||||
| {% block menu_zadani %}{% if "/zadani/" in flatpage.url %}selected{% endif %}{% endblock %} | ||||
| {% block menu_clanky %}{% if "/clanky/" in flatpage.url %}selected{% endif %}{% endblock %} | ||||
| {% block menu_archiv %}{% if "/archiv/" in flatpage.url %}selected{% endif %}{% endblock %} | ||||
| 
 | ||||
| {# TODO zvirazneni submenu #} | ||||
|  |  | |||
|  | @ -1,17 +0,0 @@ | |||
| {% load i18n cache mam_menu %} | ||||
| {% aktualni_rocniky as rs %} | ||||
| 
 | ||||
| <ul> | ||||
|   <li><a href="/co-je-MaM/uvod/">Co je M&M</a> | ||||
|   <li><a href="{% url 'seminar_seznam_soustredeni' %}">Soustředění</a> | ||||
|   <li><a href="/zadani/aktualni/">Zadání</a> | ||||
|   <li><a href="/clanky/uvod/">Články</a> | ||||
|   <li><a href="/archiv/cisla/">Archiv</a> | ||||
|   <li>{#<a href="/odevzdat-reseni/muj-ucet">#}Odeslat řešení{#</a>#} | ||||
| </ul> | ||||
| 
 | ||||
| <!-- TODO smazat <ul> | ||||
| {% for r in rs %} | ||||
| <li><a href='{{ r.verejne_url }}'>Ročník {{ r }}</a> | ||||
| {% endfor %} | ||||
| </ul>--> | ||||
|  | @ -1,6 +1,4 @@ | |||
| {% extends "base.html" %} | ||||
| 
 | ||||
| {% block submenu %} | ||||
|   {% include "seminar/archiv/submenu.html" %} | ||||
| {% endblock %} | ||||
| {% block menu_archiv %}selected{% endblock %} | ||||
| 
 | ||||
|  |  | |||
							
								
								
									
										8
									
								
								seminar/templates/seminar/archiv/base_cisla.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								seminar/templates/seminar/archiv/base_cisla.html
									
									
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,8 @@ | |||
| {% extends "seminar/archiv/base.html" %} | ||||
| 
 | ||||
| {% block submenu %} | ||||
|   {% with "cisla" as selected %} | ||||
|   {% include "seminar/archiv/submenu.html" %} | ||||
|   {% endwith %} | ||||
| {% endblock %} | ||||
| 
 | ||||
							
								
								
									
										8
									
								
								seminar/templates/seminar/archiv/base_temata.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								seminar/templates/seminar/archiv/base_temata.html
									
									
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,8 @@ | |||
| {% extends "seminar/archiv/base.html" %} | ||||
| 
 | ||||
| {% block submenu %} | ||||
|   {% with "temata" as selected %} | ||||
|   {% include "seminar/archiv/submenu.html" %} | ||||
|   {% endwith %} | ||||
| {% endblock %} | ||||
| 
 | ||||
							
								
								
									
										10
									
								
								seminar/templates/seminar/archiv/base_ulohy.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								seminar/templates/seminar/archiv/base_ulohy.html
									
									
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,10 @@ | |||
| {% extends "seminar/archiv/base.html" %} | ||||
| 
 | ||||
| {% block menu_archiv %}selected{% endblock %} | ||||
| 
 | ||||
| {% block submenu %} | ||||
|   {% with "ulohy" as selected %} | ||||
|   {% include "seminar/archiv/submenu.html" %} | ||||
|   {% endwith %} | ||||
| {% endblock %} | ||||
| 
 | ||||
|  | @ -1,8 +1,4 @@ | |||
| {% extends "seminar/archiv/base.html" %} | ||||
| 
 | ||||
| {% block submenu %} | ||||
|   {% include "seminar/archiv/submenu.html" %} | ||||
| {% endblock %} | ||||
| {% extends "seminar/archiv/base_cisla.html" %} | ||||
| 
 | ||||
| {% block content %} | ||||
| <div> | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| {% extends "seminar/archiv/base.html" %} | ||||
| {% extends "seminar/archiv/base_cisla.html" %} | ||||
| 
 | ||||
| {% block content %} | ||||
| <div> | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| {% extends "seminar/archiv/base.html" %} | ||||
| {% extends "seminar/archiv/base_ulohy.html" %} | ||||
| 
 | ||||
| {% load comments %} | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| {% extends "seminar/archiv/base.html" %} | ||||
| {% extends "seminar/archiv/base_cisla.html" %} | ||||
| 
 | ||||
| {% block content %} | ||||
| <div> | ||||
|  |  | |||
|  | @ -1,9 +1,9 @@ | |||
| {% with "/archiv" as cesta %} | ||||
| 
 | ||||
| <ul> | ||||
|   <li><a href="{{cesta}}/cisla/">Čísla</a> | ||||
|   <li><a href="{{cesta}}/temata/">Témata</a> | ||||
|   <li><a href="{{cesta}}/ulohy/">Úlohy</a> | ||||
|   <li class="{% if selected == "cisla" %}selected{% endif %}"><a href="{{cesta}}/cisla/">Čísla</a> | ||||
|   <li class="{% if selected == "temata" %}selected{% endif %}"><a href="{{cesta}}/temata/">Témata</a> | ||||
|   <li class="{% if selected == "ulohy" %}selected{% endif %}"><a href="{{cesta}}/ulohy/">Úlohy</a> | ||||
| </ul> | ||||
| 
 | ||||
| {% endwith %} | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| {% extends "seminar/archiv/base.html" %} | ||||
| {% extends "seminar/archiv/base_temata.html" %} | ||||
| 
 | ||||
| {% block content %} | ||||
|   <h2> | ||||
|  |  | |||
|  | @ -1,5 +1,7 @@ | |||
| {% extends "base.html" %} | ||||
| 
 | ||||
| {% block menu_clanky %}selected{% endblock %} | ||||
| 
 | ||||
| {% block submenu %} | ||||
|   {% include "seminar/clanky/submenu.html" %} | ||||
| {% endblock %} | ||||
|  |  | |||
|  | @ -1,9 +1,9 @@ | |||
| {% with "/clanky" as cesta %} | ||||
| 
 | ||||
| <ul> | ||||
|   <li><a href="{{cesta}}/uvod/">Úvod</a> | ||||
|   <li><a href="{{cesta}}/org/">Organizátorské články</a> | ||||
|   <li><a href="{{cesta}}/resitel/">Řešitelské články</a> | ||||
|   <li class="{% if selected == "uvod" %}selected{% endif %}"><a href="{{cesta}}/uvod/">Úvod</a> | ||||
|   <li class="{% if selected == "org" %}selected{% endif %}"><a href="{{cesta}}/org/">Organizátorské články</a> | ||||
|   <li class="{% if selected == "resitel" %}selected{% endif %}"><a href="{{cesta}}/resitel/">Řešitelské články</a> | ||||
| </ul> | ||||
| 
 | ||||
| {% endwith %} | ||||
|  |  | |||
|  | @ -7,6 +7,13 @@ | |||
|   {% endif %} | ||||
| {% endblock%}{% endblock%} | ||||
| 
 | ||||
| {% block menu_uvod %}selected{% endblock %} | ||||
| {% block submenu %} | ||||
|   {% with "org" as selected %} | ||||
|   {% include "seminar/cojemam/submenu.html" %} | ||||
|   {% endwith %} | ||||
| {% endblock %} | ||||
| 
 | ||||
| {% block content %} | ||||
| <div> | ||||
|   {% if not aktivni %} | ||||
|  |  | |||
|  | @ -1,10 +1,10 @@ | |||
| {% with "/co-je-MaM" as cesta %} | ||||
| 
 | ||||
| <ul> | ||||
|   <li><a href="{{cesta}}/uvod/">Úvod</a> | ||||
|   <li><a href="{{cesta}}/jak-resit/">Jak řešit</a> | ||||
|   <li><a href="{{cesta}}/organizatori/">Organizátoři</a> | ||||
|   <li><a href="{{cesta}}/FAQ/">FAQ</a> | ||||
|   <li class="{% if selected == "uvod" %}selected{% endif %}"><a href="{{cesta}}/uvod/">Úvod</a> | ||||
|   <li class="{% if selected == "jak-resit" %}selected{% endif %}"><a href="{{cesta}}/jak-resit/">Jak řešit</a> | ||||
|   <li class="{% if selected == "org" %}selected{% endif %}"><a href="{{cesta}}/organizatori/">Organizátoři</a> | ||||
|   <li class="{% if selected == "FAQ" %}selected{% endif %}"><a href="{{cesta}}/FAQ/">FAQ</a> | ||||
| </ul> | ||||
| 
 | ||||
| {% endwith %} | ||||
|  |  | |||
|  | @ -1,5 +1,12 @@ | |||
| {% extends "seminar/soustredeni/base.html" %} | ||||
| 
 | ||||
| {% block menu_soustredeni %}selected{% endblock %} | ||||
| {% block submenu %} | ||||
|   {% with "probehlo" as selected %} | ||||
|   {% include "seminar/soustredeni/submenu.html" %} | ||||
|   {% endwith %} | ||||
| {% endblock submenu %} | ||||
| 
 | ||||
| {% block content %}{% if user.is_authenticated %}{# PRACUJE SE STRANKA #} | ||||
| 
 | ||||
|   <h2> | ||||
|  |  | |||
|  | @ -1,9 +1,9 @@ | |||
| {% with "/soustredeni" as cesta %} | ||||
| 
 | ||||
| <ul> | ||||
|   <li><a href="{{cesta}}/uvod/">Úvod</a> | ||||
|   <li><a href="{{cesta}}/pripravujeme/">Připravujeme</a> | ||||
|   <li><a href="{{cesta}}/probehlo/">Proběhlo</a> | ||||
|   <li class="{% if selected == "uvod" %}selected{% endif %}"><a href="{{cesta}}/">Úvod</a> | ||||
|   <li class="{% if selected == "pripravujeme" %}selected{% endif %}"><a href="{{cesta}}/pripravujeme/">Připravujeme</a> | ||||
|   <li class="{% if selected == "probehlo" %}selected{% endif %}"><a href="{{cesta}}/probehlo/">Proběhlo</a> | ||||
| </ul> | ||||
| 
 | ||||
| {% endwith %} | ||||
|  |  | |||
|  | @ -1,5 +1,11 @@ | |||
| {% extends "seminar/zadani/base.html" %} | ||||
| 
 | ||||
| {% block submenu %} | ||||
|   {% with "aktualni" as selected %} | ||||
|   {% include 'seminar/zadani/submenu.html' %} | ||||
|   {% endwith %} | ||||
| {% endblock submenu %} | ||||
| 
 | ||||
| {% block content %} | ||||
| <div> | ||||
|   <h2> | ||||
|  |  | |||
|  | @ -1,5 +1,12 @@ | |||
| {% extends "seminar/zadani/base.html" %} | ||||
| 
 | ||||
| {% block submenu %} | ||||
|   {% with "temata" as selected %} | ||||
|   {% include 'seminar/zadani/submenu.html' %} | ||||
|   {% endwith %} | ||||
| {% endblock submenu %} | ||||
| 
 | ||||
| 
 | ||||
| {% block content %} | ||||
| {% with nastaveni.aktualni_rocnik as ar %} | ||||
| <div> | ||||
|  |  | |||
|  | @ -1,5 +1,7 @@ | |||
| {% extends "base.html" %} | ||||
| 
 | ||||
| {% block menu_zadani %}selected{% endblock %} | ||||
| 
 | ||||
| {% block submenu %} | ||||
|   {% include 'seminar/zadani/submenu.html' %} | ||||
| {% endblock submenu %} | ||||
|  |  | |||
|  | @ -1,11 +1,11 @@ | |||
| {% with "/zadani" as cesta %} | ||||
| 
 | ||||
| <ul> | ||||
|   <li><a href="{{cesta}}/aktualni/">Aktuální zadání</a> | ||||
|   <li><a href="{{cesta}}/ulohy/">Úlohy</a> | ||||
|   <li><a href="{{cesta}}/temata/">Témata</a> | ||||
|   <li><a href="{{cesta}}/aktualni-cislo/">Aktuální číslo</a> | ||||
|   <li><a href="{{cesta}}/vysledkove-listiny/">Výsledkové listiny</a> | ||||
|   <li class="{% if selected == "aktualni" %}selected{% endif %}"><a href="{{cesta}}/aktualni/">Aktuální zadání</a> | ||||
|   <li class="{% if selected == "ulohy" %}selected{% endif %}"><a href="{{cesta}}/ulohy/">Úlohy</a> | ||||
|   <li class="{% if selected == "temata" %}selected{% endif %}"><a href="{{cesta}}/temata/">Témata</a> | ||||
|   <li class="{% if selected == "aktualni-cislo" %}selected{% endif %}"><a href="{{cesta}}/aktualni-cislo/">Aktuální číslo</a> | ||||
|   <li class="{% if selected == "vysledkove-listiny" %}selected{% endif %}"><a href="{{cesta}}/vysledkove-listiny/">Výsledkové listiny</a> | ||||
| </ul> | ||||
| 
 | ||||
| {% endwith %} | ||||
|  |  | |||
|  | @ -13,7 +13,7 @@ urlpatterns = patterns('', | |||
|     url(r'^cislo/(?P<rocnik>\d+)\.(?P<cislo>[0-9-]+)/$', views.CisloView.as_view(), name='seminar_cislo'), | ||||
|     url(r'^problem/(?P<pk>\d+)/$', views.ProblemView.as_view(), name='seminar_problem'), | ||||
| 
 | ||||
|     url(r'^soustredeni/$', views.SoustredeniListView.as_view(), | ||||
|     url(r'^soustredeni/probehlo/$', views.SoustredeniListView.as_view(), | ||||
|         name = 'seminar_seznam_soustredeni'), | ||||
|     url(r'^soustredeni/(?P<pk>\d+)/$', views.SoustredeniView.as_view(), name='seminar_soustredeni'), | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue
	
	 Bc. Petr Pecha
						Bc. Petr Pecha