Merge branch 'data_migrations' into vzhled
# Conflicts: # seminar/templates/seminar/cojemam/base.html # seminar/templates/seminar/soustredeni/seznam_soustredeni.html
This commit is contained in:
commit
796e32db7f
47 changed files with 403 additions and 293 deletions
207
data/fotka_header.json
Normal file
207
data/fotka_header.json
Normal file
|
@ -0,0 +1,207 @@
|
|||
[
|
||||
{
|
||||
"model": "mamweb.fotkaheader",
|
||||
"pk": "baliky.jpg",
|
||||
"fields": {
|
||||
"cas": "2020-09-20T09:18:34.562Z",
|
||||
"fotka": "header/baliky.jpg"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "mamweb.fotkaheader",
|
||||
"pk": "beh.jpg",
|
||||
"fields": {
|
||||
"cas": "2020-09-20T09:18:34.562Z",
|
||||
"fotka": "header/beh.jpg"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "mamweb.fotkaheader",
|
||||
"pk": "kryptografie.jpg",
|
||||
"fields": {
|
||||
"cas": "2020-09-20T09:18:34.562Z",
|
||||
"fotka": "header/kryptografie.jpg"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "mamweb.fotkaheader",
|
||||
"pk": "mam_cernobile.jpg",
|
||||
"fields": {
|
||||
"cas": "2020-09-20T09:18:34.562Z",
|
||||
"fotka": "header/mam_cernobile.jpg"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "mamweb.fotkaheader",
|
||||
"pk": "noc.jpg",
|
||||
"fields": {
|
||||
"cas": "2020-09-20T09:18:34.562Z",
|
||||
"fotka": "header/noc.jpg"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "mamweb.fotkaheader",
|
||||
"pk": "ohen.jpg",
|
||||
"fields": {
|
||||
"cas": "2020-09-20T09:18:34.562Z",
|
||||
"fotka": "header/ohen.jpg"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "mamweb.fotkaheader",
|
||||
"pk": "snih.jpg",
|
||||
"fields": {
|
||||
"cas": "2020-09-20T09:18:34.562Z",
|
||||
"fotka": "header/snih.jpg"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "mamweb.fotkaheader",
|
||||
"pk": "spolecna.jpg",
|
||||
"fields": {
|
||||
"cas": "2020-09-20T09:18:34.562Z",
|
||||
"fotka": "header/spolecna.jpg"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "mamweb.fotkaheader",
|
||||
"pk": "stiny.jpg",
|
||||
"fields": {
|
||||
"cas": "2020-09-20T09:18:34.562Z",
|
||||
"fotka": "header/stiny.jpg"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "mamweb.fotkaheader",
|
||||
"pk": "vikendovka.jpg",
|
||||
"fields": {
|
||||
"cas": "2020-09-20T09:18:34.562Z",
|
||||
"fotka": "header/vikendovka.jpg"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "mamweb.fotkaheader",
|
||||
"pk": "vylet.jpg",
|
||||
"fields": {
|
||||
"cas": "2020-09-20T09:18:34.562Z",
|
||||
"fotka": "header/vylet.jpg"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "mamweb.fotkaurlvazba",
|
||||
"pk": 1,
|
||||
"fields": {
|
||||
"url": "/archiv/",
|
||||
"fotka": "stiny.jpg",
|
||||
"denni_doba": "oboji"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "mamweb.fotkaurlvazba",
|
||||
"pk": 2,
|
||||
"fields": {
|
||||
"url": "/clanky/",
|
||||
"fotka": "kryptografie.jpg",
|
||||
"denni_doba": "den"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "mamweb.fotkaurlvazba",
|
||||
"pk": 3,
|
||||
"fields": {
|
||||
"url": "/clanky/",
|
||||
"fotka": "ohen.jpg",
|
||||
"denni_doba": "noc"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "mamweb.fotkaurlvazba",
|
||||
"pk": 4,
|
||||
"fields": {
|
||||
"url": "/zadani/",
|
||||
"fotka": "baliky.jpg",
|
||||
"denni_doba": "den"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "mamweb.fotkaurlvazba",
|
||||
"pk": 5,
|
||||
"fields": {
|
||||
"url": "/zadani/",
|
||||
"fotka": "stiny.jpg",
|
||||
"denni_doba": "noc"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "mamweb.fotkaurlvazba",
|
||||
"pk": 6,
|
||||
"fields": {
|
||||
"url": "/co-je-MaM/",
|
||||
"fotka": "vikendovka.jpg",
|
||||
"denni_doba": "den"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "mamweb.fotkaurlvazba",
|
||||
"pk": 7,
|
||||
"fields": {
|
||||
"url": "/co-je-MaM/",
|
||||
"fotka": "noc.jpg",
|
||||
"denni_doba": "noc"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "mamweb.fotkaurlvazba",
|
||||
"pk": 8,
|
||||
"fields": {
|
||||
"url": "/soustredeni/",
|
||||
"fotka": "beh.jpg",
|
||||
"denni_doba": "den"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "mamweb.fotkaurlvazba",
|
||||
"pk": 9,
|
||||
"fields": {
|
||||
"url": "/soustredeni/",
|
||||
"fotka": "vylet.jpg",
|
||||
"denni_doba": "noc"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "mamweb.fotkaurlvazba",
|
||||
"pk": 10,
|
||||
"fields": {
|
||||
"url": "/login/",
|
||||
"fotka": "baliky.jpg",
|
||||
"denni_doba": "den"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "mamweb.fotkaurlvazba",
|
||||
"pk": 11,
|
||||
"fields": {
|
||||
"url": "/login/",
|
||||
"fotka": "stiny.jpg",
|
||||
"denni_doba": "noc"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "mamweb.fotkaurlvazba",
|
||||
"pk": 12,
|
||||
"fields": {
|
||||
"url": "/profil/",
|
||||
"fotka": "baliky.jpg",
|
||||
"denni_doba": "den"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "mamweb.fotkaurlvazba",
|
||||
"pk": 13,
|
||||
"fields": {
|
||||
"url": "/profil/",
|
||||
"fotka": "stiny.jpg",
|
||||
"denni_doba": "noc"
|
||||
}
|
||||
}
|
||||
]
|
|
@ -1,6 +0,0 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{# TODO predelat pres context processor #}
|
||||
{% block header %}soustredeni{% endblock %}
|
||||
{% block menu_soustredeni %}selected{% endblock %}
|
||||
{% block submenu %}{% include 'seminar/soustredeni/submenu.html' %}{% endblock %}
|
|
@ -1,4 +1,4 @@
|
|||
{% extends "galerie/Base.html" %}
|
||||
{% extends "base.html" %}
|
||||
|
||||
|
||||
{% block nadpis1a %}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% extends "galerie/Base.html" %}
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block nadpis1a %}
|
||||
Galerie {{galerie.nazev}}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% extends "galerie/Base.html" %}
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}{% block nadpis1a %}
|
||||
Vytvářím novou galerii
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block submenu %}
|
||||
{% include "korektury/submenu.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{# blok do kterého se nacita text, v pripade jinyhc templatu obalit vlastnim blokem #}
|
||||
{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
{# blok pro titulek stranky #}
|
||||
{% endblock %}
|
|
@ -1,10 +1,4 @@
|
|||
{% extends "korektury/base.html" %}
|
||||
|
||||
{% block submenu %}
|
||||
{% with "help" as selected %}
|
||||
{% include "korektury/submenu.html" %}
|
||||
{% endwith %}
|
||||
{% endblock %}
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% load staticfiles %}
|
||||
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
{% extends "korektury/base.html" %}
|
||||
{% extends "base.html" %}
|
||||
{% load staticfiles %}
|
||||
|
||||
{% block submenu %}
|
||||
{% include "korektury/submenu.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block script%}
|
||||
<link rel="stylesheet" type="text/css" media="screen, projection" href="{% static "korektury/opraf-list.css" %}" />
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
{% with "/korektury" as cesta %}
|
||||
|
||||
<div id='submenu'>
|
||||
<ul>
|
||||
<li class="{% if selected == "aktualni" %}selected{% endif %}"><a href="{{cesta}}/">Aktuální</a>
|
||||
<li class="{% if selected == "zastarale" %}selected{% endif %}"><a href="{{cesta}}/zastarale/">Zastaralé</a>
|
||||
<li class="{% if selected == "help" %}selected{% endif %}"><a href="{{cesta}}/help/">Nápověda</a>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{% endwith %}
|
||||
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
from django.contrib import admin
|
||||
from django.contrib.admin import ModelAdmin
|
||||
from django.contrib.flatpages.models import FlatPage
|
||||
|
||||
# Note: we are renaming the original Admin and Form as we import them!
|
||||
|
@ -7,7 +8,9 @@ from django.contrib.flatpages.admin import FlatpageForm as FlatpageFormOld
|
|||
|
||||
from django import forms
|
||||
from ckeditor_uploader.widgets import CKEditorUploadingWidget
|
||||
|
||||
|
||||
import mamweb.models as m
|
||||
|
||||
class FlatpageForm(FlatpageFormOld):
|
||||
content = forms.CharField(widget=CKEditorUploadingWidget())
|
||||
class Meta:
|
||||
|
@ -22,3 +25,9 @@ class FlatPageAdmin(FlatPageAdminOld):
|
|||
# We have to unregister the normal admin, and then reregister ours
|
||||
admin.site.unregister(FlatPage)
|
||||
admin.site.register(FlatPage, FlatPageAdmin)
|
||||
|
||||
class FotkaPozadiAdmin(ModelAdmin):
|
||||
readonly_fields = ['cas']
|
||||
|
||||
admin.site.register(m.FotkaHeader, FotkaPozadiAdmin)
|
||||
admin.site.register(m.FotkaUrlVazba)
|
||||
|
|
|
@ -1,12 +1,45 @@
|
|||
|
||||
from datetime import datetime, date
|
||||
import random
|
||||
|
||||
from django.conf import settings
|
||||
|
||||
from mamweb.models import FotkaUrlVazba
|
||||
|
||||
|
||||
def vzhled(request):
|
||||
''' Podle casu prida do templatu, zdali je nebo neni noc '''
|
||||
hodin = datetime.now().hour
|
||||
if (hodin <= 6) or (hodin >= 20):
|
||||
noc = True
|
||||
nedoba = 'den'
|
||||
doba = 'noc'
|
||||
else:
|
||||
noc = False
|
||||
return {'noc' : noc}
|
||||
nedoba = 'noc'
|
||||
doba = 'den'
|
||||
url = request.path
|
||||
|
||||
fotky = FotkaUrlVazba.objects.exclude(denni_doba=nedoba)
|
||||
fotka = None
|
||||
|
||||
# TODO rychlejší patternmatch?
|
||||
while (fotka is None) and (url != ''):
|
||||
presne = fotky.filter(url__exact=url)
|
||||
if presne.count() > 0:
|
||||
presne_doba = presne.filter(denni_doba=doba)
|
||||
if presne_doba.count() > 0:
|
||||
fotka = random.choice(presne_doba).url_fotky()
|
||||
else:
|
||||
fotka = random.choice(presne).url_fotky()
|
||||
|
||||
url = url[:-1]
|
||||
index = url.rfind('/')
|
||||
if index != -1:
|
||||
url = url[:index+1]
|
||||
|
||||
if fotka is None:
|
||||
fotka = settings.STATIC_URL + "images/header/vikendovka.jpg"
|
||||
|
||||
return {'noc': noc, 'fotka': fotka}
|
||||
|
||||
|
|
60
mamweb/migrations/0001_initial.py
Normal file
60
mamweb/migrations/0001_initial.py
Normal file
|
@ -0,0 +1,60 @@
|
|||
# Generated by Django 2.2.15 on 2020-09-20 09:14
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
import django.utils.timezone
|
||||
|
||||
from shutil import copytree
|
||||
|
||||
|
||||
def zkopiruj_fotky(apps, schema_editor):
|
||||
copytree("mamweb/static/images/header/", "media/header/", dirs_exist_ok=True)
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='FotkaHeader',
|
||||
fields=[
|
||||
('cas', models.DateTimeField(default=django.utils.timezone.now, help_text='Čas vložení fotky',
|
||||
verbose_name='čas vložení fotky')),
|
||||
('nazev',
|
||||
models.CharField(help_text='Název např. archiv_noc', max_length=50, primary_key=True, serialize=False,
|
||||
unique=True, verbose_name='název fotky')),
|
||||
('fotka', models.ImageField(upload_to='header')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'fotka do pozadí menu',
|
||||
'verbose_name_plural': 'fotky do pozadí menu',
|
||||
'db_table': 'fotky_header',
|
||||
'ordering': ['-cas'],
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='FotkaUrlVazba',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('url',
|
||||
models.CharField(blank=True, help_text='url prefix stránek např: /archiv/ nebo /', max_length=100,
|
||||
verbose_name='URL')),
|
||||
('denni_doba', models.CharField(choices=[('den', 'Zobrazit jen ve dne'), ('noc', 'Zobrazit jen v noci'),
|
||||
('oboji', 'Zobrazovat pořád')], default='oboji', max_length=16,
|
||||
verbose_name='denní doba')),
|
||||
('fotka', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mamweb.FotkaHeader',
|
||||
verbose_name='fotka')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'vazba url a fotky do pozadí menu',
|
||||
'verbose_name_plural': 'vazby url a fotek do pozadí menu',
|
||||
'db_table': 'fotky_url_vazby',
|
||||
'ordering': ['url'],
|
||||
},
|
||||
|
||||
),
|
||||
migrations.RunPython(zkopiruj_fotky, migrations.RunPython.noop),
|
||||
]
|
0
mamweb/migrations/__init__.py
Normal file
0
mamweb/migrations/__init__.py
Normal file
65
mamweb/models.py
Normal file
65
mamweb/models.py
Normal file
|
@ -0,0 +1,65 @@
|
|||
from django.core.exceptions import ValidationError
|
||||
from django.db import models
|
||||
from django.utils import timezone
|
||||
|
||||
|
||||
class FotkaHeader(models.Model):
|
||||
class Meta:
|
||||
ordering = ['-cas']
|
||||
db_table = 'fotky_header'
|
||||
verbose_name = u'fotka do pozadí menu'
|
||||
verbose_name_plural = u'fotky do pozadí menu'
|
||||
|
||||
cas = models.DateTimeField(u'čas vložení fotky', default=timezone.now, help_text='Čas vložení fotky')
|
||||
|
||||
nazev = models.CharField(
|
||||
u'název fotky', null=False, blank=False, unique=True, primary_key=True,
|
||||
max_length=50, help_text='Název např. archiv_noc'
|
||||
)
|
||||
|
||||
fotka = models.ImageField(upload_to='header', null=False, blank=False)
|
||||
|
||||
def __str__(self):
|
||||
return self.nazev
|
||||
|
||||
def clean(self):
|
||||
if not self.fotka:
|
||||
raise ValidationError("Chybí obrázek")
|
||||
""" Kontroluje, zda sedí poměr stran """
|
||||
if abs(self.fotka.width - (self.fotka.height * 970 / 350)) > 2:
|
||||
raise ValidationError("Obrázek by měl mít rozměry 970w na 350h, nebo alespoň podobný poměr stran.")
|
||||
super().clean()
|
||||
|
||||
|
||||
class FotkaUrlVazba(models.Model):
|
||||
class Meta:
|
||||
ordering = ['url']
|
||||
db_table = 'fotky_url_vazby'
|
||||
verbose_name = u'vazba url a fotky do pozadí menu'
|
||||
verbose_name_plural = u'vazby url a fotek do pozadí menu'
|
||||
|
||||
url = models.CharField(
|
||||
u'URL', blank=True, null=False, max_length=100,
|
||||
help_text='url prefix stránek např: /archiv/ nebo /'
|
||||
)
|
||||
|
||||
fotka = models.ForeignKey(
|
||||
FotkaHeader, blank=False, null=False, verbose_name='fotka',
|
||||
on_delete=models.CASCADE
|
||||
)
|
||||
|
||||
DOBA_DEN = 'den'
|
||||
DOBA_NOC = 'noc'
|
||||
DOBA_OBOJI = 'oboji'
|
||||
DOBA_CHOICES = [
|
||||
(DOBA_DEN, 'Zobrazit jen ve dne'),
|
||||
(DOBA_NOC, 'Zobrazit jen v noci'),
|
||||
(DOBA_OBOJI, 'Zobrazovat pořád')]
|
||||
|
||||
denni_doba = models.CharField('denní doba', max_length=16, choices=DOBA_CHOICES, blank=False, default=DOBA_OBOJI)
|
||||
|
||||
def __str__(self):
|
||||
return self.url
|
||||
|
||||
def url_fotky(self):
|
||||
return self.fotka.fotka.url
|
|
@ -213,38 +213,6 @@ h1 {
|
|||
top: 58px;
|
||||
}
|
||||
|
||||
/*
|
||||
fotky:
|
||||
|
||||
todo url
|
||||
|
||||
kryptografie
|
||||
baliky
|
||||
beh
|
||||
mam_cernobile -pro archiv? asi ne
|
||||
vylet
|
||||
spolecna -spíš ne, moc lidí
|
||||
snih
|
||||
ohen
|
||||
noc
|
||||
stiny
|
||||
vikendovka
|
||||
*/
|
||||
|
||||
#header.cojemam { background-image: url("../images/header/vikendovka.jpg");}
|
||||
#header.soustredeni { background-image: url("../images/header/beh.jpg");}
|
||||
#header.zadani { background-image: url("../images/header/baliky.jpg");}
|
||||
#header.clanky { background-image: url("../images/header/kryptografie.jpg");}
|
||||
#header.archiv { background-image: url("../images/header/stiny.jpg");}
|
||||
|
||||
#header.NOC {background-image: url("../images/header/noc.jpg");}
|
||||
#header.NOCcojemam { background-image: url("../images/header/noc.jpg");}
|
||||
#header.NOCsoustredeni { background-image: url("../images/header/vylet.jpg");}
|
||||
#header.NOCzadani { background-image: url("../images/header/stiny.jpg");}
|
||||
#header.NOCclanky { background-image: url("../images/header/ohen.jpg");}
|
||||
#header.NOCarchiv { background-image: url("../images/header/stiny.jpg");}
|
||||
|
||||
|
||||
#header img.logo {
|
||||
position: absolute center;
|
||||
width: 100%;
|
||||
|
|
|
@ -56,7 +56,8 @@
|
|||
<div class='col-md-12'>
|
||||
<a href='/'>
|
||||
<div id="title" >M&M - korespondenční seminář a časopis MFF UK</div>
|
||||
<div id="header" class="{% if noc %}NOC{% endif %}{% block header %}{% endblock %}">
|
||||
<div id="header" style="background-image: url('{{ fotka }}')">
|
||||
{# TODO style=… není fancy řešení, ale u <img> se bojím, že mi to rozbije vzhled #}
|
||||
{% sitetree_menu from "main_menu" include "trunk" template "logo.html" %}
|
||||
<img class="logo-mobile" src="{% static 'images/logo-mobile.svg' %}" />
|
||||
</div>
|
||||
|
|
|
@ -8,106 +8,4 @@
|
|||
<div>
|
||||
{{ flatpage.content }}
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
||||
{# nahraj spravne submenu #}
|
||||
{% block submenu %}
|
||||
{# co-je-MaM #}
|
||||
{% if "/co-je-MaM/" in flatpage.url %}
|
||||
{% 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 "odmeny" in flatpage.url %}
|
||||
{% with "odmeny" as selected %}
|
||||
{% include "seminar/cojemam/submenu.html" %}
|
||||
{% endwith %}
|
||||
{% elif "FAQ" in flatpage.url %}
|
||||
{% with "FAQ" as selected %}
|
||||
{% include "seminar/cojemam/submenu.html" %}
|
||||
{% endwith %}
|
||||
{% elif "kontakt" in flatpage.url %}
|
||||
{% else %}
|
||||
{% include "seminar/cojemam/submenu.html" %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{# soustredeni #}
|
||||
{% if "/soustredeni/" in flatpage.url %}
|
||||
{% 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 %}
|
||||
{# zadani #}
|
||||
{% if "/zadani/" in flatpage.url %}
|
||||
{% if "/aktualni-cislo/" in flatpage.url %}
|
||||
{% with "aktualni-cislo" as selected %}
|
||||
{% include "seminar/zadani/submenu.html" %}
|
||||
{% endwith %}
|
||||
{% elif "/vysledkova-listina/" in flatpage.url %}
|
||||
{% with "vysledkova-listina" as selected %}
|
||||
{% include "seminar/zadani/submenu.html" %}
|
||||
{% endwith %}
|
||||
{% else %}
|
||||
{% include "seminar/zadani/submenu.html" %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{# clanky #}
|
||||
{% if "/clanky/" in flatpage.url %}
|
||||
{% 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 %}
|
||||
{% elif "/jak-psat-vedecky-clanek/" in flatpage.url %}
|
||||
{% with "jak-psat-vedecky-clanek" as selected %}
|
||||
{% include "seminar/clanky/submenu.html" %}
|
||||
{% endwith %}
|
||||
{% else %}
|
||||
{% include "seminar/clanky/submenu.html" %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{# archiv #}
|
||||
{% if "/archiv/" in flatpage.url %}
|
||||
{% if "/ulohy/" in flatpage.url %}
|
||||
{% with "ulohy" as selected %}
|
||||
{% include "seminar/archiv/submenu.html" %}
|
||||
{% endwith %}
|
||||
{% elif "/vysledky/" in flatpage.url %}
|
||||
{% with "vysledky" as selected %}
|
||||
{% include "seminar/archiv/submenu.html" %}
|
||||
{% endwith %}
|
||||
{% else %}
|
||||
{% include "seminar/archiv/submenu.html" %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{# zvirazneni menu #}
|
||||
{% block menu_uvod %}{% if not "/kontakt/" in flatpage.url %}{% if "/co-je-MaM/" in flatpage.url %}selected{% endif %}{% 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 %}
|
||||
{% block menu_odevzdat %}{% if "/kontakt/" in flatpage.url %}selected{% endif %}{% endblock %}
|
||||
|
||||
{# zmena titulniho obrazku #}
|
||||
{% block header %}{% if "/co-je-MaM/" in flatpage.url %}cojemam{% elif "/soustredeni/" in flatpage.url %}soustredeni{% elif "/zadani/" in flatpage.url %}zadani{% elif "/clanky/" in flatpage.url %}clanky{% elif "/archiv/" in flatpage.url %}archiv{% else %}odeslat{% endif %}{% endblock header %}
|
||||
|
||||
{# TODO zvirazneni submenu #}
|
||||
{% endblock content %}
|
|
@ -1,9 +1,5 @@
|
|||
{% extends "prednasky/base.html" %}
|
||||
|
||||
|
||||
{% block header %}hlasovani{% endblock %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
<h1>{% block nadpis1a %}{% block nadpis1b %}Hlasování o přednáškách{% endblock %}{% endblock %}</h1>
|
||||
{# Projdi vsechny seznamy #}
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
{% extends "prednasky/base.html" %}
|
||||
|
||||
|
||||
{% block header %}seznam_prednasek{% endblock %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
<h1>{% block nadpis1a %}Průběžné výsledky hlasování{% endblock %}</h1>
|
||||
<div class="mam-org-only">
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block menu_archiv %}selected{% endblock %}
|
||||
|
||||
{# zmena fotky #}{% block header %}archiv{% endblock %}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
{% extends "seminar/archiv/base.html" %}
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% extends "seminar/archiv/base.html" %}
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% extends "seminar/archiv/base.html" %}
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<h1>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% extends "seminar/archiv/base.html" %}
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}
|
||||
{{prispevek.nazev}}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% extends "seminar/archiv/base.html" %}
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% load comments %}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% extends "seminar/archiv/base.html" %}
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% extends "seminar/archiv/base.html" %}
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<h1>
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block menu_clanky %}selected{% endblock %}
|
||||
|
||||
{# zmena fotky #}{% block header %}clanky{% endblock %}
|
||||
|
||||
{% block submenu %}
|
||||
{% include "seminar/clanky/submenu.html" %}
|
||||
{% endblock %}
|
||||
|
|
@ -1,11 +1,5 @@
|
|||
{% extends 'seminar/clanky/resitelske_clanky.html' %}
|
||||
|
||||
{% block submenu %}
|
||||
{% with "org" as selected %}
|
||||
{% include "seminar/clanky/submenu.html" %}
|
||||
{% endwith %}
|
||||
{% endblock submenu %}
|
||||
|
||||
{% block nadpis1a %}{% block nadpis1b %}
|
||||
Organizátorské články
|
||||
{% endblock %}{% endblock %}
|
||||
|
|
|
@ -1,13 +1,5 @@
|
|||
{% extends 'base.html' %}
|
||||
|
||||
{% block menu_clanky %}selected{% endblock %}
|
||||
|
||||
{% block submenu %}
|
||||
{% with "resitel" as selected %}
|
||||
{% include "seminar/clanky/submenu.html" %}
|
||||
{% endwith %}
|
||||
{% endblock submenu %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h1>
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% endblock %}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
{% extends "seminar/cojemam/base.html" %}
|
||||
{% extends "base.html" %}
|
||||
{% block nadpis1a %}{% block nadpis1b %}
|
||||
{% if aktivni %}
|
||||
Organizátoři
|
||||
|
@ -7,15 +7,6 @@
|
|||
{% endif %}
|
||||
{% endblock%}{% endblock%}
|
||||
|
||||
{# podbarveni menu a submenu #}
|
||||
{% block menu_uvod %}selected{% endblock %}
|
||||
{% block submenu %}
|
||||
{% with "org" as selected %}
|
||||
{% include "seminar/cojemam/submenu.html" %}
|
||||
{% endwith %}
|
||||
{% endblock %}
|
||||
|
||||
{# zmena fotky #}{% block header %}cojemam{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% extends "seminar/zadani/base.html" %}
|
||||
{% extends "base.html" %}
|
||||
{% load staticfiles %}
|
||||
|
||||
{% block script %}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% extends "seminar/zadani/base.html" %}
|
||||
{% extends "base.html" %}
|
||||
{% load staticfiles %}
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% extends "seminar/zadani/base.html" %}
|
||||
{% extends "base.html" %}
|
||||
{% load staticfiles %}
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% extends "seminar/zadani/base.html" %}
|
||||
{% extends "base.html" %}
|
||||
{% load staticfiles %}
|
||||
{% block script %}
|
||||
<!--script type="text/javascript" src="{% static 'admin/js/vendor/jquery/jquery.js' %}"></script!-->
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% extends "seminar/zadani/base.html" %}
|
||||
{% extends "base.html" %}
|
||||
{% load staticfiles %}
|
||||
|
||||
{% block script %}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% extends "seminar/zadani/base.html" %}
|
||||
{% extends "base.html" %}
|
||||
{% load staticfiles %}
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block submenu %}
|
||||
{% include "seminar/soustredeni/submenu.html" %}
|
||||
{% endblock %}
|
||||
|
|
@ -1,6 +1,4 @@
|
|||
{% extends "seminar/soustredeni/base.html" %}
|
||||
|
||||
{% block menu_soustredeni %}selected{% endblock %}
|
||||
{% extends "base.html" %}
|
||||
|
||||
{# zmena fotky #}{% block header %}soustredeni{% endblock %}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% extends "seminar/archiv/base.html" %}
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% load comments %}
|
||||
|
||||
|
|
|
@ -1,11 +1,4 @@
|
|||
{% extends "seminar/zadani/base.html" %}
|
||||
|
||||
{% block submenu %}
|
||||
{% with "vysledkova-listina" as selected %}
|
||||
{% include 'seminar/zadani/submenu.html' %}
|
||||
{% endwith %}
|
||||
{% endblock submenu %}
|
||||
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
{% with nastaveni.aktualni_rocnik as rocnik %}
|
||||
|
|
|
@ -1,10 +1,4 @@
|
|||
{% extends "seminar/zadani/base.html" %}
|
||||
|
||||
{% block submenu %}
|
||||
{% with "aktualni" as selected %}
|
||||
{% include 'seminar/zadani/submenu.html' %}
|
||||
{% endwith %}
|
||||
{% endblock submenu %}
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block nadpis1a %}{% block nadpis1b %}
|
||||
Aktuální zadání
|
||||
|
|
|
@ -1,11 +1,4 @@
|
|||
{% extends "seminar/zadani/base.html" %}
|
||||
|
||||
{% block submenu %}
|
||||
{% with "temata" as selected %}
|
||||
{% include 'seminar/zadani/submenu.html' %}
|
||||
{% endwith %}
|
||||
{% endblock submenu %}
|
||||
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
{% with nastaveni.aktualni_rocnik as ar %}
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block menu_zadani %}selected{% endblock %}
|
||||
|
||||
{# zmena fotky #}{% block header %}zadani{% endblock %}
|
||||
|
||||
{% block submenu %}
|
||||
{% include 'seminar/zadani/submenu.html' %}
|
||||
{% endblock submenu %}
|
||||
|
Loading…
Reference in a new issue