Browse Source

Podbarveni submenu soustredeni

remotes/origin/cislopdf
Bc. Petr Pecha 9 years ago
parent
commit
ccd63ae756
  1. 10
      mamweb/templates/flatpages/default.html
  2. 7
      seminar/templates/seminar/soustredeni/seznam_soustredeni.html
  3. 6
      seminar/templates/seminar/soustredeni/submenu.html
  4. 2
      seminar/urls.py

10
mamweb/templates/flatpages/default.html

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

7
seminar/templates/seminar/soustredeni/seznam_soustredeni.html

@ -1,5 +1,12 @@
{% extends "seminar/soustredeni/base.html" %} {% 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 #} {% block content %}{% if user.is_authenticated %}{# PRACUJE SE STRANKA #}
<h2> <h2>

6
seminar/templates/seminar/soustredeni/submenu.html

@ -1,9 +1,9 @@
{% with "/soustredeni" as cesta %} {% with "/soustredeni" as cesta %}
<ul> <ul>
<li><a href="{{cesta}}/uvod/">Úvod</a> <li class="{% if selected == "uvod" %}selected{% endif %}"><a href="{{cesta}}/">Úvod</a>
<li><a href="{{cesta}}/pripravujeme/">Připravujeme</a> <li class="{% if selected == "pripravujeme" %}selected{% endif %}"><a href="{{cesta}}/pripravujeme/">Připravujeme</a>
<li><a href="{{cesta}}/probehlo/">Proběhlo</a> <li class="{% if selected == "probehlo" %}selected{% endif %}"><a href="{{cesta}}/probehlo/">Proběhlo</a>
</ul> </ul>
{% endwith %} {% endwith %}

2
seminar/urls.py

@ -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'^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'^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'), name = 'seminar_seznam_soustredeni'),
url(r'^soustredeni/(?P<pk>\d+)/$', views.SoustredeniView.as_view(), name='seminar_soustredeni'), url(r'^soustredeni/(?P<pk>\d+)/$', views.SoustredeniView.as_view(), name='seminar_soustredeni'),

Loading…
Cancel
Save