diff --git a/aleksis/apps/alsijil/migrations/0022_documentation_teachers.py b/aleksis/apps/alsijil/migrations/0022_documentation_teachers.py new file mode 100644 index 0000000000000000000000000000000000000000..8e6c30bd98de76e717727c92c9d0d8735791514b --- /dev/null +++ b/aleksis/apps/alsijil/migrations/0022_documentation_teachers.py @@ -0,0 +1,24 @@ +# Generated by Django 4.2.9 on 2024-03-16 00:59 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("core", "0061_remove_group_additional_fields"), + ("alsijil", "0021_participationstatus"), + ] + + operations = [ + migrations.AddField( + model_name="documentation", + name="teachers", + field=models.ManyToManyField( + blank=True, + null=True, + related_name="documentations_as_teacher", + to="core.person", + verbose_name="Teachers", + ), + ), + ] diff --git a/aleksis/apps/alsijil/migrations/0023_extramark_colour_bg_extramark_colour_fg_and_more.py b/aleksis/apps/alsijil/migrations/0023_extramark_colour_bg_extramark_colour_fg_and_more.py new file mode 100644 index 0000000000000000000000000000000000000000..e47867577007ee4d853863ba2dfab157235f6068 --- /dev/null +++ b/aleksis/apps/alsijil/migrations/0023_extramark_colour_bg_extramark_colour_fg_and_more.py @@ -0,0 +1,42 @@ +# Generated by Django 4.2.9 on 2024-03-16 01:05 + +import colorfield.fields +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("alsijil", "0022_documentation_teachers"), + ] + + operations = [ + migrations.AddField( + model_name="extramark", + name="colour_bg", + field=colorfield.fields.ColorField( + blank=True, + default="", + image_field=None, + max_length=25, + samples=None, + verbose_name="Background colour", + ), + ), + migrations.AddField( + model_name="extramark", + name="colour_fg", + field=colorfield.fields.ColorField( + blank=True, + default="", + image_field=None, + max_length=25, + samples=None, + verbose_name="Foreground colour", + ), + ), + migrations.AddField( + model_name="extramark", + name="show_in_coursebook", + field=models.BooleanField(default=True, verbose_name="Show in coursebook"), + ), + ] diff --git a/aleksis/apps/alsijil/models.py b/aleksis/apps/alsijil/models.py index 7356d23dad2949092bb31ab292c081c06fdb1e2b..163e837cbc5cb9949e63b7a13c422369b4ca1e2f 100644 --- a/aleksis/apps/alsijil/models.py +++ b/aleksis/apps/alsijil/models.py @@ -432,6 +432,11 @@ class ExtraMark(ExtensibleModel): short_name = models.CharField(max_length=255, unique=True, verbose_name=_("Short name")) name = models.CharField(max_length=255, unique=True, verbose_name=_("Name")) + colour_fg = ColorField(verbose_name=_("Foreground colour"), blank=True) + colour_bg = ColorField(verbose_name=_("Background colour"), blank=True) + + show_in_coursebook = models.BooleanField(default=True, verbose_name=_("Show in coursebook")) + def __str__(self): return f"{self.name}" @@ -475,6 +480,10 @@ class Documentation(CalendarEvent): Subject, models.PROTECT, related_name="+", blank=True, null=True, verbose_name=_("Subject") ) + teachers = models.ManyToManyField( + "core.Person", related_name="documentations_as_teacher", blank=True, null=True, verbose_name=_("Teachers") + ) + topic = models.CharField(verbose_name=_("Lesson Topic"), max_length=255, blank=True) homework = models.CharField(verbose_name=_("Homework"), max_length=255, blank=True) group_note = models.CharField(verbose_name=_("Group Note"), max_length=255, blank=True)