Podbarveni submenu soustredeni

This commit is contained in:
Bc. Petr Pecha 2015-09-11 17:58:16 +02:00
parent 0f4044d7c0
commit ccd63ae756
4 changed files with 20 additions and 5 deletions

View file

@ -34,7 +34,15 @@
{% endif %}
{% endif %}
{% if "/soustredeni/" in flatpage.url %}
{% include "seminar/soustredeni/submenu.html" %}
{% 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 %}
{% if "/zadani/" in flatpage.url %}
{% include "seminar/zadani/submenu.html" %}

View file

@ -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>

View file

@ -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 %}

View file

@ -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'),