Browse Source

Premisteni archivniho menu do archivu

remotes/origin/feincms
Bc. Petr Pecha 10 years ago
parent
commit
d03298fb86
  1. 8
      mamweb/templates/menu.html
  2. 22
      seminar/templates/seminar/archiv/cisla.html
  3. 8
      seminar/urls.py
  4. 4
      seminar/views.py

8
mamweb/templates/menu.html

@ -12,12 +12,8 @@
<!-- <li><a href="/odevzdat-reseni/muj-ucet">Odeslat řešení</a>--> <!-- <li><a href="/odevzdat-reseni/muj-ucet">Odeslat řešení</a>-->
</ul> </ul>
<h2>STARÉ MENU</h2> <!-- TODO smazat <ul>
<p><a href='{% url 'seminar_aktualni_zadani' %}'>Aktuální zadání</a>
<ul>
{% for r in rs %} {% for r in rs %}
<li><a href='{{ r.verejne_url }}'>Ročník {{ r }}</a> <li><a href='{{ r.verejne_url }}'>Ročník {{ r }}</a>
{% endfor %} {% endfor %}
</ul> </ul>-->

22
seminar/templates/seminar/archiv/cisla.html

@ -0,0 +1,22 @@
{% extends "base.html" %}
{% block submenu %}
{% include "seminar/archiv/submenu.html" %}
{% endblock %}
{% block content %}
<div>
<h2>Archiv čísel</h2>
<ul>
{% for r in object_list %}
<li><a href='{{ r.verejne_url }}'>Ročník {{ r }}</a>
{% empty %}
Niesú žiadne ročníky
{% endfor %}
</ul>
</div>
{% endblock content %}

8
seminar/urls.py

@ -5,9 +5,11 @@ urlpatterns = patterns('',
url(r'^co-je-MaM/organizatori/$', views.CojemamOrganizatoriView.as_view()), 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'^archiv/cisla/$', views.CislaView.as_view()),
url(r'^cislo/(?P<pk>\d+)/$', views.CisloView.as_view(), name='seminar_cislo'), url(r'^archiv/cisla/rocnik/(?P<pk>\d+)/$', views.RocnikView.as_view(), name='seminar_rocnik'),
url(r'^problem/(?P<pk>\d+)/$', views.ProblemView.as_view(), name='seminar_problem'), url(r'^archiv/cisla/cislo/(?P<pk>\d+)/$', views.CisloView.as_view(), name='seminar_cislo'),
url(r'^archiv/cisla/problem/(?P<pk>\d+)/$', views.ProblemView.as_view(), name='seminar_problem'),
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'),
url(r'^zadani/$', views.AktualniZadaniView, name='seminar_aktualni_zadani'), url(r'^zadani/$', views.AktualniZadaniView, name='seminar_aktualni_zadani'),

4
seminar/views.py

@ -17,6 +17,10 @@ def AktualniZadaniView(request):
class CojemamOrganizatoriView(generic.TemplateView): class CojemamOrganizatoriView(generic.TemplateView):
template_name='seminar/cojemam/organizatori.html' template_name='seminar/cojemam/organizatori.html'
class CislaView(generic.ListView):
model = Rocnik
template_name='seminar/archiv/cisla.html'
class RocnikView(generic.DetailView): class RocnikView(generic.DetailView):
model = Rocnik model = Rocnik
template_name = 'seminar/rocnik.html' template_name = 'seminar/rocnik.html'

Loading…
Cancel
Save