Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • komasolver
  • main
  • renovate/django-5.x
  • renovate/django-debug-toolbar-5.x
  • renovate/django_csp-4.x
  • renovate/djangorestframework-3.x
  • renovate/tzdata-2025.x
  • renovate/uwsgi-2.x
8 results

Target

Select target project
  • konstantin/akplanning
  • matedealer/akplanning
  • kif/akplanning
  • mirco/akplanning
  • lordofthevoid/akplanning
  • voidptr/akplanning
  • xayomer/akplanning-fork
  • mollux/akplanning
  • neumantm/akplanning
  • mmarx/akplanning
  • nerf/akplanning
  • felix_bonn/akplanning
  • sebastian.uschmann/akplanning
13 results
Select Git revision
  • ak-import
  • feature/clear-schedule-button
  • feature/json-export-via-rest-framework
  • feature/json-schedule-import-tests
  • feature/preference-polling
  • feature/preference-polling-form
  • feature/preference-polling-form-rebased
  • feature/preference-polling-rebased
  • fix/add-room-import-only-once
  • main
  • merge-to-upstream
  • renovate/django-5.x
  • renovate/django-debug-toolbar-4.x
  • renovate/django-simple-history-3.x
  • renovate/mysqlclient-2.x
15 results
Show changes
Commits on Source (38)
Showing
with 670 additions and 360 deletions
uwsgi==2.0.25.1 uwsgi==2.0.28
image: python:3.9 image: python:3.11
services: services:
- mysql - mysql
...@@ -26,10 +26,9 @@ cache: ...@@ -26,10 +26,9 @@ cache:
- pip install pylint-gitlab pylint-django - pip install pylint-gitlab pylint-django
- mysql --version - mysql --version
check: migrations:
extends: .before_script_template extends: .before_script_template
script: script:
- ./Utils/check.sh --all
- source venv/bin/activate - source venv/bin/activate
- ./manage.py makemigrations --dry-run --check - ./manage.py makemigrations --dry-run --check
......
import zoneinfo import zoneinfo
from django.apps import apps from django.apps import apps
from django.test import TestCase, override_settings from django.test import override_settings, TestCase
from django.urls import reverse from django.urls import reverse
from django.utils.timezone import now from django.utils.timezone import now
from AKDashboard.models import DashboardButton from AKDashboard.models import DashboardButton
from AKModel.models import Event, AK, AKCategory from AKModel.models import AK, AKCategory, Event
from AKModel.tests import BasicViewTests from AKModel.tests import BasicViewTests
...@@ -13,6 +14,7 @@ class DashboardTests(TestCase): ...@@ -13,6 +14,7 @@ class DashboardTests(TestCase):
""" """
Specific Dashboard Tests Specific Dashboard Tests
""" """
@classmethod @classmethod
def setUpTestData(cls): def setUpTestData(cls):
""" """
...@@ -20,17 +22,17 @@ class DashboardTests(TestCase): ...@@ -20,17 +22,17 @@ class DashboardTests(TestCase):
""" """
super().setUpTestData() super().setUpTestData()
cls.event = Event.objects.create( cls.event = Event.objects.create(
name="Dashboard Test Event", name="Dashboard Test Event",
slug="dashboardtest", slug="dashboardtest",
timezone=zoneinfo.ZoneInfo("Europe/Berlin"), timezone=zoneinfo.ZoneInfo("Europe/Berlin"),
start=now(), start=now(),
end=now(), end=now(),
active=True, active=True,
plan_hidden=False, plan_hidden=False,
) )
cls.default_category = AKCategory.objects.create( cls.default_category = AKCategory.objects.create(
name="Test Category", name="Test Category",
event=cls.event, event=cls.event,
) )
def test_dashboard_view(self): def test_dashboard_view(self):
...@@ -62,12 +64,12 @@ class DashboardTests(TestCase): ...@@ -62,12 +64,12 @@ class DashboardTests(TestCase):
# History should be empty # History should be empty
response = self.client.get(url) response = self.client.get(url)
self.assertQuerysetEqual(response.context["recent_changes"], []) self.assertQuerySetEqual(response.context["recent_changes"], [])
AK.objects.create( AK.objects.create(
name="Test AK", name="Test AK",
category=self.default_category, category=self.default_category,
event=self.event, event=self.event,
) )
# History should now contain one AK (Test AK) # History should now contain one AK (Test AK)
...@@ -154,8 +156,8 @@ class DashboardTests(TestCase): ...@@ -154,8 +156,8 @@ class DashboardTests(TestCase):
self.assertNotContains(response, "Dashboard Button Test") self.assertNotContains(response, "Dashboard Button Test")
DashboardButton.objects.create( DashboardButton.objects.create(
text="Dashboard Button Test", text="Dashboard Button Test",
event=self.event event=self.event
) )
response = self.client.get(url_event_dashboard) response = self.client.get(url_event_dashboard)
......
...@@ -2,6 +2,8 @@ from django import forms ...@@ -2,6 +2,8 @@ from django import forms
from django.apps import apps from django.apps import apps
from django.contrib import admin, messages from django.contrib import admin, messages
from django.contrib.admin import SimpleListFilter, RelatedFieldListFilter, action, display from django.contrib.admin import SimpleListFilter, RelatedFieldListFilter, action, display
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
from django.contrib.auth.models import User # pylint: disable=E5142
from django.db.models import Count, F from django.db.models import Count, F
from django.http import HttpResponseRedirect from django.http import HttpResponseRedirect
from django.shortcuts import render, redirect from django.shortcuts import render, redirect
...@@ -15,7 +17,7 @@ from simple_history.admin import SimpleHistoryAdmin ...@@ -15,7 +17,7 @@ from simple_history.admin import SimpleHistoryAdmin
from AKModel.availability.models import Availability from AKModel.availability.models import Availability
from AKModel.forms import RoomFormWithAvailabilities from AKModel.forms import RoomFormWithAvailabilities
from AKModel.models import Event, AKOwner, AKCategory, AKTrack, AKRequirement, AK, AKSlot, Room, AKOrgaMessage, \ from AKModel.models import Event, AKOwner, AKCategory, AKTrack, AKRequirement, AK, AKSlot, Room, AKOrgaMessage, \
ConstraintViolation, DefaultSlot ConstraintViolation, DefaultSlot, AKType
from AKModel.urls import get_admin_urls_event_wizard, get_admin_urls_event from AKModel.urls import get_admin_urls_event_wizard, get_admin_urls_event
from AKModel.views.ak import AKResetInterestView, AKResetInterestCounterView from AKModel.views.ak import AKResetInterestView, AKResetInterestCounterView
from AKModel.views.manage import CVMarkResolvedView, CVSetLevelViolationView, CVSetLevelWarningView from AKModel.views.manage import CVMarkResolvedView, CVSetLevelViolationView, CVSetLevelWarningView
...@@ -215,6 +217,18 @@ class AKRequirementAdmin(PrepopulateWithNextActiveEventMixin, admin.ModelAdmin): ...@@ -215,6 +217,18 @@ class AKRequirementAdmin(PrepopulateWithNextActiveEventMixin, admin.ModelAdmin):
ordering = ['name'] ordering = ['name']
@admin.register(AKType)
class AKTypeAdmin(PrepopulateWithNextActiveEventMixin, admin.ModelAdmin):
"""
Admin interface for AKRequirements
"""
model = AKType
list_display = ['name', 'event']
list_filter = ['event']
list_editable = []
ordering = ['name']
class WishFilter(SimpleListFilter): class WishFilter(SimpleListFilter):
""" """
Re-usable filter for wishes Re-usable filter for wishes
...@@ -257,6 +271,7 @@ class AKAdminForm(forms.ModelForm): ...@@ -257,6 +271,7 @@ class AKAdminForm(forms.ModelForm):
self.fields["requirements"].queryset = AKRequirement.objects.filter(event=self.instance.event) self.fields["requirements"].queryset = AKRequirement.objects.filter(event=self.instance.event)
self.fields["conflicts"].queryset = AK.objects.filter(event=self.instance.event) self.fields["conflicts"].queryset = AK.objects.filter(event=self.instance.event)
self.fields["prerequisites"].queryset = AK.objects.filter(event=self.instance.event) self.fields["prerequisites"].queryset = AK.objects.filter(event=self.instance.event)
self.fields["types"].queryset = AKType.objects.filter(event=self.instance.event)
@admin.register(AK) @admin.register(AK)
...@@ -555,3 +570,41 @@ class DefaultSlotAdmin(EventTimezoneFormMixin, admin.ModelAdmin): ...@@ -555,3 +570,41 @@ class DefaultSlotAdmin(EventTimezoneFormMixin, admin.ModelAdmin):
list_display = ['start_simplified', 'end_simplified', 'event'] list_display = ['start_simplified', 'end_simplified', 'event']
list_filter = ['event'] list_filter = ['event']
form = DefaultSlotAdminForm form = DefaultSlotAdminForm
# Define a new User admin
class UserAdmin(BaseUserAdmin):
"""
Admin interface for Users
Enhances the built-in UserAdmin with additional actions to activate and deactivate users and a custom selection
of displayed properties in overview list
"""
list_display = ["username", "email", "is_active", "is_staff", "is_superuser"]
actions = ['activate', 'deactivate']
@admin.action(description=_("Activate selected users"))
def activate(self, request, queryset):
"""
Bulk activate users
:param request: HTTP request
:param queryset: queryset containing all users that should be activated
"""
queryset.update(is_active=True)
self.message_user(request, _("The selected users have been activated."))
@admin.action(description=_("Deactivate selected users"))
def deactivate(self, request, queryset):
"""
Bulk deactivate users
:param request: HTTP request
:param queryset: queryset containing all users that should be deactivated
"""
queryset.update(is_active=False)
self.message_user(request, _("The selected users have been deactivated."))
# Re-register UserAdmin
admin.site.unregister(User)
admin.site.register(User, UserAdmin)
...@@ -193,6 +193,14 @@ ...@@ -193,6 +193,14 @@
"event": 2 "event": 2
} }
}, },
{
"model": "AKModel.aktype",
"pk": 1,
"fields": {
"name": "Input",
"event": 2
}
},
{ {
"model": "AKModel.historicalak", "model": "AKModel.historicalak",
"pk": 1, "pk": 1,
...@@ -206,7 +214,6 @@ ...@@ -206,7 +214,6 @@
"reso": false, "reso": false,
"present": true, "present": true,
"notes": "", "notes": "",
"interest": -1,
"category": 4, "category": 4,
"track": null, "track": null,
"event": 2, "event": 2,
...@@ -229,7 +236,6 @@ ...@@ -229,7 +236,6 @@
"reso": false, "reso": false,
"present": true, "present": true,
"notes": "", "notes": "",
"interest": -1,
"category": 4, "category": 4,
"track": null, "track": null,
"event": 2, "event": 2,
...@@ -252,7 +258,6 @@ ...@@ -252,7 +258,6 @@
"reso": false, "reso": false,
"present": null, "present": null,
"notes": "", "notes": "",
"interest": -1,
"category": 5, "category": 5,
"track": null, "track": null,
"event": 2, "event": 2,
...@@ -275,7 +280,6 @@ ...@@ -275,7 +280,6 @@
"reso": false, "reso": false,
"present": null, "present": null,
"notes": "", "notes": "",
"interest": -1,
"category": 5, "category": 5,
"track": null, "track": null,
"event": 2, "event": 2,
...@@ -298,7 +302,6 @@ ...@@ -298,7 +302,6 @@
"reso": false, "reso": false,
"present": null, "present": null,
"notes": "We need to find a volunteer first...", "notes": "We need to find a volunteer first...",
"interest": -1,
"category": 3, "category": 3,
"track": null, "track": null,
"event": 2, "event": 2,
...@@ -321,7 +324,6 @@ ...@@ -321,7 +324,6 @@
"reso": false, "reso": false,
"present": null, "present": null,
"notes": "We need to find a volunteer first...", "notes": "We need to find a volunteer first...",
"interest": -1,
"category": 3, "category": 3,
"track": null, "track": null,
"event": 2, "event": 2,
...@@ -344,7 +346,6 @@ ...@@ -344,7 +346,6 @@
"reso": false, "reso": false,
"present": null, "present": null,
"notes": "", "notes": "",
"interest": -1,
"category": 5, "category": 5,
"track": 1, "track": 1,
"event": 2, "event": 2,
......
...@@ -10,7 +10,7 @@ from django.forms.utils import ErrorList ...@@ -10,7 +10,7 @@ from django.forms.utils import ErrorList
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
from AKModel.availability.forms import AvailabilitiesFormMixin from AKModel.availability.forms import AvailabilitiesFormMixin
from AKModel.models import Event, AKCategory, AKRequirement, Room from AKModel.models import Event, AKCategory, AKRequirement, Room, AKType
class DateTimeInput(forms.DateInput): class DateTimeInput(forms.DateInput):
...@@ -101,6 +101,13 @@ class NewEventWizardImportForm(forms.Form): ...@@ -101,6 +101,13 @@ class NewEventWizardImportForm(forms.Form):
required=False, required=False,
) )
import_types = forms.ModelMultipleChoiceField(
queryset=AKType.objects.all(),
widget=forms.CheckboxSelectMultiple,
label=_("Copy types"),
required=False,
)
# pylint: disable=too-many-arguments # pylint: disable=too-many-arguments
def __init__(self, data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=ErrorList, def __init__(self, data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=ErrorList,
label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None,
...@@ -111,6 +118,8 @@ class NewEventWizardImportForm(forms.Form): ...@@ -111,6 +118,8 @@ class NewEventWizardImportForm(forms.Form):
event=self.initial["import_event"]) event=self.initial["import_event"])
self.fields["import_requirements"].queryset = self.fields["import_requirements"].queryset.filter( self.fields["import_requirements"].queryset = self.fields["import_requirements"].queryset.filter(
event=self.initial["import_event"]) event=self.initial["import_event"])
self.fields["import_types"].queryset = self.fields["import_types"].queryset.filter(
event=self.initial["import_event"])
# pylint: disable=import-outside-toplevel # pylint: disable=import-outside-toplevel
# Local imports used to prevent cyclic imports and to only import when AKDashboard is available # Local imports used to prevent cyclic imports and to only import when AKDashboard is available
......
# Generated by Django 4.2.13 on 2025-02-25 20:58
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('AKModel', '0060_orga_message_resolved'),
]
operations = [
migrations.CreateModel(
name='AKType',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(help_text='Name describing the type', max_length=128, verbose_name='Name')),
('event', models.ForeignKey(help_text='Associated event', on_delete=django.db.models.deletion.CASCADE, to='AKModel.event', verbose_name='Event')),
],
options={
'verbose_name': 'AK Type',
'verbose_name_plural': 'AK Types',
'ordering': ['name'],
'unique_together': {('event', 'name')},
},
),
migrations.AddField(
model_name='ak',
name='types',
field=models.ManyToManyField(blank=True, help_text='This AK is', to='AKModel.aktype', verbose_name='Types'),
),
]
# Generated by Django 4.2.13 on 2025-02-26 22:35
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('AKModel', '0061_types'),
]
operations = [
migrations.RemoveField(
model_name='historicalak',
name='interest',
),
]
# Generated by Django 4.2.13 on 2025-03-03 19:59
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('AKModel', '0062_interest_no_history'),
]
operations = [
migrations.AlterField(
model_name='ak',
name='name',
field=models.CharField(help_text='Name of the AK', max_length=256, validators=[django.core.validators.RegexValidator(inverse_match=True, message='May not contain quotation marks', regex='[\'\\"´`]+'), django.core.validators.RegexValidator(message='Must contain at least one letter or digit', regex='[\\w\\s]+')], verbose_name='Name'),
),
migrations.AlterField(
model_name='ak',
name='short_name',
field=models.CharField(blank=True, help_text='Name displayed in the schedule', max_length=64, validators=[django.core.validators.RegexValidator(inverse_match=True, message='May not contain quotation marks', regex='[\'\\"´`]+')], verbose_name='Short Name'),
),
migrations.AlterField(
model_name='akowner',
name='name',
field=models.CharField(help_text='Name to identify an AK owner by', max_length=64, validators=[django.core.validators.RegexValidator(inverse_match=True, message='May not contain quotation marks', regex='[\'\\"´`]+'), django.core.validators.RegexValidator(message='Must contain at least one letter or digit', regex='[\\w\\s]+')], verbose_name='Nickname'),
),
migrations.AlterField(
model_name='historicalak',
name='name',
field=models.CharField(help_text='Name of the AK', max_length=256, validators=[django.core.validators.RegexValidator(inverse_match=True, message='May not contain quotation marks', regex='[\'\\"´`]+'), django.core.validators.RegexValidator(message='Must contain at least one letter or digit', regex='[\\w\\s]+')], verbose_name='Name'),
),
migrations.AlterField(
model_name='historicalak',
name='short_name',
field=models.CharField(blank=True, help_text='Name displayed in the schedule', max_length=64, validators=[django.core.validators.RegexValidator(inverse_match=True, message='May not contain quotation marks', regex='[\'\\"´`]+')], verbose_name='Short Name'),
),
]
import itertools import itertools
from datetime import timedelta from datetime import datetime, timedelta
from django.db import models from django.core.validators import RegexValidator
from django.apps import apps from django.apps import apps
from django.db import models
from django.db.models import Count from django.db.models import Count
from django.urls import reverse_lazy from django.urls import reverse_lazy
from django.utils import timezone from django.utils import timezone
from django.utils.datetime_safe import datetime
from django.utils.text import slugify from django.utils.text import slugify
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
from simple_history.models import HistoricalRecords from simple_history.models import HistoricalRecords
from timezone_field import TimeZoneField from timezone_field import TimeZoneField
# Custom validators to be used for some of the fields
# Prevent inclusion of the quotation marks ' " ´ `
# This may be necessary to prevent javascript issues
no_quotation_marks_validator = RegexValidator(regex=r"['\"´`]+", inverse_match=True,
message=_('May not contain quotation marks'))
# Enforce that the field contains of at least one letter or digit (and not just special characters
# This prevents issues when autogenerating slugs from that field
slugable_validator = RegexValidator(regex=r"[\w\s]+", message=_('Must contain at least one letter or digit'))
class Event(models.Model): class Event(models.Model):
""" """
An event supplies the frame for all Aks. An event supplies the frame for all Aks.
...@@ -32,8 +42,9 @@ class Event(models.Model): ...@@ -32,8 +42,9 @@ class Event(models.Model):
help_text=_('When should AKs with intention to submit a resolution be done?')) help_text=_('When should AKs with intention to submit a resolution be done?'))
interest_start = models.DateTimeField(verbose_name=_('Interest Window Start'), blank=True, null=True, interest_start = models.DateTimeField(verbose_name=_('Interest Window Start'), blank=True, null=True,
help_text= help_text=
_('Opening time for expression of interest. When left blank, no interest indication will be possible.')) _('Opening time for expression of interest. When left blank, no interest '
'indication will be possible.'))
interest_end = models.DateTimeField(verbose_name=_('Interest Window End'), blank=True, null=True, interest_end = models.DateTimeField(verbose_name=_('Interest Window End'), blank=True, null=True,
help_text=_('Closing time for expression of interest.')) help_text=_('Closing time for expression of interest.'))
...@@ -45,7 +56,7 @@ class Event(models.Model): ...@@ -45,7 +56,7 @@ class Event(models.Model):
plan_hidden = models.BooleanField(verbose_name=_('Plan Hidden'), help_text=_('Hides plan for non-staff users'), plan_hidden = models.BooleanField(verbose_name=_('Plan Hidden'), help_text=_('Hides plan for non-staff users'),
default=True) default=True)
plan_published_at = models.DateTimeField(verbose_name=_('Plan published at'), blank=True, null=True, plan_published_at = models.DateTimeField(verbose_name=_('Plan published at'), blank=True, null=True,
help_text=_('Timestamp at which the plan was published')) help_text=_('Timestamp at which the plan was published'))
base_url = models.URLField(verbose_name=_("Base URL"), help_text=_("Prefix for wiki link construction"), blank=True) base_url = models.URLField(verbose_name=_("Base URL"), help_text=_("Prefix for wiki link construction"), blank=True)
wiki_export_template_name = models.CharField(verbose_name=_("Wiki Export Template Name"), blank=True, max_length=50) wiki_export_template_name = models.CharField(verbose_name=_("Wiki Export Template Name"), blank=True, max_length=50)
...@@ -53,8 +64,8 @@ class Event(models.Model): ...@@ -53,8 +64,8 @@ class Event(models.Model):
help_text=_('Default length in hours that is assumed for AKs in this event.')) help_text=_('Default length in hours that is assumed for AKs in this event.'))
contact_email = models.EmailField(verbose_name=_("Contact email address"), blank=True, contact_email = models.EmailField(verbose_name=_("Contact email address"), blank=True,
help_text=_("An email address that is displayed on every page " help_text=_("An email address that is displayed on every page "
"and can be used for all kinds of questions")) "and can be used for all kinds of questions"))
class Meta: class Meta:
verbose_name = _('Event') verbose_name = _('Event')
...@@ -85,7 +96,7 @@ class Event(models.Model): ...@@ -85,7 +96,7 @@ class Event(models.Model):
event = Event.objects.filter(active=True).order_by('start').first() event = Event.objects.filter(active=True).order_by('start').first()
# No active event? Return the next event taking place # No active event? Return the next event taking place
if event is None: if event is None:
event = Event.objects.order_by('start').filter(start__gt=datetime.now()).first() event = Event.objects.order_by('start').filter(start__gt=datetime.now().astimezone()).first()
return event return event
def get_categories_with_aks(self, wishes_seperately=False, def get_categories_with_aks(self, wishes_seperately=False,
...@@ -166,7 +177,9 @@ class Event(models.Model): ...@@ -166,7 +177,9 @@ class Event(models.Model):
class AKOwner(models.Model): class AKOwner(models.Model):
""" An AKOwner describes the person organizing/holding an AK. """ An AKOwner describes the person organizing/holding an AK.
""" """
name = models.CharField(max_length=64, verbose_name=_('Nickname'), help_text=_('Name to identify an AK owner by')) name = models.CharField(max_length=64, verbose_name=_('Nickname'),
validators=[no_quotation_marks_validator, slugable_validator],
help_text=_('Name to identify an AK owner by'))
slug = models.SlugField(max_length=64, blank=True, verbose_name=_('Slug'), help_text=_('Slug for URL generation')) slug = models.SlugField(max_length=64, blank=True, verbose_name=_('Slug'), help_text=_('Slug for URL generation'))
institution = models.CharField(max_length=128, blank=True, verbose_name=_('Institution'), help_text=_('Uni etc.')) institution = models.CharField(max_length=128, blank=True, verbose_name=_('Institution'), help_text=_('Uni etc.'))
link = models.URLField(blank=True, verbose_name=_('Web Link'), help_text=_('Link to Homepage')) link = models.URLField(blank=True, verbose_name=_('Web Link'), help_text=_('Link to Homepage'))
...@@ -245,8 +258,8 @@ class AKCategory(models.Model): ...@@ -245,8 +258,8 @@ class AKCategory(models.Model):
description = models.TextField(blank=True, verbose_name=_("Description"), description = models.TextField(blank=True, verbose_name=_("Description"),
help_text=_("Short description of this AK Category")) help_text=_("Short description of this AK Category"))
present_by_default = models.BooleanField(blank=True, default=True, verbose_name=_("Present by default"), present_by_default = models.BooleanField(blank=True, default=True, verbose_name=_("Present by default"),
help_text=_("Present AKs of this category by default " help_text=_("Present AKs of this category by default if AK owner did not "
"if AK owner did not specify whether this AK should be presented?")) "specify whether this AK should be presented?"))
event = models.ForeignKey(to=Event, on_delete=models.CASCADE, verbose_name=_('Event'), event = models.ForeignKey(to=Event, on_delete=models.CASCADE, verbose_name=_('Event'),
help_text=_('Associated event')) help_text=_('Associated event'))
...@@ -306,11 +319,32 @@ class AKRequirement(models.Model): ...@@ -306,11 +319,32 @@ class AKRequirement(models.Model):
return self.name return self.name
class AKType(models.Model):
""" An AKType allows to associate one or multiple types with an AK, e.g., to better describe the format of that AK
or to which group of people it is addressed. Types are specified per event and are an optional feature.
"""
name = models.CharField(max_length=128, verbose_name=_('Name'), help_text=_('Name describing the type'))
event = models.ForeignKey(to=Event, on_delete=models.CASCADE, verbose_name=_('Event'),
help_text=_('Associated event'))
class Meta:
verbose_name = _('AK Type')
verbose_name_plural = _('AK Types')
ordering = ['name']
unique_together = ['event', 'name']
def __str__(self):
return self.name
class AK(models.Model): class AK(models.Model):
""" An AK is a slot-based activity to be scheduled during an event. """ An AK is a slot-based activity to be scheduled during an event.
""" """
name = models.CharField(max_length=256, verbose_name=_('Name'), help_text=_('Name of the AK')) name = models.CharField(max_length=256, verbose_name=_('Name'), help_text=_('Name of the AK'),
validators=[no_quotation_marks_validator, slugable_validator])
short_name = models.CharField(max_length=64, blank=True, verbose_name=_('Short Name'), short_name = models.CharField(max_length=64, blank=True, verbose_name=_('Short Name'),
validators=[no_quotation_marks_validator],
help_text=_('Name displayed in the schedule')) help_text=_('Name displayed in the schedule'))
description = models.TextField(blank=True, verbose_name=_('Description'), help_text=_('Description of the AK')) description = models.TextField(blank=True, verbose_name=_('Description'), help_text=_('Description of the AK'))
...@@ -323,6 +357,8 @@ class AK(models.Model): ...@@ -323,6 +357,8 @@ class AK(models.Model):
category = models.ForeignKey(to=AKCategory, on_delete=models.PROTECT, verbose_name=_('Category'), category = models.ForeignKey(to=AKCategory, on_delete=models.PROTECT, verbose_name=_('Category'),
help_text=_('Category of the AK')) help_text=_('Category of the AK'))
types = models.ManyToManyField(to=AKType, blank=True, verbose_name=_('Types'),
help_text=_("This AK is"))
track = models.ForeignKey(to=AKTrack, blank=True, on_delete=models.SET_NULL, null=True, verbose_name=_('Track'), track = models.ForeignKey(to=AKTrack, blank=True, on_delete=models.SET_NULL, null=True, verbose_name=_('Track'),
help_text=_('Track the AK belongs to')) help_text=_('Track the AK belongs to'))
...@@ -340,8 +376,8 @@ class AK(models.Model): ...@@ -340,8 +376,8 @@ class AK(models.Model):
help_text=_('AKs that should precede this AK in the schedule')) help_text=_('AKs that should precede this AK in the schedule'))
notes = models.TextField(blank=True, verbose_name=_('Organizational Notes'), help_text=_( notes = models.TextField(blank=True, verbose_name=_('Organizational Notes'), help_text=_(
'Notes to organizers. These are public. For private notes, please use the button for private messages ' 'Notes to organizers. These are public. For private notes, please use the button for private messages '
'on the detail page of this AK (after creation/editing).')) 'on the detail page of this AK (after creation/editing).'))
interest = models.IntegerField(default=-1, verbose_name=_('Interest'), help_text=_('Expected number of people')) interest = models.IntegerField(default=-1, verbose_name=_('Interest'), help_text=_('Expected number of people'))
interest_counter = models.IntegerField(default=0, verbose_name=_('Interest Counter'), interest_counter = models.IntegerField(default=0, verbose_name=_('Interest Counter'),
...@@ -353,7 +389,7 @@ class AK(models.Model): ...@@ -353,7 +389,7 @@ class AK(models.Model):
include_in_export = models.BooleanField(default=True, verbose_name=_('Export?'), include_in_export = models.BooleanField(default=True, verbose_name=_('Export?'),
help_text=_("Include AK in wiki export?")) help_text=_("Include AK in wiki export?"))
history = HistoricalRecords(excluded_fields=['interest_counter', 'include_in_export']) history = HistoricalRecords(excluded_fields=['interest', 'interest_counter', 'include_in_export'])
class Meta: class Meta:
verbose_name = _('AK') verbose_name = _('AK')
...@@ -385,8 +421,24 @@ class AK(models.Model): ...@@ -385,8 +421,24 @@ class AK(models.Model):
{_('Interest')}: {self.interest}""" {_('Interest')}: {self.interest}"""
if self.requirements.count() > 0: if self.requirements.count() > 0:
detail_string += f"\n{_('Requirements')}: {', '.join(str(r) for r in self.requirements.all())}" detail_string += f"\n{_('Requirements')}: {', '.join(str(r) for r in self.requirements.all())}"
if self.types.count() > 0:
detail_string += f"\n{_('Types')}: {', '.join(str(r) for r in self.types.all())}"
# Find conflicts
# (both directions, those specified for this AK and those were this AK was specified as conflict)
# Deduplicate and order list alphabetically
conflicts = set()
if self.conflicts.count() > 0: if self.conflicts.count() > 0:
detail_string += f"\n{_('Conflicts')}: {', '.join(str(c) for c in self.conflicts.all())}" for c in self.conflicts.all():
conflicts.add(str(c))
if self.conflict.count() > 0:
for c in self.conflict.all():
conflicts.add(str(c))
if len(conflicts) > 0:
conflicts = list(conflicts)
conflicts.sort()
detail_string += f"\n{_('Conflicts')}: {', '.join(conflicts)}"
if self.prerequisites.count() > 0: if self.prerequisites.count() > 0:
detail_string += f"\n{_('Prerequisites')}: {', '.join(str(p) for p in self.prerequisites.all())}" detail_string += f"\n{_('Prerequisites')}: {', '.join(str(p) for p in self.prerequisites.all())}"
detail_string += f"\n{_('Availabilities')}: \n{availabilities}" detail_string += f"\n{_('Availabilities')}: \n{availabilities}"
...@@ -466,7 +518,7 @@ class AK(models.Model): ...@@ -466,7 +518,7 @@ class AK(models.Model):
return reverse_lazy('submit:ak_detail', kwargs={'event_slug': self.event.slug, 'pk': self.id}) return reverse_lazy('submit:ak_detail', kwargs={'event_slug': self.event.slug, 'pk': self.id})
return self.edit_url return self.edit_url
def save(self, force_insert=False, force_update=False, using=None, update_fields=None): def save(self, *args, force_insert=False, force_update=False, using=None, update_fields=None):
# Auto-Generate Link if not set yet # Auto-Generate Link if not set yet
if self.link == "": if self.link == "":
link = self.event.base_url + self.name.replace(" ", "_") link = self.event.base_url + self.name.replace(" ", "_")
...@@ -475,7 +527,8 @@ class AK(models.Model): ...@@ -475,7 +527,8 @@ class AK(models.Model):
# Tell Django that we have updated the link field # Tell Django that we have updated the link field
if update_fields is not None: if update_fields is not None:
update_fields = {"link"}.union(update_fields) update_fields = {"link"}.union(update_fields)
super().save(force_insert, force_update, using, update_fields) super().save(*args,
force_insert=force_insert, force_update=force_update, using=using, update_fields=update_fields)
class Room(models.Model): class Room(models.Model):
...@@ -592,7 +645,7 @@ class AKSlot(models.Model): ...@@ -592,7 +645,7 @@ class AKSlot(models.Model):
def overlaps(self, other: "AKSlot"): def overlaps(self, other: "AKSlot"):
""" """
Check wether two slots overlap Check whether two slots overlap
:param other: second slot to compare with :param other: second slot to compare with
:return: true if they overlap, false if not: :return: true if they overlap, false if not:
...@@ -600,13 +653,14 @@ class AKSlot(models.Model): ...@@ -600,13 +653,14 @@ class AKSlot(models.Model):
""" """
return self.start < other.end <= self.end or self.start <= other.start < self.end return self.start < other.end <= self.end or self.start <= other.start < self.end
def save(self, force_insert=False, force_update=False, using=None, update_fields=None): def save(self, *args, force_insert=False, force_update=False, using=None, update_fields=None):
# Make sure duration is not longer than the event # Make sure duration is not longer than the event
if update_fields is None or 'duration' in update_fields: if update_fields is None or 'duration' in update_fields:
event_duration = self.event.end - self.event.start event_duration = self.event.end - self.event.start
event_duration_hours = event_duration.days * 24 + event_duration.seconds // 3600 event_duration_hours = event_duration.days * 24 + event_duration.seconds // 3600
self.duration = min(self.duration, event_duration_hours) self.duration = min(self.duration, event_duration_hours)
super().save(force_insert, force_update, using, update_fields) super().save(*args,
force_insert=force_insert, force_update=force_update, using=using, update_fields=update_fields)
class AKOrgaMessage(models.Model): class AKOrgaMessage(models.Model):
...@@ -641,6 +695,7 @@ class ConstraintViolation(models.Model): ...@@ -641,6 +695,7 @@ class ConstraintViolation(models.Model):
Depending on the type, different fields (references to other models) will be filled. Each violation should always Depending on the type, different fields (references to other models) will be filled. Each violation should always
be related to an event and at least on other instance of a causing entity be related to an event and at least on other instance of a causing entity
""" """
class Meta: class Meta:
verbose_name = _('Constraint Violation') verbose_name = _('Constraint Violation')
verbose_name_plural = _('Constraint Violations') verbose_name_plural = _('Constraint Violations')
...@@ -657,7 +712,7 @@ class ConstraintViolation(models.Model): ...@@ -657,7 +712,7 @@ class ConstraintViolation(models.Model):
AK_CONFLICT_COLLISION = 'acc', _('AK Slot is scheduled at the same time as an AK listed as a conflict') AK_CONFLICT_COLLISION = 'acc', _('AK Slot is scheduled at the same time as an AK listed as a conflict')
AK_BEFORE_PREREQUISITE = 'abp', _('AK Slot is scheduled before an AK listed as a prerequisite') AK_BEFORE_PREREQUISITE = 'abp', _('AK Slot is scheduled before an AK listed as a prerequisite')
AK_AFTER_RESODEADLINE = 'aar', _( AK_AFTER_RESODEADLINE = 'aar', _(
'AK Slot for AK with intention to submit a resolution is scheduled after resolution deadline') 'AK Slot for AK with intention to submit a resolution is scheduled after resolution deadline')
AK_CATEGORY_MISMATCH = 'acm', _('AK Slot in a category is outside that categories availabilities') AK_CATEGORY_MISMATCH = 'acm', _('AK Slot in a category is outside that categories availabilities')
AK_SLOT_COLLISION = 'asc', _('Two AK Slots for the same AK scheduled at the same time') AK_SLOT_COLLISION = 'asc', _('Two AK Slots for the same AK scheduled at the same time')
ROOM_CAPACITY_EXCEEDED = 'rce', _('Room does not have enough space for interest in scheduled AK Slot') ROOM_CAPACITY_EXCEEDED = 'rce', _('Room does not have enough space for interest in scheduled AK Slot')
...@@ -858,6 +913,7 @@ class DefaultSlot(models.Model): ...@@ -858,6 +913,7 @@ class DefaultSlot(models.Model):
Model representing a default slot, Model representing a default slot,
i.e., a prefered slot to use for typical AKs in the schedule to guarantee enough breaks etc. i.e., a prefered slot to use for typical AKs in the schedule to guarantee enough breaks etc.
""" """
class Meta: class Meta:
verbose_name = _('Default Slot') verbose_name = _('Default Slot')
verbose_name_plural = _('Default Slots') verbose_name_plural = _('Default Slots')
...@@ -870,7 +926,8 @@ class DefaultSlot(models.Model): ...@@ -870,7 +926,8 @@ class DefaultSlot(models.Model):
help_text=_('Associated event')) help_text=_('Associated event'))
primary_categories = models.ManyToManyField(to=AKCategory, verbose_name=_('Primary categories'), blank=True, primary_categories = models.ManyToManyField(to=AKCategory, verbose_name=_('Primary categories'), blank=True,
help_text=_('Categories that should be assigned to this slot primarily')) help_text=_(
'Categories that should be assigned to this slot primarily'))
@property @property
def start_simplified(self) -> str: def start_simplified(self) -> str:
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
{% block content %} {% block content %}
<pre> <pre>
title;duration;who;requirements;prerequisites;conflicts;availabilities;category;track;reso;notes; title;duration;who;requirements;prerequisites;conflicts;availabilities;category;types;track;reso;notes;
{% for slot in slots %}{{ slot.ak.short_name }};{{ slot.duration }};{{ slot.ak.owners.all|join:", " }};{{ slot.ak.requirements.all|join:", " }};{{ slot.ak.prerequisites.all|join:", " }};{{ slot.ak.conflicts.all|join:", " }};{% for a in slot.ak.availabilities.all %}{{ a.start | timezone:event.timezone | date:"l H:i" }} - {{ a.end | timezone:event.timezone | date:"l H:i" }}, {% endfor %};{{ slot.ak.category }};{{ slot.ak.track }};{{ slot.ak.reso }};{{ slot.ak.notes }}; {% for slot in slots %}{{ slot.ak.short_name }};{{ slot.duration }};{{ slot.ak.owners.all|join:", " }};{{ slot.ak.requirements.all|join:", " }};{{ slot.ak.prerequisites.all|join:", " }};{{ slot.ak.conflicts.all|join:", " }};{% for a in slot.ak.availabilities.all %}{{ a.start | timezone:event.timezone | date:"l H:i" }} - {{ a.end | timezone:event.timezone | date:"l H:i" }}, {% endfor %};{{ slot.ak.category }};{{ slot.ak.types.all|join:", " }};{{ slot.ak.track }};{{ slot.ak.reso }};{{ slot.ak.notes }};
{% endfor %} {% endfor %}
</pre> </pre>
{% endblock %} {% endblock %}
from datetime import timedelta from datetime import datetime, timedelta
from django.conf import settings from django.conf import settings
from django.shortcuts import redirect from django.shortcuts import redirect
from django.urls import reverse_lazy from django.urls import reverse_lazy
from django.utils.datetime_safe import datetime from django.views.generic import DetailView, ListView
from django.views.generic import ListView, DetailView
from AKModel.models import AKSlot, Room, AKTrack
from AKModel.metaviews.admin import FilterByEventSlugMixin from AKModel.metaviews.admin import FilterByEventSlugMixin
from AKModel.models import AKSlot, AKTrack, Room
class PlanIndexView(FilterByEventSlugMixin, ListView): class PlanIndexView(FilterByEventSlugMixin, ListView):
...@@ -152,7 +151,7 @@ class PlanTrackView(FilterByEventSlugMixin, DetailView): ...@@ -152,7 +151,7 @@ class PlanTrackView(FilterByEventSlugMixin, DetailView):
context = super().get_context_data(object_list=object_list, **kwargs) context = super().get_context_data(object_list=object_list, **kwargs)
# Restrict AKSlot list to given track # Restrict AKSlot list to given track
# while joining AK, room and category information to reduce the amount of necessary SQL queries # while joining AK, room and category information to reduce the amount of necessary SQL queries
context["slots"] = AKSlot.objects.\ context["slots"] = AKSlot.objects. \
filter(event=self.event, ak__track=context['track']).\ filter(event=self.event, ak__track=context['track']). \
select_related('ak', 'room', 'ak__category') select_related('ak', 'room', 'ak__category')
return context return context
...@@ -24,7 +24,8 @@ class AKAddSlotForm(forms.Form): ...@@ -24,7 +24,8 @@ class AKAddSlotForm(forms.Form):
start = forms.CharField(label=_("Start"), disabled=True) start = forms.CharField(label=_("Start"), disabled=True)
end = forms.CharField(label=_("End"), disabled=True) end = forms.CharField(label=_("End"), disabled=True)
duration = forms.CharField(label=_("Duration"), disabled=True) duration = forms.CharField(label=_("Duration"), disabled=True)
room = forms.IntegerField(label=_("Room"), disabled=True) room = forms.IntegerField(label=_("Room"), disabled=True, widget=forms.HiddenInput())
room_name = forms.CharField(label=_("Room"), disabled=True)
def __init__(self, event): def __init__(self, event):
super().__init__() super().__init__()
......
...@@ -157,6 +157,7 @@ ...@@ -157,6 +157,7 @@
$('#id_start').val(info.startStr); $('#id_start').val(info.startStr);
$('#id_end').val(info.endStr); $('#id_end').val(info.endStr);
$('#id_room').val(info.resource._resource.id); $('#id_room').val(info.resource._resource.id);
$('#id_room_name').val(info.resource._resource.title);
$('#id_duration').val(Math.abs(info.end-info.start)/1000/60/60); $('#id_duration').val(Math.abs(info.end-info.start)/1000/60/60);
$('#id_ak').val(""); $('#id_ak').val("");
$('#newAKSlotModal').modal('show'); $('#newAKSlotModal').modal('show');
...@@ -354,9 +355,11 @@ ...@@ -354,9 +355,11 @@
<h5 class="mt-2">{{ track_slots.grouper }}</h5> <h5 class="mt-2">{{ track_slots.grouper }}</h5>
{% endif %} {% endif %}
{% for slot in track_slots.list %} {% for slot in track_slots.list %}
<div class="unscheduled-slot badge" style='background-color: {{ slot.ak.category.color }}' <div class="unscheduled-slot badge" style='background-color: {% with slot.ak.category.color as color %} {% if color %}{{ color }}{% else %}#000000;{% endif %}{% endwith %}'
data-event='{ "title": "{{ slot.ak.short_name }}", "duration": {"hours": "{{ slot.duration|unlocalize }}"}, "constraint": "roomAvailable", "description": "{{ slot.ak.details | escapejs }}", "slotID": "{{ slot.pk }}", "backgroundColor": "{{ slot.ak.category.color }}", "url": "{% url "admin:AKModel_akslot_change" slot.pk %}"}' data-details="{{ slot.ak.details }}">{{ slot.ak.short_name }} {% with slot.ak.details as details %}
data-event='{ "title": "{{ slot.ak.short_name }}", "duration": {"hours": "{{ slot.duration|unlocalize }}"}, "constraint": "roomAvailable", "description": "{{ details | escapejs }}", "slotID": "{{ slot.pk }}", "backgroundColor": "{{ slot.ak.category.color }}", "url": "{% url "admin:AKModel_akslot_change" slot.pk %}"}' data-details="{{ details }}">{{ slot.ak.short_name }}
({{ slot.duration }} h)<br>{{ slot.ak.owners_list }} ({{ slot.duration }} h)<br>{{ slot.ak.owners_list }}
{% endwith %}
</div> </div>
{% endfor %} {% endfor %}
{% endfor %} {% endfor %}
......
...@@ -13,14 +13,19 @@ ...@@ -13,14 +13,19 @@
{% block content %} {% block content %}
<h4 class="mt-4 mb-4">{% trans "AKs with public notes" %}</h4> <h4 class="mt-4 mb-4">{% trans "AKs with public notes" %}</h4>
{% for ak in aks_with_comment %} {% for ak in aks_with_comment %}
<a href="{{ ak.edit_url }}">{{ ak }}</a><br>{{ ak.notes }}<br><br> <a href="{{ ak.detail_url }}">{{ ak }}</a>
<a href="{{ ak.edit_url }}">{% fa6_icon "pen-to-square" %}</a>
<a class="link-warning" href="{% url "admin:AKModel_ak_change" object_id=ak.pk %}">{% fa6_icon "pen-to-square" %}</a><br>
{{ ak.notes }}<br><br>
{% empty %} {% empty %}
- -
{% endfor %} {% endfor %}
<h4 class="mt-4 mb-4">{% trans "AKs without availabilities" %}</h4> <h4 class="mt-4 mb-4">{% trans "AKs without availabilities" %}</h4>
{% for ak in aks_without_availabilities %} {% for ak in aks_without_availabilities %}
<a href="{{ ak.edit_url }}">{{ ak }}</a><br> <a href="{{ ak.detail_url }}">{{ ak }}</a>
<a href="{{ ak.edit_url }}">{% fa6_icon "pen-to-square" %}</a>
<a class="link-warning" href="{% url "admin:AKModel_ak_change" object_id=ak.pk %}">{% fa6_icon "pen-to-square" %}</a><br>
{% empty %} {% empty %}
-<br> -<br>
{% endfor %} {% endfor %}
...@@ -30,7 +35,10 @@ ...@@ -30,7 +35,10 @@
<h4 class="mt-4 mb-4">{% trans "AK wishes with slots" %}</h4> <h4 class="mt-4 mb-4">{% trans "AK wishes with slots" %}</h4>
{% for ak in ak_wishes_with_slots %} {% for ak in ak_wishes_with_slots %}
<a href="{{ ak.detail_url }}">{{ ak }}</a> <a href="{% url "admin:AKModel_akslot_changelist" %}?ak={{ ak.pk }}">({{ ak.akslot__count }})</a><br> <a href="{% url "admin:AKModel_akslot_changelist" %}?ak={{ ak.pk }}">({{ ak.akslot__count }})</a>
<a href="{{ ak.detail_url }}">{{ ak }}</a>
<a href="{{ ak.edit_url }}">{% fa6_icon "pen-to-square" %}</a>
<a class="link-warning" href="{% url "admin:AKModel_ak_change" object_id=ak.pk %}">{% fa6_icon "pen-to-square" %}</a><br>
{% empty %} {% empty %}
-<br> -<br>
{% endfor %} {% endfor %}
...@@ -39,7 +47,9 @@ ...@@ -39,7 +47,9 @@
<h4 class="mt-4 mb-4">{% trans "AKs without slots" %}</h4> <h4 class="mt-4 mb-4">{% trans "AKs without slots" %}</h4>
{% for ak in aks_without_slots %} {% for ak in aks_without_slots %}
<a href="{{ ak.detail_url }}">{{ ak }}</a><br> <a href="{{ ak.detail_url }}">{{ ak }}</a>
<a href="{{ ak.edit_url }}">{% fa6_icon "pen-to-square" %}</a>
<a class="link-warning" href="{% url "admin:AKModel_ak_change" object_id=ak.pk %}">{% fa6_icon "pen-to-square" %}</a><br>
{% empty %} {% empty %}
-<br> -<br>
{% endfor %} {% endfor %}
......
...@@ -41,7 +41,9 @@ class SchedulingAdminView(AdminViewMixin, FilterByEventSlugMixin, ListView): ...@@ -41,7 +41,9 @@ class SchedulingAdminView(AdminViewMixin, FilterByEventSlugMixin, ListView):
context_object_name = "slots_unscheduled" context_object_name = "slots_unscheduled"
def get_queryset(self): def get_queryset(self):
return super().get_queryset().filter(start__isnull=True).select_related('event', 'ak').order_by('ak__track') return super().get_queryset().filter(start__isnull=True).select_related('event', 'ak', 'ak__track',
'ak__category').prefetch_related('ak__types', 'ak__owners', 'ak__conflicts', 'ak__prerequisites',
'ak__requirements', 'ak__conflict').order_by('ak__track', 'ak')
def get_context_data(self, *, object_list=None, **kwargs): def get_context_data(self, *, object_list=None, **kwargs):
context = super().get_context_data(object_list=object_list, **kwargs) context = super().get_context_data(object_list=object_list, **kwargs)
...@@ -152,6 +154,13 @@ class InterestEnteringAdminView(SuccessMessageMixin, AdminViewMixin, EventSlugMi ...@@ -152,6 +154,13 @@ class InterestEnteringAdminView(SuccessMessageMixin, AdminViewMixin, EventSlugMi
def get_success_url(self): def get_success_url(self):
return self.request.path return self.request.path
def form_valid(self, form):
# Don't create a history entry for this change
form.instance.skip_history_when_saving = True
r = super().form_valid(form)
del form.instance.skip_history_when_saving
return r
def get_context_data(self, **kwargs): def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs) context = super().get_context_data(**kwargs)
context["title"] = f"{_('Enter interest')}" context["title"] = f"{_('Enter interest')}"
......
from datetime import datetime
from rest_framework import status from rest_framework import status
from rest_framework.decorators import api_view from rest_framework.decorators import api_view
from rest_framework.response import Response from rest_framework.response import Response
from django.utils.datetime_safe import datetime
from AKModel.models import AK from AKModel.models import AK
......
...@@ -11,7 +11,7 @@ from django.utils.translation import gettext_lazy as _ ...@@ -11,7 +11,7 @@ from django.utils.translation import gettext_lazy as _
from AKModel.availability.forms import AvailabilitiesFormMixin from AKModel.availability.forms import AvailabilitiesFormMixin
from AKModel.availability.models import Availability from AKModel.availability.models import Availability
from AKModel.models import AK, AKOwner, AKCategory, AKRequirement, AKSlot, AKOrgaMessage from AKModel.models import AK, AKOwner, AKCategory, AKRequirement, AKSlot, AKOrgaMessage, AKType
class AKForm(AvailabilitiesFormMixin, forms.ModelForm): class AKForm(AvailabilitiesFormMixin, forms.ModelForm):
...@@ -37,6 +37,7 @@ class AKForm(AvailabilitiesFormMixin, forms.ModelForm): ...@@ -37,6 +37,7 @@ class AKForm(AvailabilitiesFormMixin, forms.ModelForm):
'owners', 'owners',
'description', 'description',
'category', 'category',
'types',
'reso', 'reso',
'present', 'present',
'requirements', 'requirements',
...@@ -48,6 +49,7 @@ class AKForm(AvailabilitiesFormMixin, forms.ModelForm): ...@@ -48,6 +49,7 @@ class AKForm(AvailabilitiesFormMixin, forms.ModelForm):
widgets = { widgets = {
'requirements': forms.CheckboxSelectMultiple, 'requirements': forms.CheckboxSelectMultiple,
'types': forms.CheckboxSelectMultiple,
'event': forms.HiddenInput, 'event': forms.HiddenInput,
} }
...@@ -61,6 +63,10 @@ class AKForm(AvailabilitiesFormMixin, forms.ModelForm): ...@@ -61,6 +63,10 @@ class AKForm(AvailabilitiesFormMixin, forms.ModelForm):
self.fields["prerequisites"].widget.attrs = {'class': 'chosen-select'} self.fields["prerequisites"].widget.attrs = {'class': 'chosen-select'}
self.fields['category'].queryset = AKCategory.objects.filter(event=self.initial.get('event')) self.fields['category'].queryset = AKCategory.objects.filter(event=self.initial.get('event'))
self.fields['types'].queryset = AKType.objects.filter(event=self.initial.get('event'))
# Don't ask for types if there are no types configured for this event
if self.fields['types'].queryset.count() == 0:
self.fields.pop('types')
self.fields['requirements'].queryset = AKRequirement.objects.filter(event=self.initial.get('event')) self.fields['requirements'].queryset = AKRequirement.objects.filter(event=self.initial.get('event'))
# Don't ask for requirements if there are no requirements configured for this event # Don't ask for requirements if there are no requirements configured for this event
if self.fields['requirements'].queryset.count() == 0: if self.fields['requirements'].queryset.count() == 0:
...@@ -146,6 +152,9 @@ class AKSubmissionForm(AKForm): ...@@ -146,6 +152,9 @@ class AKSubmissionForm(AKForm):
class Meta(AKForm.Meta): class Meta(AKForm.Meta):
# Exclude fields again that were previously included in the parent class # Exclude fields again that were previously included in the parent class
exclude = ['link', 'protocol_link'] #pylint: disable=modelform-uses-exclude exclude = ['link', 'protocol_link'] #pylint: disable=modelform-uses-exclude
widgets = AKForm.Meta.widgets | {
'types': forms.CheckboxSelectMultiple(attrs={'checked' : 'checked'}),
}
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
...@@ -182,6 +191,9 @@ class AKWishForm(AKForm): ...@@ -182,6 +191,9 @@ class AKWishForm(AKForm):
class Meta(AKForm.Meta): class Meta(AKForm.Meta):
# Exclude fields again that were previously included in the parent class # Exclude fields again that were previously included in the parent class
exclude = ['owners', 'link', 'protocol_link'] #pylint: disable=modelform-uses-exclude exclude = ['owners', 'link', 'protocol_link'] #pylint: disable=modelform-uses-exclude
widgets = AKForm.Meta.widgets | {
'types': forms.CheckboxSelectMultiple(attrs={'checked': 'checked'}),
}
class AKOwnerForm(forms.ModelForm): class AKOwnerForm(forms.ModelForm):
......
...@@ -8,7 +8,7 @@ msgid "" ...@@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-02-02 23:53+0100\n" "POT-Creation-Date: 2025-03-25 15:58+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
...@@ -17,16 +17,16 @@ msgstr "" ...@@ -17,16 +17,16 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#: AKSubmission/forms.py:95 #: AKSubmission/forms.py:101
#, python-format #, python-format
msgid "\"%(duration)s\" is not a valid duration" msgid "\"%(duration)s\" is not a valid duration"
msgstr "\"%(duration)s\" ist keine gültige Dauer" msgstr "\"%(duration)s\" ist keine gültige Dauer"
#: AKSubmission/forms.py:155 #: AKSubmission/forms.py:164
msgid "Duration(s)" msgid "Duration(s)"
msgstr "Dauer(n)" msgstr "Dauer(n)"
#: AKSubmission/forms.py:157 #: AKSubmission/forms.py:166
msgid "" msgid ""
"Enter at least one planned duration (in hours). If your AK should have " "Enter at least one planned duration (in hours). If your AK should have "
"multiple slots, use multiple lines" "multiple slots, use multiple lines"
...@@ -34,7 +34,7 @@ msgstr "" ...@@ -34,7 +34,7 @@ msgstr ""
"Mindestens eine geplante Dauer (in Stunden) angeben. Wenn der AK mehrere " "Mindestens eine geplante Dauer (in Stunden) angeben. Wenn der AK mehrere "
"Slots haben soll, mehrere Zeilen verwenden" "Slots haben soll, mehrere Zeilen verwenden"
#: AKSubmission/templates/AKSubmission/ak_detail.html:23 #: AKSubmission/templates/AKSubmission/ak_detail.html:22
#: AKSubmission/templates/AKSubmission/ak_edit.html:13 #: AKSubmission/templates/AKSubmission/ak_edit.html:13
#: AKSubmission/templates/AKSubmission/ak_history.html:16 #: AKSubmission/templates/AKSubmission/ak_history.html:16
#: AKSubmission/templates/AKSubmission/ak_overview.html:22 #: AKSubmission/templates/AKSubmission/ak_overview.html:22
...@@ -47,66 +47,66 @@ msgstr "" ...@@ -47,66 +47,66 @@ msgstr ""
#: AKSubmission/templates/AKSubmission/submission_overview.html:7 #: AKSubmission/templates/AKSubmission/submission_overview.html:7
#: AKSubmission/templates/AKSubmission/submission_overview.html:11 #: AKSubmission/templates/AKSubmission/submission_overview.html:11
#: AKSubmission/templates/AKSubmission/submission_overview.html:36 #: AKSubmission/templates/AKSubmission/submission_overview.html:36
#: AKSubmission/templates/AKSubmission/submit_new.html:31 #: AKSubmission/templates/AKSubmission/submit_new.html:38
#: AKSubmission/templates/AKSubmission/submit_new_wish.html:13 #: AKSubmission/templates/AKSubmission/submit_new_wish.html:13
msgid "AK Submission" msgid "AK Submission"
msgstr "AK-Eintragung" msgstr "AK-Eintragung"
#: AKSubmission/templates/AKSubmission/ak_detail.html:127 #: AKSubmission/templates/AKSubmission/ak_detail.html:126
#: AKSubmission/templates/AKSubmission/ak_interest_script.html:50 #: AKSubmission/templates/AKSubmission/ak_interest_script.html:50
msgid "Interest indication currently not allowed. Sorry." msgid "Interest indication currently not allowed. Sorry."
msgstr "Interessenangabe aktuell nicht erlaubt. Sorry." msgstr "Interessenangabe aktuell nicht erlaubt. Sorry."
#: AKSubmission/templates/AKSubmission/ak_detail.html:129 #: AKSubmission/templates/AKSubmission/ak_detail.html:128
#: AKSubmission/templates/AKSubmission/ak_interest_script.html:52 #: AKSubmission/templates/AKSubmission/ak_interest_script.html:52
msgid "Could not save your interest. Sorry." msgid "Could not save your interest. Sorry."
msgstr "Interesse konnte nicht gespeichert werden. Sorry." msgstr "Interesse konnte nicht gespeichert werden. Sorry."
#: AKSubmission/templates/AKSubmission/ak_detail.html:150 #: AKSubmission/templates/AKSubmission/ak_detail.html:149
msgid "Interest" msgid "Interest"
msgstr "Interesse" msgstr "Interesse"
#: AKSubmission/templates/AKSubmission/ak_detail.html:152 #: AKSubmission/templates/AKSubmission/ak_detail.html:151
#: AKSubmission/templates/AKSubmission/ak_table.html:55 #: AKSubmission/templates/AKSubmission/ak_table.html:65
msgid "Show Interest" msgid "Show Interest"
msgstr "Interesse bekunden" msgstr "Interesse bekunden"
#: AKSubmission/templates/AKSubmission/ak_detail.html:158 #: AKSubmission/templates/AKSubmission/ak_detail.html:157
#: AKSubmission/templates/AKSubmission/ak_table.html:46 #: AKSubmission/templates/AKSubmission/ak_table.html:56
msgid "Open external link" msgid "Open external link"
msgstr "Externen Link öffnen" msgstr "Externen Link öffnen"
#: AKSubmission/templates/AKSubmission/ak_detail.html:163 #: AKSubmission/templates/AKSubmission/ak_detail.html:162
msgid "Open protocol link" msgid "Open protocol link"
msgstr "Protokolllink öffnen" msgstr "Protokolllink öffnen"
#: AKSubmission/templates/AKSubmission/ak_detail.html:168 #: AKSubmission/templates/AKSubmission/ak_detail.html:167
#: AKSubmission/templates/AKSubmission/ak_history.html:19 #: AKSubmission/templates/AKSubmission/ak_history.html:19
#: AKSubmission/templates/AKSubmission/ak_history.html:31 #: AKSubmission/templates/AKSubmission/ak_history.html:31
msgid "History" msgid "History"
msgstr "Versionsgeschichte" msgstr "Versionsgeschichte"
#: AKSubmission/templates/AKSubmission/ak_detail.html:171 #: AKSubmission/templates/AKSubmission/ak_detail.html:170
#: AKSubmission/templates/AKSubmission/akmessage_add.html:8 #: AKSubmission/templates/AKSubmission/akmessage_add.html:8
#: AKSubmission/templates/AKSubmission/akmessage_add.html:16 #: AKSubmission/templates/AKSubmission/akmessage_add.html:16
#: AKSubmission/templates/AKSubmission/akmessage_add.html:22 #: AKSubmission/templates/AKSubmission/akmessage_add.html:22
msgid "Add confidential message to organizers" msgid "Add confidential message to organizers"
msgstr "Sende eine private Nachricht an das Organisationsteam" msgstr "Sende eine private Nachricht an das Organisationsteam"
#: AKSubmission/templates/AKSubmission/ak_detail.html:174 #: AKSubmission/templates/AKSubmission/ak_detail.html:173
#: AKSubmission/templates/AKSubmission/ak_detail.html:317 #: AKSubmission/templates/AKSubmission/ak_detail.html:326
#: AKSubmission/templates/AKSubmission/ak_edit.html:16 #: AKSubmission/templates/AKSubmission/ak_edit.html:16
#: AKSubmission/templates/AKSubmission/ak_table.html:51 #: AKSubmission/templates/AKSubmission/ak_table.html:61
msgid "Edit" msgid "Edit"
msgstr "Bearbeiten" msgstr "Bearbeiten"
#: AKSubmission/templates/AKSubmission/ak_detail.html:179 #: AKSubmission/templates/AKSubmission/ak_detail.html:178
#: AKSubmission/templates/AKSubmission/ak_history.html:31 #: AKSubmission/templates/AKSubmission/ak_history.html:31
#: AKSubmission/templates/AKSubmission/ak_table.html:34 #: AKSubmission/templates/AKSubmission/ak_table.html:37
msgid "AK Wish" msgid "AK Wish"
msgstr "AK-Wunsch" msgstr "AK-Wunsch"
#: AKSubmission/templates/AKSubmission/ak_detail.html:187 #: AKSubmission/templates/AKSubmission/ak_detail.html:186
#, python-format #, python-format
msgid "" msgid ""
"This AK currently takes place for another <span v-html=\"timeUntilEnd\">" "This AK currently takes place for another <span v-html=\"timeUntilEnd\">"
...@@ -116,7 +116,8 @@ msgstr "" ...@@ -116,7 +116,8 @@ msgstr ""
"%(featured_slot_remaining)s</span> Minute(n) in %(room)s statt.&nbsp;\n" "%(featured_slot_remaining)s</span> Minute(n) in %(room)s statt.&nbsp;\n"
" " " "
#: AKSubmission/templates/AKSubmission/ak_detail.html:190 #: AKSubmission/templates/AKSubmission/ak_detail.html:189
#, python-format
msgid "" msgid ""
"This AK starts in <span v-html=\"timeUntilStart\">" "This AK starts in <span v-html=\"timeUntilStart\">"
"%(featured_slot_remaining)s</span> minute(s) in %(room)s.&nbsp;" "%(featured_slot_remaining)s</span> minute(s) in %(room)s.&nbsp;"
...@@ -125,89 +126,94 @@ msgstr "" ...@@ -125,89 +126,94 @@ msgstr ""
"%(featured_slot_remaining)s</span> Minute(n) in %(room)s.&nbsp;\n" "%(featured_slot_remaining)s</span> Minute(n) in %(room)s.&nbsp;\n"
" " " "
#: AKSubmission/templates/AKSubmission/ak_detail.html:195 #: AKSubmission/templates/AKSubmission/ak_detail.html:194
#: AKSubmission/templates/AKSubmission/ak_detail.html:325 #: AKSubmission/templates/AKSubmission/ak_detail.html:334
msgid "Go to virtual room" msgid "Go to virtual room"
msgstr "Zum virtuellen Raum" msgstr "Zum virtuellen Raum"
#: AKSubmission/templates/AKSubmission/ak_detail.html:206 #: AKSubmission/templates/AKSubmission/ak_detail.html:205
#: AKSubmission/templates/AKSubmission/ak_table.html:10 #: AKSubmission/templates/AKSubmission/ak_table.html:10
msgid "Who?" msgid "Who?"
msgstr "Wer?" msgstr "Wer?"
#: AKSubmission/templates/AKSubmission/ak_detail.html:212 #: AKSubmission/templates/AKSubmission/ak_detail.html:211
#: AKSubmission/templates/AKSubmission/ak_history.html:36 #: AKSubmission/templates/AKSubmission/ak_history.html:36
#: AKSubmission/templates/AKSubmission/ak_table.html:11 #: AKSubmission/templates/AKSubmission/ak_table.html:11
msgid "Category" msgid "Category"
msgstr "Kategorie" msgstr "Kategorie"
#: AKSubmission/templates/AKSubmission/ak_detail.html:219 #: AKSubmission/templates/AKSubmission/ak_detail.html:218
#: AKSubmission/templates/AKSubmission/ak_table.html:13
msgid "Types"
msgstr "Typen"
#: AKSubmission/templates/AKSubmission/ak_detail.html:228
#: AKSubmission/templates/AKSubmission/ak_history.html:37 #: AKSubmission/templates/AKSubmission/ak_history.html:37
msgid "Track" msgid "Track"
msgstr "Track" msgstr "Track"
#: AKSubmission/templates/AKSubmission/ak_detail.html:225 #: AKSubmission/templates/AKSubmission/ak_detail.html:234
msgid "Present this AK" msgid "Present this AK"
msgstr "Diesen AK vorstellen" msgstr "Diesen AK vorstellen"
#: AKSubmission/templates/AKSubmission/ak_detail.html:230 #: AKSubmission/templates/AKSubmission/ak_detail.html:239
msgid "(Category Default)" msgid "(Category Default)"
msgstr "(Kategorievoreinstellung)" msgstr "(Kategorievoreinstellung)"
#: AKSubmission/templates/AKSubmission/ak_detail.html:236 #: AKSubmission/templates/AKSubmission/ak_detail.html:245
msgid "Reso intention?" msgid "Reso intention?"
msgstr "Resoabsicht?" msgstr "Resoabsicht?"
#: AKSubmission/templates/AKSubmission/ak_detail.html:243 #: AKSubmission/templates/AKSubmission/ak_detail.html:252
msgid "Requirements" msgid "Requirements"
msgstr "Anforderungen" msgstr "Anforderungen"
#: AKSubmission/templates/AKSubmission/ak_detail.html:256 #: AKSubmission/templates/AKSubmission/ak_detail.html:265
msgid "Conflicting AKs" msgid "Conflicting AKs"
msgstr "AK-Konflikte" msgstr "AK-Konflikte"
#: AKSubmission/templates/AKSubmission/ak_detail.html:264 #: AKSubmission/templates/AKSubmission/ak_detail.html:273
msgid "Prerequisite AKs" msgid "Prerequisite AKs"
msgstr "Vorausgesetzte AKs" msgstr "Vorausgesetzte AKs"
#: AKSubmission/templates/AKSubmission/ak_detail.html:272 #: AKSubmission/templates/AKSubmission/ak_detail.html:281
msgid "Notes" msgid "Notes"
msgstr "Notizen" msgstr "Notizen"
#: AKSubmission/templates/AKSubmission/ak_detail.html:285 #: AKSubmission/templates/AKSubmission/ak_detail.html:294
msgid "When?" msgid "When?"
msgstr "Wann?" msgstr "Wann?"
#: AKSubmission/templates/AKSubmission/ak_detail.html:287 #: AKSubmission/templates/AKSubmission/ak_detail.html:296
#: AKSubmission/templates/AKSubmission/akslot_delete.html:35 #: AKSubmission/templates/AKSubmission/akslot_delete.html:35
msgid "Duration" msgid "Duration"
msgstr "Dauer" msgstr "Dauer"
#: AKSubmission/templates/AKSubmission/ak_detail.html:289 #: AKSubmission/templates/AKSubmission/ak_detail.html:298
msgid "Room" msgid "Room"
msgstr "Raum" msgstr "Raum"
#: AKSubmission/templates/AKSubmission/ak_detail.html:320 #: AKSubmission/templates/AKSubmission/ak_detail.html:329
msgid "Delete" msgid "Delete"
msgstr "Löschen" msgstr "Löschen"
#: AKSubmission/templates/AKSubmission/ak_detail.html:331 #: AKSubmission/templates/AKSubmission/ak_detail.html:340
msgid "Schedule" msgid "Schedule"
msgstr "Schedule" msgstr "Schedule"
#: AKSubmission/templates/AKSubmission/ak_detail.html:343 #: AKSubmission/templates/AKSubmission/ak_detail.html:352
msgid "Add another slot" msgid "Add another slot"
msgstr "Einen neuen AK-Slot hinzufügen" msgstr "Einen neuen AK-Slot hinzufügen"
#: AKSubmission/templates/AKSubmission/ak_detail.html:353 #: AKSubmission/templates/AKSubmission/ak_detail.html:362
msgid "Possible Times" msgid "Possible Times"
msgstr "Mögliche Zeiten" msgstr "Mögliche Zeiten"
#: AKSubmission/templates/AKSubmission/ak_detail.html:357 #: AKSubmission/templates/AKSubmission/ak_detail.html:366
msgid "Start" msgid "Start"
msgstr "Start" msgstr "Start"
#: AKSubmission/templates/AKSubmission/ak_detail.html:358 #: AKSubmission/templates/AKSubmission/ak_detail.html:367
msgid "End" msgid "End"
msgstr "Ende" msgstr "Ende"
...@@ -259,16 +265,16 @@ msgid "Time" ...@@ -259,16 +265,16 @@ msgid "Time"
msgstr "Zeit" msgstr "Zeit"
#: AKSubmission/templates/AKSubmission/ak_history.html:48 #: AKSubmission/templates/AKSubmission/ak_history.html:48
#: AKSubmission/templates/AKSubmission/ak_table.html:25 #: AKSubmission/templates/AKSubmission/ak_table.html:28
msgid "Present results of this AK" msgid "Present results of this AK"
msgstr "Die Ergebnisse dieses AKs vorstellen" msgstr "Die Ergebnisse dieses AKs vorstellen"
#: AKSubmission/templates/AKSubmission/ak_history.html:52 #: AKSubmission/templates/AKSubmission/ak_history.html:52
#: AKSubmission/templates/AKSubmission/ak_table.html:29 #: AKSubmission/templates/AKSubmission/ak_table.html:32
msgid "Intends to submit a resolution" msgid "Intends to submit a resolution"
msgstr "Beabsichtigt eine Resolution einzureichen" msgstr "Beabsichtigt eine Resolution einzureichen"
#: AKSubmission/templates/AKSubmission/ak_list.html:6 AKSubmission/views.py:84 #: AKSubmission/templates/AKSubmission/ak_list.html:6 AKSubmission/views.py:82
msgid "All AKs" msgid "All AKs"
msgstr "Alle AKs" msgstr "Alle AKs"
...@@ -284,11 +290,11 @@ msgstr "AK-Liste" ...@@ -284,11 +290,11 @@ msgstr "AK-Liste"
msgid "Add AK" msgid "Add AK"
msgstr "AK hinzufügen" msgstr "AK hinzufügen"
#: AKSubmission/templates/AKSubmission/ak_table.html:42 #: AKSubmission/templates/AKSubmission/ak_table.html:52
msgid "Details" msgid "Details"
msgstr "Details" msgstr "Details"
#: AKSubmission/templates/AKSubmission/ak_table.html:66 #: AKSubmission/templates/AKSubmission/ak_table.html:76
msgid "There are no AKs in this category yet" msgid "There are no AKs in this category yet"
msgstr "Es gibt noch keine AKs in dieser Kategorie" msgstr "Es gibt noch keine AKs in dieser Kategorie"
...@@ -299,7 +305,7 @@ msgstr "Senden" ...@@ -299,7 +305,7 @@ msgstr "Senden"
#: AKSubmission/templates/AKSubmission/akmessage_add.html:31 #: AKSubmission/templates/AKSubmission/akmessage_add.html:31
#: AKSubmission/templates/AKSubmission/akowner_create_update.html:26 #: AKSubmission/templates/AKSubmission/akowner_create_update.html:26
#: AKSubmission/templates/AKSubmission/akslot_add_update.html:29 #: AKSubmission/templates/AKSubmission/akslot_add_update.html:29
#: AKSubmission/templates/AKSubmission/submit_new.html:52 #: AKSubmission/templates/AKSubmission/submit_new.html:59
msgid "Reset Form" msgid "Reset Form"
msgstr "Formular leeren" msgstr "Formular leeren"
...@@ -307,7 +313,7 @@ msgstr "Formular leeren" ...@@ -307,7 +313,7 @@ msgstr "Formular leeren"
#: AKSubmission/templates/AKSubmission/akowner_create_update.html:30 #: AKSubmission/templates/AKSubmission/akowner_create_update.html:30
#: AKSubmission/templates/AKSubmission/akslot_add_update.html:33 #: AKSubmission/templates/AKSubmission/akslot_add_update.html:33
#: AKSubmission/templates/AKSubmission/akslot_delete.html:45 #: AKSubmission/templates/AKSubmission/akslot_delete.html:45
#: AKSubmission/templates/AKSubmission/submit_new.html:56 #: AKSubmission/templates/AKSubmission/submit_new.html:63
msgid "Cancel" msgid "Cancel"
msgstr "Abbrechen" msgstr "Abbrechen"
...@@ -375,8 +381,8 @@ msgstr "Ich leite bisher keine AKs" ...@@ -375,8 +381,8 @@ msgstr "Ich leite bisher keine AKs"
#: AKSubmission/templates/AKSubmission/submission_overview.html:67 #: AKSubmission/templates/AKSubmission/submission_overview.html:67
#: AKSubmission/templates/AKSubmission/submit_new.html:9 #: AKSubmission/templates/AKSubmission/submit_new.html:9
#: AKSubmission/templates/AKSubmission/submit_new.html:34
#: AKSubmission/templates/AKSubmission/submit_new.html:41 #: AKSubmission/templates/AKSubmission/submit_new.html:41
#: AKSubmission/templates/AKSubmission/submit_new.html:48
msgid "New AK" msgid "New AK"
msgstr "Neuer AK" msgstr "Neuer AK"
...@@ -390,15 +396,21 @@ msgstr "" ...@@ -390,15 +396,21 @@ msgstr ""
"Dieses Event is nicht aktiv. Es können keine AKs hinzugefügt oder bearbeitet " "Dieses Event is nicht aktiv. Es können keine AKs hinzugefügt oder bearbeitet "
"werden" "werden"
#: AKSubmission/templates/AKSubmission/submit_new.html:48 #: AKSubmission/templates/AKSubmission/submit_new.html:29
msgid ""
"only relevant for KIF-AKs - determines whether the AK appears in the slides "
"for the closing plenary session"
msgstr "nur relevant für KIF-AKs - entscheidet, ob der AK in den Folien fürs Abschlussplenum auftaucht"
#: AKSubmission/templates/AKSubmission/submit_new.html:55
msgid "Submit" msgid "Submit"
msgstr "Eintragen" msgstr "Eintragen"
#: AKSubmission/views.py:127 #: AKSubmission/views.py:125
msgid "Wishes" msgid "Wishes"
msgstr "Wünsche" msgstr "Wünsche"
#: AKSubmission/views.py:127 #: AKSubmission/views.py:125
msgid "AKs one would like to have" msgid "AKs one would like to have"
msgstr "" msgstr ""
"AKs die sich gewünscht wurden, aber bei denen noch nicht klar ist, wer sie " "AKs die sich gewünscht wurden, aber bei denen noch nicht klar ist, wer sie "
...@@ -408,60 +420,60 @@ msgstr "" ...@@ -408,60 +420,60 @@ msgstr ""
msgid "Currently planned AKs" msgid "Currently planned AKs"
msgstr "Aktuell geplante AKs" msgstr "Aktuell geplante AKs"
#: AKSubmission/views.py:300 #: AKSubmission/views.py:305
msgid "Event inactive. Cannot create or update." msgid "Event inactive. Cannot create or update."
msgstr "Event inaktiv. Hinzufügen/Bearbeiten nicht möglich." msgstr "Event inaktiv. Hinzufügen/Bearbeiten nicht möglich."
#: AKSubmission/views.py:325 #: AKSubmission/views.py:330
msgid "AK successfully created" msgid "AK successfully created"
msgstr "AK erfolgreich angelegt" msgstr "AK erfolgreich angelegt"
#: AKSubmission/views.py:398 #: AKSubmission/views.py:404
msgid "AK successfully updated" msgid "AK successfully updated"
msgstr "AK erfolgreich aktualisiert" msgstr "AK erfolgreich aktualisiert"
#: AKSubmission/views.py:449 #: AKSubmission/views.py:455
#, python-brace-format #, python-brace-format
msgid "Added '{owner}' as new owner of '{ak.name}'" msgid "Added '{owner}' as new owner of '{ak.name}'"
msgstr "'{owner}' als neue Leitung von '{ak.name}' hinzugefügt" msgstr "'{owner}' als neue Leitung von '{ak.name}' hinzugefügt"
#: AKSubmission/views.py:553 #: AKSubmission/views.py:558
msgid "No user selected" msgid "No user selected"
msgstr "Keine Person ausgewählt" msgstr "Keine Person ausgewählt"
#: AKSubmission/views.py:569 #: AKSubmission/views.py:574
msgid "Person Info successfully updated" msgid "Person Info successfully updated"
msgstr "Personen-Info erfolgreich aktualisiert" msgstr "Personen-Info erfolgreich aktualisiert"
#: AKSubmission/views.py:605 #: AKSubmission/views.py:610
msgid "AK Slot successfully added" msgid "AK Slot successfully added"
msgstr "AK-Slot erfolgreich angelegt" msgstr "AK-Slot erfolgreich angelegt"
#: AKSubmission/views.py:624 #: AKSubmission/views.py:629
msgid "You cannot edit a slot that has already been scheduled" msgid "You cannot edit a slot that has already been scheduled"
msgstr "Bereits geplante AK-Slots können nicht mehr bearbeitet werden" msgstr "Bereits geplante AK-Slots können nicht mehr bearbeitet werden"
#: AKSubmission/views.py:634 #: AKSubmission/views.py:639
msgid "AK Slot successfully updated" msgid "AK Slot successfully updated"
msgstr "AK-Slot erfolgreich aktualisiert" msgstr "AK-Slot erfolgreich aktualisiert"
#: AKSubmission/views.py:652 #: AKSubmission/views.py:657
msgid "You cannot delete a slot that has already been scheduled" msgid "You cannot delete a slot that has already been scheduled"
msgstr "Bereits geplante AK-Slots können nicht mehr gelöscht werden" msgstr "Bereits geplante AK-Slots können nicht mehr gelöscht werden"
#: AKSubmission/views.py:662 #: AKSubmission/views.py:667
msgid "AK Slot successfully deleted" msgid "AK Slot successfully deleted"
msgstr "AK-Slot erfolgreich angelegt" msgstr "AK-Slot erfolgreich angelegt"
#: AKSubmission/views.py:674 #: AKSubmission/views.py:679
msgid "Messages" msgid "Messages"
msgstr "Nachrichten" msgstr "Nachrichten"
#: AKSubmission/views.py:684 #: AKSubmission/views.py:689
msgid "Delete all messages" msgid "Delete all messages"
msgstr "Alle Nachrichten löschen" msgstr "Alle Nachrichten löschen"
#: AKSubmission/views.py:711 #: AKSubmission/views.py:716
msgid "Message to organizers successfully saved" msgid "Message to organizers successfully saved"
msgstr "Nachricht an die Organisator*innen erfolgreich gespeichert" msgstr "Nachricht an die Organisator*innen erfolgreich gespeichert"
......