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

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
  • komasolver
  • main
  • renovate/django-5.x
  • renovate/django-debug-toolbar-5.x
  • renovate/django_csp-4.x
  • renovate/djangorestframework-3.x
  • renovate/sphinxcontrib-apidoc-0.x
  • renovate/tzdata-2025.x
  • renovate/uwsgi-2.x
9 results
Show changes
Commits on Source (6)
Showing
with 357 additions and 213 deletions
...@@ -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: 2021-10-29 13:36+0000\n" "POT-Creation-Date: 2022-12-27 01:09+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
...@@ -101,6 +101,10 @@ msgstr "AK-Plan" ...@@ -101,6 +101,10 @@ msgstr "AK-Plan"
msgid "AK Submission" msgid "AK Submission"
msgstr "AK-Einreichung" msgstr "AK-Einreichung"
#: AKDashboard/templates/AKDashboard/dashboard_row.html:57
msgid "AK History"
msgstr "AK-Verlauf"
#: AKDashboard/views.py:42 #: AKDashboard/views.py:42
#, python-format #, python-format
msgid "New AK: %(ak)s." msgid "New AK: %(ak)s."
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
{% include "AKDashboard/dashboard_row.html" %} {% include "AKDashboard/dashboard_row.html" %}
{% if recent_changes|length > 0 %} {% if recent_changes|length > 0 %}
<h3 class="mt-1">{% trans "Recent" %}:</h3> <h3 class="mt-1" id="history">{% trans "Recent" %}:</h3>
<ul id="recent-changes-list"> <ul id="recent-changes-list">
{% for recent in recent_changes %} {% for recent in recent_changes %}
<li><a href="{{ recent.link }}">{% fa5_icon recent.icon.0 recent.icon.1 %} {{ recent.text }}</a> <span style="color: #999999;">{{ recent.timestamp | timezone:event.timezone | date:"d.m. H:i" }}</span></li> <li><a href="{{ recent.link }}">{% fa5_icon recent.icon.0 recent.icon.1 %} {{ recent.text }}</a> <span style="color: #999999;">{{ recent.timestamp | timezone:event.timezone | date:"d.m. H:i" }}</span></li>
......
...@@ -50,6 +50,13 @@ ...@@ -50,6 +50,13 @@
</div> </div>
</a> </a>
{% endif %} {% endif %}
<a class="dashboard-box 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 %} {% 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 }}">
......
...@@ -20,7 +20,8 @@ class AvailabilitiesFormMixin(forms.Form): ...@@ -20,7 +20,8 @@ class AvailabilitiesFormMixin(forms.Form):
availabilities = forms.CharField( availabilities = forms.CharField(
label=_('Availability'), label=_('Availability'),
help_text=_( help_text=_(
'Click and drag to mark the availability during the event, double-click to delete.' # Adapted help text '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.' # Adapted help text
), ),
widget=forms.TextInput(attrs={'class': 'availabilities-editor-data'}), widget=forms.TextInput(attrs={'class': 'availabilities-editor-data'}),
required=False, required=False,
......
...@@ -377,6 +377,7 @@ ...@@ -377,6 +377,7 @@
"notes": "", "notes": "",
"interest": -1, "interest": -1,
"interest_counter": 0, "interest_counter": 0,
"include_in_export": false,
"event": 2, "event": 2,
"owners": [ "owners": [
1 1
......
...@@ -112,7 +112,8 @@ class DefaultSlotEditorForm(AdminIntermediateForm): ...@@ -112,7 +112,8 @@ class DefaultSlotEditorForm(AdminIntermediateForm):
availabilities = forms.CharField( availabilities = forms.CharField(
label=_('Default Slots'), label=_('Default Slots'),
help_text=_( help_text=_(
'Click and drag to mark the availability during the event, double-click to delete.' # Adapted help text '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.'
), ),
widget=forms.TextInput(attrs={'class': 'availabilities-editor-data'}), widget=forms.TextInput(attrs={'class': 'availabilities-editor-data'}),
required=True, required=True,
......
# Generated by Django 3.2.16 on 2022-12-26 22:38
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('AKModel', '0054_default_slots'),
]
operations = [
migrations.AddField(
model_name='ak',
name='include_in_export',
field=models.BooleanField(default=True, help_text='Include AK in wiki export?', verbose_name='Export?'),
),
]
...@@ -92,10 +92,10 @@ class Event(models.Model): ...@@ -92,10 +92,10 @@ class Event(models.Model):
for category in categories: for category in categories:
ak_list = [] ak_list = []
for ak in category.ak_set.all(): for ak in category.ak_set.all():
if ak.wish: if filter(ak):
ak_wishes.append(ak) if ak.wish:
else: ak_wishes.append(ak)
if filter(ak): else:
ak_list.append(ak) ak_list.append(ak)
if not hide_empty_categories or len(ak_list) > 0: if not hide_empty_categories or len(ak_list) > 0:
categories_with_aks.append((category, ak_list)) categories_with_aks.append((category, ak_list))
...@@ -288,7 +288,10 @@ class AK(models.Model): ...@@ -288,7 +288,10 @@ class AK(models.Model):
event = models.ForeignKey(to=Event, on_delete=models.CASCADE, verbose_name=_('Event'), event = models.ForeignKey(to=Event, on_delete=models.CASCADE, verbose_name=_('Event'),
help_text=_('Associated event')) help_text=_('Associated event'))
history = HistoricalRecords(excluded_fields=['interest_counter']) include_in_export = models.BooleanField(default=True, verbose_name=_('Export?'),
help_text=_("Include AK in wiki export?"))
history = HistoricalRecords(excluded_fields=['interest_counter', 'include_in_export'])
class Meta: class Meta:
verbose_name = _('AK') verbose_name = _('AK')
......
...@@ -18,7 +18,8 @@ ...@@ -18,7 +18,8 @@
'{{ event.timezone }}', '{{ event.timezone }}',
'{{ LANGUAGE_CODE }}', '{{ LANGUAGE_CODE }}',
'{{ event.start | timezone:event.timezone | date:"Y-m-d H:i:s" }}', '{{ event.start | timezone:event.timezone | date:"Y-m-d H:i:s" }}',
'{{ event.end | timezone:event.timezone | date:"Y-m-d H:i:s" }}' '{{ event.end | timezone:event.timezone | date:"Y-m-d H:i:s" }}',
'00:15:00'
); );
}); });
</script> </script>
......
...@@ -110,3 +110,20 @@ class ModelViewTests(BasicViewTests, TestCase): ...@@ -110,3 +110,20 @@ class ModelViewTests(BasicViewTests, TestCase):
view_name_with_prefix, url = self._name_and_url((f'admin:AKModel_{model[1]}_change', {'object_id': m.pk})) view_name_with_prefix, url = self._name_and_url((f'admin:AKModel_{model[1]}_change', {'object_id': m.pk}))
response = self.client.get(url) response = self.client.get(url)
self.assertEqual(response.status_code, 200, msg=f"Edit form for model {model[1]} ({url}) broken") self.assertEqual(response.status_code, 200, msg=f"Edit form for model {model[1]} ({url}) broken")
def test_wiki_export(self):
self.client.force_login(self.admin_user)
export_url = reverse_lazy(f"admin:ak_wiki_export", kwargs={'slug': 'kif42'})
response = self.client.get(export_url)
self.assertEqual(response.status_code, 200, "Export not working at all")
export_count = 0
for category, aks in response.context["categories_with_aks"]:
for ak in aks:
self.assertEqual(ak.include_in_export, True, f"AK with export flag set to False (pk={ak.pk}) included in export")
self.assertNotEqual(ak.pk, 1, "AK known to be excluded from export (PK 1) included in export")
export_count += 1
self.assertEqual(export_count, AK.objects.filter(event_id=2, include_in_export=True).count(),
"Wiki export contained the wrong number of AKs")
...@@ -197,7 +197,10 @@ class AKWikiExportView(AdminViewMixin, DetailView): ...@@ -197,7 +197,10 @@ class AKWikiExportView(AdminViewMixin, DetailView):
def get_context_data(self, **kwargs): def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs) context = super().get_context_data(**kwargs)
categories_with_aks, ak_wishes = context["event"].get_categories_with_aks(wishes_seperately=True) categories_with_aks, ak_wishes = context["event"].get_categories_with_aks(
wishes_seperately=True,
filter=lambda ak: ak.include_in_export
)
context["categories_with_aks"] = [(category.name, ak_list) for category, ak_list in categories_with_aks] context["categories_with_aks"] = [(category.name, ak_list) for category, ak_list in categories_with_aks]
context["categories_with_aks"].append((_("Wishes"), ak_wishes)) context["categories_with_aks"].append((_("Wishes"), ak_wishes))
......
...@@ -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: 2022-05-22 08:02+0000\n" "POT-Creation-Date: 2022-12-27 00:42+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
...@@ -38,7 +38,7 @@ msgstr "Veranstaltung" ...@@ -38,7 +38,7 @@ msgstr "Veranstaltung"
#: AKPlan/templates/AKPlan/plan_index.html:55 #: AKPlan/templates/AKPlan/plan_index.html:55
#: AKPlan/templates/AKPlan/plan_room.html:13 #: AKPlan/templates/AKPlan/plan_room.html:13
#: AKPlan/templates/AKPlan/plan_room.html:59 #: AKPlan/templates/AKPlan/plan_room.html:59
#: AKPlan/templates/AKPlan/plan_wall.html:52 #: AKPlan/templates/AKPlan/plan_wall.html:54
msgid "Room" msgid "Room"
msgstr "Raum" msgstr "Raum"
...@@ -63,12 +63,12 @@ msgid "AK Wall" ...@@ -63,12 +63,12 @@ msgid "AK Wall"
msgstr "AK-Wall" msgstr "AK-Wall"
#: AKPlan/templates/AKPlan/plan_index.html:126 #: AKPlan/templates/AKPlan/plan_index.html:126
#: AKPlan/templates/AKPlan/plan_wall.html:116 #: AKPlan/templates/AKPlan/plan_wall.html:119
msgid "Current AKs" msgid "Current AKs"
msgstr "Aktuelle AKs" msgstr "Aktuelle AKs"
#: AKPlan/templates/AKPlan/plan_index.html:133 #: AKPlan/templates/AKPlan/plan_index.html:133
#: AKPlan/templates/AKPlan/plan_wall.html:121 #: AKPlan/templates/AKPlan/plan_wall.html:124
msgid "Next AKs" msgid "Next AKs"
msgstr "Nächste AKs" msgstr "Nächste AKs"
...@@ -99,7 +99,7 @@ msgstr "Eigenschaften" ...@@ -99,7 +99,7 @@ msgstr "Eigenschaften"
msgid "Track" msgid "Track"
msgstr "Track" msgstr "Track"
#: AKPlan/templates/AKPlan/plan_wall.html:131 #: AKPlan/templates/AKPlan/plan_wall.html:134
msgid "Reload page automatically?" msgid "Reload page automatically?"
msgstr "Seite automatisch neu laden?" msgstr "Seite automatisch neu laden?"
......
...@@ -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: 2021-10-29 13:36+0000\n" "POT-Creation-Date: 2022-12-27 00:42+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
...@@ -17,10 +17,10 @@ msgstr "" ...@@ -17,10 +17,10 @@ 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"
#: AKPlanning/settings.py:144 #: AKPlanning/settings.py:146
msgid "German" msgid "German"
msgstr "Deutsch" msgstr "Deutsch"
#: AKPlanning/settings.py:145 #: AKPlanning/settings.py:147
msgid "English" msgid "English"
msgstr "Englisch" msgstr "Englisch"
...@@ -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: 2022-11-29 00:13+0100\n" "POT-Creation-Date: 2022-12-27 00:42+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
...@@ -41,13 +41,13 @@ msgstr "" ...@@ -41,13 +41,13 @@ msgstr ""
#: AKScheduling/templates/admin/AKScheduling/constraint_violations.html:44 #: AKScheduling/templates/admin/AKScheduling/constraint_violations.html:44
#: AKScheduling/templates/admin/AKScheduling/constraint_violations.html:100 #: AKScheduling/templates/admin/AKScheduling/constraint_violations.html:100
#: AKScheduling/templates/admin/AKScheduling/scheduling.html:214 #: AKScheduling/templates/admin/AKScheduling/scheduling.html:222
#: AKScheduling/templates/admin/AKScheduling/scheduling.html:293 #: AKScheduling/templates/admin/AKScheduling/scheduling.html:360
msgid "No violations" msgid "No violations"
msgstr "Keine Verletzungen" msgstr "Keine Verletzungen"
#: AKScheduling/templates/admin/AKScheduling/constraint_violations.html:77 #: AKScheduling/templates/admin/AKScheduling/constraint_violations.html:77
#: AKScheduling/templates/admin/AKScheduling/scheduling.html:264 #: AKScheduling/templates/admin/AKScheduling/scheduling.html:331
msgid "Violation(s)" msgid "Violation(s)"
msgstr "Verletzung(en)" msgstr "Verletzung(en)"
...@@ -60,12 +60,12 @@ msgid "Reload now" ...@@ -60,12 +60,12 @@ msgid "Reload now"
msgstr "Jetzt neu laden" msgstr "Jetzt neu laden"
#: AKScheduling/templates/admin/AKScheduling/constraint_violations.html:90 #: AKScheduling/templates/admin/AKScheduling/constraint_violations.html:90
#: AKScheduling/templates/admin/AKScheduling/scheduling.html:200 #: AKScheduling/templates/admin/AKScheduling/scheduling.html:211
msgid "Violation" msgid "Violation"
msgstr "Verletzung" msgstr "Verletzung"
#: AKScheduling/templates/admin/AKScheduling/constraint_violations.html:91 #: AKScheduling/templates/admin/AKScheduling/constraint_violations.html:91
#: AKScheduling/templates/admin/AKScheduling/scheduling.html:287 #: AKScheduling/templates/admin/AKScheduling/scheduling.html:354
msgid "Problem" msgid "Problem"
msgstr "Problem" msgstr "Problem"
...@@ -79,7 +79,7 @@ msgstr "Seit" ...@@ -79,7 +79,7 @@ msgstr "Seit"
#: AKScheduling/templates/admin/AKScheduling/constraint_violations.html:106 #: AKScheduling/templates/admin/AKScheduling/constraint_violations.html:106
#: AKScheduling/templates/admin/AKScheduling/manage_tracks.html:243 #: AKScheduling/templates/admin/AKScheduling/manage_tracks.html:243
#: AKScheduling/templates/admin/AKScheduling/scheduling.html:250 #: AKScheduling/templates/admin/AKScheduling/scheduling.html:317
#: AKScheduling/templates/admin/AKScheduling/special_attention.html:48 #: AKScheduling/templates/admin/AKScheduling/special_attention.html:48
#: AKScheduling/templates/admin/AKScheduling/unscheduled.html:34 #: AKScheduling/templates/admin/AKScheduling/unscheduled.html:34
msgid "Event Status" msgid "Event Status"
...@@ -95,7 +95,7 @@ msgstr "Abschicken" ...@@ -95,7 +95,7 @@ msgstr "Abschicken"
#: AKScheduling/templates/admin/AKScheduling/manage_tracks.html:11 #: AKScheduling/templates/admin/AKScheduling/manage_tracks.html:11
#: AKScheduling/templates/admin/AKScheduling/scheduling.html:19 #: AKScheduling/templates/admin/AKScheduling/scheduling.html:19
#: AKScheduling/templates/admin/AKScheduling/scheduling.html:247 #: AKScheduling/templates/admin/AKScheduling/scheduling.html:314
msgid "Scheduling for" msgid "Scheduling for"
msgstr "Scheduling für" msgstr "Scheduling für"
...@@ -147,15 +147,35 @@ msgstr "Event (horizontal)" ...@@ -147,15 +147,35 @@ msgstr "Event (horizontal)"
msgid "Event (Vertical)" msgid "Event (Vertical)"
msgstr "Event (vertikal)" msgstr "Event (vertikal)"
#: AKScheduling/templates/admin/AKScheduling/scheduling.html:147 #: AKScheduling/templates/admin/AKScheduling/scheduling.html:157
msgid "Room" msgid "Room"
msgstr "Raum" msgstr "Raum"
#: AKScheduling/templates/admin/AKScheduling/scheduling.html:261 #: AKScheduling/templates/admin/AKScheduling/scheduling.html:253
msgid "Please choose AK"
msgstr "Bitte AK auswählen"
#: AKScheduling/templates/admin/AKScheduling/scheduling.html:273
msgid "Could not create slot"
msgstr "Konnte Slot nicht anlegen"
#: AKScheduling/templates/admin/AKScheduling/scheduling.html:289
msgid "Add slot"
msgstr "Slot hinzufügen"
#: AKScheduling/templates/admin/AKScheduling/scheduling.html:300
msgid "Add"
msgstr "Hinzufügen"
#: AKScheduling/templates/admin/AKScheduling/scheduling.html:301
msgid "Cancel"
msgstr "Abbrechen"
#: AKScheduling/templates/admin/AKScheduling/scheduling.html:328
msgid "Unscheduled" msgid "Unscheduled"
msgstr "Nicht gescheduled" msgstr "Nicht gescheduled"
#: AKScheduling/templates/admin/AKScheduling/scheduling.html:286 #: AKScheduling/templates/admin/AKScheduling/scheduling.html:353
msgid "Level" msgid "Level"
msgstr "Level" msgstr "Level"
...@@ -191,19 +211,19 @@ msgstr "Noch nicht geschedulte AK-Slots" ...@@ -191,19 +211,19 @@ msgstr "Noch nicht geschedulte AK-Slots"
msgid "Count" msgid "Count"
msgstr "Anzahl" msgstr "Anzahl"
#: AKScheduling/views.py:109 #: AKScheduling/views.py:112
msgid "Interest updated" msgid "Interest updated"
msgstr "Interesse aktualisiert" msgstr "Interesse aktualisiert"
#: AKScheduling/views.py:154 #: AKScheduling/views.py:157
msgid "Wishes" msgid "Wishes"
msgstr "Wünsche" msgstr "Wünsche"
#: AKScheduling/views.py:162 #: AKScheduling/views.py:165
msgid "Cleanup: Delete unscheduled slots for wishes" msgid "Cleanup: Delete unscheduled slots for wishes"
msgstr "Aufräumen: Noch nicht geplante Slots für Wünsche löschen" msgstr "Aufräumen: Noch nicht geplante Slots für Wünsche löschen"
#: AKScheduling/views.py:169 #: AKScheduling/views.py:172
#, python-brace-format #, python-brace-format
msgid "" msgid ""
"The following {count} unscheduled slots of wishes will be deleted:\n" "The following {count} unscheduled slots of wishes will be deleted:\n"
...@@ -215,15 +235,15 @@ msgstr "" ...@@ -215,15 +235,15 @@ msgstr ""
"\n" "\n"
" {slots}" " {slots}"
#: AKScheduling/views.py:176 #: AKScheduling/views.py:179
msgid "Unscheduled slots for wishes successfully deleted" msgid "Unscheduled slots for wishes successfully deleted"
msgstr "Noch nicht geplante Slots für Wünsche erfolgreich gelöscht" msgstr "Noch nicht geplante Slots für Wünsche erfolgreich gelöscht"
#: AKScheduling/views.py:181 #: AKScheduling/views.py:184
msgid "Create default availabilities for AKs" msgid "Create default availabilities for AKs"
msgstr "Standardverfügbarkeiten für AKs anlegen" msgstr "Standardverfügbarkeiten für AKs anlegen"
#: AKScheduling/views.py:188 #: AKScheduling/views.py:191
#, python-brace-format #, python-brace-format
msgid "" msgid ""
"The following {count} AKs don't have any availability information. Create " "The following {count} AKs don't have any availability information. Create "
...@@ -236,15 +256,18 @@ msgstr "" ...@@ -236,15 +256,18 @@ msgstr ""
"\n" "\n"
" {aks}" " {aks}"
#: AKScheduling/views.py:206 #: AKScheduling/views.py:209
#, python-brace-format #, python-brace-format
msgid "Could not create default availabilities for AK: {ak}" msgid "Could not create default availabilities for AK: {ak}"
msgstr "Konnte keine Verfügbarkeit anlegen für AK: {ak}" msgstr "Konnte keine Verfügbarkeit anlegen für AK: {ak}"
#: AKScheduling/views.py:211 #: AKScheduling/views.py:214
#, python-brace-format #, python-brace-format
msgid "Created default availabilities for {count} AKs" msgid "Created default availabilities for {count} AKs"
msgstr "Standardverfügbarkeiten für {count} AKs angelegt" msgstr "Standardverfügbarkeiten für {count} AKs angelegt"
#~ msgid "Bitte AK auswählen"
#~ msgstr "Please sel"
#~ msgid "Cannot load current violations from server" #~ msgid "Cannot load current violations from server"
#~ msgstr "Kann die aktuellen Verletzungen nicht vom Server laden" #~ msgstr "Kann die aktuellen Verletzungen nicht vom Server laden"
...@@ -250,7 +250,7 @@ ...@@ -250,7 +250,7 @@
function addSlot() { function addSlot() {
let ak = $('#id_ak').val(); let ak = $('#id_ak').val();
if(ak === "") { if(ak === "") {
alert("{% trans "Bitte AK auswählen" %}"); alert("{% trans "Please choose AK" %}");
} }
else { else {
$.ajax({ $.ajax({
......
...@@ -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: 2022-11-26 23:16+0100\n" "POT-Creation-Date: 2023-01-01 16:07+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
...@@ -38,6 +38,33 @@ msgstr "" ...@@ -38,6 +38,33 @@ msgstr ""
"Mindestens eine geplante Dauer (in Stunden) angeben. Wenn der AK mehrere " "Mindestens eine geplante Dauer (in Stunden) angeben. Wenn der AK mehrere "
"Slots haben soll, mehrere Zeilen verwenden" "Slots haben soll, mehrere Zeilen verwenden"
#: AKSubmission/forms.py:192
#: AKSubmission/templates/AKSubmission/ak_detail.html:315
msgid "Start"
msgstr "Start"
#: AKSubmission/forms.py:193
#: AKSubmission/templates/AKSubmission/ak_detail.html:316
msgid "End"
msgstr "Ende"
#: AKSubmission/forms.py:194
#: AKSubmission/templates/AKSubmission/ak_detail.html:245
#: AKSubmission/templates/AKSubmission/akslot_delete.html:35
msgid "Duration"
msgstr "Dauer"
#: AKSubmission/forms.py:195
#: AKSubmission/templates/AKSubmission/ak_detail.html:247
msgid "Room"
msgstr "Raum"
#: AKSubmission/forms.py:199
#: AKSubmission/templates/AKSubmission/ak_history.html:11
#: AKSubmission/templates/AKSubmission/akslot_delete.html:31
msgid "AK"
msgstr "AK"
#: AKSubmission/templates/AKSubmission/ak_detail.html:22 #: AKSubmission/templates/AKSubmission/ak_detail.html:22
#: AKSubmission/templates/AKSubmission/ak_edit.html:13 #: AKSubmission/templates/AKSubmission/ak_edit.html:13
#: AKSubmission/templates/AKSubmission/ak_history.html:16 #: AKSubmission/templates/AKSubmission/ak_history.html:16
...@@ -197,15 +224,6 @@ msgstr "Notizen" ...@@ -197,15 +224,6 @@ msgstr "Notizen"
msgid "When?" msgid "When?"
msgstr "Wann?" msgstr "Wann?"
#: AKSubmission/templates/AKSubmission/ak_detail.html:245
#: AKSubmission/templates/AKSubmission/akslot_delete.html:35
msgid "Duration"
msgstr "Dauer"
#: AKSubmission/templates/AKSubmission/ak_detail.html:247
msgid "Room"
msgstr "Raum"
#: AKSubmission/templates/AKSubmission/ak_detail.html:278 #: AKSubmission/templates/AKSubmission/ak_detail.html:278
msgid "Delete" msgid "Delete"
msgstr "Löschen" msgstr "Löschen"
...@@ -222,14 +240,6 @@ msgstr "Einen neuen AK-Slot hinzufügen" ...@@ -222,14 +240,6 @@ msgstr "Einen neuen AK-Slot hinzufügen"
msgid "Possible Times" msgid "Possible Times"
msgstr "Mögliche Zeiten" msgstr "Mögliche Zeiten"
#: AKSubmission/templates/AKSubmission/ak_detail.html:315
msgid "Start"
msgstr "Start"
#: AKSubmission/templates/AKSubmission/ak_detail.html:316
msgid "End"
msgstr "Ende"
#: AKSubmission/templates/AKSubmission/ak_edit.html:8 #: AKSubmission/templates/AKSubmission/ak_edit.html:8
#: AKSubmission/templates/AKSubmission/ak_history.html:11 #: AKSubmission/templates/AKSubmission/ak_history.html:11
#: AKSubmission/templates/AKSubmission/ak_overview.html:8 #: AKSubmission/templates/AKSubmission/ak_overview.html:8
...@@ -248,14 +258,16 @@ msgid "AKs" ...@@ -248,14 +258,16 @@ msgid "AKs"
msgstr "AKs" msgstr "AKs"
#: AKSubmission/templates/AKSubmission/ak_edit.html:8 #: AKSubmission/templates/AKSubmission/ak_edit.html:8
#: AKSubmission/templates/AKSubmission/ak_edit.html:21 #: AKSubmission/templates/AKSubmission/ak_edit.html:32
msgid "Edit AK" msgid "Edit AK"
msgstr "AK bearbeiten" msgstr "AK bearbeiten"
#: AKSubmission/templates/AKSubmission/ak_history.html:11 #: AKSubmission/templates/AKSubmission/ak_edit.html:24
#: AKSubmission/templates/AKSubmission/akslot_delete.html:31 msgid ""
msgid "AK" "Add person not in the list yet. Unsaved changes in this form will be lost."
msgstr "AK" msgstr ""
"Person hinzufügen, die noch nicht in der Liste ist. Ungespeicherte "
"Änderungen in diesem Formular gehen verloren."
#: AKSubmission/templates/AKSubmission/ak_history.html:27 #: AKSubmission/templates/AKSubmission/ak_history.html:27
msgid "Back" msgid "Back"
...@@ -311,7 +323,7 @@ msgstr "Senden" ...@@ -311,7 +323,7 @@ msgstr "Senden"
#: AKSubmission/templates/AKSubmission/akmessage_add.html:32 #: AKSubmission/templates/AKSubmission/akmessage_add.html:32
#: AKSubmission/templates/AKSubmission/akowner_create_update.html:27 #: AKSubmission/templates/AKSubmission/akowner_create_update.html:27
#: AKSubmission/templates/AKSubmission/akslot_add_update.html:30 #: AKSubmission/templates/AKSubmission/akslot_add_update.html:30
#: AKSubmission/templates/AKSubmission/submit_new.html:54 #: AKSubmission/templates/AKSubmission/submit_new.html:56
msgid "Reset Form" msgid "Reset Form"
msgstr "Formular leeren" msgstr "Formular leeren"
...@@ -319,7 +331,7 @@ msgstr "Formular leeren" ...@@ -319,7 +331,7 @@ msgstr "Formular leeren"
#: AKSubmission/templates/AKSubmission/akowner_create_update.html:31 #: AKSubmission/templates/AKSubmission/akowner_create_update.html:31
#: AKSubmission/templates/AKSubmission/akslot_add_update.html:34 #: AKSubmission/templates/AKSubmission/akslot_add_update.html:34
#: AKSubmission/templates/AKSubmission/akslot_delete.html:46 #: AKSubmission/templates/AKSubmission/akslot_delete.html:46
#: AKSubmission/templates/AKSubmission/submit_new.html:58 #: AKSubmission/templates/AKSubmission/submit_new.html:60
msgid "Cancel" msgid "Cancel"
msgstr "Abbrechen" msgstr "Abbrechen"
...@@ -402,7 +414,7 @@ msgstr "" ...@@ -402,7 +414,7 @@ msgstr ""
"Dieses Event is nicht aktiv. Es können keine AKs hinzugefügt oder bearbeitet " "Dieses Event is nicht aktiv. Es können keine AKs hinzugefügt oder bearbeitet "
"werden" "werden"
#: AKSubmission/templates/AKSubmission/submit_new.html:50 #: AKSubmission/templates/AKSubmission/submit_new.html:52
msgid "Submit" msgid "Submit"
msgstr "Eintragen" msgstr "Eintragen"
...@@ -432,35 +444,40 @@ msgstr "AK erfolgreich angelegt" ...@@ -432,35 +444,40 @@ msgstr "AK erfolgreich angelegt"
msgid "AK successfully updated" msgid "AK successfully updated"
msgstr "AK erfolgreich aktualisiert" msgstr "AK erfolgreich aktualisiert"
#: AKSubmission/views.py:344 #: AKSubmission/views.py:310
#, python-brace-format
msgid "Added '{owner}' as new owner of '{ak.name}'"
msgstr "'{owner}' als neue Leitung von '{ak.name}' hinzugefügt"
#: AKSubmission/views.py:351
msgid "Person Info successfully updated" msgid "Person Info successfully updated"
msgstr "Personen-Info erfolgreich aktualisiert" msgstr "Personen-Info erfolgreich aktualisiert"
#: AKSubmission/views.py:364 #: AKSubmission/views.py:371
msgid "No user selected" msgid "No user selected"
msgstr "Keine Person ausgewählt" msgstr "Keine Person ausgewählt"
#: AKSubmission/views.py:391 #: AKSubmission/views.py:398
msgid "AK Slot successfully added" msgid "AK Slot successfully added"
msgstr "AK-Slot erfolgreich angelegt" msgstr "AK-Slot erfolgreich angelegt"
#: AKSubmission/views.py:405 #: AKSubmission/views.py:412
msgid "You cannot edit a slot that has already been scheduled" msgid "You cannot edit a slot that has already been scheduled"
msgstr "Bereits geplante AK-Slots können nicht mehr bearbeitet werden" msgstr "Bereits geplante AK-Slots können nicht mehr bearbeitet werden"
#: AKSubmission/views.py:415 #: AKSubmission/views.py:422
msgid "AK Slot successfully updated" msgid "AK Slot successfully updated"
msgstr "AK-Slot erfolgreich aktualisiert" msgstr "AK-Slot erfolgreich aktualisiert"
#: AKSubmission/views.py:428 #: AKSubmission/views.py:435
msgid "You cannot delete a slot that has already been scheduled" msgid "You cannot delete a slot that has already been scheduled"
msgstr "Bereits geplante AK-Slots können nicht mehr gelöscht werden" msgstr "Bereits geplante AK-Slots können nicht mehr gelöscht werden"
#: AKSubmission/views.py:438 #: AKSubmission/views.py:445
msgid "AK Slot successfully deleted" msgid "AK Slot successfully deleted"
msgstr "AK-Slot erfolgreich angelegt" msgstr "AK-Slot erfolgreich angelegt"
#: AKSubmission/views.py:460 #: AKSubmission/views.py:467
msgid "Message to organizers successfully saved" msgid "Message to organizers successfully saved"
msgstr "Nachricht an die Organisator*innen erfolgreich gespeichert" msgstr "Nachricht an die Organisator*innen erfolgreich gespeichert"
......
...@@ -16,6 +16,17 @@ ...@@ -16,6 +16,17 @@
<li class="breadcrumb-item active">{% trans "Edit" %}</li> <li class="breadcrumb-item active">{% trans "Edit" %}</li>
{% endblock %} {% endblock %}
{% block form_contents %}
{% bootstrap_field form.name %}
<div class="form-group">
{% bootstrap_field form.owners form_group_class="" %}
<a href="{% url 'submit:akowner_create' event_slug=event.slug %}?add_to_existing_ak={{ ak.pk }}">
{% fa5_icon "plus" "fas" %} {% trans "Add person not in the list yet. Unsaved changes in this form will be lost." %}
</a>
</div>
{% bootstrap_form form exclude='name,owners' %}
{% endblock %}
{% block headline %} {% block headline %}
<h2>{% trans 'Edit AK' %}</h2> <h2>{% trans 'Edit AK' %}</h2>
......
...@@ -44,7 +44,9 @@ ...@@ -44,7 +44,9 @@
<h2>{% trans 'New AK' %}</h2> <h2>{% trans 'New AK' %}</h2>
{% endblock %} {% endblock %}
<form method="POST" class="post-form">{% csrf_token %} <form method="POST" class="post-form">{% csrf_token %}
{% bootstrap_form form %} {% block form_contents %}
{% bootstrap_form form %}
{% endblock %}
{% buttons %} {% buttons %}
<button type="submit" class="save btn btn-primary float-right"> <button type="submit" class="save btn btn-primary float-right">
{% fa5_icon "check" 'fas' %} {% trans "Submit" %} {% fa5_icon "check" 'fas' %} {% trans "Submit" %}
......
...@@ -159,4 +159,21 @@ class ModelViewTests(BasicViewTests, TestCase): ...@@ -159,4 +159,21 @@ class ModelViewTests(BasicViewTests, TestCase):
response = self.client.post(invalid_interest_api_url) response = self.client.post(invalid_interest_api_url)
self.assertEqual(response.status_code, 404, f"Invalid URL reachable ({interest_api_url})") self.assertEqual(response.status_code, 404, f"Invalid URL reachable ({interest_api_url})")
def test_adding_of_unknown_user(self):
detail_url = reverse_lazy(f"{self.APP_NAME}:ak_detail", kwargs={'event_slug': 'kif42', 'pk': 1})
response = self.client.get(detail_url)
self.assertEqual(response.status_code, 200, msg="Could not load ak detail view")
edit_url = reverse_lazy(f"{self.APP_NAME}:ak_edit", kwargs={'event_slug': 'kif42', 'pk': 1})
response = self.client.get(edit_url)
self.assertEqual(response.status_code, 200, msg="Could not load ak detail view")
self.assertContains(response, "Add person not in the list yet",
msg_prefix="Link to add unknown user not contained")
self.assertEqual(AK.objects.get(pk=1).owners.count(), 1)
add_new_user_to_ak_url = reverse_lazy(f"{self.APP_NAME}:akowner_create", kwargs={'event_slug': 'kif42'}) + f"?add_to_existing_ak=1"
response = self.client.post(add_new_user_to_ak_url, {'name': 'New test owner', 'event': Event.get_by_slug('kif42').pk})
self.assertRedirects(response, detail_url,
msg_prefix=f"No correct redirect: {add_new_user_to_ak_url} (POST) -> {detail_url}")
self._assert_message(response, "Added 'New test owner' as new owner of 'Test AK Inhalt'")
self.assertEqual(AK.objects.get(pk=1).owners.count(), 2)