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

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
Show changes
Commits on Source (5)
......@@ -54,7 +54,7 @@ class DashboardEventView(DetailView):
# Changes in plan
if apps.is_installed("AKPlan"):
if not context['event'].plan_hidden:
last_changed_slots = AKSlot.objects.filter(event=context['event']).order_by('-updated')[
last_changed_slots = AKSlot.objects.filter(event=context['event'], start__isnull=False).order_by('-updated')[
:int(settings.DASHBOARD_RECENT_MAX)]
for changed_slot in last_changed_slots:
recent_changes.append({'icon': ('clock', 'far'),
......
......@@ -9,7 +9,10 @@ from AKModel.models import Event, AKCategory, AKRequirement
class NewEventWizardStartForm(forms.ModelForm):
class Meta:
model = Event
fields = ['name', 'slug', 'timezone']
fields = ['name', 'slug', 'timezone', 'plan_hidden']
widgets = {
'plan_hidden': forms.HiddenInput(),
}
is_init = forms.BooleanField(initial=True, widget=forms.HiddenInput)
......@@ -23,7 +26,6 @@ class NewEventWizardSettingsForm(forms.ModelForm):
'slug': forms.HiddenInput(),
'timezone': forms.HiddenInput(),
'active': forms.HiddenInput(),
'plan_hidden': forms.HiddenInput(),
'start': DateTimePickerInput(options={"format": "YYYY-MM-DD HH:mm"}),
'end': DateTimePickerInput(options={"format": "YYYY-MM-DD HH:mm"}),
'reso_deadline': DateTimePickerInput(options={"format": "YYYY-MM-DD HH:mm"}),
......
......@@ -6,6 +6,7 @@
{% include "AKPlan/load_fullcalendar.html" %}
<script>
{% get_current_language as LANGUAGE_CODE %}
document.addEventListener('DOMContentLoaded', function () {
var calendarEl = document.getElementById('akSlotCalendar');
......
......@@ -22,6 +22,8 @@
{% include "AKPlan/load_fullcalendar.html" %}
{% get_current_language as LANGUAGE_CODE %}
<script>
document.addEventListener('DOMContentLoaded', function () {
var planEl = document.getElementById('planCalendar');
......
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-10-29 13:36+0000\n"
"POT-Creation-Date: 2022-08-13 18:04+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -428,39 +428,45 @@ msgstr "Event inaktiv. Hinzufügen/Bearbeiten nicht möglich."
msgid "AK successfully created"
msgstr "AK erfolgreich angelegt"
#: AKSubmission/views.py:267
#: AKSubmission/views.py:227
msgid ""
"Due to technical reasons, the link you entered was truncated to a length of "
"200 characters"
msgstr "Aus technischen Gründen wurde der eingegebeneLink auf eine Länge von 200 Zeichen gekürzt"
#: AKSubmission/views.py:272
msgid "AK successfully updated"
msgstr "AK erfolgreich aktualisiert"
#: AKSubmission/views.py:334
#: AKSubmission/views.py:339
msgid "Person Info successfully updated"
msgstr "Personen-Info erfolgreich aktualisiert"
#: AKSubmission/views.py:354
#: AKSubmission/views.py:359
msgid "No user selected"
msgstr "Keine Person ausgewählt"
#: AKSubmission/views.py:380
#: AKSubmission/views.py:385
msgid "AK Slot successfully added"
msgstr "AK-Slot erfolgreich angelegt"
#: AKSubmission/views.py:394
#: AKSubmission/views.py:399
msgid "You cannot edit a slot that has already been scheduled"
msgstr "Bereits geplante AK-Slots können nicht mehr bearbeitet werden"
#: AKSubmission/views.py:404
#: AKSubmission/views.py:409
msgid "AK Slot successfully updated"
msgstr "AK-Slot erfolgreich aktualisiert"
#: AKSubmission/views.py:417
#: AKSubmission/views.py:422
msgid "You cannot delete a slot that has already been scheduled"
msgstr "Bereits geplante AK-Slots können nicht mehr gelöscht werden"
#: AKSubmission/views.py:427
#: AKSubmission/views.py:432
msgid "AK Slot successfully deleted"
msgstr "AK-Slot erfolgreich angelegt"
#: AKSubmission/views.py:448
#: AKSubmission/views.py:454
msgid "Message to organizers successfully saved"
msgstr "Nachricht an die Organisator*innen erfolgreich gespeichert"
......
......@@ -215,16 +215,24 @@ class AKAndAKWishSubmissionView(EventSlugMixin, EventInactiveRedirectMixin, Crea
return redirect(reverse_lazy('submit:submission_overview',
kwargs={'event_slug': form.cleaned_data["event"].slug}))
super_form_valid = super().form_valid(form)
# Generate object but don't store it in the database yet
self.object = form.save(commit=False)
# Generate wiki link
if form.cleaned_data["event"].base_url:
self.object.link = form.cleaned_data["event"].base_url + form.cleaned_data["name"].replace(" ", "_")
self.object.save()
link = form.cleaned_data["event"].base_url + form.cleaned_data["name"].replace(" ", "_")
# Truncate links longer than 200 characters (default length of URL fields in django)
self.object.link = link[:200]
if len(link) > 200:
messages.add_message(self.request, messages.WARNING,
_("Due to technical reasons, the link you entered was truncated to a length of 200 characters"))
# Try to save AK and get redirect URL
super_form_valid = super().form_valid(form)
# Set tags (and generate them if necessary)
for tag_name in form.cleaned_data["tag_names"]:
tag, _ = AKTag.objects.get_or_create(name=tag_name)
tag, was_created = AKTag.objects.get_or_create(name=tag_name)
self.object.tags.add(tag)
# Generate slot(s)
......@@ -280,7 +288,7 @@ class AKEditView(EventSlugMixin, EventInactiveRedirectMixin, UpdateView):
# Set tags (and generate them if necessary)
for tag_name in form.cleaned_data["tag_names"]:
tag, _ = AKTag.objects.get_or_create(name=tag_name)
tag, was_created = AKTag.objects.get_or_create(name=tag_name)
self.object.tags.add(tag)
return super_form_valid
......
......@@ -31,4 +31,4 @@ Afterwards, you may check your setup by executing ``Utils/check.sh`` or ``Utils/
## Developer Notes
* to regenerate translations use ````python manage.py makemessages -l de_DE --ignore venv````
* to create a data backup use ````python manage.py dumpdata --indent=2 > db.json --traceback````
* to export all database items belonging to a certain event use ````.\Utils\json_export.sh <event_id> <export_prefix> [--prod]````. The results will be saved in ````backups/<export_prefix>.json````
* to export all database items belonging to a certain event use ````./Utils/json_export.sh <event_id> <export_prefix> [--prod]````. The results will be saved in ````backups/<export_prefix>.json````