Browse Source

Merge branch 'Petr'

remotes/origin/cislopdf deploy-prod-2015-09-11-18-56-xlfd
Bc. Petr Pecha 9 years ago
parent
commit
f04bbfa03f
  1. 11
      mamweb/templates/base.html
  2. 80
      mamweb/templates/flatpages/default.html
  3. 17
      mamweb/templates/menu.html
  4. 4
      seminar/templates/seminar/archiv/base.html
  5. 8
      seminar/templates/seminar/archiv/base_cisla.html
  6. 8
      seminar/templates/seminar/archiv/base_temata.html
  7. 10
      seminar/templates/seminar/archiv/base_ulohy.html
  8. 6
      seminar/templates/seminar/archiv/cisla.html
  9. 2
      seminar/templates/seminar/archiv/cislo.html
  10. 2
      seminar/templates/seminar/archiv/problem.html
  11. 2
      seminar/templates/seminar/archiv/rocnik.html
  12. 6
      seminar/templates/seminar/archiv/submenu.html
  13. 2
      seminar/templates/seminar/archiv/temata.html
  14. 2
      seminar/templates/seminar/clanky/base.html
  15. 6
      seminar/templates/seminar/clanky/submenu.html
  16. 7
      seminar/templates/seminar/cojemam/organizatori.html
  17. 8
      seminar/templates/seminar/cojemam/submenu.html
  18. 7
      seminar/templates/seminar/soustredeni/seznam_soustredeni.html
  19. 6
      seminar/templates/seminar/soustredeni/submenu.html
  20. 6
      seminar/templates/seminar/zadani/AktualniZadani.html
  21. 7
      seminar/templates/seminar/zadani/Temata.html
  22. 2
      seminar/templates/seminar/zadani/base.html
  23. 10
      seminar/templates/seminar/zadani/submenu.html
  24. 2
      seminar/urls.py

11
mamweb/templates/base.html

@ -57,7 +57,16 @@
<div class='row'> <div class='row'>
<div class='col-md-12' style=''> <div class='col-md-12' style=''>
<div id='menu'> <div id='menu'>
{% include "menu.html" %} {# ============= MENU ============== #}
<ul>
<li class="{% block menu_uvod %}{% endblock %}"><a href="/co-je-MaM/uvod/">Co je M&amp;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> </div>
</div> </div>

80
mamweb/templates/flatpages/default.html

@ -14,21 +14,91 @@
</div> </div>
{% endblock content %} {% endblock content %}
{# nahraj spravne submenu #}
{% block submenu %} {% block submenu %}
{# co-je-MaM #}
{% if "/co-je-MaM/" in flatpage.url %} {% if "/co-je-MaM/" in flatpage.url %}
{% include "seminar/cojemam/submenu.html" %} {% 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 %}
{% endif %} {% endif %}
{# soustredeni #}
{% 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 %}
{# zadani #}
{% if "/zadani/" in flatpage.url %} {% if "/zadani/" in flatpage.url %}
{% include "seminar/zadani/submenu.html" %} {% 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 %} {% endif %}
{# clanky #}
{% if "/clanky/" in flatpage.url %} {% if "/clanky/" in flatpage.url %}
{% include "seminar/clanky/submenu.html" %} {% 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 %} {% endif %}
{# archiv #}
{% if "/archiv/" in flatpage.url %} {% if "/archiv/" in flatpage.url %}
{% include "seminar/archiv/submenu.html" %} {% if "/ulohy/" in flatpage.url %}
{% with "ulohy" as selected %}
{% include "seminar/archiv/submenu.html" %}
{% endwith %}
{% else %}
{% include "seminar/archiv/submenu.html" %}
{% endif %}
{% endif %} {% endif %}
{% endblock %} {% 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 #}

17
mamweb/templates/menu.html

@ -1,17 +0,0 @@
{% load i18n cache mam_menu %}
{% aktualni_rocniky as rs %}
<ul>
<li><a href="/co-je-MaM/uvod/">Co je M&amp;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>-->

4
seminar/templates/seminar/archiv/base.html

@ -1,6 +1,4 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block submenu %} {% block menu_archiv %}selected{% endblock %}
{% include "seminar/archiv/submenu.html" %}
{% endblock %}

8
seminar/templates/seminar/archiv/base_cisla.html

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

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

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

6
seminar/templates/seminar/archiv/cisla.html

@ -1,8 +1,4 @@
{% extends "seminar/archiv/base.html" %} {% extends "seminar/archiv/base_cisla.html" %}
{% block submenu %}
{% include "seminar/archiv/submenu.html" %}
{% endblock %}
{% block content %} {% block content %}
<div> <div>

2
seminar/templates/seminar/archiv/cislo.html

@ -1,4 +1,4 @@
{% extends "seminar/archiv/base.html" %} {% extends "seminar/archiv/base_cisla.html" %}
{% block content %} {% block content %}
<div> <div>

2
seminar/templates/seminar/archiv/problem.html

@ -1,4 +1,4 @@
{% extends "seminar/archiv/base.html" %} {% extends "seminar/archiv/base_ulohy.html" %}
{% load comments %} {% load comments %}

2
seminar/templates/seminar/archiv/rocnik.html

@ -1,4 +1,4 @@
{% extends "seminar/archiv/base.html" %} {% extends "seminar/archiv/base_cisla.html" %}
{% block content %} {% block content %}
<div> <div>

6
seminar/templates/seminar/archiv/submenu.html

@ -1,9 +1,9 @@
{% with "/archiv" as cesta %} {% with "/archiv" as cesta %}
<ul> <ul>
<li><a href="{{cesta}}/cisla/">Čísla</a> <li class="{% if selected == "cisla" %}selected{% endif %}"><a href="{{cesta}}/cisla/">Čísla</a>
<li><a href="{{cesta}}/temata/">Témata</a> <li class="{% if selected == "temata" %}selected{% endif %}"><a href="{{cesta}}/temata/">Témata</a>
<li><a href="{{cesta}}/ulohy/">Úlohy</a> <li class="{% if selected == "ulohy" %}selected{% endif %}"><a href="{{cesta}}/ulohy/">Úlohy</a>
</ul> </ul>
{% endwith %} {% endwith %}

2
seminar/templates/seminar/archiv/temata.html

@ -1,4 +1,4 @@
{% extends "seminar/archiv/base.html" %} {% extends "seminar/archiv/base_temata.html" %}
{% block content %} {% block content %}
<h2> <h2>

2
seminar/templates/seminar/clanky/base.html

@ -1,5 +1,7 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block menu_clanky %}selected{% endblock %}
{% block submenu %} {% block submenu %}
{% include "seminar/clanky/submenu.html" %} {% include "seminar/clanky/submenu.html" %}
{% endblock %} {% endblock %}

6
seminar/templates/seminar/clanky/submenu.html

@ -1,9 +1,9 @@
{% with "/clanky" as cesta %} {% with "/clanky" as cesta %}
<ul> <ul>
<li><a href="{{cesta}}/uvod/">Úvod</a> <li class="{% if selected == "uvod" %}selected{% endif %}"><a href="{{cesta}}/uvod/">Úvod</a>
<li><a href="{{cesta}}/org/">Organizátorské články</a> <li class="{% if selected == "org" %}selected{% endif %}"><a href="{{cesta}}/org/">Organizátorské články</a>
<li><a href="{{cesta}}/resitel/">Řešitelské články</a> <li class="{% if selected == "resitel" %}selected{% endif %}"><a href="{{cesta}}/resitel/">Řešitelské články</a>
</ul> </ul>
{% endwith %} {% endwith %}

7
seminar/templates/seminar/cojemam/organizatori.html

@ -7,6 +7,13 @@
{% endif %} {% endif %}
{% endblock%}{% endblock%} {% endblock%}{% endblock%}
{% block menu_uvod %}selected{% endblock %}
{% block submenu %}
{% with "org" as selected %}
{% include "seminar/cojemam/submenu.html" %}
{% endwith %}
{% endblock %}
{% block content %} {% block content %}
<div> <div>
{% if not aktivni %} {% if not aktivni %}

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

@ -1,10 +1,10 @@
{% with "/co-je-MaM" as cesta %} {% with "/co-je-MaM" as cesta %}
<ul> <ul>
<li><a href="{{cesta}}/uvod/">Úvod</a> <li class="{% if selected == "uvod" %}selected{% endif %}"><a href="{{cesta}}/uvod/">Úvod</a>
<li><a href="{{cesta}}/jak-resit/">Jak řešit</a> <li class="{% if selected == "jak-resit" %}selected{% endif %}"><a href="{{cesta}}/jak-resit/">Jak řešit</a>
<li><a href="{{cesta}}/organizatori/">Organizátoři</a> <li class="{% if selected == "org" %}selected{% endif %}"><a href="{{cesta}}/organizatori/">Organizátoři</a>
<li><a href="{{cesta}}/FAQ/">FAQ</a> <li class="{% if selected == "FAQ" %}selected{% endif %}"><a href="{{cesta}}/FAQ/">FAQ</a>
</ul> </ul>
{% endwith %} {% endwith %}

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

6
seminar/templates/seminar/zadani/AktualniZadani.html

@ -1,5 +1,11 @@
{% extends "seminar/zadani/base.html" %} {% extends "seminar/zadani/base.html" %}
{% block submenu %}
{% with "aktualni" as selected %}
{% include 'seminar/zadani/submenu.html' %}
{% endwith %}
{% endblock submenu %}
{% block content %} {% block content %}
<div> <div>
<h2> <h2>

7
seminar/templates/seminar/zadani/Temata.html

@ -1,5 +1,12 @@
{% extends "seminar/zadani/base.html" %} {% extends "seminar/zadani/base.html" %}
{% block submenu %}
{% with "temata" as selected %}
{% include 'seminar/zadani/submenu.html' %}
{% endwith %}
{% endblock submenu %}
{% block content %} {% block content %}
{% with nastaveni.aktualni_rocnik as ar %} {% with nastaveni.aktualni_rocnik as ar %}
<div> <div>

2
seminar/templates/seminar/zadani/base.html

@ -1,5 +1,7 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block menu_zadani %}selected{% endblock %}
{% block submenu %} {% block submenu %}
{% include 'seminar/zadani/submenu.html' %} {% include 'seminar/zadani/submenu.html' %}
{% endblock submenu %} {% endblock submenu %}

10
seminar/templates/seminar/zadani/submenu.html

@ -1,11 +1,11 @@
{% with "/zadani" as cesta %} {% with "/zadani" as cesta %}
<ul> <ul>
<li><a href="{{cesta}}/aktualni/">Aktuální zadání</a> <li class="{% if selected == "aktualni" %}selected{% endif %}"><a href="{{cesta}}/aktualni/">Aktuální zadání</a>
<li><a href="{{cesta}}/ulohy/">Úlohy</a> <li class="{% if selected == "ulohy" %}selected{% endif %}"><a href="{{cesta}}/ulohy/">Úlohy</a>
<li><a href="{{cesta}}/temata/">Témata</a> <li class="{% if selected == "temata" %}selected{% endif %}"><a href="{{cesta}}/temata/">Témata</a>
<li><a href="{{cesta}}/aktualni-cislo/">Aktuální číslo</a> <li class="{% if selected == "aktualni-cislo" %}selected{% endif %}"><a href="{{cesta}}/aktualni-cislo/">Aktuální číslo</a>
<li><a href="{{cesta}}/vysledkove-listiny/">Výsledkové listiny</a> <li class="{% if selected == "vysledkove-listiny" %}selected{% endif %}"><a href="{{cesta}}/vysledkove-listiny/">Výsledkové listiny</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