# Generated by Django 3.2.7 on 2022-03-05 20:37

import cms.models.fields
import django.db.models.deletion
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ("auth", "0012_alter_user_first_name_max_length"),
        ("cms", "0022_auto_20180620_1551"),
        ("events", "0001_initial"),
    ]

    operations = [
        migrations.RemoveField(
            model_name="event",
            name="event_view_permission",
        ),
        migrations.RemoveField(
            model_name="event",
            name="registration_permission",
        ),
        migrations.RemoveField(
            model_name="event",
            name="submission_permission",
        ),
        migrations.RemoveField(
            model_name="event",
            name="view_permission",
        ),
        migrations.AddField(
            model_name="event",
            name="event_view_groups",
            field=models.ManyToManyField(
                help_text="What groups can view this event?",
                related_name="view_event",
                to="auth.Group",
            ),
        ),
        migrations.AddField(
            model_name="event",
            name="registration_groups",
            field=models.ManyToManyField(
                help_text="What groups are allowed to register for this event?",
                related_name="registration_event",
                to="auth.Group",
            ),
        ),
        migrations.AddField(
            model_name="event",
            name="submission_groups",
            field=models.ManyToManyField(
                help_text="What groups are allowed to submit an abstract for this event?",
                related_name="submission_event",
                to="auth.Group",
            ),
        ),
        migrations.AddField(
            model_name="event",
            name="view_programme_groups",
            field=models.ManyToManyField(
                help_text="What groups can view the programm and abstracts for this event?",
                related_name="view_event_programme",
                to="auth.Group",
            ),
        ),
        migrations.AddField(
            model_name="event",
            name="advanced_editing_mode",
            field=models.BooleanField(
                default=False,
                help_text="Ignore the provided description and enable frontend editing on the landing page.",
            ),
        ),
        migrations.AddField(
            model_name="event",
            name="event_landing_page_placeholder",
            field=cms.models.fields.PlaceholderField(
                editable=False,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                slotname="event_landing_page",
                to="cms.placeholder",
            ),
        ),
        migrations.AddField(
            model_name="event",
            name="sidebar_placeholder",
            field=cms.models.fields.PlaceholderField(
                editable=False,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name="event_sidebar",
                slotname="event_landing_page_sidebar",
                to="cms.placeholder",
            ),
        ),
        migrations.AddField(
            model_name="event",
            name="top_nav_placeholder",
            field=cms.models.fields.PlaceholderField(
                editable=False,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name="event_top_nav",
                slotname="event_landing_page_top_nav",
                to="cms.placeholder",
            ),
        ),
        migrations.AddField(
            model_name="eventpluginmodel",
            name="show_abstract",
            field=models.BooleanField(
                default=True, help_text="Shall we show the abstract or not?"
            ),
        ),
        migrations.AddField(
            model_name="event",
            name="display_registration_button",
            field=models.BooleanField(
                default=False,
                help_text="Display the registration button even if the registration has not yet opened (note, this does only affect the groups mentioned in the <i>submission groups</i>).",
            ),
        ),
        migrations.AddField(
            model_name="event",
            name="display_submission_button",
            field=models.BooleanField(
                default=False,
                help_text="Display the registration button even if the registration has not yet opened (note, this does only affect the groups mentioned in the <i>submission groups</i>).",
            ),
        ),
        migrations.AddField(
            model_name="event",
            name="logo",
            field=models.ImageField(
                blank=True,
                help_text="Logo of the event.",
                null=True,
                upload_to="static/images/event-logos/",
            ),
        ),
        migrations.AddField(
            model_name="eventpluginmodel",
            name="show_logo",
            field=models.BooleanField(
                default=True,
                help_text="Shall we show the logo of the event (if there is any)?",
            ),
        ),
        migrations.CreateModel(
            name="EventSubmissionButtonPluginModel",
            fields=[
                (
                    "cmsplugin_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        related_name="events_eventsubmissionbuttonpluginmodel",
                        serialize=False,
                        to="cms.cmsplugin",
                    ),
                ),
                (
                    "button_class",
                    models.CharField(
                        default="btn btn-primary",
                        help_text="Additional elements for the HTML class.",
                        max_length=300,
                    ),
                ),
                (
                    "display_button",
                    models.BooleanField(
                        default=True,
                        help_text="Display the button even if the use cannot yet use it",
                    ),
                ),
                (
                    "event",
                    models.ForeignKey(
                        help_text="Select the event you want to display.",
                        on_delete=django.db.models.deletion.CASCADE,
                        to="events.event",
                    ),
                ),
            ],
            options={
                "abstract": False,
            },
            bases=("cms.cmsplugin",),
        ),
        migrations.CreateModel(
            name="EventRegistrationButtonPluginModel",
            fields=[
                (
                    "cmsplugin_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        related_name="events_eventregistrationbuttonpluginmodel",
                        serialize=False,
                        to="cms.cmsplugin",
                    ),
                ),
                (
                    "button_class",
                    models.CharField(
                        default="btn btn-primary",
                        help_text="Additional elements for the HTML class.",
                        max_length=300,
                    ),
                ),
                (
                    "display_button",
                    models.BooleanField(
                        default=True,
                        help_text="Display the button even if the use cannot yet use it",
                    ),
                ),
                (
                    "event",
                    models.ForeignKey(
                        help_text="Select the event you want to display.",
                        on_delete=django.db.models.deletion.CASCADE,
                        to="events.event",
                    ),
                ),
            ],
            options={
                "abstract": False,
            },
            bases=("cms.cmsplugin",),
        ),
    ]
