diff --git a/galerie/static/galerie/prvky/dalsi.svg b/galerie/static/galerie/prvky/dalsi.svg index bd3274b6..e928adb2 100644 --- a/galerie/static/galerie/prvky/dalsi.svg +++ b/galerie/static/galerie/prvky/dalsi.svg @@ -5,11 +5,39 @@ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="25.135418mm" height="42.333332mm" viewBox="0 0 25.135418 42.333331" version="1.1" - id="svg851"> + id="svg851" + sodipodi:docname="dalsi.svg" + inkscape:version="0.92.4 (5da689c313, 2019-01-14)"> + + + + id="path44-3" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cccccccccc" /> diff --git a/galerie/static/galerie/prvky/predchozi.svg b/galerie/static/galerie/prvky/predchozi.svg index af139f7e..b7a491ed 100644 --- a/galerie/static/galerie/prvky/predchozi.svg +++ b/galerie/static/galerie/prvky/predchozi.svg @@ -5,11 +5,39 @@ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="25.135418mm" height="42.333332mm" viewBox="0 0 25.135418 42.333331" version="1.1" - id="svg851"> + id="svg851" + sodipodi:docname="predchozi.svg" + inkscape:version="0.92.4 (5da689c313, 2019-01-14)"> + + + + transform="matrix(1.0282842,0,0,1,-86.319083,-88.415315)"> + id="path44-3" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cccccccccc" /> diff --git a/seminar/migrations/0082_auto_20200506_1951.py b/seminar/migrations/0082_auto_20200506_1951.py new file mode 100644 index 00000000..3132c434 --- /dev/null +++ b/seminar/migrations/0082_auto_20200506_1951.py @@ -0,0 +1,19 @@ +# Generated by Django 2.2.12 on 2020-05-06 17:51 + +from django.db import migrations, models +import seminar.models + + +class Migration(migrations.Migration): + + dependencies = [ + ('seminar', '0081_auto_20200408_2221'), + ] + + operations = [ + migrations.AlterField( + model_name='cislo', + name='titulka_nahled', + field=models.ImageField(blank=True, help_text='Obrázek titulní strany, generuje se automaticky', null=True, upload_to=seminar.models.cislo_png_filename, verbose_name='Obrázek titulní strany'), + ), + ] diff --git a/seminar/migrations/0083_auto_20200506_1952.py b/seminar/migrations/0083_auto_20200506_1952.py new file mode 100644 index 00000000..0c7fcf38 --- /dev/null +++ b/seminar/migrations/0083_auto_20200506_1952.py @@ -0,0 +1,19 @@ +# Generated by Django 2.2.12 on 2020-05-06 17:52 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('seminar', '0082_auto_20200506_1951'), + ] + + operations = [ + migrations.AlterField( + model_name='treenode', + name='first_child', + field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='father_of_first', to='seminar.TreeNode', verbose_name='první potomek'), + ), + ] diff --git a/seminar/models.py b/seminar/models.py index 5619d15c..c53c7048 100644 --- a/seminar/models.py +++ b/seminar/models.py @@ -14,6 +14,7 @@ from django.utils.text import slugify from django.urls import reverse from django.core.cache import cache from django.core.exceptions import ObjectDoesNotExist +from django.contrib.contenttypes.models import ContentType from django.utils.text import get_valid_filename from imagekit.models import ImageSpecField, ProcessedImageField from imagekit.processors import ResizeToFit, Transpose @@ -1304,6 +1305,10 @@ class TreeNode(PolymorphicModel): def aktualizuj_nazev(self): raise NotImplementedError("Pokus o aktualizaci názvu obecného TreeNode místo konkrétní instance") + def get_admin_url(self): + content_type = ContentType.objects.get_for_model(self.__class__) + return reverse("admin:%s_%s_change" % (content_type.app_label, content_type.model), args=(self.id,)) + class RocnikNode(TreeNode): class Meta: db_table = 'seminar_nodes_rocnik' diff --git a/seminar/static/seminar/prihlaska.js b/seminar/static/seminar/prihlaska.js index 81f91d28..c3565450 100644 --- a/seminar/static/seminar/prihlaska.js +++ b/seminar/static/seminar/prihlaska.js @@ -3,7 +3,7 @@ function addrCountryChanged(){ var stat_text = document.getElementById('id_li_stat_text'); var stat = stat_select[stat_select.selectedIndex].value; if (stat === "other"){ - stat_text.style.display="block"; + stat_text.style.display="revert"; } else { stat_text.style.display="none"; $('#id_stat_text').val(""); @@ -12,18 +12,22 @@ function addrCountryChanged(){ function hideSchoolTextfields(){ var skola_nazev = document.getElementById('id_li_skola_nazev'); var skola_adresa = document.getElementById('id_li_skola_adresa'); + var skola_vypln = document.getElementById('id_li_skola_vypln'); skola_nazev.style.display="none"; skola_adresa.style.display="none"; + skola_vypln.style.display="none"; } function schoolNotInList(){ var skola_nazev = document.getElementById('id_li_skola_nazev'); var skola_adresa = document.getElementById('id_li_skola_adresa'); + var skola_vypln = document.getElementById('id_li_skola_vypln'); // FIXME nefunguje a nevim proc (TypeError: $(...).select2 is not a function) //var skola_select = $('#id_skola').select2(); //skola_select.val(null).trigger('change'); - skola_nazev.style.display="block"; - skola_adresa.style.display="block"; + skola_vypln.style.display="revert"; + skola_nazev.style.display="revert"; + skola_adresa.style.display="revert"; } document.addEventListener("DOMContentLoaded", function(){ diff --git a/seminar/templates/seminar/archiv/temata.html b/seminar/templates/seminar/archiv/temata.html index ba2a6206..fc7d87e8 100644 --- a/seminar/templates/seminar/archiv/temata.html +++ b/seminar/templates/seminar/archiv/temata.html @@ -7,17 +7,13 @@ {% endblock %}{% endblock%} - {% for tema in object_list %} - {% with tema.cislo_zadani.rocnik.rocnik as rocnik %} - {% ifchanged rocnik %} - {% if not forloop.first %}{% endif %} -

{{ rocnik }}. ročník

- {% endblock content %} diff --git a/seminar/templates/seminar/edit.html b/seminar/templates/seminar/edit.html index 3f3e0d99..bc78312c 100644 --- a/seminar/templates/seminar/edit.html +++ b/seminar/templates/seminar/edit.html @@ -15,59 +15,77 @@
{% csrf_token %} {{form.non_field_errors}} -
    -
  • - Přihlašovací údaje -
  • + +
    + +

    + Přihlašovací údaje +

    + {% include "seminar/prihlaska_field.html" with field=form.username %} -
  • +
  • + +
    + +

    Osobní údaje -

  • + + {% include "seminar/prihlaska_field.html" with field=form.jmeno %} -
  • {% include "seminar/prihlaska_field.html" with field=form.prijmeni %} -
  • {% include "seminar/prihlaska_field.html" with field=form.pohlavi_muz%} -
  • {% include "seminar/prihlaska_field.html" with field=form.email %} -
  • {% include "seminar/prihlaska_field.html" with field=form.telefon %} -
  • {% include "seminar/prihlaska_field.html" with field=form.datum_narozeni %} -
  • +
  • +
    - Bydliště -
  • + +

    + Bydliště +

    + {% include "seminar/prihlaska_field.html" with field=form.ulice %} -
  • {% include "seminar/prihlaska_field.html" with field=form.mesto %} -
  • {% include "seminar/prihlaska_field.html" with field=form.psc %} -
  • {% include "seminar/prihlaska_field.html" with field=form.stat %} -
  • -
  • - {% include "seminar/prihlaska_field.html" with field=form.stat_text %} -
  • + {% include "seminar/prihlaska_field.html" with field=form.stat_text id="id_li_stat_text"%} +
  • +
    + +

    + Škola +

    + {% include "seminar/prihlaska_field.html" with field=form.skola %} -
  • - -
  • -
  • - Vyplň prosím celý název a adresu školy.
    - {% include "seminar/prihlaska_field.html" with field=form.skola_nazev %} -
  • -
  • - {% include "seminar/prihlaska_field.html" with field=form.skola_adresa %} -
  • +
  • + + {% include "seminar/prihlaska_field.html" with field=form.skola_nazev id="id_li_skola_nazev" %} + {% include "seminar/prihlaska_field.html" with field=form.skola_adresa id="id_li_skola_adresa" %} {% include "seminar/prihlaska_field.html" with field=form.rok_maturity %} -
  • +
  • Vyplň prosím celý název a adresu školy.
    + +
    + +

    + Pošta +

    + {% include "seminar/prihlaska_field.html" with field=form.zasilat %} -
  • +
  • + +
    + +

    + Zasílání propagačních materiálů +

    + {% include "seminar/prihlaska_field.html" with field=form.spam %} - - +
    + +
    +
  • {% endblock %} - diff --git a/seminar/templates/seminar/login.html b/seminar/templates/seminar/login.html index 6319ecc0..9769a41a 100644 --- a/seminar/templates/seminar/login.html +++ b/seminar/templates/seminar/login.html @@ -10,9 +10,9 @@
    {% csrf_token %} -
      - {{ form.as_ul }} -
    + + {{ form.as_table }} +
    {# Django si posílá jméno další stránky jako obsah formuláře a výchozí hodnota (mi přišlo, že) nejde změnit... #} @@ -23,4 +23,3 @@ {% endblock %} - diff --git a/seminar/templates/seminar/prihlaska.html b/seminar/templates/seminar/prihlaska.html index 8b17c0bd..baf4ec47 100644 --- a/seminar/templates/seminar/prihlaska.html +++ b/seminar/templates/seminar/prihlaska.html @@ -14,92 +14,93 @@ {% endblock %}{% endblock %} - {% csrf_token %} {{form.non_field_errors}} -
      -
    • - Přihlašovací údaje -
    • -
    • - {% include "seminar/prihlaska_field.html" with field=form.username %} -
    • -
    • - {% include "seminar/prihlaska_field.html" with field=form.password %} -
    • -
    • - {% include "seminar/prihlaska_field.html" with field=form.password_check %} -
    • -
    • - Osobní údaje -
    • -
    • - {% include "seminar/prihlaska_field.html" with field=form.jmeno %} -
    • -
    • - {% include "seminar/prihlaska_field.html" with field=form.prijmeni %} -
    • -
    • - {% include "seminar/prihlaska_field.html" with field=form.pohlavi_muz%} -
    • -
    • - {% include "seminar/prihlaska_field.html" with field=form.email %} -
    • -
    • - {% include "seminar/prihlaska_field.html" with field=form.telefon %} -
    • -
    • - {% include "seminar/prihlaska_field.html" with field=form.datum_narozeni %} -
    • -
    • -
      - Bydliště -
    • -
    • - {% include "seminar/prihlaska_field.html" with field=form.ulice %} -
    • -
    • - {% include "seminar/prihlaska_field.html" with field=form.mesto %} -
    • -
    • - {% include "seminar/prihlaska_field.html" with field=form.psc %} -
    • -
    • - {% include "seminar/prihlaska_field.html" with field=form.stat %} -
    • -
    • - {% include "seminar/prihlaska_field.html" with field=form.stat_text %} -
    • - -
    • -
      - {% include "seminar/prihlaska_field.html" with field=form.skola %} -
    • -
    • - -
    • -
    • - Vyplň prosím celý název a adresu školy.
      - {% include "seminar/prihlaska_field.html" with field=form.skola_nazev %} -
    • -
    • - {% include "seminar/prihlaska_field.html" with field=form.skola_adresa %} -
    • -
    • - {% include "seminar/prihlaska_field.html" with field=form.rok_maturity %} -
    • -
    • - {% include "seminar/prihlaska_field.html" with field=form.zasilat %} -
    • -
    • - {% include "seminar/gdpr.html" %} - {% include "seminar/prihlaska_field.html" with field=form.gdpr %} -
    • -
    • - {% include "seminar/prihlaska_field.html" with field=form.spam %} -
    • -
    + + +
    +

    + Přihlašovací údaje +

    + + {% include "seminar/prihlaska_field.html" with field=form.username %} + {% include "seminar/prihlaska_field.html" with field=form.password %} + {% include "seminar/prihlaska_field.html" with field=form.password_check %} +
    + +
    + +

    + Osobní údaje +

    + + {% include "seminar/prihlaska_field.html" with field=form.jmeno %} + {% include "seminar/prihlaska_field.html" with field=form.prijmeni %} + {% include "seminar/prihlaska_field.html" with field=form.pohlavi_muz%} + {% include "seminar/prihlaska_field.html" with field=form.email %} + {% include "seminar/prihlaska_field.html" with field=form.telefon %} + {% include "seminar/prihlaska_field.html" with field=form.datum_narozeni %} +
    + +
    + +

    + Bydliště +

    + + {% include "seminar/prihlaska_field.html" with field=form.ulice %} + {% include "seminar/prihlaska_field.html" with field=form.mesto %} + {% include "seminar/prihlaska_field.html" with field=form.psc %} + {% include "seminar/prihlaska_field.html" with field=form.stat %} + {% include "seminar/prihlaska_field.html" with field=form.stat_text id="id_li_stat_text"%} +
    + +
    + +

    + Škola +

    + + {% include "seminar/prihlaska_field.html" with field=form.skola %} + + + {% include "seminar/prihlaska_field.html" with field=form.skola_nazev id="id_li_skola_nazev" %} + {% include "seminar/prihlaska_field.html" with field=form.skola_adresa id="id_li_skola_adresa" %} + {% include "seminar/prihlaska_field.html" with field=form.rok_maturity %} +
    Vyplň prosím celý název a adresu školy.
    + +
    + +

    + Pošta +

    + + {% include "seminar/prihlaska_field.html" with field=form.zasilat %} +
    +
    + +

    + GDPR +

    + {% include "seminar/gdpr.html" %} + + {% include "seminar/prihlaska_field.html" with field=form.gdpr %} +
    + +
    + +

    + Zasílání propagačních materiálů +

    + + {% include "seminar/prihlaska_field.html" with field=form.spam %} +
    + + + +
    +