Skip to content
Snippets Groups Projects
Commit 0d0b1c65 authored by Tomáš Valenta's avatar Tomáš Valenta
Browse files

mobile UI improvements

parent 87444373
Branches
No related tags found
No related merge requests found
......@@ -3,5 +3,7 @@ __pycache__/
webpack-stats.json
staticfiles
node_modules
shared/static/shared/*.{js,css,txt}
shared/static/shared/*.js
shared/static/shared/*.css
shared/static/shared/*.txt
media/*
# Generated by Django 4.1.4 on 2023-05-25 16:21
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('lectures', '0015_alter_lecture_options_alter_lecture_type_and_more'),
]
operations = [
migrations.AlterField(
model_name='lecture',
name='groups',
field=models.ManyToManyField(blank=True, help_text='Pokud nevybereš žádné skupiny, školení je dostupné všem.', related_name='lectures', to='lectures.lecturegroup', verbose_name='Výukové skupiny'),
),
]
......@@ -58,6 +58,7 @@ class Lecture(NameStrMixin, models.Model):
blank=True,
related_name="lectures",
verbose_name="Výukové skupiny",
help_text="Pokud nevybereš žádné skupiny, školení je dostupné všem."
)
type = models.CharField(
......@@ -178,15 +179,26 @@ class LectureMaterial(NameStrMixin, models.Model):
)
def clean(self) -> None:
BOTH_FILE_AND_LINK_DEFINED_ERROR = (
BOTH_FILE_AND_LINK_DEFINED = (
"Definuj prosím pouze odkaz, nebo soubor. Nemůžeš mít oboje najednou."
)
NEITHER_FILE_NOR_LINK_DEFINED = (
"Definuj prosím odkaz, nebo soubor. Aspoň jedna hodnota musí být vyplněna."
)
if not self.file and not self.link:
raise ValidationError(
{
"link": NEITHER_FILE_NOR_LINK_DEFINED,
"file": NEITHER_FILE_NOR_LINK_DEFINED,
}
)
if self.file and self.link:
raise ValidationError(
{
"link": BOTH_FILE_AND_LINK_DEFINED_ERROR,
"file": BOTH_FILE_AND_LINK_DEFINED_ERROR,
"link": BOTH_FILE_AND_LINK_DEFINED,
"file": BOTH_FILE_AND_LINK_DEFINED,
}
)
......
......@@ -27,17 +27,17 @@
<div class="switch overflow-x-auto">
<a
@click="toggleView('current_lectures')"
class="switch__item"
class="switch__item whitespace-nowrap"
:class="{'switch__item--active': isCurrentView('current_lectures')}"
>Aktuálně</a>
<a
@click="toggleView('timeline')"
class="switch__item"
class="switch__item whitespace-nowrap"
:class="{'switch__item--active': isCurrentView('timeline')}"
>Časová osa</a>
<a
@click="toggleView('recordings')"
class="switch__item"
class="switch__item whitespace-nowrap"
:class="{'switch__item--active': isCurrentView('recordings')}"
>Záznamy</a>
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment