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
  • koma/feature/preference-polling-form
  • main
  • renovate/django-5.x
  • renovate/jsonschema-4.x
4 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
  • 520-akowner
  • 520-fix-event-wizard-datepicker
  • 520-fix-scheduling
  • 520-improve-scheduling
  • 520-improve-scheduling-2
  • 520-improve-submission
  • 520-improve-trackmanager
  • 520-improve-wall
  • 520-message-resolved
  • 520-status
  • 520-upgrades
  • add_express_interest_to_ak_overview
  • admin-production-color
  • bugfixes
  • csp
  • featire-ical-export
  • feature-ak-requirement-lists
  • feature-akslide-export-better-filename
  • feature-akslides
  • feature-better-admin
  • feature-better-cv-list
  • feature-colors
  • feature-constraint-checking
  • feature-constraint-checking-wip
  • feature-dashboard-history-button
  • feature-event-status
  • feature-event-wizard
  • feature-export-flag
  • feature-improve-admin
  • feature-improve-filters
  • feature-improved-user-creation-workflow
  • feature-interest-view
  • feature-mails
  • feature-modular-status
  • feature-plan-autoreload
  • feature-present-default
  • feature-register-link
  • feature-remaining-constraint-validation
  • feature-room-import
  • feature-scheduler-improve
  • feature-scheduling-2.0
  • feature-special-attention
  • feature-time-input
  • feature-tracker
  • feature-wiki-wishes
  • feature-wish-slots
  • feature-wizard-buttons
  • features-availabilities
  • fix-ak-times-above-folg
  • fix-api
  • fix-constraint-violation-string
  • fix-cv-checking
  • fix-default-slot-length
  • fix-default-slot-localization
  • fix-doc-minor
  • fix-duration-display
  • fix-event-tz-pytz-update
  • fix-history-interest
  • fix-interest-view
  • fix-js
  • fix-pipeline
  • fix-plan-timezone-now
  • fix-room-add
  • fix-scheduling-drag
  • fix-slot-defaultlength
  • fix-timezone
  • fix-translation-scheduling
  • fix-virtual-room-admin
  • fix-wizard-csp
  • font-locally
  • improve-admin
  • improve-online
  • improve-slides
  • improve-submission-coupling
  • interest_restriction
  • main
  • master
  • meta-debug-toolbar
  • meta-export
  • meta-makemessages
  • meta-performance
  • meta-tests
  • meta-tests-gitlab-test
  • meta-upgrades
  • mollux-master-patch-02906
  • port-availabilites-fullcalendar
  • qs
  • remove-tags
  • renovate/configure
  • renovate/django-4.x
  • renovate/django-5.x
  • renovate/django-bootstrap-datepicker-plus-5.x
  • renovate/django-bootstrap5-23.x
  • renovate/django-bootstrap5-24.x
  • renovate/django-compressor-4.x
  • renovate/django-debug-toolbar-4.x
  • renovate/django-registration-redux-2.x
  • renovate/django-simple-history-3.x
  • renovate/django-split-settings-1.x
  • renovate/django-timezone-field-5.x
100 results
Show changes
Commits on Source (406)
Showing
with 1741 additions and 560 deletions
uwsgi==2.0.22 uwsgi==2.0.30
image: python:3.9 image: python:3.11
services: services:
- mysql - mysql
...@@ -14,6 +14,7 @@ cache: ...@@ -14,6 +14,7 @@ cache:
paths: paths:
- ~/.cache/pip/ - ~/.cache/pip/
.before_script_template:
before_script: before_script:
- python -V # Print out python version for debugging - python -V # Print out python version for debugging
- apt-get -qq update - apt-get -qq update
...@@ -25,17 +26,18 @@ before_script: ...@@ -25,17 +26,18 @@ before_script:
- pip install pylint-gitlab pylint-django - pip install pylint-gitlab pylint-django
- mysql --version - mysql --version
check: migrations:
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
test: test:
extends: .before_script_template
script: script:
- source venv/bin/activate - source venv/bin/activate
- echo "GRANT ALL on *.* to '${MYSQL_USER}';"| mysql -u root --password="${MYSQL_ROOT_PASSWORD}" -h mysql - echo "GRANT ALL on *.* to '${MYSQL_USER}';"| mysql -u root --password="${MYSQL_ROOT_PASSWORD}" -h mysql
- pip install pytest-cov unittest-xml-reporting - pip install pytest-cov
- coverage run --source='.' manage.py test --settings AKPlanning.settings_ci - coverage run --source='.' manage.py test --settings AKPlanning.settings_ci
after_script: after_script:
- source venv/bin/activate - source venv/bin/activate
...@@ -50,6 +52,7 @@ test: ...@@ -50,6 +52,7 @@ test:
junit: unit.xml junit: unit.xml
lint: lint:
extends: .before_script_template
stage: test stage: test
script: script:
- pylint --load-plugins pylint_django --django-settings-module=AKPlanning.settings_ci --rcfile pylintrc --exit-zero --output-format=text AK* | tee /tmp/pylint.txt - pylint --load-plugins pylint_django --django-settings-module=AKPlanning.settings_ci --rcfile pylintrc --exit-zero --output-format=text AK* | tee /tmp/pylint.txt
...@@ -67,6 +70,7 @@ lint: ...@@ -67,6 +70,7 @@ lint:
when: always when: always
doc: doc:
extends: .before_script_template
stage: test stage: test
script: script:
- cd docs - cd docs
......
...@@ -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: 2023-05-15 20:03+0200\n" "POT-Creation-Date: 2025-06-21 18:09+0000\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,110 +17,122 @@ msgstr "" ...@@ -17,110 +17,122 @@ 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"
#: AKDashboard/models.py:10 #: AKDashboard/models.py:21
msgid "Dashboard Button" msgid "Dashboard Button"
msgstr "Dashboard-Button" msgstr "Dashboard-Button"
#: AKDashboard/models.py:11 #: AKDashboard/models.py:22
msgid "Dashboard Buttons" msgid "Dashboard Buttons"
msgstr "Dashboard-Buttons" msgstr "Dashboard-Buttons"
#: AKDashboard/models.py:21 #: AKDashboard/models.py:32
msgid "Text" msgid "Text"
msgstr "Text" msgstr "Text"
#: AKDashboard/models.py:22 #: AKDashboard/models.py:33
msgid "Text that will be shown on the button" msgid "Text that will be shown on the button"
msgstr "Text, der auf dem Button angezeigt wird" msgstr "Text, der auf dem Button angezeigt wird"
#: AKDashboard/models.py:23 #: AKDashboard/models.py:34
msgid "Link URL" msgid "Link URL"
msgstr "Link-URL" msgstr "Link-URL"
#: AKDashboard/models.py:23 #: AKDashboard/models.py:34
msgid "URL this button links to" msgid "URL this button links to"
msgstr "URL auf die der Button verweist" msgstr "URL auf die der Button verweist"
#: AKDashboard/models.py:24 #: AKDashboard/models.py:35
msgid "Icon" msgid "Icon"
msgstr "Symbol" msgstr "Symbol"
#: AKDashboard/models.py:26 #: AKDashboard/models.py:37
msgid "Button Style" msgid "Button Style"
msgstr "Stil des Buttons" msgstr "Stil des Buttons"
#: AKDashboard/models.py:26 #: AKDashboard/models.py:37
msgid "Style (Color) of this button (bootstrap class)" msgid "Style (Color) of this button (bootstrap class)"
msgstr "Stiel (Farbe) des Buttons (Bootstrap-Klasse)" msgstr "Stiel (Farbe) des Buttons (Bootstrap-Klasse)"
#: AKDashboard/models.py:28 #: AKDashboard/models.py:39
msgid "Event" msgid "Event"
msgstr "Veranstaltung" msgstr "Veranstaltung"
#: AKDashboard/models.py:28 #: AKDashboard/models.py:39
msgid "Event this button belongs to" msgid "Event this button belongs to"
msgstr "Veranstaltung, zu der dieser Button gehört" msgstr "Veranstaltung, zu der dieser Button gehört"
#: AKDashboard/templates/AKDashboard/dashboard.html:17 #: AKDashboard/templates/AKDashboard/dashboard.html:19
#: AKDashboard/templates/AKDashboard/dashboard_event.html:29 #: AKDashboard/templates/AKDashboard/dashboard_event.html:30
#: AKDashboard/templates/AKDashboard/dashboard_row_old_event.html:53
msgid "Write to organizers of this event for questions and comments" msgid "Write to organizers of this event for questions and comments"
msgstr "" msgstr ""
"Kontaktiere die Organisator*innen des Events bei Fragen oder Kommentaren" "Kontaktiere die Organisator*innen des Events bei Fragen oder Kommentaren"
#: AKDashboard/templates/AKDashboard/dashboard.html:24 #: AKDashboard/templates/AKDashboard/dashboard.html:25
msgid "Old events"
msgstr "Frühere Veranstaltungen"
#: AKDashboard/templates/AKDashboard/dashboard.html:35
msgid "Currently, there are no Events!" msgid "Currently, there are no Events!"
msgstr "Aktuell gibt es keine Events!" msgstr "Aktuell gibt es keine Events!"
#: AKDashboard/templates/AKDashboard/dashboard.html:27 #: AKDashboard/templates/AKDashboard/dashboard.html:38
msgid "Please contact an administrator if you want to use AKPlanning." msgid "Please contact an administrator if you want to use AKPlanning."
msgstr "" msgstr ""
"Bitte kontaktiere eine*n Administrator*in, falls du AKPlanning verwenden " "Bitte kontaktiere eine*n Administrator*in, falls du AKPlanning verwenden "
"möchtest." "möchtest."
#: AKDashboard/templates/AKDashboard/dashboard_event.html:19 #: AKDashboard/templates/AKDashboard/dashboard_event.html:20
msgid "Recent" msgid "Recent"
msgstr "Kürzlich" msgstr "Kürzlich"
#: AKDashboard/templates/AKDashboard/dashboard_row.html:12 #: AKDashboard/templates/AKDashboard/dashboard_row.html:18
#: AKDashboard/templates/AKDashboard/dashboard_row_old_event.html:20
msgid "AK List" msgid "AK List"
msgstr "AK-Liste" msgstr "AK-Liste"
#: AKDashboard/templates/AKDashboard/dashboard_row.html:23 #: AKDashboard/templates/AKDashboard/dashboard_row.html:29
msgid "Current AKs" msgid "Current AKs"
msgstr "Aktuelle AKs" msgstr "Aktuelle AKs"
#: AKDashboard/templates/AKDashboard/dashboard_row.html:30 #: AKDashboard/templates/AKDashboard/dashboard_row.html:36
msgid "AK Wall" msgid "AK Wall"
msgstr "AK-Wall" msgstr "AK-Wall"
#: AKDashboard/templates/AKDashboard/dashboard_row.html:38 #: AKDashboard/templates/AKDashboard/dashboard_row.html:44
#: AKDashboard/templates/AKDashboard/dashboard_row_old_event.html:30
msgid "Schedule" msgid "Schedule"
msgstr "AK-Plan" msgstr "AK-Plan"
#: AKDashboard/templates/AKDashboard/dashboard_row.html:49 #: AKDashboard/templates/AKDashboard/dashboard_row.html:55
msgid "AK Submission" msgid "AK Submission"
msgstr "AK-Einreichung" msgstr "AK-Einreichung"
#: AKDashboard/templates/AKDashboard/dashboard_row.html:57 #: AKDashboard/templates/AKDashboard/dashboard_row.html:63
#: AKDashboard/templates/AKDashboard/dashboard_row_old_event.html:39
msgid "AK History" msgid "AK History"
msgstr "AK-Verlauf" msgstr "AK-Verlauf"
#: AKDashboard/views.py:42 #: AKDashboard/templates/AKDashboard/dashboard_row.html:72
msgid "AK Preferences"
msgstr "AK-Präferenzen"
#: AKDashboard/views.py:70
#, python-format #, python-format
msgid "New AK: %(ak)s." msgid "New AK: %(ak)s."
msgstr "Neuer AK: %(ak)s." msgstr "Neuer AK: %(ak)s."
#: AKDashboard/views.py:45 #: AKDashboard/views.py:73
#, python-format #, python-format
msgid "AK \"%(ak)s\" edited." msgid "AK \"%(ak)s\" edited."
msgstr "AK \"%(ak)s\" bearbeitet." msgstr "AK \"%(ak)s\" bearbeitet."
#: AKDashboard/views.py:48 #: AKDashboard/views.py:76
#, python-format #, python-format
msgid "AK \"%(ak)s\" deleted." msgid "AK \"%(ak)s\" deleted."
msgstr "AK \"%(ak)s\" gelöscht." msgstr "AK \"%(ak)s\" gelöscht."
#: AKDashboard/views.py:60 #: AKDashboard/views.py:91
#, python-format #, python-format
msgid "AK \"%(ak)s\" (re-)scheduled." msgid "AK \"%(ak)s\" (re-)scheduled."
msgstr "AK \"%(ak)s\" (um-)geplant." msgstr "AK \"%(ak)s\" (um-)geplant."
...@@ -2,6 +2,10 @@ ...@@ -2,6 +2,10 @@
margin-bottom: 5em; margin-bottom: 5em;
} }
.dashboard-row-small {
margin-bottom: 3em;
}
.dashboard-row > .row { .dashboard-row > .row {
margin-left: 0; margin-left: 0;
padding-bottom: 1em; padding-bottom: 1em;
......
...@@ -9,7 +9,9 @@ ...@@ -9,7 +9,9 @@
{% endblock %} {% endblock %}
{% block content %} {% block content %}
{% for event in events %} {% include "messages.html" %}
{% if total_event_count > 0 %}
{% for event in active_and_current_events %}
<div class="dashboard-row"> <div class="dashboard-row">
{% include "AKDashboard/dashboard_row.html" %} {% include "AKDashboard/dashboard_row.html" %}
{% if event.contact_email %} {% if event.contact_email %}
...@@ -18,7 +20,16 @@ ...@@ -18,7 +20,16 @@
</p> </p>
{% endif %} {% endif %}
</div> </div>
{% empty %} {% endfor %}
{% if old_event_count > 0 %}
<h2 class="mb-3">{% trans "Old events" %}</h2>
{% for event in old_events %}
<div class="dashboard-row-small">
{% include "AKDashboard/dashboard_row_old_event.html" %}
</div>
{% endfor %}
{% endif %}
{% else %}
<div class="jumbotron"> <div class="jumbotron">
<h2 class="display-4"> <h2 class="display-4">
{% trans 'Currently, there are no Events!' %} {% trans 'Currently, there are no Events!' %}
...@@ -27,5 +38,5 @@ ...@@ -27,5 +38,5 @@
{% trans 'Please contact an administrator if you want to use AKPlanning.' %} {% trans 'Please contact an administrator if you want to use AKPlanning.' %}
</p> </p>
</div> </div>
{% endfor %} {% endif %}
{% endblock %} {% endblock %}
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
{% endblock %} {% endblock %}
{% block content %} {% block content %}
{% include "messages.html" %}
<div class="dashboard-row"> <div class="dashboard-row">
{% include "AKDashboard/dashboard_row.html" %} {% include "AKDashboard/dashboard_row.html" %}
......
...@@ -3,6 +3,12 @@ ...@@ -3,6 +3,12 @@
{% load fontawesome_6 %} {% load fontawesome_6 %}
<h2><a href="{% url 'dashboard:dashboard_event' slug=event.slug %}">{{ event.name }}</a></h2> <h2><a href="{% url 'dashboard:dashboard_event' slug=event.slug %}">{{ event.name }}</a></h2>
<h4 class="text-muted">
{% if event.place %}
<b>{{ event.place }} &middot;</b>
{% endif %}
{{ event | event_month_year }}
</h4>
<div class="mt-2"> <div class="mt-2">
{% if 'AKSubmission'|check_app_installed %} {% if 'AKSubmission'|check_app_installed %}
<a class="dashboard-box btn btn-primary" <a class="dashboard-box btn btn-primary"
...@@ -57,6 +63,17 @@ ...@@ -57,6 +63,17 @@
<span class='text'>{% trans 'AK History' %}</span> <span class='text'>{% trans 'AK History' %}</span>
</div> </div>
</a> </a>
{% if 'AKPreference'|check_app_installed and event.active %}
{% if not event.poll_hidden or user.is_staff %}
<a class="dashboard-box btn btn-primary"
href="{% url 'poll:poll' event_slug=event.slug %}">
<div class="col-sm-12 col-md-3 col-lg-2 dashboard-button">
<span class="fa fa-poll"></span>
<span class='text'>{% trans 'AK Preferences' %}</span>
</div>
</a>
{% endif %}
{% endif %}
{% for button in event.dashboardbutton_set.all %} {% for button in event.dashboardbutton_set.all %}
<a class="dashboard-box btn btn-{{ button.get_color_display }}" <a class="dashboard-box btn btn-{{ button.get_color_display }}"
href="{{ button.url }}"> href="{{ button.url }}">
......
{% load i18n %}
{% load tags_AKModel %}
{% load fontawesome_6 %}
<h3><a href="{% url 'dashboard:dashboard_event' slug=event.slug %}">{{ event.name }}</a>
<span class="text-muted">
&middot;
{% if event.place %}
{{ event.place }} &middot;
{% endif %}
{{ event | event_month_year }}
</span>
</h3>
<div class="mt-2">
{% if 'AKSubmission'|check_app_installed %}
<a class="btn btn-primary"
href="{% url 'submit:ak_list' event_slug=event.slug %}">
<div class="col-sm-12 col-md-3 col-lg-2 dashboard-button">
<span class="fa fa-list-ul"></span>
<span class='text'>{% trans 'AK List' %}</span>
</div>
</a>
{% endif %}
{% if 'AKPlan'|check_app_installed %}
{% if not event.plan_hidden or user.is_staff %}
<a class="btn btn-primary"
href="{% url 'plan:plan_overview' event_slug=event.slug %}">
<div class="col-sm-12 col-md-3 col-lg-2 dashboard-button">
<span class="fa fa-calendar-alt"></span>
<span class='text'>{% trans 'Schedule' %}</span>
</div>
</a>
{% endif %}
{% endif %}
<a class="btn btn-primary"
href="{% url 'dashboard:dashboard_event' slug=event.slug %}#history">
<div class="col-sm-12 col-md-3 col-lg-2 dashboard-button">
<span class="fa fa-history"></span>
<span class='text'>{% trans 'AK History' %}</span>
</div>
</a>
{% for button in event.dashboardbutton_set.all %}
<a class="btn btn-{{ button.get_color_display }}"
href="{{ button.url }}">
<div class="col-sm-12 col-md-3 col-lg-2 dashboard-button">
{% if button.icon %}<span class="fa">{{ button.icon.as_html }}</span>{% endif %}
<span class='text'>{{ button.text }}</span>
</div>
</a>
{% endfor %}
<a class="btn btn-info"
href=mailto:{{ event.contact_email }}"
title="{% trans 'Write to organizers of this event for questions and comments' %}">
{% fa6_icon "envelope" "fas" %}
</a>
</div>
import pytz 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.test_views import BasicViewTests
class DashboardTests(TestCase): class DashboardTests(TestCase):
""" """
Specific Dashboard Tests Specific Dashboard Tests
""" """
@classmethod @classmethod
def setUpTestData(cls): def setUpTestData(cls):
""" """
...@@ -22,11 +24,12 @@ class DashboardTests(TestCase): ...@@ -22,11 +24,12 @@ class DashboardTests(TestCase):
cls.event = Event.objects.create( cls.event = Event.objects.create(
name="Dashboard Test Event", name="Dashboard Test Event",
slug="dashboardtest", slug="dashboardtest",
timezone=pytz.utc, timezone=zoneinfo.ZoneInfo("Europe/Berlin"),
start=now(), start=now(),
end=now(), end=now(),
active=True, active=True,
plan_hidden=False, plan_hidden=False,
poll_hidden=False,
) )
cls.default_category = AKCategory.objects.create( cls.default_category = AKCategory.objects.create(
name="Test Category", name="Test Category",
...@@ -62,7 +65,7 @@ class DashboardTests(TestCase): ...@@ -62,7 +65,7 @@ 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",
...@@ -90,7 +93,8 @@ class DashboardTests(TestCase): ...@@ -90,7 +93,8 @@ class DashboardTests(TestCase):
self.event.save() self.event.save()
response = self.client.get(url_dashboard_index) response = self.client.get(url_dashboard_index)
self.assertEqual(response.status_code, 200) self.assertEqual(response.status_code, 200)
self.assertFalse(self.event in response.context["events"]) self.assertFalse(self.event in response.context["active_and_current_events"])
self.assertFalse(self.event in response.context["old_events"])
response = self.client.get(url_event_dashboard) response = self.client.get(url_event_dashboard)
self.assertEqual(response.status_code, 200) self.assertEqual(response.status_code, 200)
self.assertEqual(response.context["event"], self.event) self.assertEqual(response.context["event"], self.event)
...@@ -100,7 +104,7 @@ class DashboardTests(TestCase): ...@@ -100,7 +104,7 @@ class DashboardTests(TestCase):
self.event.save() self.event.save()
response = self.client.get(url_dashboard_index) response = self.client.get(url_dashboard_index)
self.assertEqual(response.status_code, 200) self.assertEqual(response.status_code, 200)
self.assertTrue(self.event in response.context["events"]) self.assertTrue(self.event in response.context["active_and_current_events"])
def test_active(self): def test_active(self):
""" """
...@@ -143,6 +147,26 @@ class DashboardTests(TestCase): ...@@ -143,6 +147,26 @@ class DashboardTests(TestCase):
self.assertContains(response, "Current AKs") self.assertContains(response, "Current AKs")
self.assertContains(response, "AK Wall") self.assertContains(response, "AK Wall")
def test_poll_hidden(self):
"""
Test visibility of poll buttons with regard to poll visibility status for a given event
"""
url_event_dashboard = reverse('dashboard:dashboard_event', kwargs={"slug": self.event.slug})
if apps.is_installed('AKPreference'):
# Poll hidden? No buttons should show up
self.event.poll_hidden = True
self.event.save()
response = self.client.get(url_event_dashboard)
self.assertNotContains(response, "AK Preferences")
# Poll not hidden?
# Buttons to preference poll should be on the page
self.event.poll_hidden = False
self.event.save()
response = self.client.get(url_event_dashboard)
self.assertContains(response, "AK Preferences")
def test_dashboard_buttons(self): def test_dashboard_buttons(self):
""" """
Make sure manually added buttons are displayed correctly Make sure manually added buttons are displayed correctly
......
...@@ -22,7 +22,18 @@ class DashboardView(TemplateView): ...@@ -22,7 +22,18 @@ class DashboardView(TemplateView):
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['events'] = Event.objects.filter(public=True).prefetch_related('dashboardbutton_set') # Load events and split between active and current/featured events and those that should show smaller below
context["active_and_current_events"] = []
context["old_events"] = []
events = Event.objects.filter(public=True).order_by("-active", "-pk").prefetch_related('dashboardbutton_set')
for event in events:
if event.active or len(context["active_and_current_events"]) < settings.DASHBOARD_MAX_FEATURED_EVENTS:
context["active_and_current_events"].append(event)
else:
context["old_events"].append(event)
context["active_event_count"] = len(context["active_and_current_events"])
context["old_event_count"] = len(context["old_events"])
context["total_event_count"] = context["active_event_count"] + context["old_event_count"]
return context return context
......
...@@ -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,15 +17,18 @@ from simple_history.admin import SimpleHistoryAdmin ...@@ -15,15 +17,18 @@ 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 PlanPublishView, PlanUnpublishView, DefaultSlotEditorView, CVMarkResolvedView, \ from AKModel.views.manage import CVMarkResolvedView, CVSetLevelViolationView, CVSetLevelWarningView, ClearScheduleView
CVSetLevelViolationView, CVSetLevelWarningView
from AKModel.views.room import RoomBatchCreationView
class EventRelatedFieldListFilter(RelatedFieldListFilter): class EventRelatedFieldListFilter(RelatedFieldListFilter):
"""
Reusable filter to restrict the possible choices of a field to those belonging to a certain event
as specified in the event__id__exact GET parameter.
The choices are only restricted if this parameter is present, otherwise all choices are used/returned
"""
def field_choices(self, field, request, model_admin): def field_choices(self, field, request, model_admin):
ordering = self.field_admin_ordering(field, request, model_admin) ordering = self.field_admin_ordering(field, request, model_admin)
limit_choices = {} limit_choices = {}
...@@ -34,41 +39,82 @@ class EventRelatedFieldListFilter(RelatedFieldListFilter): ...@@ -34,41 +39,82 @@ class EventRelatedFieldListFilter(RelatedFieldListFilter):
@admin.register(Event) @admin.register(Event)
class EventAdmin(admin.ModelAdmin): class EventAdmin(admin.ModelAdmin):
"""
Admin interface for Event
This allows to edit most fields of an event, some can only be changed by admin actions, since they have side effects
This admin interface registers additional views as defined in urls.py, the wizard, and the full scheduling
functionality if the AKScheduling app is active.
The interface overrides the built-in creation interface for a new event and replaces it with the event creation
wizard.
"""
model = Event model = Event
list_display = ['name', 'status_url', 'place', 'start', 'end', 'active', 'plan_hidden'] list_display = ['name', 'status_url', 'place', 'start', 'end', 'active', 'plan_hidden', 'poll_hidden']
list_filter = ['active'] list_filter = ['active']
list_editable = ['active'] list_editable = ['active']
ordering = ['-start'] ordering = ['-start']
readonly_fields = ['status_url', 'plan_hidden', 'plan_published_at', 'toggle_plan_visibility'] readonly_fields = [
actions = ['publish', 'unpublish'] 'status_url',
'plan_hidden', 'plan_published_at', 'toggle_plan_visibility',
'poll_hidden', 'poll_published_at', 'toggle_poll_visibility',
]
actions = ['publish_plan', 'unpublish_plan', 'publish_poll', 'unpublish_poll']
def add_view(self, request, form_url='', extra_context=None): def add_view(self, request, form_url='', extra_context=None):
# Always use wizard to create new events (the built-in form wouldn't work anyways since the timezone cannot # Override
# Always use wizard to create new events (the built-in form wouldn't work anyway since the timezone cannot
# be specified before starting to fill the form) # be specified before starting to fill the form)
return redirect("admin:new_event_wizard_start") return redirect("admin:new_event_wizard_start")
def get_urls(self): def get_urls(self):
"""
Get all event-related URLs
This will be both the built-in URLs and additional views providing additional functionality
:return: list of all relevant URLs
:rtype: List[path]
"""
# Load wizard URLs and the additional URLs defined in urls.py
# (first, to have the highest priority when overriding views)
urls = get_admin_urls_event_wizard(self.admin_site) urls = get_admin_urls_event_wizard(self.admin_site)
urls.extend(get_admin_urls_event(self.admin_site)) urls.extend(get_admin_urls_event(self.admin_site))
# Make scheduling admin views available if app is active
if apps.is_installed("AKScheduling"): if apps.is_installed("AKScheduling"):
from AKScheduling.urls import get_admin_urls_scheduling from AKScheduling.urls import get_admin_urls_scheduling # pylint: disable=import-outside-toplevel
urls.extend(get_admin_urls_scheduling(self.admin_site)) urls.extend(get_admin_urls_scheduling(self.admin_site))
urls.extend([
path('plan/publish/', self.admin_site.admin_view(PlanPublishView.as_view()), name="plan-publish"), if apps.is_installed("AKSolverInterface"):
path('plan/unpublish/', self.admin_site.admin_view(PlanUnpublishView.as_view()), name="plan-unpublish"), from AKSolverInterface.urls import get_admin_urls_solver_interface # pylint: disable=import-outside-toplevel
path('<slug:event_slug>/defaultSlots/', self.admin_site.admin_view(DefaultSlotEditorView.as_view()), name="default-slots-editor"), urls.extend(get_admin_urls_solver_interface(self.admin_site))
path('<slug:event_slug>/importRooms/', self.admin_site.admin_view(RoomBatchCreationView.as_view()), name="room-import"),
]) # Make sure built-in URLs are available as well
urls.extend(super().get_urls()) urls.extend(super().get_urls())
return urls return urls
@display(description=_("Status")) @display(description=_("Status"))
def status_url(self, obj): def status_url(self, obj):
"""
Define a read-only field to go to the status page of the event
:param obj: the event to link
:return: status page link (HTML)
:rtype: str
"""
return format_html("<a href='{url}'>{text}</a>", return format_html("<a href='{url}'>{text}</a>",
url=reverse_lazy('admin:event_status', kwargs={'event_slug': obj.slug}), text=_("Status")) url=reverse_lazy('admin:event_status', kwargs={'event_slug': obj.slug}), text=_("Status"))
@display(description=_("Toggle plan visibility")) @display(description=_("Toggle plan visibility"))
def toggle_plan_visibility(self, obj): def toggle_plan_visibility(self, obj):
"""
Define a read-only field to toggle the visibility of the plan of this event
This will choose from two different link targets/views depending on the current visibility status
:param obj: event to change the visibility of the plan for
:return: toggling link (HTML)
:rtype: str
"""
if obj.plan_hidden: if obj.plan_hidden:
url = f"{reverse_lazy('admin:plan-publish')}?pks={obj.pk}" url = f"{reverse_lazy('admin:plan-publish')}?pks={obj.pk}"
text = _('Publish plan') text = _('Publish plan')
...@@ -77,79 +123,159 @@ class EventAdmin(admin.ModelAdmin): ...@@ -77,79 +123,159 @@ class EventAdmin(admin.ModelAdmin):
text = _('Unpublish plan') text = _('Unpublish plan')
return format_html("<a href='{url}'>{text}</a>", url=url, text=text) return format_html("<a href='{url}'>{text}</a>", url=url, text=text)
@display(description=_("Toggle poll visibility"))
def toggle_poll_visibility(self, obj):
"""
Define a read-only field to toggle the visibility of the preference poll of this event
This will choose from two different link targets/views depending on the current visibility status
:param obj: event to change the visibility of the poll for
:return: toggling link (HTML)
:rtype: str
"""
if obj.poll_hidden:
url = f"{reverse_lazy('admin:poll-publish')}?pks={obj.pk}"
text = _('Publish preference poll')
else:
url = f"{reverse_lazy('admin:poll-unpublish')}?pks={obj.pk}"
text = _('Unpublish preference poll')
return format_html("<a href='{url}'>{text}</a>", url=url, text=text)
def get_form(self, request, obj=None, change=False, **kwargs): def get_form(self, request, obj=None, change=False, **kwargs):
# Use timezone of event # Override (update) form rendering to make sure the timezone of the event is used
timezone.activate(obj.timezone) timezone.activate(obj.timezone)
return super().get_form(request, obj, change, **kwargs) return super().get_form(request, obj, change, **kwargs)
@action(description=_('Publish plan')) @action(description=_('Publish plan'))
def publish(self, request, queryset): def publish_plan(self, request, queryset):
"""
Admin action to publish the plan
"""
selected = queryset.values_list('pk', flat=True) selected = queryset.values_list('pk', flat=True)
return HttpResponseRedirect(f"{reverse_lazy('admin:plan-publish')}?pks={','.join(str(pk) for pk in selected)}") return HttpResponseRedirect(f"{reverse_lazy('admin:plan-publish')}?pks={','.join(str(pk) for pk in selected)}")
@action(description=_('Unpublish plan')) @action(description=_('Unpublish plan'))
def unpublish(self, request, queryset): def unpublish_plan(self, request, queryset):
"""
Admin action to hide the plan
"""
selected = queryset.values_list('pk', flat=True)
return HttpResponseRedirect(
f"{reverse_lazy('admin:plan-unpublish')}?pks={','.join(str(pk) for pk in selected)}")
@action(description=_('Publish preference poll'))
def publish_poll(self, request, queryset):
"""
Admin action to publish the preference poll
"""
selected = queryset.values_list('pk', flat=True) selected = queryset.values_list('pk', flat=True)
return HttpResponseRedirect(f"{reverse_lazy('admin:plan-unpublish')}?pks={','.join(str(pk) for pk in selected)}") return HttpResponseRedirect(f"{reverse_lazy('admin:poll-publish')}?pks={','.join(str(pk) for pk in selected)}")
@action(description=_('Unpublish preference poll'))
def unpublish_poll(self, request, queryset):
"""
Admin action to hide the preference poll
"""
selected = queryset.values_list('pk', flat=True)
return HttpResponseRedirect(
f"{reverse_lazy('admin:poll-unpublish')}?pks={','.join(str(pk) for pk in selected)}")
class PrepopulateWithNextActiveEventMixin:
"""
Mixin for automated pre-population of the event field
"""
# pylint: disable=too-few-public-methods
def formfield_for_foreignkey(self, db_field, request, **kwargs):
"""
Override field generation for foreign key fields to introduce special handling for event fields:
Pre-populate the event field with the next active event (since that is the most likeliest event to be worked
on in the admin interface) to make creation of new owners easier
"""
if db_field.name == 'event':
kwargs['initial'] = Event.get_next_active()
return super().formfield_for_foreignkey(db_field, request, **kwargs)
@admin.register(AKOwner) @admin.register(AKOwner)
class AKOwnerAdmin(admin.ModelAdmin): class AKOwnerAdmin(PrepopulateWithNextActiveEventMixin, admin.ModelAdmin):
"""
Admin interface for AKOwner
"""
model = AKOwner model = AKOwner
list_display = ['name', 'institution', 'event'] list_display = ['name', 'institution', 'event', 'aks_url']
list_filter = ['event', 'institution'] list_filter = ['event', 'institution']
list_editable = [] list_editable = []
ordering = ['name'] ordering = ['name']
readonly_fields = ['aks_url']
def formfield_for_foreignkey(self, db_field, request, **kwargs): @display(description=_("AKs"))
if db_field.name == 'event': def aks_url(self, obj):
kwargs['initial'] = Event.get_next_active() """
return super(AKOwnerAdmin, self).formfield_for_foreignkey(db_field, request, **kwargs) Define a read-only field to go to the list of all AKs by this user
:param obj: user
:return: AK list page link (HTML)
:rtype: str
"""
return format_html("<a href='{url}'>{text}</a>",
url=reverse_lazy('admin:aks_by_owner', kwargs={'event_slug': obj.event.slug, 'pk': obj.pk}),
text=obj.ak_set.count())
@admin.register(AKCategory) @admin.register(AKCategory)
class AKCategoryAdmin(admin.ModelAdmin): class AKCategoryAdmin(PrepopulateWithNextActiveEventMixin, admin.ModelAdmin):
"""
Admin interface for AKCategory
"""
model = AKCategory model = AKCategory
list_display = ['name', 'color', 'event'] list_display = ['name', 'color', 'event']
list_filter = ['event'] list_filter = ['event']
list_editable = ['color'] list_editable = ['color']
ordering = ['name'] ordering = ['name']
def formfield_for_foreignkey(self, db_field, request, **kwargs):
if db_field.name == 'event':
kwargs['initial'] = Event.get_next_active()
return super(AKCategoryAdmin, self).formfield_for_foreignkey(db_field, request, **kwargs)
@admin.register(AKTrack) @admin.register(AKTrack)
class AKTrackAdmin(admin.ModelAdmin): class AKTrackAdmin(PrepopulateWithNextActiveEventMixin, admin.ModelAdmin):
"""
Admin interface for AKTrack
"""
model = AKTrack model = AKTrack
list_display = ['name', 'color', 'event'] list_display = ['name', 'color', 'event']
list_filter = ['event'] list_filter = ['event']
list_editable = ['color'] list_editable = ['color']
ordering = ['name'] ordering = ['name']
def formfield_for_foreignkey(self, db_field, request, **kwargs):
if db_field.name == 'event':
kwargs['initial'] = Event.get_next_active()
return super(AKTrackAdmin, self).formfield_for_foreignkey(db_field, request, **kwargs)
@admin.register(AKRequirement) @admin.register(AKRequirement)
class AKRequirementAdmin(admin.ModelAdmin): class AKRequirementAdmin(PrepopulateWithNextActiveEventMixin, admin.ModelAdmin):
"""
Admin interface for AKRequirements
"""
model = AKRequirement model = AKRequirement
list_display = ['name', 'event'] list_display = ['name', 'event']
list_filter = ['event'] list_filter = ['event']
list_editable = [] list_editable = []
ordering = ['name'] ordering = ['name']
def formfield_for_foreignkey(self, db_field, request, **kwargs):
if db_field.name == 'event': @admin.register(AKType)
kwargs['initial'] = Event.get_next_active() class AKTypeAdmin(PrepopulateWithNextActiveEventMixin, admin.ModelAdmin):
return super(AKRequirementAdmin, self).formfield_for_foreignkey(db_field, request, **kwargs) """
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
"""
title = _("Wish") # a label for our filter title = _("Wish") # a label for our filter
parameter_name = 'wishes' # you can put anything here parameter_name = 'wishes' # you can put anything here
...@@ -170,6 +296,9 @@ class WishFilter(SimpleListFilter): ...@@ -170,6 +296,9 @@ class WishFilter(SimpleListFilter):
class AKAdminForm(forms.ModelForm): class AKAdminForm(forms.ModelForm):
"""
Modified admin form for AKs, to be used in :class:`AKAdmin`
"""
class Meta: class Meta:
widgets = { widgets = {
'requirements': forms.CheckboxSelectMultiple, 'requirements': forms.CheckboxSelectMultiple,
...@@ -185,13 +314,24 @@ class AKAdminForm(forms.ModelForm): ...@@ -185,13 +314,24 @@ 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)
class AKAdmin(SimpleHistoryAdmin): class AKAdmin(PrepopulateWithNextActiveEventMixin, SimpleHistoryAdmin):
"""
Admin interface for AKs
Uses a modified form (see :class:`AKAdminForm`)
"""
model = AK model = AK
list_display = ['name', 'short_name', 'category', 'track', 'is_wish', 'interest', 'interest_counter', 'event'] list_display = ['name', 'short_name', 'category', 'track', 'is_wish', 'interest', 'interest_counter', 'event']
list_filter = ['event', WishFilter, ('category', EventRelatedFieldListFilter), ('requirements', EventRelatedFieldListFilter)] list_filter = ['event',
WishFilter,
('category', EventRelatedFieldListFilter),
('requirements', EventRelatedFieldListFilter),
('types', EventRelatedFieldListFilter),
]
list_editable = ['short_name', 'track', 'interest_counter'] list_editable = ['short_name', 'track', 'interest_counter']
ordering = ['pk'] ordering = ['pk']
actions = ['wiki_export', 'reset_interest', 'reset_interest_counter'] actions = ['wiki_export', 'reset_interest', 'reset_interest_counter']
...@@ -199,25 +339,36 @@ class AKAdmin(SimpleHistoryAdmin): ...@@ -199,25 +339,36 @@ class AKAdmin(SimpleHistoryAdmin):
@display(boolean=True) @display(boolean=True)
def is_wish(self, obj): def is_wish(self, obj):
"""
Property: Is this AK a wish?
"""
return obj.wish return obj.wish
@action(description=_("Export to wiki syntax")) @action(description=_("Export to wiki syntax"))
def wiki_export(self, request, queryset): def wiki_export(self, request, queryset):
"""
Action: Export to wiki syntax
This will use the wiki export view (therefore, all AKs have to have the same event to correclty handle the
categories and to prevent accidentially merging AKs from different events in the wiki)
but restrict the AKs to the ones explicitly selected here.
"""
# Only export when all AKs belong to the same event # Only export when all AKs belong to the same event
if queryset.values("event").distinct().count() == 1: if queryset.values("event").distinct().count() == 1:
event = queryset.first().event event = queryset.first().event
pks = set(ak.pk for ak in queryset.all()) pks = set(ak.pk for ak in queryset.all())
categories_with_aks = event.get_categories_with_aks(wishes_seperately=False, filter=lambda ak: ak.pk in pks, categories_with_aks = event.get_categories_with_aks(wishes_seperately=False,
filter_func=lambda ak: ak.pk in pks,
hide_empty_categories=True) hide_empty_categories=True)
return render(request, 'admin/AKModel/wiki_export.html', context={"categories_with_aks": categories_with_aks}) return render(request, 'admin/AKModel/wiki_export.html',
context={"categories_with_aks": categories_with_aks})
self.message_user(request, _("Cannot export AKs from more than one event at the same time."), messages.ERROR) self.message_user(request, _("Cannot export AKs from more than one event at the same time."), messages.ERROR)
return redirect('admin:AKModel_ak_changelist')
def formfield_for_foreignkey(self, db_field, request, **kwargs):
if db_field.name == 'event':
kwargs['initial'] = Event.get_next_active()
return super(AKAdmin, self).formfield_for_foreignkey(db_field, request, **kwargs)
def get_urls(self): def get_urls(self):
"""
Add additional URLs/views
Currently used to reset the interest field and interest counter field
"""
urls = [ urls = [
path('reset-interest/', AKResetInterestView.as_view(), name="ak-reset-interest"), path('reset-interest/', AKResetInterestView.as_view(), name="ak-reset-interest"),
path('reset-interest-counter/', AKResetInterestCounterView.as_view(), name="ak-reset-interest-counter"), path('reset-interest-counter/', AKResetInterestCounterView.as_view(), name="ak-reset-interest-counter"),
...@@ -227,17 +378,30 @@ class AKAdmin(SimpleHistoryAdmin): ...@@ -227,17 +378,30 @@ class AKAdmin(SimpleHistoryAdmin):
@action(description=_("Reset interest in AKs")) @action(description=_("Reset interest in AKs"))
def reset_interest(self, request, queryset): def reset_interest(self, request, queryset):
"""
Action: Reset interest field for the given AKs
Will use a typical admin confirmation view flow
"""
selected = queryset.values_list('pk', flat=True) selected = queryset.values_list('pk', flat=True)
return HttpResponseRedirect(f"{reverse_lazy('admin:ak-reset-interest')}?pks={','.join(str(pk) for pk in selected)}") return HttpResponseRedirect(
f"{reverse_lazy('admin:ak-reset-interest')}?pks={','.join(str(pk) for pk in selected)}")
@action(description=_("Reset AKs' interest counters")) @action(description=_("Reset AKs' interest counters"))
def reset_interest_counter(self, request, queryset): def reset_interest_counter(self, request, queryset):
"""
Action: Reset interest counter field for the given AKs
Will use a typical admin confirmation view flow
"""
selected = queryset.values_list('pk', flat=True) selected = queryset.values_list('pk', flat=True)
return HttpResponseRedirect(f"{reverse_lazy('admin:ak-reset-interest-counter')}?pks={','.join(str(pk) for pk in selected)}") return HttpResponseRedirect(
f"{reverse_lazy('admin:ak-reset-interest-counter')}?pks={','.join(str(pk) for pk in selected)}")
@admin.register(Room) @admin.register(Room)
class RoomAdmin(admin.ModelAdmin): class RoomAdmin(PrepopulateWithNextActiveEventMixin, admin.ModelAdmin):
"""
Admin interface for Rooms
"""
model = Room model = Room
list_display = ['name', 'location', 'capacity', 'event'] list_display = ['name', 'location', 'capacity', 'event']
list_filter = ['event', ('properties', EventRelatedFieldListFilter), 'location'] list_filter = ['event', ('properties', EventRelatedFieldListFilter), 'location']
...@@ -246,26 +410,29 @@ class RoomAdmin(admin.ModelAdmin): ...@@ -246,26 +410,29 @@ class RoomAdmin(admin.ModelAdmin):
change_form_template = "admin/AKModel/room_change_form.html" change_form_template = "admin/AKModel/room_change_form.html"
def add_view(self, request, form_url='', extra_context=None): def add_view(self, request, form_url='', extra_context=None):
# Override creation view
# Use custom view for room creation (either room form or combined form if virtual rooms are supported) # Use custom view for room creation (either room form or combined form if virtual rooms are supported)
return redirect("admin:room-new") return redirect("admin:room-new")
def get_form(self, request, obj=None, change=False, **kwargs): def get_form(self, request, obj=None, change=False, **kwargs):
# Override form creation to use a form that allows to specify availabilites of the room once this room is
# associated with an event (so not before the first saving) since the timezone information and event start
# and end are needed to correclty render the calendar
if obj is not None: if obj is not None:
return RoomFormWithAvailabilities return RoomFormWithAvailabilities
return super().get_form(request, obj, change, **kwargs) return super().get_form(request, obj, change, **kwargs)
def formfield_for_foreignkey(self, db_field, request, **kwargs):
if db_field.name == 'event':
kwargs['initial'] = Event.get_next_active()
return super(RoomAdmin, self).formfield_for_foreignkey(
db_field, request, **kwargs
)
def get_urls(self): def get_urls(self):
"""
Add additional URLs/views
This is currently used to adapt the creation form behavior, to allow the creation of virtual rooms in-place
when the support for virtual rooms is turned on (AKOnline app active)
"""
# pylint: disable=import-outside-toplevel
if apps.is_installed("AKOnline"): if apps.is_installed("AKOnline"):
from AKOnline.views import RoomCreationWithVirtualView as RoomCreationView from AKOnline.views import RoomCreationWithVirtualView as RoomCreationView
else: else:
from .views import RoomCreationView from .views.room import RoomCreationView
urls = [ urls = [
path('new/', self.admin_site.admin_view(RoomCreationView.as_view()), name="room-new"), path('new/', self.admin_site.admin_view(RoomCreationView.as_view()), name="room-new"),
...@@ -274,7 +441,28 @@ class RoomAdmin(admin.ModelAdmin): ...@@ -274,7 +441,28 @@ class RoomAdmin(admin.ModelAdmin):
return urls return urls
class EventTimezoneFormMixin:
"""
Mixin to enforce the usage of the timezone of the associated event in forms
"""
# pylint: disable=too-few-public-methods
def get_form(self, request, obj=None, change=False, **kwargs):
"""
Override form creation, use timezone of associated event
"""
if obj is not None and obj.event.timezone:
timezone.activate(obj.event.timezone)
# No timezone available? Use UTC
else:
timezone.activate("UTC")
return super().get_form(request, obj, change, **kwargs)
class AKSlotAdminForm(forms.ModelForm): class AKSlotAdminForm(forms.ModelForm):
"""
Modified admin form for AKSlots, to be used in :class:`AKSlotAdmin`
"""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
# Filter possible values for foreign keys when event is specified # Filter possible values for foreign keys when event is specified
...@@ -284,58 +472,91 @@ class AKSlotAdminForm(forms.ModelForm): ...@@ -284,58 +472,91 @@ class AKSlotAdminForm(forms.ModelForm):
@admin.register(AKSlot) @admin.register(AKSlot)
class AKSlotAdmin(admin.ModelAdmin): class AKSlotAdmin(EventTimezoneFormMixin, PrepopulateWithNextActiveEventMixin, admin.ModelAdmin):
"""
Admin interface for AKSlots
Uses a modified form (see :class:`AKSlotAdminForm`)
"""
model = AKSlot model = AKSlot
list_display = ['id', 'ak', 'room', 'start', 'duration', 'event'] list_display = ['id', 'ak', 'room', 'start', 'duration', 'event']
list_filter = ['event', ('room', EventRelatedFieldListFilter)] list_filter = ['event', "fixed", ('room', EventRelatedFieldListFilter),
('ak__category', EventRelatedFieldListFilter)]
ordering = ['start'] ordering = ['start']
readonly_fields = ['ak_details_link', 'updated'] readonly_fields = ['ak_details_link', 'updated']
form = AKSlotAdminForm form = AKSlotAdminForm
actions = ["reset_scheduling"]
def get_form(self, request, obj=None, change=False, **kwargs):
# Use timezone of associated event
if obj is not None and obj.event.timezone:
timezone.activate(obj.event.timezone)
# No timezone available? Use UTC
else:
timezone.activate("UTC")
return super().get_form(request, obj, change, **kwargs)
def formfield_for_foreignkey(self, db_field, request, **kwargs):
if db_field.name == 'event':
kwargs['initial'] = Event.get_next_active()
return super(AKSlotAdmin, self).formfield_for_foreignkey(db_field, request, **kwargs)
@display(description=_('AK Details')) @display(description=_('AK Details'))
def ak_details_link(self, akslot): def ak_details_link(self, akslot):
"""
Define a read-only field to link the details of the associated AK
:param obj: the AK to link
:return: AK detail page page link (HTML)
:rtype: str
"""
if apps.is_installed("AKSubmission") and akslot.ak is not None: if apps.is_installed("AKSubmission") and akslot.ak is not None:
link = f"<a href={{ akslot.detail_url }}>{str(akslot.ak)}</a>" link = f"<a href='{ akslot.ak.detail_url }'>{str(akslot.ak)}</a>"
return mark_safe(link) return mark_safe(str(link))
return "-" return "-"
def get_urls(self):
"""
Add additional URLs/views
"""
urls = [
path('clear-schedule/', ClearScheduleView.as_view(), name="clear-schedule"),
]
urls.extend(super().get_urls())
return urls
@action(description=_("Clear start/rooms"))
def reset_scheduling(self, request, queryset):
"""
Action: Reset start and room field for the given AKs
Will use a typical admin confirmation view flow
"""
if queryset.filter(fixed=True).exists():
self.message_user(
request,
_(
"Cannot reset scheduling for fixed AKs. "
"Please make sure to filter out fixed AKs first."
),
messages.ERROR,
)
return redirect('admin:AKModel_akslot_changelist')
selected = queryset.values_list('pk', flat=True)
return HttpResponseRedirect(
f"{reverse_lazy('admin:clear-schedule')}?pks={','.join(str(pk) for pk in selected)}")
ak_details_link.short_description = _('AK Details') ak_details_link.short_description = _('AK Details')
@admin.register(Availability) @admin.register(Availability)
class AvailabilityAdmin(admin.ModelAdmin): class AvailabilityAdmin(EventTimezoneFormMixin, admin.ModelAdmin):
def get_form(self, request, obj=None, change=False, **kwargs): """
# Use timezone of associated event Admin interface for Availabilities
if obj is not None and obj.event.timezone: """
timezone.activate(obj.event.timezone) list_display = ['__str__', 'event']
# No timezone available? Use UTC list_filter = ['event']
else:
timezone.activate("UTC")
return super().get_form(request, obj, change, **kwargs)
@admin.register(AKOrgaMessage) @admin.register(AKOrgaMessage)
class AKOrgaMessageAdmin(admin.ModelAdmin): class AKOrgaMessageAdmin(admin.ModelAdmin):
list_display = ['timestamp', 'ak', 'text'] """
Admin interface for AKOrgaMessages
"""
list_display = ['timestamp', 'ak', 'text', 'resolved']
list_filter = ['ak__event'] list_filter = ['ak__event']
readonly_fields = ['timestamp', 'ak', 'text'] readonly_fields = ['timestamp', 'ak', 'text']
class ConstraintViolationAdminForm(forms.ModelForm): class ConstraintViolationAdminForm(forms.ModelForm):
"""
Adapted admin form for constraint violations for usage in :class:`ConstraintViolationAdmin`)
"""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
# Filter possible values for foreign keys & m2m when event is specified # Filter possible values for foreign keys & m2m when event is specified
...@@ -350,6 +571,10 @@ class ConstraintViolationAdminForm(forms.ModelForm): ...@@ -350,6 +571,10 @@ class ConstraintViolationAdminForm(forms.ModelForm):
@admin.register(ConstraintViolation) @admin.register(ConstraintViolation)
class ConstraintViolationAdmin(admin.ModelAdmin): class ConstraintViolationAdmin(admin.ModelAdmin):
"""
Admin interface for constraint violations
Uses an adapted form (see :class:`ConstraintViolationAdminForm`)
"""
list_display = ['type', 'level', 'get_details', 'manually_resolved'] list_display = ['type', 'level', 'get_details', 'manually_resolved']
list_filter = ['event'] list_filter = ['event']
readonly_fields = ['timestamp'] readonly_fields = ['timestamp']
...@@ -357,6 +582,9 @@ class ConstraintViolationAdmin(admin.ModelAdmin): ...@@ -357,6 +582,9 @@ class ConstraintViolationAdmin(admin.ModelAdmin):
actions = ['mark_resolved', 'set_violation', 'set_warning'] actions = ['mark_resolved', 'set_violation', 'set_warning']
def get_urls(self): def get_urls(self):
"""
Add additional URLs/views to change status and severity of CVs
"""
urls = [ urls = [
path('mark-resolved/', CVMarkResolvedView.as_view(), name="cv-mark-resolved"), path('mark-resolved/', CVMarkResolvedView.as_view(), name="cv-mark-resolved"),
path('set-violation/', CVSetLevelViolationView.as_view(), name="cv-set-violation"), path('set-violation/', CVSetLevelViolationView.as_view(), name="cv-set-violation"),
...@@ -367,21 +595,36 @@ class ConstraintViolationAdmin(admin.ModelAdmin): ...@@ -367,21 +595,36 @@ class ConstraintViolationAdmin(admin.ModelAdmin):
@action(description=_("Mark Constraint Violations as manually resolved")) @action(description=_("Mark Constraint Violations as manually resolved"))
def mark_resolved(self, request, queryset): def mark_resolved(self, request, queryset):
"""
Action: Mark CV as resolved
"""
selected = queryset.values_list('pk', flat=True) selected = queryset.values_list('pk', flat=True)
return HttpResponseRedirect(f"{reverse_lazy('admin:cv-mark-resolved')}?pks={','.join(str(pk) for pk in selected)}") return HttpResponseRedirect(
f"{reverse_lazy('admin:cv-mark-resolved')}?pks={','.join(str(pk) for pk in selected)}")
@action(description=_('Set Constraint Violations to level "violation"')) @action(description=_('Set Constraint Violations to level "violation"'))
def set_violation(self, request, queryset): def set_violation(self, request, queryset):
"""
Action: Promote CV to level violation
"""
selected = queryset.values_list('pk', flat=True) selected = queryset.values_list('pk', flat=True)
return HttpResponseRedirect(f"{reverse_lazy('admin:cv-set-violation')}?pks={','.join(str(pk) for pk in selected)}") return HttpResponseRedirect(
f"{reverse_lazy('admin:cv-set-violation')}?pks={','.join(str(pk) for pk in selected)}")
@action(description=_('Set Constraint Violations to level "warning"')) @action(description=_('Set Constraint Violations to level "warning"'))
def set_warning(self, request, queryset): def set_warning(self, request, queryset):
"""
Action: Set CV to level warning
"""
selected = queryset.values_list('pk', flat=True) selected = queryset.values_list('pk', flat=True)
return HttpResponseRedirect(f"{reverse_lazy('admin:cv-set-warning')}?pks={','.join(str(pk) for pk in selected)}") return HttpResponseRedirect(
f"{reverse_lazy('admin:cv-set-warning')}?pks={','.join(str(pk) for pk in selected)}")
class DefaultSlotAdminForm(forms.ModelForm): class DefaultSlotAdminForm(forms.ModelForm):
"""
Adapted admin form for DefaultSlot for usage in :class:`DefaultSlotAdmin`
"""
class Meta: class Meta:
widgets = { widgets = {
'primary_categories': forms.CheckboxSelectMultiple 'primary_categories': forms.CheckboxSelectMultiple
...@@ -395,13 +638,49 @@ class DefaultSlotAdminForm(forms.ModelForm): ...@@ -395,13 +638,49 @@ class DefaultSlotAdminForm(forms.ModelForm):
@admin.register(DefaultSlot) @admin.register(DefaultSlot)
class DefaultSlotAdmin(admin.ModelAdmin): class DefaultSlotAdmin(EventTimezoneFormMixin, admin.ModelAdmin):
"""
Admin interface for default slots
Uses an adapted form (see :class:`DefaultSlotAdminForm`)
"""
list_display = ['start_simplified', 'end_simplified', 'event'] list_display = ['start_simplified', 'end_simplified', 'event']
list_filter = ['event'] list_filter = ['event']
form = DefaultSlotAdminForm form = DefaultSlotAdminForm
def get_form(self, request, obj=None, change=False, **kwargs):
# Use timezone of event # Define a new User admin
if obj is not None: class UserAdmin(BaseUserAdmin):
timezone.activate(obj.event.timezone) """
return super().get_form(request, obj, change, **kwargs) 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)
...@@ -3,8 +3,15 @@ from django.contrib.admin.apps import AdminConfig ...@@ -3,8 +3,15 @@ from django.contrib.admin.apps import AdminConfig
class AkmodelConfig(AppConfig): class AkmodelConfig(AppConfig):
"""
App configuration (default, only specifies name of the app)
"""
name = 'AKModel' name = 'AKModel'
class AKAdminConfig(AdminConfig): class AKAdminConfig(AdminConfig):
"""
App configuration for admin
Loading a custom version here allows to add additional contex and further adapt the behavior of the admin interface
"""
default_site = 'AKModel.site.AKAdminSite' default_site = 'AKModel.site.AKAdminSite'
# This part of the code was adapted from pretalx (https://github.com/pretalx/pretalx) # This part of the code was adapted from pretalx (https://github.com/pretalx/pretalx)
# Copyright 2017-2019, Tobias Kunze # Copyright 2017-2019, Tobias Kunze
# Original Copyrights licensed under the Apache License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0 # Original Copyrights licensed under the Apache License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0
# Changes are marked in the code # Documentation was mainly added by us, other changes are marked in the code
import datetime import datetime
import json import json
...@@ -12,11 +12,15 @@ from django.utils.dateparse import parse_datetime ...@@ -12,11 +12,15 @@ from django.utils.dateparse import parse_datetime
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
from AKModel.availability.models import Availability from AKModel.availability.models import Availability
from AKModel.availability.serializers import AvailabilitySerializer from AKModel.availability.serializers import AvailabilityFormSerializer
from AKModel.models import Event from AKModel.models import Event
class AvailabilitiesFormMixin(forms.Form): class AvailabilitiesFormMixin(forms.Form):
"""
Mixin for forms to add availabilities functionality to it
Will handle the rendering and population of an availabilities field
"""
availabilities = forms.CharField( availabilities = forms.CharField(
label=_('Availability'), label=_('Availability'),
help_text=_( help_text=_(
...@@ -28,40 +32,46 @@ class AvailabilitiesFormMixin(forms.Form): ...@@ -28,40 +32,46 @@ class AvailabilitiesFormMixin(forms.Form):
) )
def _serialize(self, event, instance): def _serialize(self, event, instance):
"""
Serialize relevant availabilities into a JSON format to populate the text field in the form
:param event: event the availabilities belong to (relevant for start and end times)
:param instance: the entity availabilities in this form should belong to (e.g., an AK, or a Room)
:return: JSON serializiation of the relevant availabilities
:rtype: str
"""
if instance: if instance:
availabilities = AvailabilitySerializer( availabilities = instance.availabilities.all()
instance.availabilities.all(), many=True
).data
else: else:
availabilities = [] availabilities = []
return json.dumps( return json.dumps(AvailabilityFormSerializer((availabilities, event)).data)
{
'availabilities': availabilities,
'event': {
# 'timezone': event.timezone,
'date_from': str(event.start),
'date_to': str(event.end),
},
}
)
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
# Load event information and populate availabilities text field
self.event = self.initial.get('event') self.event = self.initial.get('event')
if isinstance(self.event, int): if isinstance(self.event, int):
self.event = Event.objects.get(pk=self.event) self.event = Event.objects.get(pk=self.event)
initial = kwargs.pop('initial', dict()) initial = kwargs.pop('initial', {})
initial['availabilities'] = self._serialize(self.event, kwargs['instance']) if 'availabilities' not in initial:
initial['availabilities'] = self._serialize(self.event, kwargs.get('instance'))
if not isinstance(self, forms.BaseModelForm): if not isinstance(self, forms.BaseModelForm):
kwargs.pop('instance') kwargs.pop('instance', None)
kwargs['initial'] = initial kwargs['initial'] = initial
def _parse_availabilities_json(self, jsonavailabilities): def _parse_availabilities_json(self, jsonavailabilities):
"""
Turn raw JSON availabilities into a list of model instances
:param jsonavailabilities: raw json input
:return: a list of availability objects corresponding to the raw input
:rtype: List[Availability]
"""
try: try:
rawdata = json.loads(jsonavailabilities) rawdata = json.loads(jsonavailabilities)
except ValueError: except ValueError as exc:
raise forms.ValidationError("Submitted availabilities are not valid json.") raise forms.ValidationError("Submitted availabilities are not valid json.") from exc
if not isinstance(rawdata, dict): if not isinstance(rawdata, dict):
raise forms.ValidationError( raise forms.ValidationError(
"Submitted json does not comply with expected format, should be object." "Submitted json does not comply with expected format, should be object."
...@@ -74,17 +84,32 @@ class AvailabilitiesFormMixin(forms.Form): ...@@ -74,17 +84,32 @@ class AvailabilitiesFormMixin(forms.Form):
return availabilities return availabilities
def _parse_datetime(self, strdate): def _parse_datetime(self, strdate):
"""
Parse input date string
This will try to correct timezone information if needed
:param strdate: string representing a timestamp
:return: a timestamp object
"""
tz = self.event.timezone # adapt to our event model tz = self.event.timezone # adapt to our event model
obj = parse_datetime(strdate) obj = parse_datetime(strdate)
if not obj: if not obj:
raise TypeError raise TypeError
if obj.tzinfo is None: if obj.tzinfo is None:
# Adapt to new python timezone interface
obj = obj.replace(tzinfo=tz) obj = obj.replace(tzinfo=tz)
return obj return obj
def _validate_availability(self, rawavail): def _validate_availability(self, rawavail):
"""
Validate a raw availability instance input by making sure the relevant fields are present and can be parsed
The cleaned up values that are produced to test the validity of the input are stored in-place in the input
object for later usage in cleaning/parsing to availability objects
:param rawavail: object to validate/clean
"""
message = _("The submitted availability does not comply with the required format.") message = _("The submitted availability does not comply with the required format.")
if not isinstance(rawavail, dict): if not isinstance(rawavail, dict):
raise forms.ValidationError(message) raise forms.ValidationError(message)
...@@ -96,12 +121,11 @@ class AvailabilitiesFormMixin(forms.Form): ...@@ -96,12 +121,11 @@ class AvailabilitiesFormMixin(forms.Form):
try: try:
rawavail['start'] = self._parse_datetime(rawavail['start']) rawavail['start'] = self._parse_datetime(rawavail['start'])
rawavail['end'] = self._parse_datetime(rawavail['end']) rawavail['end'] = self._parse_datetime(rawavail['end'])
except (TypeError, ValueError): # Adapt: Better error handling
except (TypeError, ValueError) as exc:
raise forms.ValidationError( raise forms.ValidationError(
_("The submitted availability contains an invalid date.") _("The submitted availability contains an invalid date.")
) ) from exc
tz = self.event.timezone # adapt to our event model
timeframe_start = self.event.start # adapt to our event model timeframe_start = self.event.start # adapt to our event model
if rawavail['start'] < timeframe_start: if rawavail['start'] < timeframe_start:
...@@ -115,6 +139,10 @@ class AvailabilitiesFormMixin(forms.Form): ...@@ -115,6 +139,10 @@ class AvailabilitiesFormMixin(forms.Form):
rawavail['end'] = timeframe_end rawavail['end'] = timeframe_end
def clean_availabilities(self): def clean_availabilities(self):
"""
Turn raw availabilities into real availability objects
:return:
"""
data = self.cleaned_data.get('availabilities') data = self.cleaned_data.get('availabilities')
required = ( required = (
'availabilities' in self.fields and self.fields['availabilities'].required 'availabilities' in self.fields and self.fields['availabilities'].required
...@@ -135,7 +163,8 @@ class AvailabilitiesFormMixin(forms.Form): ...@@ -135,7 +163,8 @@ class AvailabilitiesFormMixin(forms.Form):
return availabilities return availabilities
def _set_foreignkeys(self, instance, availabilities): def _set_foreignkeys(self, instance, availabilities):
"""Set the reference to `instance` in each given availability. """
Set the reference to `instance` in each given availability.
For example, set the availabilitiy.room_id to instance.id, in For example, set the availabilitiy.room_id to instance.id, in
case instance of type Room. case instance of type Room.
""" """
...@@ -144,11 +173,21 @@ class AvailabilitiesFormMixin(forms.Form): ...@@ -144,11 +173,21 @@ class AvailabilitiesFormMixin(forms.Form):
for avail in availabilities: for avail in availabilities:
setattr(avail, reference_name, instance.id) setattr(avail, reference_name, instance.id)
def _replace_availabilities(self, instance, availabilities: [Availability]): def _replace_availabilities(self, instance, availabilities: list[Availability]):
"""
Replace the existing list of availabilities belonging to an entity with a new, updated one
This will trigger a post_save signal for usage in constraint violation checking
:param instance: entity the availabilities belong to
:param availabilities: list of new availabilities
"""
with transaction.atomic(): with transaction.atomic():
# TODO: do not recreate objects unnecessarily, give the client the IDs, so we can track modifications and leave unchanged objects alone # TODO: do not recreate objects unnecessarily, give the client the IDs, so we can track modifications and
# leave unchanged objects alone
instance.availabilities.all().delete() instance.availabilities.all().delete()
Availability.objects.bulk_create(availabilities) Availability.objects.bulk_create(availabilities)
# Adaption:
# Trigger post save signal manually to make sure constraints are updated accordingly # Trigger post save signal manually to make sure constraints are updated accordingly
# Doing this one time is sufficient, since this will nevertheless update all availability constraint # Doing this one time is sufficient, since this will nevertheless update all availability constraint
# violations of the corresponding AK # violations of the corresponding AK
...@@ -156,6 +195,9 @@ class AvailabilitiesFormMixin(forms.Form): ...@@ -156,6 +195,9 @@ class AvailabilitiesFormMixin(forms.Form):
post_save.send(Availability, instance=availabilities[0], created=True) post_save.send(Availability, instance=availabilities[0], created=True)
def save(self, *args, **kwargs): def save(self, *args, **kwargs):
"""
Override the saving method of the (model) form
"""
instance = super().save(*args, **kwargs) instance = super().save(*args, **kwargs)
availabilities = self.cleaned_data.get('availabilities') availabilities = self.cleaned_data.get('availabilities')
......
...@@ -11,6 +11,8 @@ from django.utils.functional import cached_property ...@@ -11,6 +11,8 @@ from django.utils.functional import cached_property
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
from AKModel.models import Event, AKOwner, Room, AK, AKCategory from AKModel.models import Event, AKOwner, Room, AK, AKCategory
# TODO: Decouple from AKPreference app
from AKPreference.models import EventParticipant
zero_time = datetime.time(0, 0) zero_time = datetime.time(0, 0)
...@@ -23,6 +25,10 @@ zero_time = datetime.time(0, 0) ...@@ -23,6 +25,10 @@ zero_time = datetime.time(0, 0)
# add meta class # add meta class
# enable availabilities for AKs and AKCategories # enable availabilities for AKs and AKCategories
# add verbose names and help texts to model attributes # add verbose names and help texts to model attributes
# adapt or extemd documentation
# add participants
class Availability(models.Model): class Availability(models.Model):
"""The Availability class models when people or rooms are available for. """The Availability class models when people or rooms are available for.
...@@ -31,6 +37,8 @@ class Availability(models.Model): ...@@ -31,6 +37,8 @@ class Availability(models.Model):
span multiple days, but due to our choice of input widget, it will span multiple days, but due to our choice of input widget, it will
usually only span a single day at most. usually only span a single day at most.
""" """
# pylint: disable=broad-exception-raised
event = models.ForeignKey( event = models.ForeignKey(
to=Event, to=Event,
related_name='availabilities', related_name='availabilities',
...@@ -74,20 +82,48 @@ class Availability(models.Model): ...@@ -74,20 +82,48 @@ class Availability(models.Model):
verbose_name=_('AK Category'), verbose_name=_('AK Category'),
help_text=_('AK Category whose availability this is'), help_text=_('AK Category whose availability this is'),
) )
participant = models.ForeignKey(
to=EventParticipant,
related_name='availabilities',
on_delete=models.CASCADE,
null=True,
blank=True,
verbose_name=_('Participant'),
help_text=_('Participant whose availability this is'),
)
start = models.DateTimeField() start = models.DateTimeField()
end = models.DateTimeField() end = models.DateTimeField()
def __str__(self) -> str: def __str__(self) -> str:
person = self.person.name if self.person else None person = self.person.name if self.person else None
participant = str(self.participant) if self.participant else None
room = getattr(self.room, 'name', None) room = getattr(self.room, 'name', None)
event = getattr(getattr(self, 'event', None), 'name', None) event = getattr(getattr(self, 'event', None), 'name', None)
ak = getattr(self.ak, 'name', None) ak = getattr(self.ak, 'name', None)
ak_category = getattr(self.ak_category, 'name', None) ak_category = getattr(self.ak_category, 'name', None)
return f'Availability(event={event}, person={person}, room={room}, ak={ak}, ak category={ak_category})' arg_list = [
f"event={event}",
f"person={person}",
f"room={room}",
f"ak={ak}",
f"ak category={ak_category}",
f"participant={participant}",
]
return f'Availability({", ".join(arg_list)})'
def __hash__(self): def __hash__(self):
return hash( return hash(
(getattr(self, 'event', None), self.person, self.room, self.ak, self.ak_category, self.start, self.end)) (
getattr(self, 'event', None),
self.person,
self.room,
self.ak,
self.ak_category,
self.participant,
self.start,
self.end,
)
)
def __eq__(self, other: 'Availability') -> bool: def __eq__(self, other: 'Availability') -> bool:
"""Comparisons like ``availability1 == availability2``. """Comparisons like ``availability1 == availability2``.
...@@ -96,10 +132,10 @@ class Availability(models.Model): ...@@ -96,10 +132,10 @@ class Availability(models.Model):
are the same. are the same.
""" """
return all( return all(
[ (
getattr(self, attribute, None) == getattr(other, attribute, None) getattr(self, attribute, None) == getattr(other, attribute, None)
for attribute in ['event', 'person', 'room', 'ak', 'ak_category', 'start', 'end'] for attribute in ['event', 'person', 'room', 'ak', 'ak_category', 'participant', 'start', 'end']
] )
) )
@cached_property @cached_property
...@@ -146,9 +182,12 @@ class Availability(models.Model): ...@@ -146,9 +182,12 @@ class Availability(models.Model):
if not other.overlaps(self, strict=False): if not other.overlaps(self, strict=False):
raise Exception('Only overlapping Availabilities can be merged.') raise Exception('Only overlapping Availabilities can be merged.')
return Availability( avail = Availability(
start=min(self.start, other.start), end=max(self.end, other.end) start=min(self.start, other.start), end=max(self.end, other.end)
) )
if self.event == other.event:
avail.event = self.event
return avail
def __or__(self, other: 'Availability') -> 'Availability': def __or__(self, other: 'Availability') -> 'Availability':
"""Performs the merge operation: ``availability1 | availability2``""" """Performs the merge operation: ``availability1 | availability2``"""
...@@ -163,9 +202,12 @@ class Availability(models.Model): ...@@ -163,9 +202,12 @@ class Availability(models.Model):
if not other.overlaps(self, False): if not other.overlaps(self, False):
raise Exception('Only overlapping Availabilities can be intersected.') raise Exception('Only overlapping Availabilities can be intersected.')
return Availability( avail = Availability(
start=max(self.start, other.start), end=min(self.end, other.end) start=max(self.start, other.start), end=min(self.end, other.end)
) )
if self.event == other.event:
avail.event = self.event
return avail
def __and__(self, other: 'Availability') -> 'Availability': def __and__(self, other: 'Availability') -> 'Availability':
"""Performs the intersect operation: ``availability1 & """Performs the intersect operation: ``availability1 &
...@@ -233,16 +275,66 @@ class Availability(models.Model): ...@@ -233,16 +275,66 @@ class Availability(models.Model):
@property @property
def simplified(self): def simplified(self):
return f'{self.start.astimezone(self.event.timezone).strftime("%a %H:%M")}-{self.end.astimezone(self.event.timezone).strftime("%a %H:%M")}' """
Get a simplified (only Weekday, hour and minute) string representation of an availability
:return: simplified string version
:rtype: str
"""
return (f'{self.start.astimezone(self.event.timezone).strftime("%a %H:%M")}-'
f'{self.end.astimezone(self.event.timezone).strftime("%a %H:%M")}')
@classmethod @classmethod
def with_event_length(cls, event, person=None, room=None, ak=None, ak_category=None): def with_event_length(
cls,
event: Event,
person: AKOwner | None = None,
room: Room | None = None,
ak: AK | None = None,
ak_category: AKCategory | None = None,
participant: EventParticipant | None = None,
) -> "Availability":
"""
Create an availability covering exactly the time between event start and event end.
Can e.g., be used to create default availabilities.
:param event: relevant event
:param person: person, if availability should be connected to a person
:param room: room, if availability should be connected to a room
:param ak: ak, if availability should be connected to a ak
:param ak_category: ak_category, if availability should be connected to a ak_category
:return: availability associated to the entity oder entities selected
:rtype: Availability
"""
timeframe_start = event.start # adapt to our event model timeframe_start = event.start # adapt to our event model
# add 1 day, not 24 hours, https://stackoverflow.com/a/25427822/2486196 # add 1 day, not 24 hours, https://stackoverflow.com/a/25427822/2486196
timeframe_end = event.end # adapt to our event model timeframe_end = event.end # adapt to our event model
timeframe_end = timeframe_end + datetime.timedelta(days=1) timeframe_end = timeframe_end + datetime.timedelta(days=1)
return Availability(start=timeframe_start, end=timeframe_end, event=event, person=person, return Availability(start=timeframe_start, end=timeframe_end, event=event, person=person,
room=room, ak=ak, ak_category=ak_category) room=room, ak=ak, ak_category=ak_category, participant=participant)
def is_covered(self, availabilities: List['Availability']):
"""Check if list of availibilities cover this object.
:param availabilities: availabilities to check.
:return: whether the availabilities cover full event.
:rtype: bool
"""
avail_union = Availability.union(availabilities)
return any(avail.contains(self) for avail in avail_union)
@classmethod
def is_event_covered(cls, event: Event, availabilities: List['Availability']) -> bool:
"""Check if list of availibilities cover whole event.
:param event: event to check.
:param availabilities: availabilities to check.
:return: whether the availabilities cover full event.
:rtype: bool
"""
# NOTE: Cannot use `Availability.with_event_length` as its end is the
# event end + 1 day
full_event = Availability(event=event, start=event.start, end=event.end)
return full_event.is_covered(availabilities)
class Meta: class Meta:
verbose_name = _('Availability') verbose_name = _('Availability')
......
# This part of the code was adapted from pretalx (https://github.com/pretalx/pretalx) # This part of the code was adapted from pretalx (https://github.com/pretalx/pretalx)
# Copyright 2017-2019, Tobias Kunze # Copyright 2017-2019, Tobias Kunze
# Original Copyrights licensed under the Apache License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0 # Original Copyrights licensed under the Apache License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0
# Changes are marked in the code # Documentation was mainly added by us, other changes are marked in the code
from django.utils import timezone from django.utils import timezone
from rest_framework.fields import SerializerMethodField from rest_framework.fields import SerializerMethodField
from rest_framework.serializers import ModelSerializer from rest_framework.serializers import BaseSerializer, ModelSerializer
from AKModel.availability.models import Availability from AKModel.availability.models import Availability
from AKModel.models import Event
class AvailabilitySerializer(ModelSerializer): class AvailabilitySerializer(ModelSerializer):
"""
REST Framework Serializer for Availability
"""
allDay = SerializerMethodField() allDay = SerializerMethodField()
start = SerializerMethodField() start = SerializerMethodField()
end = SerializerMethodField() end = SerializerMethodField()
def get_allDay(self, obj): def get_allDay(self, obj): # pylint: disable=invalid-name
"""
Bridge between naming conventions of python and fullcalendar by providing the all_day field as allDay, too
"""
return obj.all_day return obj.all_day
# Use already localized strings in serialized field
# (default would be UTC, but that would require heavy timezone calculation on client side)
def get_start(self, obj): def get_start(self, obj):
"""
Get start timestamp
Use already localized strings in serialized field
(default would be UTC, but that would require heavy timezone calculation on client side)
"""
return timezone.localtime(obj.start, obj.event.timezone).strftime("%Y-%m-%dT%H:%M:%S") return timezone.localtime(obj.start, obj.event.timezone).strftime("%Y-%m-%dT%H:%M:%S")
def get_end(self, obj): def get_end(self, obj):
"""
Get end timestamp
Use already localized strings in serialized field
(default would be UTC, but that would require heavy timezone calculation on client side)
"""
return timezone.localtime(obj.end, obj.event.timezone).strftime("%Y-%m-%dT%H:%M:%S") return timezone.localtime(obj.end, obj.event.timezone).strftime("%Y-%m-%dT%H:%M:%S")
class Meta: class Meta:
model = Availability model = Availability
fields = ('id', 'start', 'end', 'allDay') fields = ('id', 'start', 'end', 'allDay')
class AvailabilityFormSerializer(BaseSerializer):
"""Serializer to configure an availability form."""
def create(self, validated_data):
raise ValueError("`AvailabilityFormSerializer` is read-only.")
def to_internal_value(self, data):
raise ValueError("`AvailabilityFormSerializer` is read-only.")
def update(self, instance, validated_data):
raise ValueError("`AvailabilityFormSerializer` is read-only.")
def to_representation(self, instance: tuple[Availability, Event], **kwargs):
availabilities, event = instance
return {
'availabilities': AvailabilitySerializer(availabilities, many=True).data,
'event': {
# 'timezone': event.timezone,
'date_from': str(event.start),
'date_to': str(event.end),
},
}
# environment.py """
Environment definitions
Needed for tex compilation
"""
import re import re
from django_tex.environment import environment from django_tex.environment import environment
# Used to filter all very special UTF-8 chars that are probably not contained in the LaTeX fonts # Used to filter all very special UTF-8 chars that are probably not contained in the LaTeX fonts
# and would hence cause compilation errors # and would hence cause compilation errors
utf8_replace_pattern = re.compile(u'[^\u0000-\u206F]', re.UNICODE) utf8_replace_pattern = re.compile('[^\u0000-\u206F]', re.UNICODE)
def latex_escape_utf8(value): def latex_escape_utf8(value):
...@@ -17,12 +20,14 @@ def latex_escape_utf8(value): ...@@ -17,12 +20,14 @@ def latex_escape_utf8(value):
:return: escaped string :return: escaped string
:rtype: str :rtype: str
""" """
return utf8_replace_pattern.sub('', value).replace('&', '\&').replace('_', '\_').replace('#', '\#').replace('$', return (utf8_replace_pattern.sub('', value).replace('&', r'\&').replace('_', r'\_').replace('#', r'\#').
'\$').replace( replace('$', r'\$').replace('%', r'\%').replace('{', r'\{').replace('}', r'\}'))
'%', '\%').replace('{', '\{').replace('}', '\}')
def improved_tex_environment(**options): def improved_tex_environment(**options):
"""
Encapsulate our improved latex environment for usage
"""
env = environment(**options) env = environment(**options)
env.filters.update({ env.filters.update({
'latex_escape_utf8': latex_escape_utf8, 'latex_escape_utf8': latex_escape_utf8,
......
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
"model": "AKModel.akcategory", "model": "AKModel.akcategory",
"pk": 1, "pk": 1,
"fields": { "fields": {
"name": "Spa", "name": "Spaß",
"color": "275246", "color": "275246",
"description": "", "description": "",
"present_by_default": true, "present_by_default": true,
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
"model": "AKModel.akcategory", "model": "AKModel.akcategory",
"pk": 3, "pk": 3,
"fields": { "fields": {
"name": "Spa/Kultur", "name": "Spaß/Kultur",
"color": "333333", "color": "333333",
"description": "", "description": "",
"present_by_default": true, "present_by_default": true,
...@@ -193,6 +193,15 @@ ...@@ -193,6 +193,15 @@
"event": 2 "event": 2
} }
}, },
{
"model": "AKModel.aktype",
"pk": 1,
"fields": {
"name": "Input",
"event": 2,
"slug": "input"
}
},
{ {
"model": "AKModel.historicalak", "model": "AKModel.historicalak",
"pk": 1, "pk": 1,
...@@ -206,7 +215,6 @@ ...@@ -206,7 +215,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 +237,6 @@ ...@@ -229,7 +237,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 +259,6 @@ ...@@ -252,7 +259,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 +281,6 @@ ...@@ -275,7 +281,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 +303,6 @@ ...@@ -298,7 +303,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 +325,6 @@ ...@@ -321,7 +325,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 +347,6 @@ ...@@ -344,7 +347,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,
...@@ -360,7 +362,9 @@ ...@@ -360,7 +362,9 @@
"fields": { "fields": {
"name": "Test AK Inhalt", "name": "Test AK Inhalt",
"short_name": "test1", "short_name": "test1",
"description": "", "description": "-",
"goal": "-",
"info": "",
"link": "", "link": "",
"protocol_link": "", "protocol_link": "",
"category": 4, "category": 4,
...@@ -388,7 +392,9 @@ ...@@ -388,7 +392,9 @@
"fields": { "fields": {
"name": "Test AK Meta", "name": "Test AK Meta",
"short_name": "test2", "short_name": "test2",
"description": "", "description": "-",
"goal": "-",
"info": "",
"link": "", "link": "",
"protocol_link": "", "protocol_link": "",
"category": 5, "category": 5,
...@@ -414,6 +420,8 @@ ...@@ -414,6 +420,8 @@
"name": "AK Wish", "name": "AK Wish",
"short_name": "wish1", "short_name": "wish1",
"description": "Description of my Wish", "description": "Description of my Wish",
"goal": "-",
"info": "",
"link": "", "link": "",
"protocol_link": "", "protocol_link": "",
"category": 3, "category": 3,
...@@ -436,6 +444,66 @@ ...@@ -436,6 +444,66 @@
] ]
} }
}, },
{
"model": "AKModel.ak",
"pk": 4,
"fields": {
"name": "Test AK fixed slots",
"short_name": "testfixed",
"description": "-",
"goal": "-",
"info": "",
"link": "",
"protocol_link": "",
"category": 4,
"track": null,
"reso": false,
"present": true,
"notes": "",
"interest": -1,
"interest_counter": 0,
"include_in_export": false,
"event": 2,
"owners": [
1
],
"requirements": [
3
],
"conflicts": [],
"prerequisites": []
}
},
{
"model": "AKModel.ak",
"pk": 5,
"fields": {
"name": "Test AK Ernst",
"short_name": "testernst",
"description": "-",
"goal": "-",
"info": "",
"link": "",
"protocol_link": "",
"category": 2,
"track": null,
"reso": false,
"present": true,
"notes": "",
"interest": -1,
"interest_counter": 0,
"include_in_export": false,
"event": 1,
"owners": [
3
],
"requirements": [
2
],
"conflicts": [],
"prerequisites": []
}
},
{ {
"model": "AKModel.room", "model": "AKModel.room",
"pk": 1, "pk": 1,
...@@ -460,6 +528,19 @@ ...@@ -460,6 +528,19 @@
"properties": [] "properties": []
} }
}, },
{
"model": "AKModel.room",
"pk": 3,
"fields": {
"name": "BBB Session 1",
"location": "",
"capacity": -1,
"event": 1,
"properties": [
2
]
}
},
{ {
"model": "AKModel.akslot", "model": "AKModel.akslot",
"pk": 1, "pk": 1,
...@@ -525,6 +606,58 @@ ...@@ -525,6 +606,58 @@
"updated": "2022-12-02T12:23:11.856Z" "updated": "2022-12-02T12:23:11.856Z"
} }
}, },
{
"model": "AKModel.akslot",
"pk": 6,
"fields": {
"ak": 4,
"room": null,
"start": "2020-11-08T18:30:00Z",
"duration": "2.00",
"fixed": true,
"event": 2,
"updated": "2022-12-02T12:23:11.856Z"
}
},
{
"model": "AKModel.akslot",
"pk": 7,
"fields": {
"ak": 4,
"room": 2,
"start": null,
"duration": "2.00",
"fixed": true,
"event": 2,
"updated": "2022-12-02T12:23:11.856Z"
}
},
{
"model": "AKModel.akslot",
"pk": 8,
"fields": {
"ak": 4,
"room": 2,
"start": "2020-11-07T16:00:00Z",
"duration": "2.00",
"fixed": true,
"event": 2,
"updated": "2022-12-02T12:23:11.856Z"
}
},
{
"model": "AKModel.akslot",
"pk": 9,
"fields": {
"ak": 5,
"room": null,
"start": null,
"duration": "2.00",
"fixed": false,
"event": 1,
"updated": "2022-12-02T12:23:11.856Z"
}
},
{ {
"model": "AKModel.constraintviolation", "model": "AKModel.constraintviolation",
"pk": 1, "pk": 1,
...@@ -668,5 +801,71 @@ ...@@ -668,5 +801,71 @@
"start": "2020-11-07T18:30:00Z", "start": "2020-11-07T18:30:00Z",
"end": "2020-11-07T21:30:00Z" "end": "2020-11-07T21:30:00Z"
} }
},
{
"model": "AKModel.availability",
"pk": 7,
"fields": {
"event": 1,
"person": null,
"room": null,
"ak": 5,
"ak_category": null,
"start": "2020-10-01T17:41:22Z",
"end": "2020-10-04T17:41:30Z"
}
},
{
"model": "AKModel.availability",
"pk": 8,
"fields": {
"event": 1,
"person": null,
"room": 3,
"ak": null,
"ak_category": null,
"start": "2020-10-01T17:41:22Z",
"end": "2020-10-04T17:41:30Z"
}
},
{
"model": "AKModel.defaultslot",
"pk": 1,
"fields": {
"event": 2,
"start": "2020-11-07T08:00:00Z",
"end": "2020-11-07T12:00:00Z",
"primary_categories": [5]
}
},
{
"model": "AKModel.defaultslot",
"pk": 2,
"fields": {
"event": 2,
"start": "2020-11-07T14:00:00Z",
"end": "2020-11-07T17:00:00Z",
"primary_categories": [4]
}
},
{
"model": "AKModel.defaultslot",
"pk": 3,
"fields": {
"event": 2,
"start": "2020-11-08T08:00:00Z",
"end": "2020-11-08T19:00:00Z",
"primary_categories": [4, 5]
}
},
{
"model": "AKModel.defaultslot",
"pk": 4,
"fields": {
"event": 2,
"start": "2020-11-09T17:00:00Z",
"end": "2020-11-10T01:00:00Z",
"primary_categories": [4, 5, 3]
}
} }
] ]
"""
Central and admin forms
"""
import csv import csv
import io import io
from bootstrap_datepicker_plus.widgets import DateTimePickerInput
from django import forms from django import forms
from django.forms.utils import ErrorList 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):
"""
Simple widget for datetime input fields using the HTML5 datetime-local input type
"""
input_type = 'datetime-local'
class NewEventWizardStartForm(forms.ModelForm): class NewEventWizardStartForm(forms.ModelForm):
"""
Initial view of new event wizard
This form is a model form for Event, but only with a subset of the required fields.
It is therefore not possible to really create an event using this form, but only to enter
information, in particular the timezone, that is needed to correctly handle/parse the user
inputs for further required fields like start and end of the event.
The form will be used for this partial input, the input of the remaining required fields
will then be handled by :class:`NewEventWizardSettingsForm` (see below).
"""
class Meta: class Meta:
model = Event model = Event
fields = ['name', 'slug', 'timezone', 'plan_hidden'] fields = ['name', 'slug', 'timezone', 'plan_hidden', 'poll_hidden']
widgets = { widgets = {
'plan_hidden': forms.HiddenInput(), 'plan_hidden': forms.HiddenInput(),
'poll_hidden': forms.HiddenInput(),
} }
# Special hidden field for wizard state handling
is_init = forms.BooleanField(initial=True, widget=forms.HiddenInput) is_init = forms.BooleanField(initial=True, widget=forms.HiddenInput)
class NewEventWizardSettingsForm(forms.ModelForm): class NewEventWizardSettingsForm(forms.ModelForm):
"""
Form for second view of the event creation wizard.
Will handle the input of the remaining required as well as some optional fields.
See also :class:`NewEventWizardStartForm`.
"""
class Meta: class Meta:
model = Event model = Event
exclude = [] fields = "__all__"
exclude = ['plan_published_at', 'poll_published_at']
widgets = { widgets = {
'name': forms.HiddenInput(), 'name': forms.HiddenInput(),
'slug': forms.HiddenInput(), 'slug': forms.HiddenInput(),
'timezone': forms.HiddenInput(), 'timezone': forms.HiddenInput(),
'active': forms.HiddenInput(), 'active': forms.HiddenInput(),
'start': DateTimePickerInput(options={"format": "YYYY-MM-DD HH:mm"}), 'start': DateTimeInput(),
'end': DateTimePickerInput(options={"format": "YYYY-MM-DD HH:mm"}), 'end': DateTimeInput(),
'reso_deadline': DateTimePickerInput(options={"format": "YYYY-MM-DD HH:mm"}), 'interest_start': DateTimeInput(),
'interest_end': DateTimeInput(),
'reso_deadline': DateTimeInput(),
'plan_hidden': forms.HiddenInput(), 'plan_hidden': forms.HiddenInput(),
'poll_hidden': forms.HiddenInput(),
} }
class NewEventWizardPrepareImportForm(forms.Form): class NewEventWizardPrepareImportForm(forms.Form):
"""
Wizard form for choosing an event to import/copy elements (requirements, categories, etc) from.
Is used to restrict the list of elements to choose from in the next step (see :class:`NewEventWizardImportForm`).
"""
import_event = forms.ModelChoiceField( import_event = forms.ModelChoiceField(
queryset=Event.objects.all(), queryset=Event.objects.all(),
label=_("Copy ak requirements and ak categories of existing event"), label=_("Copy ak requirements and ak categories of existing event"),
...@@ -46,6 +83,12 @@ class NewEventWizardPrepareImportForm(forms.Form): ...@@ -46,6 +83,12 @@ class NewEventWizardPrepareImportForm(forms.Form):
class NewEventWizardImportForm(forms.Form): class NewEventWizardImportForm(forms.Form):
"""
Wizard form for excaclty choosing which elemments to copy/import for the newly created event.
Possible elements are categories, requirements, and dashboard buttons if AKDashboard is active.
The lists are restricted to elements from the event selected in the previous step
(see :class:`NewEventWizardPrepareImportForm`).
"""
import_categories = forms.ModelMultipleChoiceField( import_categories = forms.ModelMultipleChoiceField(
queryset=AKCategory.objects.all(), queryset=AKCategory.objects.all(),
widget=forms.CheckboxSelectMultiple, widget=forms.CheckboxSelectMultiple,
...@@ -60,6 +103,14 @@ class NewEventWizardImportForm(forms.Form): ...@@ -60,6 +103,14 @@ 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
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,
renderer=None): renderer=None):
...@@ -69,11 +120,15 @@ class NewEventWizardImportForm(forms.Form): ...@@ -69,11 +120,15 @@ 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
# Local imports used to prevent cyclic imports and to only import when AKDashboard is available
from django.apps import apps from django.apps import apps
if apps.is_installed("AKDashboard"): if apps.is_installed("AKDashboard"):
# If AKDashboard is active, allow to copy dashboard buttons, too
from AKDashboard.models import DashboardButton from AKDashboard.models import DashboardButton
self.fields["import_buttons"] = forms.ModelMultipleChoiceField( self.fields["import_buttons"] = forms.ModelMultipleChoiceField(
queryset=DashboardButton.objects.filter(event=self.initial["import_event"]), queryset=DashboardButton.objects.filter(event=self.initial["import_event"]),
widget=forms.CheckboxSelectMultiple, widget=forms.CheckboxSelectMultiple,
...@@ -83,26 +138,55 @@ class NewEventWizardImportForm(forms.Form): ...@@ -83,26 +138,55 @@ class NewEventWizardImportForm(forms.Form):
class NewEventWizardActivateForm(forms.ModelForm): class NewEventWizardActivateForm(forms.ModelForm):
"""
Wizard form to activate the newly created event
"""
class Meta: class Meta:
fields = ["active"] fields = ["active"]
model = Event model = Event
class AdminIntermediateForm(forms.Form): class AdminIntermediateForm(forms.Form):
pass """
Base form for admin intermediate views (forms used there should inherit from this,
by default, the form is empty since it is only needed for the confirmation button)
"""
class AdminIntermediateActionForm(AdminIntermediateForm): class AdminIntermediateActionForm(AdminIntermediateForm):
"""
Form for Admin Action Confirmation views -- has a pks field needed to handle the serialization/deserialization of
the IDs of the entities the user selected for the admin action to be performed on
"""
pks = forms.CharField(widget=forms.HiddenInput) pks = forms.CharField(widget=forms.HiddenInput)
class SlideExportForm(AdminIntermediateForm): class SlideExportForm(AdminIntermediateForm):
"""
Form to control the slides generated from the AK list of an event
The user can select how many upcoming AKs are displayed at the footer to inform people that it is their turn soon,
whether the AK list should be restricted to those AKs that where marked for presentation, and whether ther should
be a symbol and empty space to take notes on for wishes
"""
num_next = forms.IntegerField( num_next = forms.IntegerField(
min_value=0, min_value=0,
max_value=6, max_value=6,
initial=3, initial=3,
label=_("# next AKs"), label=_("# next AKs"),
help_text=_("How many next AKs should be shown on a slide?")) help_text=_("How many next AKs should be shown on a slide?"))
types = forms.MultipleChoiceField(
label=_("AK Types"),
help_text=_("Which AK types should be included in the slides?"),
widget=forms.CheckboxSelectMultiple,
choices=[],
required=False)
types_all_selected_only = forms.BooleanField(
initial=False,
label=_("Only show AKs with all selected types?"),
help_text=_("If checked, only AKs that have all selected types will be shown in the slides. "
"If unchecked, AKs with at least one of the selected types will be shown."),
required=False)
presentation_mode = forms.TypedChoiceField( presentation_mode = forms.TypedChoiceField(
initial=False, initial=False,
label=_("Presentation only?"), label=_("Presentation only?"),
...@@ -121,6 +205,9 @@ class SlideExportForm(AdminIntermediateForm): ...@@ -121,6 +205,9 @@ class SlideExportForm(AdminIntermediateForm):
class DefaultSlotEditorForm(AdminIntermediateForm): class DefaultSlotEditorForm(AdminIntermediateForm):
"""
Form for default slot editor
"""
availabilities = forms.CharField( availabilities = forms.CharField(
label=_('Default Slots'), label=_('Default Slots'),
help_text=_( help_text=_(
...@@ -133,6 +220,12 @@ class DefaultSlotEditorForm(AdminIntermediateForm): ...@@ -133,6 +220,12 @@ class DefaultSlotEditorForm(AdminIntermediateForm):
class RoomBatchCreationForm(AdminIntermediateForm): class RoomBatchCreationForm(AdminIntermediateForm):
"""
Form for room batch creation
Allows to input a list of room details and choose whether default availabilities should be generated for these
rooms. Will check that the input follows a CSV format with at least a name column present.
"""
rooms = forms.CharField( rooms = forms.CharField(
label=_('New rooms'), label=_('New rooms'),
help_text=_('Enter room details in CSV format. Required colum is "name", optional colums are "location", ' help_text=_('Enter room details in CSV format. Required colum is "name", optional colums are "location", '
...@@ -147,6 +240,13 @@ class RoomBatchCreationForm(AdminIntermediateForm): ...@@ -147,6 +240,13 @@ class RoomBatchCreationForm(AdminIntermediateForm):
) )
def clean_rooms(self): def clean_rooms(self):
"""
Validate and transform the input for the rooms textfield
Treat the input as CSV and turn it into a dict containing the relevant information.
:return: a dict containing the raw room information
:rtype: dict[str, str]
"""
rooms_raw_text = self.cleaned_data["rooms"] rooms_raw_text = self.cleaned_data["rooms"]
rooms_raw_dict = csv.DictReader(io.StringIO(rooms_raw_text), delimiter=";") rooms_raw_dict = csv.DictReader(io.StringIO(rooms_raw_text), delimiter=";")
...@@ -157,6 +257,10 @@ class RoomBatchCreationForm(AdminIntermediateForm): ...@@ -157,6 +257,10 @@ class RoomBatchCreationForm(AdminIntermediateForm):
class RoomForm(forms.ModelForm): class RoomForm(forms.ModelForm):
"""
Room (creation) form (basic), will be extended for handling of availabilities
(see :class:`RoomFormWithAvailabilities`) and also for creating hybrid rooms in AKOnline (if active)
"""
class Meta: class Meta:
model = Room model = Room
fields = ['name', fields = ['name',
...@@ -167,6 +271,9 @@ class RoomForm(forms.ModelForm): ...@@ -167,6 +271,9 @@ class RoomForm(forms.ModelForm):
class RoomFormWithAvailabilities(AvailabilitiesFormMixin, RoomForm): class RoomFormWithAvailabilities(AvailabilitiesFormMixin, RoomForm):
"""
Room (update) form including handling of availabilities, extends :class:`RoomForm`
"""
class Meta: class Meta:
model = Room model = Room
fields = ['name', fields = ['name',
...@@ -182,7 +289,7 @@ class RoomFormWithAvailabilities(AvailabilitiesFormMixin, RoomForm): ...@@ -182,7 +289,7 @@ class RoomFormWithAvailabilities(AvailabilitiesFormMixin, RoomForm):
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
# Init availability mixin # Init availability mixin
kwargs['initial'] = dict() kwargs['initial'] = {}
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
self.initial = {**self.initial, **kwargs['initial']} self.initial = {**self.initial, **kwargs['initial']}
# Filter possible values for m2m when event is specified # Filter possible values for m2m when event is specified
......
...@@ -2,7 +2,7 @@ msgid "" ...@@ -2,7 +2,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: 2023-05-15 20:19+0200\n" "POT-Creation-Date: 2025-06-24 10:36+0000\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"
...@@ -11,9 +11,9 @@ msgstr "" ...@@ -11,9 +11,9 @@ 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"
#: AKModel/admin.py:65 AKModel/admin.py:68 #: AKModel/admin.py:96 AKModel/admin.py:106
#: AKModel/templates/admin/AKModel/event_wizard/activate.html:32 #: AKModel/templates/admin/AKModel/event_wizard/activate.html:35
#: AKModel/templates/admin/AKModel/event_wizard/created_prepare_import.html:48 #: AKModel/templates/admin/AKModel/event_wizard/created_prepare_import.html:51
#: AKModel/templates/admin/AKModel/event_wizard/finish.html:21 #: AKModel/templates/admin/AKModel/event_wizard/finish.html:21
#: AKModel/templates/admin/AKModel/requirements_overview.html:8 #: AKModel/templates/admin/AKModel/requirements_overview.html:8
#: AKModel/templates/admin/AKModel/status/status.html:8 #: AKModel/templates/admin/AKModel/status/status.html:8
...@@ -21,67 +21,114 @@ msgstr "" ...@@ -21,67 +21,114 @@ msgstr ""
msgid "Status" msgid "Status"
msgstr "Status" msgstr "Status"
#: AKModel/admin.py:70 #: AKModel/admin.py:108
msgid "Toggle plan visibility" msgid "Toggle plan visibility"
msgstr "Plansichtbarkeit ändern" msgstr "Plansichtbarkeit ändern"
#: AKModel/admin.py:74 AKModel/admin.py:85 AKModel/views/manage.py:105 #: AKModel/admin.py:120 AKModel/admin.py:149 AKModel/views/manage.py:187
msgid "Publish plan" msgid "Publish plan"
msgstr "Plan veröffentlichen" msgstr "Plan veröffentlichen"
#: AKModel/admin.py:77 AKModel/admin.py:90 AKModel/views/manage.py:115 #: AKModel/admin.py:123 AKModel/admin.py:157 AKModel/views/manage.py:200
msgid "Unpublish plan" msgid "Unpublish plan"
msgstr "Plan verbergen" msgstr "Plan verbergen"
#: AKModel/admin.py:153 #: AKModel/admin.py:126
msgid "Toggle poll visibility"
msgstr "Sichtbarkeit der Abfrage ändern"
#: AKModel/admin.py:138 AKModel/admin.py:166 AKModel/views/manage.py:213
msgid "Publish preference poll"
msgstr "Präferenzen-Abfrage veröffentlichen"
#: AKModel/admin.py:141 AKModel/admin.py:174 AKModel/views/manage.py:226
msgid "Unpublish preference poll"
msgstr "Präferenzen-Abfrage verbergen"
#: AKModel/admin.py:213 AKModel/models.py:800 AKModel/models.py:1251
#: AKModel/templates/admin/AKModel/aks_by_user.html:12
#: AKModel/templates/admin/AKModel/status/event_aks.html:10
#: AKModel/views/manage.py:99 AKModel/views/status.py:102
msgid "AKs"
msgstr "AKs"
#: AKModel/admin.py:279
msgid "Wish" msgid "Wish"
msgstr "AK-Wunsch" msgstr "AK-Wunsch"
#: AKModel/admin.py:159 #: AKModel/admin.py:285
msgid "Is wish" msgid "Is wish"
msgstr "Ist ein Wunsch" msgstr "Ist ein Wunsch"
#: AKModel/admin.py:160 #: AKModel/admin.py:286
msgid "Is not a wish" msgid "Is not a wish"
msgstr "Ist kein Wunsch" msgstr "Ist kein Wunsch"
#: AKModel/admin.py:204 #: AKModel/admin.py:347
msgid "Export to wiki syntax" msgid "Export to wiki syntax"
msgstr "In Wiki-Syntax exportieren" msgstr "In Wiki-Syntax exportieren"
#: AKModel/admin.py:213 #: AKModel/admin.py:364
msgid "Cannot export AKs from more than one event at the same time." msgid "Cannot export AKs from more than one event at the same time."
msgstr "Kann nicht AKs von mehreren Events zur selben Zeit exportieren." msgstr "Kann nicht AKs von mehreren Events zur selben Zeit exportieren."
#: AKModel/admin.py:228 AKModel/views/ak.py:80 #: AKModel/admin.py:379 AKModel/views/ak.py:99
msgid "Reset interest in AKs" msgid "Reset interest in AKs"
msgstr "Interesse an AKs zurücksetzen" msgstr "Interesse an AKs zurücksetzen"
#: AKModel/admin.py:233 AKModel/views/ak.py:90 #: AKModel/admin.py:389 AKModel/views/ak.py:114
msgid "Reset AKs' interest counters" msgid "Reset AKs' interest counters"
msgstr "Interessenszähler der AKs zurücksetzen" msgstr "Interessenszähler der AKs zurücksetzen"
#: AKModel/admin.py:309 AKModel/admin.py:316 #: AKModel/admin.py:490 AKModel/admin.py:534
msgid "AK Details" msgid "AK Details"
msgstr "AK-Details" msgstr "AK-Details"
#: AKModel/admin.py:368 AKModel/views/manage.py:75 #: AKModel/admin.py:514
msgid "Clear start/rooms"
msgstr "Zugewiesenen Start/Räume zurücksetzen"
#: AKModel/admin.py:524
msgid ""
"Cannot reset scheduling for fixed AKs. Please make sure to filter out fixed "
"AKs first."
msgstr ""
"Planung von fixierten AKs kann nicht zurückgesetzt werden. Stelle bitte "
"sicher, dass alle fixierten AKs zunächst rausgefiltert sind."
#: AKModel/admin.py:596 AKModel/views/manage.py:126
msgid "Mark Constraint Violations as manually resolved" msgid "Mark Constraint Violations as manually resolved"
msgstr "Markiere Constraintverletzungen als manuell behoben" msgstr "Markiere Constraintverletzungen als manuell behoben"
#: AKModel/admin.py:373 AKModel/views/manage.py:85 #: AKModel/admin.py:605 AKModel/views/manage.py:139
msgid "Set Constraint Violations to level \"violation\"" msgid "Set Constraint Violations to level \"violation\""
msgstr "Constraintverletzungen auf Level \"Violation\" setzen" msgstr "Constraintverletzungen auf Level \"Violation\" setzen"
#: AKModel/admin.py:378 AKModel/views/manage.py:95 #: AKModel/admin.py:614 AKModel/views/manage.py:152
msgid "Set Constraint Violations to level \"warning\"" msgid "Set Constraint Violations to level \"warning\""
msgstr "Constraintverletzungen auf Level \"Warning\" setzen" msgstr "Constraintverletzungen auf Level \"Warning\" setzen"
#: AKModel/availability/forms.py:21 AKModel/availability/models.py:248 #: AKModel/admin.py:661
msgid "Activate selected users"
msgstr "Ausgewählte Benutzer*innen aktivieren"
#: AKModel/admin.py:670
msgid "The selected users have been activated."
msgstr "Benutzer*innen aktiviert"
#: AKModel/admin.py:672
msgid "Deactivate selected users"
msgstr "Ausgewählte Benutzer*innen deaktivieren"
#: AKModel/admin.py:681
msgid "The selected users have been deactivated."
msgstr "Benutzer*innen deaktiviert"
#: AKModel/availability/forms.py:25 AKModel/availability/models.py:340
msgid "Availability" msgid "Availability"
msgstr "Verfügbarkeit" msgstr "Verfügbarkeit"
#: AKModel/availability/forms.py:23 #: AKModel/availability/forms.py:27
msgid "" msgid ""
"Click and drag to mark the availability during the event, double-click to " "Click and drag to mark the availability during the event, double-click to "
"delete. Or use the start and end inputs to add entries to the calendar view." "delete. Or use the start and end inputs to add entries to the calendar view."
...@@ -90,121 +137,157 @@ msgstr "" ...@@ -90,121 +137,157 @@ msgstr ""
"Doppelt klicken um Einträge zu löschen. Oder Start- und End-Eingabe " "Doppelt klicken um Einträge zu löschen. Oder Start- und End-Eingabe "
"verwenden, um der Kalenderansicht neue Einträge hinzuzufügen." "verwenden, um der Kalenderansicht neue Einträge hinzuzufügen."
#: AKModel/availability/forms.py:88 #: AKModel/availability/forms.py:113
msgid "The submitted availability does not comply with the required format." msgid "The submitted availability does not comply with the required format."
msgstr "Die eingetragenen Verfügbarkeit haben nicht das notwendige Format." msgstr "Die eingetragenen Verfügbarkeit haben nicht das notwendige Format."
#: AKModel/availability/forms.py:101 #: AKModel/availability/forms.py:127
msgid "The submitted availability contains an invalid date." msgid "The submitted availability contains an invalid date."
msgstr "Die eingegebene Verfügbarkeit enthält ein ungültiges Datum." msgstr "Die eingegebene Verfügbarkeit enthält ein ungültiges Datum."
#: AKModel/availability/forms.py:124 AKModel/availability/forms.py:134 #: AKModel/availability/forms.py:152 AKModel/availability/forms.py:162
msgid "Please fill in your availabilities!" msgid "Please fill in your availabilities!"
msgstr "Bitte Verfügbarkeiten eintragen!" msgstr "Bitte Verfügbarkeiten eintragen!"
#: AKModel/availability/models.py:38 AKModel/models.py:57 AKModel/models.py:129 #: AKModel/availability/models.py:46 AKModel/models.py:182
#: AKModel/models.py:184 AKModel/models.py:203 AKModel/models.py:224 #: AKModel/models.py:569 AKModel/models.py:646 AKModel/models.py:679
#: AKModel/models.py:277 AKModel/models.py:354 AKModel/models.py:387 #: AKModel/models.py:708 AKModel/models.py:727 AKModel/models.py:790
#: AKModel/models.py:458 AKModel/models.py:499 AKModel/models.py:664 #: AKModel/models.py:959 AKModel/models.py:1024 AKModel/models.py:1189
#: AKModel/models.py:1247 AKModel/models.py:1439
msgid "Event" msgid "Event"
msgstr "Event" msgstr "Event"
#: AKModel/availability/models.py:39 AKModel/models.py:130 #: AKModel/availability/models.py:47 AKModel/models.py:570
#: AKModel/models.py:185 AKModel/models.py:204 AKModel/models.py:225 #: AKModel/models.py:647 AKModel/models.py:680 AKModel/models.py:709
#: AKModel/models.py:278 AKModel/models.py:355 AKModel/models.py:388 #: AKModel/models.py:728 AKModel/models.py:791 AKModel/models.py:960
#: AKModel/models.py:459 AKModel/models.py:500 AKModel/models.py:665 #: AKModel/models.py:1025 AKModel/models.py:1190 AKModel/models.py:1248
#: AKModel/models.py:1440
msgid "Associated event" msgid "Associated event"
msgstr "Zugehöriges Event" msgstr "Zugehöriges Event"
#: AKModel/availability/models.py:47 #: AKModel/availability/models.py:55
msgid "Person" msgid "Person"
msgstr "Person" msgstr "Person"
#: AKModel/availability/models.py:48 #: AKModel/availability/models.py:56
msgid "Person whose availability this is" msgid "Person whose availability this is"
msgstr "Person deren Verfügbarkeit hier abgebildet wird" msgstr "Person deren Verfügbarkeit hier abgebildet wird"
#: AKModel/availability/models.py:56 AKModel/models.py:358 #: AKModel/availability/models.py:64 AKModel/models.py:963
#: AKModel/models.py:377 AKModel/models.py:508 #: AKModel/models.py:1014 AKModel/models.py:1257
msgid "Room" msgid "Room"
msgstr "Raum" msgstr "Raum"
#: AKModel/availability/models.py:57 #: AKModel/availability/models.py:65
msgid "Room whose availability this is" msgid "Room whose availability this is"
msgstr "Raum dessen Verfügbarkeit hier abgebildet wird" msgstr "Raum dessen Verfügbarkeit hier abgebildet wird"
#: AKModel/availability/models.py:65 AKModel/models.py:286 #: AKModel/availability/models.py:73 AKModel/models.py:799
#: AKModel/models.py:376 AKModel/models.py:453 #: AKModel/models.py:1013 AKModel/models.py:1184
msgid "AK" msgid "AK"
msgstr "AK" msgstr "AK"
#: AKModel/availability/models.py:66 #: AKModel/availability/models.py:74
msgid "AK whose availability this is" msgid "AK whose availability this is"
msgstr "Verfügbarkeiten" msgstr "Verfügbarkeiten"
#: AKModel/availability/models.py:74 AKModel/models.py:188 #: AKModel/availability/models.py:82 AKModel/models.py:650
#: AKModel/models.py:514 #: AKModel/models.py:1263
msgid "AK Category" msgid "AK Category"
msgstr "AK-Kategorie" msgstr "AK-Kategorie"
#: AKModel/availability/models.py:75 #: AKModel/availability/models.py:83
msgid "AK Category whose availability this is" msgid "AK Category whose availability this is"
msgstr "AK-Kategorie, deren Verfügbarkeit hier abgebildet wird" msgstr "AK-Kategorie, deren Verfügbarkeit hier abgebildet wird"
#: AKModel/availability/models.py:249 #: AKModel/availability/models.py:91
msgid "Participant"
msgstr "Teilnehmer*in"
#: AKModel/availability/models.py:92
msgid "Participant whose availability this is"
msgstr "Teilnehmer*in, deren Verfügbarkeit hier abgebildet wird"
#: AKModel/availability/models.py:341
msgid "Availabilities" msgid "Availabilities"
msgstr "Verfügbarkeiten" msgstr "Verfügbarkeiten"
#: AKModel/forms.py:43 #: AKModel/forms.py:80
msgid "Copy ak requirements and ak categories of existing event" msgid "Copy ak requirements and ak categories of existing event"
msgstr "AK-Anforderungen und AK-Kategorien eines existierenden Events kopieren" msgstr "AK-Anforderungen und AK-Kategorien eines existierenden Events kopieren"
#: AKModel/forms.py:44 #: AKModel/forms.py:81
msgid "You can choose what to copy in the next step" msgid "You can choose what to copy in the next step"
msgstr "" msgstr ""
"Im nächsten Schritt kann ausgewählt werden, was genau kopiert werden soll" "Im nächsten Schritt kann ausgewählt werden, was genau kopiert werden soll"
#: AKModel/forms.py:52 #: AKModel/forms.py:95
msgid "Copy ak categories" msgid "Copy ak categories"
msgstr "AK-Kategorien kopieren" msgstr "AK-Kategorien kopieren"
#: AKModel/forms.py:59 #: AKModel/forms.py:102
msgid "Copy ak requirements" msgid "Copy ak requirements"
msgstr "AK-Anforderungen kopieren" msgstr "AK-Anforderungen kopieren"
#: AKModel/forms.py:80 #: AKModel/forms.py:109
msgid "Copy types"
msgstr "Typen kopieren"
#: AKModel/forms.py:135
msgid "Copy dashboard buttons" msgid "Copy dashboard buttons"
msgstr "Dashboard-Buttons kopieren" msgstr "Dashboard-Buttons kopieren"
#: AKModel/forms.py:104 #: AKModel/forms.py:176
msgid "# next AKs" msgid "# next AKs"
msgstr "# nächste AKs" msgstr "# nächste AKs"
#: AKModel/forms.py:105 #: AKModel/forms.py:177
msgid "How many next AKs should be shown on a slide?" msgid "How many next AKs should be shown on a slide?"
msgstr "Wie viele nächste AKs sollen auf einer Folie angezeigt werden?" msgstr "Wie viele nächste AKs sollen auf einer Folie angezeigt werden?"
#: AKModel/forms.py:108 #: AKModel/forms.py:179 AKModel/models.py:732
msgid "AK Types"
msgstr "AK-Typen"
#: AKModel/forms.py:180
msgid "Which AK types should be included in the slides?"
msgstr "Welche AK-Typen sollen in den Folien enthalten sein?"
#: AKModel/forms.py:186
msgid "Only show AKs with all selected types?"
msgstr "Nur AKs mit dem ausgewählten Typ anzeigen?"
#: AKModel/forms.py:187
msgid ""
"If checked, only AKs that have all selected types will be shown in the "
"slides. If unchecked, AKs with at least one of the selected types will be "
"shown."
msgstr ""
"Wenn ausgewählt werden nur AKs, die alle spezifizierten Typen erfüllen, in "
"die Folien aufgenommen. Wenn nicht ausgewählt werden AKs, die mindestens "
"einen der spezifizierten Typen erfüllen, in die Folien aufgenommen."
#: AKModel/forms.py:192
msgid "Presentation only?" msgid "Presentation only?"
msgstr "Nur Vorstellung?" msgstr "Nur Vorstellung?"
#: AKModel/forms.py:110 AKModel/forms.py:117 #: AKModel/forms.py:194 AKModel/forms.py:201
msgid "Yes" msgid "Yes"
msgstr "Ja" msgstr "Ja"
#: AKModel/forms.py:110 AKModel/forms.py:117 #: AKModel/forms.py:194 AKModel/forms.py:201
msgid "No" msgid "No"
msgstr "Nein" msgstr "Nein"
#: AKModel/forms.py:112 #: AKModel/forms.py:196
msgid "Restrict AKs to those that asked for chance to be presented?" msgid "Restrict AKs to those that asked for chance to be presented?"
msgstr "AKs auf solche, die um eine Vorstellung gebeten haben, einschränken?" msgstr "AKs auf solche, die um eine Vorstellung gebeten haben, einschränken?"
#: AKModel/forms.py:115 #: AKModel/forms.py:199
msgid "Space for notes in wishes?" msgid "Space for notes in wishes?"
msgstr "Platz für Notizen bei den Wünschen?" msgstr "Platz für Notizen bei den Wünschen?"
#: AKModel/forms.py:119 #: AKModel/forms.py:203
msgid "" msgid ""
"Create symbols indicating space to note down owners and timeslots for " "Create symbols indicating space to note down owners and timeslots for "
"wishes, e.g., to be filled out on a touch screen while presenting?" "wishes, e.g., to be filled out on a touch screen while presenting?"
...@@ -213,11 +296,11 @@ msgstr "" ...@@ -213,11 +296,11 @@ msgstr ""
"fürWünsche markieren, z.B. um während der Präsentation auf einem Touchscreen " "fürWünsche markieren, z.B. um während der Präsentation auf einem Touchscreen "
"ausgefüllt zu werden?" "ausgefüllt zu werden?"
#: AKModel/forms.py:125 AKModel/models.py:658 #: AKModel/forms.py:212 AKModel/models.py:1433
msgid "Default Slots" msgid "Default Slots"
msgstr "Standardslots" msgstr "Standardslots"
#: AKModel/forms.py:127 #: AKModel/forms.py:214
msgid "" msgid ""
"Click and drag to add default slots, double-click to delete. Or use the " "Click and drag to add default slots, double-click to delete. Or use the "
"start and end inputs to add entries to the calendar view." "start and end inputs to add entries to the calendar view."
...@@ -226,11 +309,11 @@ msgstr "" ...@@ -226,11 +309,11 @@ msgstr ""
"Einträge zu löschen. Oder Start- und End-Eingabe verwenden, um der " "Einträge zu löschen. Oder Start- und End-Eingabe verwenden, um der "
"Kalenderansicht neue Einträge hinzuzufügen." "Kalenderansicht neue Einträge hinzuzufügen."
#: AKModel/forms.py:137 #: AKModel/forms.py:230
msgid "New rooms" msgid "New rooms"
msgstr "Neue Räume" msgstr "Neue Räume"
#: AKModel/forms.py:138 #: AKModel/forms.py:231
msgid "" msgid ""
"Enter room details in CSV format. Required colum is \"name\", optional " "Enter room details in CSV format. Required colum is \"name\", optional "
"colums are \"location\", \"capacity\", and \"url\" for online/hybrid rooms. " "colums are \"location\", \"capacity\", and \"url\" for online/hybrid rooms. "
...@@ -240,171 +323,213 @@ msgstr "" ...@@ -240,171 +323,213 @@ msgstr ""
"Spalten sind \"location\", \"capacity\", und \"url\" for Online-/" "Spalten sind \"location\", \"capacity\", und \"url\" for Online-/"
"HybridräumeTrennzeichen: Semikolon" "HybridräumeTrennzeichen: Semikolon"
#: AKModel/forms.py:144 #: AKModel/forms.py:237
msgid "Default availabilities?" msgid "Default availabilities?"
msgstr "Standardverfügbarkeiten?" msgstr "Standardverfügbarkeiten?"
#: AKModel/forms.py:145 #: AKModel/forms.py:238
msgid "Create default availabilities for all rooms?" msgid "Create default availabilities for all rooms?"
msgstr "Standardverfügbarkeiten für alle Räume anlegen?" msgstr "Standardverfügbarkeiten für alle Räume anlegen?"
#: AKModel/forms.py:154 #: AKModel/forms.py:254
msgid "CSV must contain a name column" msgid "CSV must contain a name column"
msgstr "CSV muss eine name-Spalte enthalten" msgstr "CSV muss eine name-Spalte enthalten"
#: AKModel/metaviews/admin.py:97 AKModel/models.py:28 #: AKModel/metaviews/admin.py:156 AKModel/models.py:139
msgid "Start" msgid "Start"
msgstr "Start" msgstr "Start"
#: AKModel/metaviews/admin.py:98 #: AKModel/metaviews/admin.py:157
msgid "Settings" msgid "Settings"
msgstr "Einstellungen" msgstr "Einstellungen"
#: AKModel/metaviews/admin.py:99 #: AKModel/metaviews/admin.py:158
msgid "Event created, Prepare Import" msgid "Event created, Prepare Import"
msgstr "Event angelegt, Import vorbereiten" msgstr "Event angelegt, Import vorbereiten"
#: AKModel/metaviews/admin.py:100 #: AKModel/metaviews/admin.py:159
msgid "Import categories & requirements" msgid "Import categories & requirements"
msgstr "Kategorien & Anforderungen kopieren" msgstr "Kategorien & Anforderungen kopieren"
#: AKModel/metaviews/admin.py:101 #: AKModel/metaviews/admin.py:160
msgid "Activate?" msgid "Activate?"
msgstr "Aktivieren?" msgstr "Aktivieren?"
#: AKModel/metaviews/admin.py:102 #: AKModel/metaviews/admin.py:161
#: AKModel/templates/admin/AKModel/event_wizard/activate.html:27 #: AKModel/templates/admin/AKModel/event_wizard/activate.html:30
msgid "Finish" msgid "Finish"
msgstr "Abschluss" msgstr "Abschluss"
#: AKModel/models.py:19 AKModel/models.py:176 AKModel/models.py:200 #: AKModel/models.py:24
#: AKModel/models.py:222 AKModel/models.py:240 AKModel/models.py:346 msgid "May not contain quotation marks"
msgstr "Darf keine Anführungszeichen enthalten"
#: AKModel/models.py:27
msgid "Must contain at least one letter or digit"
msgstr "Muss mindestens einen Buchstaben oder eine Ziffer enthalten"
#: AKModel/models.py:130 AKModel/models.py:638 AKModel/models.py:676
#: AKModel/models.py:703 AKModel/models.py:725 AKModel/models.py:743
#: AKModel/models.py:951
msgid "Name" msgid "Name"
msgstr "Name" msgstr "Name"
#: AKModel/models.py:20 #: AKModel/models.py:131
msgid "Name or iteration of the event" msgid "Name or iteration of the event"
msgstr "Name oder Iteration des Events" msgstr "Name oder Iteration des Events"
#: AKModel/models.py:21 #: AKModel/models.py:132
msgid "Short Form" msgid "Short Form"
msgstr "Kurzer Name" msgstr "Kurzer Name"
#: AKModel/models.py:22 #: AKModel/models.py:133
msgid "Short name of letters/numbers/dots/dashes/underscores used in URLs." msgid "Short name of letters/numbers/dashes/underscores used in URLs."
msgstr "" msgstr ""
"Kurzname bestehend aus Buchstaben, Nummern, Punkten und Unterstrichen zur " "Kurzname bestehend aus Buchstaben, Nummern, Bindestrichen und Unterstrichen "
"Nutzung in URLs" "zur Nutzung in URLs"
#: AKModel/models.py:24 #: AKModel/models.py:135
msgid "Place" msgid "Place"
msgstr "Ort" msgstr "Ort"
#: AKModel/models.py:25 #: AKModel/models.py:136
msgid "City etc. the event takes place in" msgid "City etc. the event takes place in"
msgstr "Stadt o.ä. in der das Event stattfindet" msgstr "Stadt o.ä. in der das Event stattfindet"
#: AKModel/models.py:27 #: AKModel/models.py:138
msgid "Time Zone" msgid "Time Zone"
msgstr "Zeitzone" msgstr "Zeitzone"
#: AKModel/models.py:27 #: AKModel/models.py:138
msgid "Time Zone where this event takes place in" msgid "Time Zone where this event takes place in"
msgstr "Zeitzone in der das Event stattfindet" msgstr "Zeitzone in der das Event stattfindet"
#: AKModel/models.py:28 #: AKModel/models.py:139
msgid "Time the event begins" msgid "Time the event begins"
msgstr "Zeit zu der das Event beginnt" msgstr "Zeit zu der das Event beginnt"
#: AKModel/models.py:29 #: AKModel/models.py:140
msgid "End" msgid "End"
msgstr "Ende" msgstr "Ende"
#: AKModel/models.py:29 #: AKModel/models.py:140
msgid "Time the event ends" msgid "Time the event ends"
msgstr "Zeit zu der das Event endet" msgstr "Zeit zu der das Event endet"
#: AKModel/models.py:30 #: AKModel/models.py:141
msgid "Resolution Deadline" msgid "Resolution Deadline"
msgstr "Resolutionsdeadline" msgstr "Resolutionsdeadline"
#: AKModel/models.py:31 #: AKModel/models.py:142
msgid "When should AKs with intention to submit a resolution be done?" msgid "When should AKs with intention to submit a resolution be done?"
msgstr "Wann sollen AKs mit Resolutionsabsicht stattgefunden haben?" msgstr "Wann sollen AKs mit Resolutionsabsicht stattgefunden haben?"
#: AKModel/models.py:33 #: AKModel/models.py:144
msgid "Interest Window Start" msgid "Interest Window Start"
msgstr "Beginn Interessensbekundung" msgstr "Beginn Interessensbekundung"
#: AKModel/models.py:34 #: AKModel/models.py:146
msgid "Opening time for expression of interest." msgid ""
msgstr "Öffnungszeitpunkt für die Angabe von Interesse an AKs." "Opening time for expression of interest. When left blank, no interest "
"indication will be possible."
msgstr ""
"Öffnungszeitpunkt für die Angabe von Interesse an AKs.Wenn das Feld leer "
"bleibt, wird keine Abgabe von Interesse möglich sein."
#: AKModel/models.py:35 #: AKModel/models.py:149
msgid "Interest Window End" msgid "Interest Window End"
msgstr "Ende Interessensbekundung" msgstr "Ende Interessensbekundung"
#: AKModel/models.py:36 #: AKModel/models.py:150
msgid "Closing time for expression of interest." msgid "Closing time for expression of interest."
msgstr "Öffnungszeitpunkt für die Angabe von Interesse an AKs." msgstr "Öffnungszeitpunkt für die Angabe von Interesse an AKs."
#: AKModel/models.py:38 #: AKModel/models.py:152
msgid "Public event" msgid "Public event"
msgstr "Öffentliches Event" msgstr "Öffentliches Event"
#: AKModel/models.py:39 #: AKModel/models.py:153
msgid "Show this event on overview page." msgid "Show this event on overview page."
msgstr "Zeige dieses Event auf der Übersichtseite an" msgstr "Zeige dieses Event auf der Übersichtseite an"
#: AKModel/models.py:41 #: AKModel/models.py:155
msgid "Active State" msgid "Active State"
msgstr "Aktiver Status" msgstr "Aktiver Status"
#: AKModel/models.py:41 #: AKModel/models.py:155
msgid "Marks currently active events" msgid "Marks currently active events"
msgstr "Markiert aktuell aktive Events" msgstr "Markiert aktuell aktive Events"
#: AKModel/models.py:42 #: AKModel/models.py:156
msgid "Plan Hidden" msgid "Plan Hidden"
msgstr "Plan verborgen" msgstr "Plan verborgen"
#: AKModel/models.py:42 #: AKModel/models.py:156
msgid "Hides plan for non-staff users" msgid "Hides plan for non-staff users"
msgstr "Verbirgt den Plan für Nutzer*innen ohne erweiterte Rechte" msgstr "Verbirgt den Plan für Nutzer*innen ohne erweiterte Rechte"
#: AKModel/models.py:44 #: AKModel/models.py:158
msgid "Plan published at" msgid "Plan published at"
msgstr "Plan veröffentlicht am/um" msgstr "Plan veröffentlicht am/um"
#: AKModel/models.py:45 #: AKModel/models.py:159
msgid "Timestamp at which the plan was published" msgid "Timestamp at which the plan was published"
msgstr "Zeitpunkt, zu dem der Plan veröffentlicht wurde" msgstr "Zeitpunkt, zu dem der Plan veröffentlicht wurde"
#: AKModel/models.py:47 #: AKModel/models.py:161
msgid "Poll Hidden"
msgstr "Präferenzen-Abfrage verborgen"
#: AKModel/models.py:162
msgid "Hides preference poll for non-staff users"
msgstr ""
"Verbirgt die Präferenzen-Abfrage für Nutzer*innen ohne erweiterte Rechte"
#: AKModel/models.py:164
msgid "Poll published at"
msgstr "Präferenzen-Abfrage veröffentlicht am/um"
#: AKModel/models.py:165
msgid "Timestamp at which the preference poll was published"
msgstr "Zeitpunkt, zu dem die Präferenzen-Abfrage veröffentlicht wurde"
#: AKModel/models.py:167
msgid "Base URL" msgid "Base URL"
msgstr "URL-Prefix" msgstr "URL-Prefix"
#: AKModel/models.py:47 #: AKModel/models.py:167
msgid "Prefix for wiki link construction" msgid "Prefix for wiki link construction"
msgstr "Prefix für die automatische Generierung von Wiki-Links" msgstr "Prefix für die automatische Generierung von Wiki-Links"
#: AKModel/models.py:48 #: AKModel/models.py:168
msgid "Wiki Export Template Name" msgid "Wiki Export Template Name"
msgstr "Wiki-Export Templatename" msgstr "Wiki-Export Templatename"
#: AKModel/models.py:49 #: AKModel/models.py:169
msgid "Default Slot Length" msgid "Default Slot Length"
msgstr "Standardslotlänge" msgstr "Standardslotlänge"
#: AKModel/models.py:50 #: AKModel/models.py:170
msgid "Default length in hours that is assumed for AKs in this event." msgid "Default length in hours that is assumed for AKs in this event."
msgstr "Standardlänge von Slots (in Stunden) für dieses Event" msgstr "Standardlänge von Slots (in Stunden) für dieses Event"
#: AKModel/models.py:52 #: AKModel/models.py:171
msgid "Export Slot Length"
msgstr "Export-Slotlänge"
#: AKModel/models.py:173
msgid ""
"Slot duration in hours that is used in the timeslot discretization, when "
"this event is exported for the solver."
msgstr ""
"Länge von Slots (in Stunden) in der Zeitslot-Diskretisierung beim JSON-"
"Export dieses Events."
#: AKModel/models.py:177
msgid "Contact email address" msgid "Contact email address"
msgstr "E-Mail Kontaktadresse" msgstr "E-Mail Kontaktadresse"
#: AKModel/models.py:54 #: AKModel/models.py:178
msgid "" msgid ""
"An email address that is displayed on every page and can be used for all " "An email address that is displayed on every page and can be used for all "
"kinds of questions" "kinds of questions"
...@@ -412,75 +537,118 @@ msgstr "" ...@@ -412,75 +537,118 @@ msgstr ""
"Eine Mailadresse die auf jeder Seite angezeigt wird und für alle Arten von " "Eine Mailadresse die auf jeder Seite angezeigt wird und für alle Arten von "
"Fragen genutzt werden kann" "Fragen genutzt werden kann"
#: AKModel/models.py:58 #: AKModel/models.py:183
msgid "Events" msgid "Events"
msgstr "Events" msgstr "Events"
#: AKModel/models.py:124 #: AKModel/models.py:458
msgid "Cannot parse malformed JSON input."
msgstr "Kann fehlerhafte JSON-Eingabe nicht verarbeiten"
#: AKModel/models.py:465
msgid "Data has changed since the export. Reexport and run the solver again."
msgstr ""
"Seit dem Export wurden die Daten verändert. Wiederhole den Export und führe "
"den Solver erneut aus."
#: AKModel/models.py:482
#, python-brace-format
msgid "AK {ak_name} is not assigned any timeslot by the solver"
msgstr "Dem AK {ak_name} wurde vom Solver kein Zeitslot zugewiesen"
#: AKModel/models.py:492
#, python-brace-format
msgid ""
"Duration of AK {ak_name} assigned by solver ({solver_duration} hours) is "
"less than the duration required by the slot ({slot_duration} hours)"
msgstr ""
"Die dem AK {ak_name} vom Solver zugewiesene Dauer ({solver_duration} "
"Stunden) ist kürzer als die aktuell vorgesehene Dauer des Slots "
"({slot_duration} Stunden)"
#: AKModel/models.py:506
#, python-brace-format
msgid ""
"Fixed AK {ak_name} assigned by solver to room {solver_room} is fixed to room "
"{slot_room}"
msgstr ""
"Dem fix geplanten AK {ak_name} wurde vom Solver Raum {solver_room} "
"zugewiesen, dabei ist der AK bereits fix in Raum {slot_room} eingeplant."
#: AKModel/models.py:517
#, python-brace-format
msgid ""
"Fixed AK {ak_name} assigned by solver to start at {solver_start} is fixed to "
"start at {slot_start}"
msgstr ""
"Dem fix geplanten AK {ak_name} wurde vom Solver die Startzeit {solver_start} "
"zugewiesen, dabei ist der AK bereits für {slot_start} eingeplant."
#: AKModel/models.py:562
msgid "Nickname" msgid "Nickname"
msgstr "Spitzname" msgstr "Spitzname"
#: AKModel/models.py:124 #: AKModel/models.py:564
msgid "Name to identify an AK owner by" msgid "Name to identify an AK owner by"
msgstr "Name, durch den eine AK-Leitung identifiziert wird" msgstr "Name, durch den eine AK-Leitung identifiziert wird"
#: AKModel/models.py:125 #: AKModel/models.py:565 AKModel/models.py:726
msgid "Slug" msgid "Slug"
msgstr "Slug" msgstr "Slug"
#: AKModel/models.py:125 #: AKModel/models.py:565
msgid "Slug for URL generation" msgid "Slug for URL generation"
msgstr "Slug für URL-Generierung" msgstr "Slug für URL-Generierung"
#: AKModel/models.py:126 #: AKModel/models.py:566
msgid "Institution" msgid "Institution"
msgstr "Instutution" msgstr "Institution"
#: AKModel/models.py:126 #: AKModel/models.py:566
msgid "Uni etc." msgid "Uni etc."
msgstr "Universität o.ä." msgstr "Universität o.ä."
#: AKModel/models.py:127 AKModel/models.py:249 #: AKModel/models.py:567 AKModel/models.py:759
msgid "Web Link" msgid "Web Link"
msgstr "Internet Link" msgstr "Internet Link"
#: AKModel/models.py:127 #: AKModel/models.py:567
msgid "Link to Homepage" msgid "Link to Homepage"
msgstr "Link zu Homepage oder Webseite" msgstr "Link zu Homepage oder Webseite"
#: AKModel/models.py:133 AKModel/models.py:507 #: AKModel/models.py:573 AKModel/models.py:1256
msgid "AK Owner" msgid "AK Owner"
msgstr "AK-Leitung" msgstr "AK-Leitung"
#: AKModel/models.py:134 #: AKModel/models.py:574
msgid "AK Owners" msgid "AK Owners"
msgstr "AK-Leitungen" msgstr "AK-Leitungen"
#: AKModel/models.py:176 #: AKModel/models.py:638
msgid "Name of the AK Category" msgid "Name of the AK Category"
msgstr "Name der AK-Kategorie" msgstr "Name der AK-Kategorie"
#: AKModel/models.py:177 AKModel/models.py:201 #: AKModel/models.py:639 AKModel/models.py:677
msgid "Color" msgid "Color"
msgstr "Farbe" msgstr "Farbe"
#: AKModel/models.py:177 AKModel/models.py:201 #: AKModel/models.py:639 AKModel/models.py:677
msgid "Color for displaying" msgid "Color for displaying"
msgstr "Farbe für die Anzeige" msgstr "Farbe für die Anzeige"
#: AKModel/models.py:178 AKModel/models.py:243 #: AKModel/models.py:640
msgid "Description" msgid "Description"
msgstr "Beschreibung" msgstr "Beschreibung"
#: AKModel/models.py:179 #: AKModel/models.py:641
msgid "Short description of this AK Category" msgid "Short description of this AK Category"
msgstr "Beschreibung der AK-Kategorie" msgstr "Beschreibung der AK-Kategorie"
#: AKModel/models.py:180 #: AKModel/models.py:642
msgid "Present by default" msgid "Present by default"
msgstr "Defaultmäßig präsentieren" msgstr "Defaultmäßig präsentieren"
#: AKModel/models.py:182 #: AKModel/models.py:643
msgid "" msgid ""
"Present AKs of this category by default if AK owner did not specify whether " "Present AKs of this category by default if AK owner did not specify whether "
"this AK should be presented?" "this AK should be presented?"
...@@ -488,132 +656,182 @@ msgstr "" ...@@ -488,132 +656,182 @@ msgstr ""
"AKs dieser Kategorie standardmäßig vorstellen, wenn die Leitungen das für " "AKs dieser Kategorie standardmäßig vorstellen, wenn die Leitungen das für "
"ihren AK nicht explizit spezifiziert haben?" "ihren AK nicht explizit spezifiziert haben?"
#: AKModel/models.py:189 #: AKModel/models.py:651
msgid "AK Categories" msgid "AK Categories"
msgstr "AK-Kategorien" msgstr "AK-Kategorien"
#: AKModel/models.py:200 #: AKModel/models.py:676
msgid "Name of the AK Track" msgid "Name of the AK Track"
msgstr "Name des AK-Tracks" msgstr "Name des AK-Tracks"
#: AKModel/models.py:207 #: AKModel/models.py:683
msgid "AK Track" msgid "AK Track"
msgstr "AK-Track" msgstr "AK-Track"
#: AKModel/models.py:208 #: AKModel/models.py:684
msgid "AK Tracks" msgid "AK Tracks"
msgstr "AK-Tracks" msgstr "AK-Tracks"
#: AKModel/models.py:222 #: AKModel/models.py:703
msgid "Name of the Requirement" msgid "Name of the Requirement"
msgstr "Name der Anforderung" msgstr "Name der Anforderung"
#: AKModel/models.py:228 AKModel/models.py:511 #: AKModel/models.py:704
msgid "Relevant for Participants?"
msgstr "Relevant für Teilnehmende?"
#: AKModel/models.py:706
msgid "Show this requirement when collecting participant preferences"
msgstr ""
"Diese Voraussetzung anzeigen, wenn Präferenzen der Teilnehmenden abgefragt "
"werden."
#: AKModel/models.py:712 AKModel/models.py:1260
msgid "AK Requirement" msgid "AK Requirement"
msgstr "AK-Anforderung" msgstr "AK-Anforderung"
#: AKModel/models.py:229 #: AKModel/models.py:713
msgid "AK Requirements" msgid "AK Requirements"
msgstr "AK-Anforderungen" msgstr "AK-Anforderungen"
#: AKModel/models.py:240 #: AKModel/models.py:725
msgid "Name describing the type"
msgstr "Name, der den Typ beschreibt"
#: AKModel/models.py:731
msgid "AK Type"
msgstr "AK Typ"
#: AKModel/models.py:743
msgid "Name of the AK" msgid "Name of the AK"
msgstr "Name des AKs" msgstr "Name des AKs"
#: AKModel/models.py:241 #: AKModel/models.py:745
msgid "Short Name" msgid "Short Name"
msgstr "Kurzer Name" msgstr "Kurzer Name"
#: AKModel/models.py:242 #: AKModel/models.py:747
msgid "Name displayed in the schedule" msgid "Name displayed in the schedule"
msgstr "Name zur Anzeige im AK-Plan" msgstr "Name zur Anzeige im AK-Plan"
#: AKModel/models.py:243 #: AKModel/models.py:748
msgid "Description of the AK" msgid "Brief Description"
msgstr "Beschreibung des AKs" msgstr "Kurzbeschreibung"
#: AKModel/models.py:748
msgid "1-2 sentences of AK description"
msgstr "1-2 repräsentative Sätze, die den AK beschreiben"
#: AKModel/models.py:245 #: AKModel/models.py:749
msgid "Design/Goal"
msgstr "Art/Ziel"
#: AKModel/models.py:750
msgid ""
"Design of the AK (e.g. discussion, problem solving, brainstorming, input, "
"output) and/or goal (e.g. Reso, solution, collection of ideas, document, "
"exchange) in a few words"
msgstr "Art bzw. Gestaltung des AKs (z.B. Diskussion, Problemlösung, Brainstorming, Input) "
"und/oder Ziel des AKs (z.B. Reso, Lösungsausarbeitung, Ideensammlung, ein Dokument, Austausch) in wenigen Worten"
#: AKModel/models.py:752
msgid "Further Information"
msgstr "Weitere Infos"
#: AKModel/models.py:753
msgid "Anything else about the AK, e.g. links, stories, detailed description"
msgstr "alles weitere zu dem AK, z.B. Links, Anekdoten, detailiertere Beschreibung des Inhalts/Ablaufs"
#: AKModel/models.py:755
msgid "Owners" msgid "Owners"
msgstr "Leitungen" msgstr "Leitungen"
#: AKModel/models.py:246 #: AKModel/models.py:756
msgid "Those organizing the AK" msgid "Those organizing the AK"
msgstr "Menschen, die den AK organisieren und halten" msgstr "Menschen, die den AK organisieren und halten"
#: AKModel/models.py:249 #: AKModel/models.py:759
msgid "Link to wiki page" msgid "Link to wiki page"
msgstr "Link zur Wiki Seite" msgstr "Link zur Wiki Seite"
#: AKModel/models.py:250 #: AKModel/models.py:760
msgid "Protocol Link" msgid "Protocol Link"
msgstr "Protokolllink" msgstr "Protokolllink"
#: AKModel/models.py:250 #: AKModel/models.py:760
msgid "Link to protocol" msgid "Link to protocol"
msgstr "Link zum Protokoll" msgstr "Link zum Protokoll"
#: AKModel/models.py:252 #: AKModel/models.py:762
msgid "Category" msgid "Category"
msgstr "Kategorie" msgstr "Kategorie"
#: AKModel/models.py:253 #: AKModel/models.py:763
msgid "Category of the AK" msgid "Category of the AK"
msgstr "Kategorie des AKs" msgstr "Kategorie des AKs"
#: AKModel/models.py:254 #: AKModel/models.py:764 AKModel/views/manage.py:67
msgid "Types"
msgstr "Typen"
#: AKModel/models.py:765
msgid "This AK is"
msgstr "Dieser AK ist"
#: AKModel/models.py:766
msgid "Track" msgid "Track"
msgstr "Track" msgstr "Track"
#: AKModel/models.py:255 #: AKModel/models.py:767
msgid "Track the AK belongs to" msgid "Track the AK belongs to"
msgstr "Track zu dem der AK gehört" msgstr "Track zu dem der AK gehört"
#: AKModel/models.py:257 #: AKModel/models.py:769
msgid "Resolution Intention" msgid "Resolution Intention"
msgstr "Resolutionsabsicht" msgstr "Resolutionsabsicht"
#: AKModel/models.py:258 #: AKModel/models.py:770
msgid "Intends to submit a resolution" msgid "Intends to submit a resolution"
msgstr "Beabsichtigt eine Resolution einzureichen" msgstr "Beabsichtigt eine Resolution einzureichen"
#: AKModel/models.py:259 #: AKModel/models.py:771
msgid "Present this AK" msgid "Present this AK"
msgstr "AK präsentieren" msgstr "AK präsentieren"
#: AKModel/models.py:260 #: AKModel/models.py:772
msgid "Present results of this AK" msgid "Present results of this AK"
msgstr "Die Ergebnisse dieses AKs vorstellen" msgstr "Die Ergebnisse dieses AKs vorstellen"
#: AKModel/models.py:262 AKModel/views/status.py:136 #: AKModel/models.py:774 AKModel/views/status.py:178
msgid "Requirements" msgid "Requirements"
msgstr "Anforderungen" msgstr "Anforderungen"
#: AKModel/models.py:263 #: AKModel/models.py:775
msgid "AK's Requirements" msgid "AK's Requirements"
msgstr "Anforderungen des AKs" msgstr "Anforderungen des AKs"
#: AKModel/models.py:265 #: AKModel/models.py:777
msgid "Conflicting AKs" msgid "Conflicting AKs"
msgstr "AK-Konflikte" msgstr "AK-Konflikte"
#: AKModel/models.py:266 #: AKModel/models.py:778
msgid "AKs that conflict and thus must not take place at the same time" msgid "AKs that conflict and thus must not take place at the same time"
msgstr "" msgstr ""
"AKs, die Konflikte haben und deshalb nicht gleichzeitig stattfinden dürfen" "AKs, die Konflikte haben und deshalb nicht gleichzeitig stattfinden dürfen"
#: AKModel/models.py:267 #: AKModel/models.py:779
msgid "Prerequisite AKs" msgid "Prerequisite AKs"
msgstr "Vorausgesetzte AKs" msgstr "Vorausgesetzte AKs"
#: AKModel/models.py:268 #: AKModel/models.py:780
msgid "AKs that should precede this AK in the schedule" msgid "AKs that should precede this AK in the schedule"
msgstr "AKs die im AK-Plan vor diesem AK stattfinden müssen" msgstr "AKs die im AK-Plan vor diesem AK stattfinden müssen"
#: AKModel/models.py:270 #: AKModel/models.py:782
msgid "Organizational Notes" msgid "Organizational Notes"
msgstr "Notizen zur Organisation" msgstr "Notizen zur Organisation"
#: AKModel/models.py:271 #: AKModel/models.py:783
msgid "" msgid ""
"Notes to organizers. These are public. For private notes, please use the " "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/" "button for private messages on the detail page of this AK (after creation/"
...@@ -623,291 +841,295 @@ msgstr "" ...@@ -623,291 +841,295 @@ msgstr ""
"Anmerkungen bitte den Button für Direktnachrichten verwenden (nach dem " "Anmerkungen bitte den Button für Direktnachrichten verwenden (nach dem "
"Anlegen/Bearbeiten)." "Anlegen/Bearbeiten)."
#: AKModel/models.py:273 #: AKModel/models.py:786
msgid "Interest" msgid "Interest"
msgstr "Interesse" msgstr "Interesse"
#: AKModel/models.py:273 #: AKModel/models.py:786
msgid "Expected number of people" msgid "Expected number of people"
msgstr "Erwartete Personenzahl" msgstr "Erwartete Personenzahl"
#: AKModel/models.py:274 #: AKModel/models.py:787
msgid "Interest Counter" msgid "Interest Counter"
msgstr "Interessenszähler" msgstr "Interessenszähler"
#: AKModel/models.py:275 #: AKModel/models.py:788
msgid "People who have indicated interest online" msgid "People who have indicated interest online"
msgstr "Anzahl Personen, die online Interesse bekundet haben" msgstr "Anzahl Personen, die online Interesse bekundet haben"
#: AKModel/models.py:280 #: AKModel/models.py:793
msgid "Export?" msgid "Export?"
msgstr "Export?" msgstr "Export?"
#: AKModel/models.py:281 #: AKModel/models.py:794
msgid "Include AK in wiki export?" msgid "Include AK in wiki export?"
msgstr "AK bei Wiki-Export berücksichtigen?" msgstr "AK bei Wiki-Export berücksichtigen?"
#: AKModel/models.py:287 AKModel/models.py:502 #: AKModel/models.py:951
#: AKModel/templates/admin/AKModel/status/event_aks.html:10
#: AKModel/views/manage.py:55 AKModel/views/status.py:74
msgid "AKs"
msgstr "AKs"
#: AKModel/models.py:346
msgid "Name or number of the room" msgid "Name or number of the room"
msgstr "Name oder Nummer des Raums" msgstr "Name oder Nummer des Raums"
#: AKModel/models.py:347 #: AKModel/models.py:952
msgid "Location" msgid "Location"
msgstr "Ort" msgstr "Ort"
#: AKModel/models.py:348 #: AKModel/models.py:953
msgid "Name or number of the location" msgid "Name or number of the location"
msgstr "Name oder Nummer des Ortes" msgstr "Name oder Nummer des Ortes"
#: AKModel/models.py:349 #: AKModel/models.py:954
msgid "Capacity" msgid "Capacity"
msgstr "Kapazität" msgstr "Kapazität"
#: AKModel/models.py:350 #: AKModel/models.py:955
msgid "Maximum number of people (-1 for unlimited)." msgid "Maximum number of people (-1 for unlimited)."
msgstr "Maximale Personenzahl (-1 wenn unbeschränkt)." msgstr "Maximale Personenzahl (-1 wenn unbeschränkt)."
#: AKModel/models.py:351 #: AKModel/models.py:956
msgid "Properties" msgid "Properties"
msgstr "Eigenschaften" msgstr "Eigenschaften"
#: AKModel/models.py:352 #: AKModel/models.py:957
msgid "AK requirements fulfilled by the room" msgid "AK requirements fulfilled by the room"
msgstr "AK-Anforderungen, die dieser Raum erfüllt" msgstr "AK-Anforderungen, die dieser Raum erfüllt"
#: AKModel/models.py:359 AKModel/views/status.py:44 #: AKModel/models.py:964 AKModel/views/status.py:59
msgid "Rooms" msgid "Rooms"
msgstr "Räume" msgstr "Räume"
#: AKModel/models.py:376 #: AKModel/models.py:1013
msgid "AK being mapped" msgid "AK being mapped"
msgstr "AK, der zugeordnet wird" msgstr "AK, der zugeordnet wird"
#: AKModel/models.py:378 #: AKModel/models.py:1015
msgid "Room the AK will take place in" msgid "Room the AK will take place in"
msgstr "Raum in dem der AK stattfindet" msgstr "Raum in dem der AK stattfindet"
#: AKModel/models.py:379 AKModel/models.py:661 #: AKModel/models.py:1016 AKModel/models.py:1436
msgid "Slot Begin" msgid "Slot Begin"
msgstr "Beginn des Slots" msgstr "Beginn des Slots"
#: AKModel/models.py:379 AKModel/models.py:661 #: AKModel/models.py:1016 AKModel/models.py:1436
msgid "Time and date the slot begins" msgid "Time and date the slot begins"
msgstr "Zeit und Datum zu der der AK beginnt" msgstr "Zeit und Datum zu der der AK beginnt"
#: AKModel/models.py:381 #: AKModel/models.py:1018
msgid "Duration" msgid "Duration"
msgstr "Dauer" msgstr "Dauer"
#: AKModel/models.py:382 #: AKModel/models.py:1019
msgid "Length in hours" msgid "Length in hours"
msgstr "Länge in Stunden" msgstr "Länge in Stunden"
#: AKModel/models.py:384 #: AKModel/models.py:1021
msgid "Scheduling fixed" msgid "Scheduling fixed"
msgstr "Planung fix" msgstr "Planung fix"
#: AKModel/models.py:385 #: AKModel/models.py:1022
msgid "Length and time of this AK should not be changed" msgid "Length and time of this AK should not be changed"
msgstr "Dauer und Zeit dieses AKs sollten nicht verändert werden" msgstr "Dauer und Zeit dieses AKs sollten nicht verändert werden"
#: AKModel/models.py:390 #: AKModel/models.py:1027
msgid "Last update" msgid "Last update"
msgstr "Letzte Aktualisierung" msgstr "Letzte Aktualisierung"
#: AKModel/models.py:393 #: AKModel/models.py:1030
msgid "AK Slot" msgid "AK Slot"
msgstr "AK-Slot" msgstr "AK-Slot"
#: AKModel/models.py:394 AKModel/models.py:504 #: AKModel/models.py:1031 AKModel/models.py:1253
msgid "AK Slots" msgid "AK Slots"
msgstr "AK-Slot" msgstr "AK-Slot"
#: AKModel/models.py:416 AKModel/models.py:425 #: AKModel/models.py:1053 AKModel/models.py:1062
msgid "Not scheduled yet" msgid "Not scheduled yet"
msgstr "Noch nicht geplant" msgstr "Noch nicht geplant"
#: AKModel/models.py:454 #: AKModel/models.py:1185
msgid "AK this message belongs to" msgid "AK this message belongs to"
msgstr "AK zu dem die Nachricht gehört" msgstr "AK zu dem die Nachricht gehört"
#: AKModel/models.py:455 #: AKModel/models.py:1186
msgid "Message text" msgid "Message text"
msgstr "Nachrichtentext" msgstr "Nachrichtentext"
#: AKModel/models.py:456 #: AKModel/models.py:1187
msgid "Message to the organizers. This is not publicly visible." msgid "Message to the organizers. This is not publicly visible."
msgstr "" msgstr ""
"Nachricht an die Organisator*innen. Diese ist nicht öffentlich sichtbar." "Nachricht an die Organisator*innen. Diese ist nicht öffentlich sichtbar."
#: AKModel/models.py:462 #: AKModel/models.py:1191
msgid "Resolved"
msgstr "Erledigt"
#: AKModel/models.py:1192
msgid "This message has been resolved (no further action needed)"
msgstr ""
"Diese Nachricht wurde vollständig bearbeitet (keine weiteren Aktionen "
"notwendig)"
#: AKModel/models.py:1195
msgid "AK Orga Message" msgid "AK Orga Message"
msgstr "AK-Organachricht" msgstr "AK-Organachricht"
#: AKModel/models.py:463 #: AKModel/models.py:1196
msgid "AK Orga Messages" msgid "AK Orga Messages"
msgstr "AK-Organachrichten" msgstr "AK-Organachrichten"
#: AKModel/models.py:472 #: AKModel/models.py:1214
msgid "Constraint Violation" msgid "Constraint Violation"
msgstr "Constraintverletzung" msgstr "Constraintverletzung"
#: AKModel/models.py:473 AKModel/views/status.py:93 #: AKModel/models.py:1215
msgid "Constraint Violations" msgid "Constraint Violations"
msgstr "Constraintverletzungen" msgstr "Constraintverletzungen"
#: AKModel/models.py:477 #: AKModel/models.py:1222
msgid "Owner has two parallel slots" msgid "Owner has two parallel slots"
msgstr "Leitung hat zwei Slots parallel" msgstr "Leitung hat zwei Slots parallel"
#: AKModel/models.py:478 #: AKModel/models.py:1223
msgid "AK Slot was scheduled outside the AK's availabilities" msgid "AK Slot was scheduled outside the AK's availabilities"
msgstr "AK Slot wurde außerhalb der Verfügbarkeit des AKs platziert" msgstr "AK Slot wurde außerhalb der Verfügbarkeit des AKs platziert"
#: AKModel/models.py:479 #: AKModel/models.py:1224
msgid "Room has two AK slots scheduled at the same time" msgid "Room has two AK slots scheduled at the same time"
msgstr "Raum hat zwei AK Slots gleichzeitig" msgstr "Raum hat zwei AK Slots gleichzeitig"
#: AKModel/models.py:480 #: AKModel/models.py:1225
msgid "Room does not satisfy the requirement of the scheduled AK" msgid "Room does not satisfy the requirement of the scheduled AK"
msgstr "Room erfüllt die Anforderungen des platzierten AKs nicht" msgstr "Room erfüllt die Anforderungen des platzierten AKs nicht"
#: AKModel/models.py:481 #: AKModel/models.py:1226
msgid "AK Slot is scheduled at the same time as an AK listed as a conflict" msgid "AK Slot is scheduled at the same time as an AK listed as a conflict"
msgstr "" msgstr ""
"AK Slot wurde wurde zur gleichen Zeit wie ein Konflikt des AKs platziert" "AK Slot wurde wurde zur gleichen Zeit wie ein Konflikt des AKs platziert"
#: AKModel/models.py:482 #: AKModel/models.py:1227
msgid "AK Slot is scheduled before an AK listed as a prerequisite" msgid "AK Slot is scheduled before an AK listed as a prerequisite"
msgstr "AK Slot wurde vor einem als Voraussetzung gelisteten AK platziert" msgstr "AK Slot wurde vor einem als Voraussetzung gelisteten AK platziert"
#: AKModel/models.py:484 #: AKModel/models.py:1229
msgid "" msgid ""
"AK Slot for AK with intention to submit a resolution is scheduled after " "AK Slot for AK with intention to submit a resolution is scheduled after "
"resolution deadline" "resolution deadline"
msgstr "" msgstr ""
"AK Slot eines AKs mit Resoabsicht wurde nach der Resodeadline platziert" "AK Slot eines AKs mit Resoabsicht wurde nach der Resodeadline platziert"
#: AKModel/models.py:485 #: AKModel/models.py:1230
msgid "AK Slot in a category is outside that categories availabilities" msgid "AK Slot in a category is outside that categories availabilities"
msgstr "AK Slot wurde außerhalb der Verfügbarkeiten seiner Kategorie" msgstr "AK Slot wurde außerhalb der Verfügbarkeiten seiner Kategorie"
#: AKModel/models.py:486 #: AKModel/models.py:1231
msgid "Two AK Slots for the same AK scheduled at the same time" msgid "Two AK Slots for the same AK scheduled at the same time"
msgstr "Zwei AK Slots eines AKs wurden zur selben Zeit platziert" msgstr "Zwei AK Slots eines AKs wurden zur selben Zeit platziert"
#: AKModel/models.py:487 #: AKModel/models.py:1232
msgid "Room does not have enough space for interest in scheduled AK Slot" msgid "Room does not have enough space for interest in scheduled AK Slot"
msgstr "Room hat nicht genug Platz für das Interesse am geplanten AK-Slot" msgstr "Room hat nicht genug Platz für das Interesse am geplanten AK-Slot"
#: AKModel/models.py:488 #: AKModel/models.py:1233
msgid "AK Slot is scheduled outside the event's availabilities" msgid "AK Slot is scheduled outside the event's availabilities"
msgstr "AK Slot wurde außerhalb der Verfügbarkeit des Events platziert" msgstr "AK Slot wurde außerhalb der Verfügbarkeit des Events platziert"
#: AKModel/models.py:491 #: AKModel/models.py:1239
msgid "Warning" msgid "Warning"
msgstr "Warnung" msgstr "Warnung"
#: AKModel/models.py:492 #: AKModel/models.py:1240
msgid "Violation" msgid "Violation"
msgstr "Verletzung" msgstr "Verletzung"
#: AKModel/models.py:494 #: AKModel/models.py:1242
msgid "Type" msgid "Type"
msgstr "Art" msgstr "Art"
#: AKModel/models.py:495 #: AKModel/models.py:1243
msgid "Type of violation, i.e. what kind of constraint was violated" msgid "Type of violation, i.e. what kind of constraint was violated"
msgstr "Art der Verletzung, gibt an welche Art Constraint verletzt wurde" msgstr "Art der Verletzung, gibt an welche Art Constraint verletzt wurde"
#: AKModel/models.py:496 #: AKModel/models.py:1244
msgid "Level" msgid "Level"
msgstr "Level" msgstr "Level"
#: AKModel/models.py:497 #: AKModel/models.py:1245
msgid "Severity level of the violation" msgid "Severity level of the violation"
msgstr "Schweregrad der Verletzung" msgstr "Schweregrad der Verletzung"
#: AKModel/models.py:503 #: AKModel/models.py:1252
msgid "AK(s) belonging to this constraint" msgid "AK(s) belonging to this constraint"
msgstr "AK(s), die zu diesem Constraint gehören" msgstr "AK(s), die zu diesem Constraint gehören"
#: AKModel/models.py:505 #: AKModel/models.py:1254
msgid "AK Slot(s) belonging to this constraint" msgid "AK Slot(s) belonging to this constraint"
msgstr "AK Slot(s), die zu diesem Constraint gehören" msgstr "AK Slot(s), die zu diesem Constraint gehören"
#: AKModel/models.py:507 #: AKModel/models.py:1256
msgid "AK Owner belonging to this constraint" msgid "AK Owner belonging to this constraint"
msgstr "AK Leitung(en), die zu diesem Constraint gehören" msgstr "AK Leitung(en), die zu diesem Constraint gehören"
#: AKModel/models.py:509 #: AKModel/models.py:1258
msgid "Room belonging to this constraint" msgid "Room belonging to this constraint"
msgstr "Raum, der zu diesem Constraint gehört" msgstr "Raum, der zu diesem Constraint gehört"
#: AKModel/models.py:512 #: AKModel/models.py:1261
msgid "AK Requirement belonging to this constraint" msgid "AK Requirement belonging to this constraint"
msgstr "AK Anforderung, die zu diesem Constraint gehört" msgstr "AK Anforderung, die zu diesem Constraint gehört"
#: AKModel/models.py:514 #: AKModel/models.py:1263
msgid "AK Category belonging to this constraint" msgid "AK Category belonging to this constraint"
msgstr "AK Kategorie, di zu diesem Constraint gehört" msgstr "AK Kategorie, di zu diesem Constraint gehört"
#: AKModel/models.py:516 #: AKModel/models.py:1265
msgid "Comment" msgid "Comment"
msgstr "Kommentar" msgstr "Kommentar"
#: AKModel/models.py:516 #: AKModel/models.py:1265
msgid "Comment or further details for this violation" msgid "Comment or further details for this violation"
msgstr "Kommentar oder weitere Details zu dieser Vereletzung" msgstr "Kommentar oder weitere Details zu dieser Verletzung"
#: AKModel/models.py:519 #: AKModel/models.py:1268
msgid "Timestamp" msgid "Timestamp"
msgstr "Timestamp" msgstr "Timestamp"
#: AKModel/models.py:519 #: AKModel/models.py:1268
msgid "Time of creation" msgid "Time of creation"
msgstr "Zeitpunkt der ERstellung" msgstr "Zeitpunkt der Erstellung"
#: AKModel/models.py:520 #: AKModel/models.py:1269
msgid "Manually Resolved" msgid "Manually Resolved"
msgstr "Manuell behoben" msgstr "Manuell behoben"
#: AKModel/models.py:521 #: AKModel/models.py:1270
msgid "Mark this violation manually as resolved" msgid "Mark this violation manually as resolved"
msgstr "Markiere diese Verletzung manuell als behoben" msgstr "Markiere diese Verletzung manuell als behoben"
#: AKModel/models.py:548 #: AKModel/models.py:1297 AKModel/templates/admin/AKModel/aks_by_user.html:22
#: AKModel/templates/admin/AKModel/requirements_overview.html:27 #: AKModel/templates/admin/AKModel/requirements_overview.html:27
msgid "Details" msgid "Details"
msgstr "Details" msgstr "Details"
#: AKModel/models.py:657 #: AKModel/models.py:1432
msgid "Default Slot" msgid "Default Slot"
msgstr "Standardslot" msgstr "Standardslot"
#: AKModel/models.py:662 #: AKModel/models.py:1437
msgid "Slot End" msgid "Slot End"
msgstr "Ende des Slots" msgstr "Ende des Slots"
#: AKModel/models.py:662 #: AKModel/models.py:1437
msgid "Time and date the slot ends" msgid "Time and date the slot ends"
msgstr "Zeit und Datum zu der der Slot endet" msgstr "Zeit und Datum zu der der Slot endet"
#: AKModel/models.py:667 #: AKModel/models.py:1442
msgid "Primary categories" msgid "Primary categories"
msgstr "Primäre Kategorien" msgstr "Primäre Kategorien"
#: AKModel/models.py:668 #: AKModel/models.py:1444
msgid "Categories that should be assigned to this slot primarily" msgid "Categories that should be assigned to this slot primarily"
msgstr "Kategorieren, die diesem Slot primär zugewiesen werden sollen" msgstr "Kategorieren, die diesem Slot primär zugewiesen werden sollen"
#: AKModel/site.py:10 #: AKModel/site.py:14
msgid "Administration" msgid "Administration"
msgstr "Verwaltung" msgstr "Verwaltung"
...@@ -933,13 +1155,26 @@ msgid "Confirm" ...@@ -933,13 +1155,26 @@ msgid "Confirm"
msgstr "Bestätigen" msgstr "Bestätigen"
#: AKModel/templates/admin/AKModel/action_intermediate.html:27 #: AKModel/templates/admin/AKModel/action_intermediate.html:27
#: AKModel/templates/admin/AKModel/event_wizard/import.html:24 #: AKModel/templates/admin/AKModel/event_wizard/import.html:27
#: AKModel/templates/admin/AKModel/event_wizard/settings.html:29 #: AKModel/templates/admin/AKModel/event_wizard/settings.html:32
#: AKModel/templates/admin/AKModel/event_wizard/start.html:23 #: AKModel/templates/admin/AKModel/event_wizard/start.html:28
#: AKModel/templates/admin/AKModel/room_create.html:30 #: AKModel/templates/admin/AKModel/room_create.html:30
msgid "Cancel" msgid "Cancel"
msgstr "Abbrechen" msgstr "Abbrechen"
#: AKModel/templates/admin/AKModel/aks_by_user.html:8
msgid "AKs by Owner"
msgstr "AKs der Leitung"
#: AKModel/templates/admin/AKModel/aks_by_user.html:26
#: AKModel/templates/admin/AKModel/requirements_overview.html:31
msgid "Edit"
msgstr "Bearbeiten"
#: AKModel/templates/admin/AKModel/aks_by_user.html:33
msgid "This user does not have any AKs currently"
msgstr "Diese Leitung hat aktuell keine AKs"
#: AKModel/templates/admin/AKModel/event_wizard/activate.html:9 #: AKModel/templates/admin/AKModel/event_wizard/activate.html:9
#: AKModel/templates/admin/AKModel/event_wizard/created_prepare_import.html:9 #: AKModel/templates/admin/AKModel/event_wizard/created_prepare_import.html:9
#: AKModel/templates/admin/AKModel/event_wizard/finish.html:9 #: AKModel/templates/admin/AKModel/event_wizard/finish.html:9
...@@ -950,26 +1185,26 @@ msgstr "Abbrechen" ...@@ -950,26 +1185,26 @@ msgstr "Abbrechen"
msgid "New event wizard" msgid "New event wizard"
msgstr "Assistent zum Anlegen eines neuen Events" msgstr "Assistent zum Anlegen eines neuen Events"
#: AKModel/templates/admin/AKModel/event_wizard/activate.html:18 #: AKModel/templates/admin/AKModel/event_wizard/activate.html:23
msgid "Successfully imported.<br><br>Do you want to activate your event now?" msgid "Successfully imported.<br><br>Do you want to activate your event now?"
msgstr "Erfolgreich importiert.<br><br>Soll das Event jetzt aktiviert werden?" msgstr "Erfolgreich importiert.<br><br>Soll das Event jetzt aktiviert werden?"
#: AKModel/templates/admin/AKModel/event_wizard/created_prepare_import.html:16 #: AKModel/templates/admin/AKModel/event_wizard/created_prepare_import.html:21
msgid "New event:" msgid "New event:"
msgstr "Neues Event:" msgstr "Neues Event:"
#: AKModel/templates/admin/AKModel/event_wizard/created_prepare_import.html:30 #: AKModel/templates/admin/AKModel/event_wizard/created_prepare_import.html:35
msgid "Your event was created and can now be further configured." msgid "Your event was created and can now be further configured."
msgstr "Das Event wurde angelegt und kann nun weiter konfiguriert werden." msgstr "Das Event wurde angelegt und kann nun weiter konfiguriert werden."
#: AKModel/templates/admin/AKModel/event_wizard/created_prepare_import.html:39 #: AKModel/templates/admin/AKModel/event_wizard/created_prepare_import.html:42
msgid "Skip Import" msgid "Skip Import"
msgstr "Import überspringen" msgstr "Import überspringen"
#: AKModel/templates/admin/AKModel/event_wizard/created_prepare_import.html:43 #: AKModel/templates/admin/AKModel/event_wizard/created_prepare_import.html:46
#: AKModel/templates/admin/AKModel/event_wizard/import.html:20 #: AKModel/templates/admin/AKModel/event_wizard/import.html:23
#: AKModel/templates/admin/AKModel/event_wizard/settings.html:22 #: AKModel/templates/admin/AKModel/event_wizard/settings.html:25
#: AKModel/templates/admin/AKModel/event_wizard/start.html:19 #: AKModel/templates/admin/AKModel/event_wizard/start.html:24
msgid "Continue" msgid "Continue"
msgstr "Fortfahren" msgstr "Fortfahren"
...@@ -977,11 +1212,11 @@ msgstr "Fortfahren" ...@@ -977,11 +1212,11 @@ msgstr "Fortfahren"
msgid "Congratulations. Everything is set up!" msgid "Congratulations. Everything is set up!"
msgstr "Herzlichen Glückwunsch. Alles ist eingerichtet!" msgstr "Herzlichen Glückwunsch. Alles ist eingerichtet!"
#: AKModel/templates/admin/AKModel/event_wizard/settings.html:26 #: AKModel/templates/admin/AKModel/event_wizard/settings.html:29
msgid "Back" msgid "Back"
msgstr "Zurück" msgstr "Zurück"
#: AKModel/templates/admin/AKModel/event_wizard/start.html:13 #: AKModel/templates/admin/AKModel/event_wizard/start.html:18
msgid "" msgid ""
"Add a new event. Please start by filling these basic properties. You can " "Add a new event. Please start by filling these basic properties. You can "
"specify more settings later." "specify more settings later."
...@@ -1006,16 +1241,12 @@ msgstr "" ...@@ -1006,16 +1241,12 @@ msgstr ""
msgid "Requirements Overview" msgid "Requirements Overview"
msgstr "Übersicht Anforderungen" msgstr "Übersicht Anforderungen"
#: AKModel/templates/admin/AKModel/requirements_overview.html:31
msgid "Edit"
msgstr "Bearbeiten"
#: AKModel/templates/admin/AKModel/requirements_overview.html:38 #: AKModel/templates/admin/AKModel/requirements_overview.html:38
msgid "No AKs with this requirement" msgid "No AKs with this requirement"
msgstr "Kein AK mit dieser Anforderung" msgstr "Kein AK mit dieser Anforderung"
#: AKModel/templates/admin/AKModel/requirements_overview.html:45 #: AKModel/templates/admin/AKModel/requirements_overview.html:45
#: AKModel/views/status.py:150 #: AKModel/views/status.py:194
msgid "Add Requirement" msgid "Add Requirement"
msgstr "Anforderung hinzufügen" msgstr "Anforderung hinzufügen"
...@@ -1068,7 +1299,7 @@ msgstr "Bisher keine Räume" ...@@ -1068,7 +1299,7 @@ msgstr "Bisher keine Räume"
msgid "Active Events" msgid "Active Events"
msgstr "Aktive Events" msgstr "Aktive Events"
#: AKModel/templates/admin/ak_index.html:16 AKModel/views/status.py:85 #: AKModel/templates/admin/ak_index.html:16 AKModel/views/status.py:113
msgid "Scheduling" msgid "Scheduling"
msgstr "Scheduling" msgstr "Scheduling"
...@@ -1101,209 +1332,242 @@ msgstr "Login" ...@@ -1101,209 +1332,242 @@ msgstr "Login"
msgid "Register" msgid "Register"
msgstr "Registrieren" msgstr "Registrieren"
#: AKModel/views/ak.py:14 #: AKModel/views/ak.py:17
msgid "Requirements for Event" msgid "Requirements for Event"
msgstr "Anforderungen für das Event" msgstr "Anforderungen für das Event"
#: AKModel/views/ak.py:28 #: AKModel/views/ak.py:34
msgid "AK CSV Export" msgid "AK CSV Export"
msgstr "AK-CSV-Export" msgstr "AK-CSV-Export"
#: AKModel/views/ak.py:42 #: AKModel/views/ak.py:48
msgid "AK Wiki Export" msgid "AK Wiki Export"
msgstr "AK-Wiki-Export" msgstr "AK-Wiki-Export"
#: AKModel/views/ak.py:53 AKModel/views/manage.py:41 #: AKModel/views/ak.py:59 AKModel/views/manage.py:66
msgid "Wishes" msgid "Wishes"
msgstr "Wünsche" msgstr "Wünsche"
#: AKModel/views/ak.py:60 #: AKModel/views/ak.py:71
msgid "Delete AK Orga Messages" msgid "Delete AK Orga Messages"
msgstr "AK-Organachrichten löschen" msgstr "AK-Organachrichten löschen"
#: AKModel/views/ak.py:75 #: AKModel/views/ak.py:89
msgid "AK Orga Messages successfully deleted" msgid "AK Orga Messages successfully deleted"
msgstr "AK-Organachrichten erfolgreich gelöscht" msgstr "AK-Organachrichten erfolgreich gelöscht"
#: AKModel/views/ak.py:82 #: AKModel/views/ak.py:101
msgid "Interest of the following AKs will be set to not filled (-1):" msgid "Interest of the following AKs will be set to not filled (-1):"
msgstr "Interesse an den folgenden AKs wird auf nicht ausgefüllt (-1) gesetzt:" msgstr "Interesse an den folgenden AKs wird auf nicht ausgefüllt (-1) gesetzt:"
#: AKModel/views/ak.py:83 #: AKModel/views/ak.py:102
msgid "Reset of interest in AKs successful." msgid "Reset of interest in AKs successful."
msgstr "Interesse an AKs erfolgreich zurückgesetzt." msgstr "Interesse an AKs erfolgreich zurückgesetzt."
#: AKModel/views/ak.py:92 #: AKModel/views/ak.py:116
msgid "Interest counter of the following AKs will be set to 0:" msgid "Interest counter of the following AKs will be set to 0:"
msgstr "Interessensbekundungszähler der folgenden AKs wird auf 0 gesetzt:" msgstr "Interessensbekundungszähler der folgenden AKs wird auf 0 gesetzt:"
#: AKModel/views/ak.py:93 #: AKModel/views/ak.py:117
msgid "AKs' interest counters set back to 0." msgid "AKs' interest counters set back to 0."
msgstr "Interessenszähler der AKs zurückgesetzt" msgstr "Interessenszähler der AKs zurückgesetzt"
#: AKModel/views/event_wizard.py:69 #: AKModel/views/event_wizard.py:104
#, python-format #, python-format
msgid "Copied '%(obj)s'" msgid "Copied '%(obj)s'"
msgstr "'%(obj)s' kopiert" msgstr "'%(obj)s' kopiert"
#: AKModel/views/event_wizard.py:72 #: AKModel/views/event_wizard.py:107
#, python-format #, python-format
msgid "Could not copy '%(obj)s' (%(error)s)" msgid "Could not copy '%(obj)s' (%(error)s)"
msgstr "'%(obj)s' konnte nicht kopiert werden (%(error)s)" msgstr "'%(obj)s' konnte nicht kopiert werden (%(error)s)"
#: AKModel/views/manage.py:25 AKModel/views/status.py:125 #: AKModel/views/manage.py:35 AKModel/views/status.py:150
msgid "Export AK Slides" msgid "Export AK Slides"
msgstr "AK-Folien exportieren" msgstr "AK-Folien exportieren"
#: AKModel/views/manage.py:36 #: AKModel/views/manage.py:61
msgid "Symbols" msgid "Symbols"
msgstr "Symbole" msgstr "Symbole"
#: AKModel/views/manage.py:37 #: AKModel/views/manage.py:62
msgid "Who?" msgid "Who?"
msgstr "Wer?" msgstr "Wer?"
#: AKModel/views/manage.py:38 #: AKModel/views/manage.py:63
msgid "Duration(s)" msgid "Duration(s)"
msgstr "Dauer(n)" msgstr "Dauer(n)"
#: AKModel/views/manage.py:39 #: AKModel/views/manage.py:64
msgid "Reso intention?" msgid "Reso intention?"
msgstr "Resolutionsabsicht?" msgstr "Resolutionsabsicht?"
#: AKModel/views/manage.py:40 #: AKModel/views/manage.py:65
msgid "Category (for Wishes)" msgid "Category (for Wishes)"
msgstr "Kategorie (für Wünsche)" msgstr "Kategorie (für Wünsche)"
#: AKModel/views/manage.py:77 #: AKModel/views/manage.py:128
msgid "The following Constraint Violations will be marked as manually resolved" msgid "The following Constraint Violations will be marked as manually resolved"
msgstr "" msgstr ""
"Die folgenden Constraintverletzungen werden als manuell behoben markiert." "Die folgenden Constraintverletzungen werden als manuell behoben markiert."
#: AKModel/views/manage.py:78 #: AKModel/views/manage.py:129
msgid "Constraint Violations marked as resolved" msgid "Constraint Violations marked as resolved"
msgstr "Constraintverletzungen als manuell behoben markiert" msgstr "Constraintverletzungen als manuell behoben markiert"
#: AKModel/views/manage.py:87 #: AKModel/views/manage.py:141
msgid "The following Constraint Violations will be set to level 'violation'" msgid "The following Constraint Violations will be set to level 'violation'"
msgstr "" msgstr ""
"Die folgenden Constraintverletzungen werden auf das Level \"Violation\" " "Die folgenden Constraintverletzungen werden auf das Level \"Violation\" "
"gesetzt." "gesetzt."
#: AKModel/views/manage.py:88 #: AKModel/views/manage.py:142
msgid "Constraint Violations set to level 'violation'" msgid "Constraint Violations set to level 'violation'"
msgstr "Constraintverletzungen auf Level \"Violation\" gesetzt" msgstr "Constraintverletzungen auf Level \"Violation\" gesetzt"
#: AKModel/views/manage.py:97 #: AKModel/views/manage.py:154
msgid "The following Constraint Violations will be set to level 'warning'" msgid "The following Constraint Violations will be set to level 'warning'"
msgstr "" msgstr ""
"Die folgenden Constraintverletzungen werden auf das Level 'warning' gesetzt." "Die folgenden Constraintverletzungen werden auf das Level 'warning' gesetzt."
#: AKModel/views/manage.py:98 #: AKModel/views/manage.py:155
msgid "Constraint Violations set to level 'warning'" msgid "Constraint Violations set to level 'warning'"
msgstr "Constraintverletzungen auf Level \"Warning\" gesetzt" msgstr "Constraintverletzungen auf Level \"Warning\" gesetzt"
#: AKModel/views/manage.py:107 #: AKModel/views/manage.py:164
msgid "Clear schedule"
msgstr "Planung zurücksetzen"
#: AKModel/views/manage.py:166
msgid "Clear schedule. The following scheduled AKSlots will be reset"
msgstr "Die Planung (Start, Räume) der folgenden AKs wird zurückgesetzt"
#: AKModel/views/manage.py:167
msgid "Schedule cleared"
msgstr "Planung zurückgesetzt"
#: AKModel/views/manage.py:189
msgid "Publish the plan(s) of:" msgid "Publish the plan(s) of:"
msgstr "Den Plan/die Pläne veröffentlichen von:" msgstr "Den Plan/die Pläne veröffentlichen von:"
#: AKModel/views/manage.py:108 #: AKModel/views/manage.py:190
msgid "Plan published" msgid "Plan published"
msgstr "Plan veröffentlicht" msgstr "Plan veröffentlicht"
#: AKModel/views/manage.py:117 #: AKModel/views/manage.py:202
msgid "Unpublish the plan(s) of:" msgid "Unpublish the plan(s) of:"
msgstr "Den Plan/die Pläne verbergen von:" msgstr "Den Plan/die Pläne verbergen von:"
#: AKModel/views/manage.py:118 #: AKModel/views/manage.py:203
msgid "Plan unpublished" msgid "Plan unpublished"
msgstr "Plan verborgen" msgstr "Plan verborgen"
#: AKModel/views/manage.py:127 AKModel/views/status.py:109 #: AKModel/views/manage.py:215
msgid "Publish the poll(s) of:"
msgstr "Die Präferenzen-Abfrage(n) veröffentlichen von:"
#: AKModel/views/manage.py:216
msgid "Preference poll published"
msgstr "Präferenzen-Abfrage veröffentlicht"
#: AKModel/views/manage.py:228
msgid "Unpublish the preference poll(s) of:"
msgstr "Die Präferenzen-Abfrage(n) verbergen von:"
#: AKModel/views/manage.py:229
msgid "Preference poll unpublished"
msgstr "Präferenzen-Abfrage verborgen"
#: AKModel/views/manage.py:240 AKModel/views/status.py:134
msgid "Edit Default Slots" msgid "Edit Default Slots"
msgstr "Standardslots bearbeiten" msgstr "Standardslots bearbeiten"
#: AKModel/views/manage.py:164 #: AKModel/views/manage.py:278
#, python-brace-format #, python-brace-format
msgid "Could not update slot {id} since it does not belong to {event}" msgid "Could not update slot {id} since it does not belong to {event}"
msgstr "" msgstr ""
"Konnte Slot {id} nicht bearbeiten, da er nicht zum Event {event} gehört" "Konnte Slot {id} nicht bearbeiten, da er nicht zum Event {event} gehört"
#: AKModel/views/manage.py:194 #: AKModel/views/manage.py:309
#, python-brace-format #, python-brace-format
msgid "Updated {u} slot(s). created {c} new slot(s) and deleted {d} slot(s)" msgid "Updated {u} slot(s). created {c} new slot(s) and deleted {d} slot(s)"
msgstr "" msgstr ""
"{u} Slot(s) aktualisiert, {c} Slot(s) hinzugefügt und {d} Slot(s) gelöscht" "{u} Slot(s) aktualisiert, {c} Slot(s) hinzugefügt und {d} Slot(s) gelöscht"
#: AKModel/views/room.py:32 #: AKModel/views/room.py:37
#, python-format #, python-format
msgid "Created Room '%(room)s'" msgid "Created Room '%(room)s'"
msgstr "Raum '%(room)s' angelegt" msgstr "Raum '%(room)s' angelegt"
#: AKModel/views/room.py:38 AKModel/views/status.py:64 #: AKModel/views/room.py:51 AKModel/views/status.py:86
msgid "Import Rooms from CSV" msgid "Import Rooms from CSV"
msgstr "Räume aus CSV importieren" msgstr "Räume aus CSV importieren"
#: AKModel/views/room.py:73 #: AKModel/views/room.py:96
#, python-brace-format #, python-brace-format
msgid "Could not import room {name}: {e}" msgid "Could not import room {name}: {e}"
msgstr "Konnte Raum {name} nicht importieren: {e}" msgstr "Konnte Raum {name} nicht importieren: {e}"
#: AKModel/views/room.py:77 #: AKModel/views/room.py:101
#, python-brace-format #, python-brace-format
msgid "Imported {count} room(s)" msgid "Imported {count} room(s)"
msgstr "{count} Raum/Räume importiert" msgstr "{count} Raum/Räume importiert"
#: AKModel/views/room.py:79 #: AKModel/views/room.py:103
msgid "No rooms imported" msgid "No rooms imported"
msgstr "Keine Räume importiert" msgstr "Keine Räume importiert"
#: AKModel/views/status.py:14 #: AKModel/views/status.py:16
msgid "Overview" msgid "Overview"
msgstr "Überblick" msgstr "Überblick"
#: AKModel/views/status.py:24 #: AKModel/views/status.py:32
msgid "Categories" msgid "Categories"
msgstr "Kategorien" msgstr "Kategorien"
#: AKModel/views/status.py:28 #: AKModel/views/status.py:36
msgid "Add category" msgid "Add category"
msgstr "Kategorie hinzufügen" msgstr "Kategorie hinzufügen"
#: AKModel/views/status.py:48 #: AKModel/views/status.py:63
msgid "Add Room" msgid "Add Room"
msgstr "Raum hinzufügen" msgstr "Raum hinzufügen"
#: AKModel/views/status.py:98 #: AKModel/views/status.py:120
msgid "AKs requiring special attention" msgid "AKs requiring special attention"
msgstr "AKs, die besondere Aufmerksamkeit benötigen" msgstr "AKs, die besondere Aufmerksamkeit benötigen"
#: AKModel/views/status.py:102 #: AKModel/views/status.py:126
msgid "Enter Interest" msgid "Enter Interest"
msgstr "Interesse erfassen" msgstr "Interesse erfassen"
#: AKModel/views/status.py:113 #: AKModel/views/status.py:138
msgid "Manage ak tracks" msgid "Manage ak tracks"
msgstr "AK-Tracks verwalten" msgstr "AK-Tracks verwalten"
#: AKModel/views/status.py:117 #: AKModel/views/status.py:142
msgid "Export AKs as CSV" msgid "Export AKs as CSV"
msgstr "AKs als CSV exportieren" msgstr "AKs als CSV exportieren"
#: AKModel/views/status.py:121 #: AKModel/views/status.py:146
msgid "Export AKs for Wiki" msgid "Export AKs for Wiki"
msgstr "AKs im Wiki-Format exportieren" msgstr "AKs im Wiki-Format exportieren"
#: AKModel/views/status.py:146 #: AKModel/views/status.py:158
msgid "Export AKs as JSON"
msgstr "AKs als JSON exportieren"
#: AKModel/views/status.py:162
msgid "Import AK schedule from JSON"
msgstr "AK-Plan aus JSON importieren"
#: AKModel/views/status.py:190
msgid "Show AKs for requirements" msgid "Show AKs for requirements"
msgstr "Zu Anforderungen gehörige AKs anzeigen" msgstr "Zu Anforderungen gehörige AKs anzeigen"
#: AKModel/views/status.py:157 #: AKModel/views/status.py:204
msgid "Event Status" msgid "Event Status"
msgstr "Eventstatus" msgstr "Eventstatus"
#~ msgid "Messages" #~ msgid "Description of the AK"
#~ msgstr "Nachrichten" #~ msgstr "Beschreibung des AKs"
#~ msgid "Delete all messages"
#~ msgstr "Alle Nachrichten löschen"
"""
Ensure PO files are generated using forward slashes in the location comments on all operating systems
"""
import os import os
from django.core.management.commands.makemessages import Command as MakeMessagesCommand from django.core.management.commands.makemessages import Command as MakeMessagesCommand
class Command(MakeMessagesCommand): class Command(MakeMessagesCommand):
"""
Adapted version of the :class:`MakeMessagesCommand`
Ensure PO files are generated using forward slashes in the location comments on all operating systems
"""
def find_files(self, root): def find_files(self, root):
# Replace backward slashes with forward slashes if necessary in file list
all_files = super().find_files(root) all_files = super().find_files(root)
if os.sep != "\\": if os.sep != "\\":
return all_files return all_files
...@@ -21,12 +23,14 @@ class Command(MakeMessagesCommand): ...@@ -21,12 +23,14 @@ class Command(MakeMessagesCommand):
return all_files return all_files
def build_potfiles(self): def build_potfiles(self):
# Replace backward slashes with forward slashes if necessary in the files itself
pot_files = super().build_potfiles() pot_files = super().build_potfiles()
if os.sep != "\\": if os.sep != "\\":
return pot_files return pot_files
for filename in pot_files: for filename in pot_files:
lines = open(filename, "r", encoding="utf-8").readlines() with open(filename, "r", encoding="utf-8") as f:
lines = f.readlines()
fixed_lines = [] fixed_lines = []
for line in lines: for line in lines:
if line.startswith("#: "): if line.startswith("#: "):
......