Browse Source

struktura menu + submenu Co je M&M

remotes/origin/feincms
Bc. Petr Pecha 10 years ago
parent
commit
cf83fb0593
  1. 2
      mamweb/templates/base.html
  2. 6
      mamweb/templates/flatpages/default.html
  3. 13
      mamweb/templates/menu.html
  4. 13
      seminar/templates/seminar/cojemam/organizatori.html
  5. 8
      seminar/templates/seminar/cojemam/submenu.html
  6. 3
      seminar/urls.py
  7. 5
      seminar/views.py

2
mamweb/templates/base.html

@ -36,6 +36,8 @@
<div class='row'>
<div class='col-md-4' style=''>
{% include "menu.html" %}
{% block submenu %}
{% endblock %}
</div>
<div class='col-md-8'>
{% block content %}

6
mamweb/templates/flatpages/default.html

@ -9,3 +9,9 @@
</div>
{% endblock content %}
{% block submenu %}
{% if "/co-je-MaM/" in flatpage.url %}
{% include "seminar/cojemam/submenu.html" %}
{% endif %}
{% endblock %}

13
mamweb/templates/menu.html

@ -1,7 +1,18 @@
{% load i18n cache mam_menu %}
{% aktualni_rocniky as rs %}
<h2>MENU</h2>
<h2> MENU </h2>
<ul>
<li><a href="/co-je-MaM/uvod/">Co je M&amp;M</a>
<li><a href="/soustredeni/uvod/">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>
<h2>STARÉ MENU</h2>
<p><a href='{% url 'seminar_aktualni_zadani' %}'>Aktuální zadání</a>

13
seminar/templates/seminar/cojemam/organizatori.html

@ -0,0 +1,13 @@
{% extends "base.html" %}
{% block submenu %}
{% include "seminar/cojemam/submenu.html" %}
{% endblock %}
{% block content %}
<div>
<h2>Organizátoři</h2>
</div>
{% endblock content %}

8
seminar/templates/seminar/cojemam/submenu.html

@ -0,0 +1,8 @@
<ul>
<li><a href="../uvod/">Úvod</a>
<li><a href="../jak-resit/">Jak řešit</a>
<li><a href="../organizatori/">Organizátoři</a>
<li><a href="../FAQ/">FAQ</a>
</ul>

3
seminar/urls.py

@ -2,6 +2,9 @@ from django.conf.urls import patterns, url
from . import views, export
urlpatterns = patterns('',
url(r'^co-je-MaM/organizatori/$', views.CojemamOrganizatoriView.as_view()),
url(r'^rocnik/(?P<pk>\d+)/$', views.RocnikView.as_view(), name='seminar_rocnik'),
url(r'^cislo/(?P<pk>\d+)/$', views.CisloView.as_view(), name='seminar_cislo'),
url(r'^problem/(?P<pk>\d+)/$', views.ProblemView.as_view(), name='seminar_problem'),

5
seminar/views.py

@ -12,6 +12,11 @@ def AktualniZadaniView(request):
},
)
# Co je M&M
class CojemamOrganizatoriView(generic.TemplateView):
template_name='seminar/cojemam/organizatori.html'
class RocnikView(generic.DetailView):
model = Rocnik
template_name = 'seminar/rocnik.html'

Loading…
Cancel
Save