Skip to content
Snippets Groups Projects
Commit efecf354 authored by Nadja Geisler's avatar Nadja Geisler :sunny:
Browse files

Merge branch 'remove-tags' into 'main'

Remove Tags

Closes #164

See merge request !155
parents a1fbe248 34bf41bb
No related branches found
No related tags found
1 merge request!155Remove Tags
Pipeline #128854 passed
Showing
with 217 additions and 336 deletions
...@@ -15,7 +15,7 @@ from simple_history.admin import SimpleHistoryAdmin ...@@ -15,7 +15,7 @@ from simple_history.admin import SimpleHistoryAdmin
from AKModel.availability.forms import AvailabilitiesFormMixin from AKModel.availability.forms import AvailabilitiesFormMixin
from AKModel.availability.models import Availability from AKModel.availability.models import Availability
from AKModel.models import Event, AKOwner, AKCategory, AKTrack, AKTag, AKRequirement, AK, AKSlot, Room, AKOrgaMessage, \ from AKModel.models import Event, AKOwner, AKCategory, AKTrack, AKRequirement, AK, AKSlot, Room, AKOrgaMessage, \
ConstraintViolation, DefaultSlot ConstraintViolation, DefaultSlot
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 import CVMarkResolvedView, CVSetLevelViolationView, CVSetLevelWarningView, AKResetInterestView, \ from AKModel.views import CVMarkResolvedView, CVSetLevelViolationView, CVSetLevelWarningView, AKResetInterestView, \
...@@ -134,15 +134,6 @@ class AKTrackAdmin(admin.ModelAdmin): ...@@ -134,15 +134,6 @@ class AKTrackAdmin(admin.ModelAdmin):
return super(AKTrackAdmin, self).formfield_for_foreignkey(db_field, request, **kwargs) return super(AKTrackAdmin, self).formfield_for_foreignkey(db_field, request, **kwargs)
@admin.register(AKTag)
class AKTagAdmin(admin.ModelAdmin):
model = AKTag
list_display = ['name']
list_filter = []
list_editable = []
ordering = ['name']
@admin.register(AKRequirement) @admin.register(AKRequirement)
class AKRequirementAdmin(admin.ModelAdmin): class AKRequirementAdmin(admin.ModelAdmin):
model = AKRequirement model = AKRequirement
......
...@@ -153,13 +153,6 @@ ...@@ -153,13 +153,6 @@
"event": 2 "event": 2
} }
}, },
{
"model": "AKModel.aktag",
"pk": 1,
"fields": {
"name": "metametameta"
}
},
{ {
"model": "AKModel.akrequirement", "model": "AKModel.akrequirement",
"pk": 1, "pk": 1,
...@@ -382,7 +375,6 @@ ...@@ -382,7 +375,6 @@
"owners": [ "owners": [
1 1
], ],
"tags": [],
"requirements": [ "requirements": [
3 3
], ],
...@@ -410,9 +402,6 @@ ...@@ -410,9 +402,6 @@
"owners": [ "owners": [
2 2
], ],
"tags": [
1
],
"requirements": [], "requirements": [],
"conflicts": [], "conflicts": [],
"prerequisites": [] "prerequisites": []
...@@ -436,7 +425,6 @@ ...@@ -436,7 +425,6 @@
"interest_counter": 0, "interest_counter": 0,
"event": 2, "event": 2,
"owners": [], "owners": [],
"tags": [],
"requirements": [ "requirements": [
4 4
], ],
......
This diff is collapsed.
# Generated by Django 3.2.16 on 2023-01-01 18:47
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('AKModel', '0055_ak_export'),
]
operations = [
migrations.RemoveField(
model_name='ak',
name='tags',
),
migrations.DeleteModel(
name='AKTag',
),
]
...@@ -212,20 +212,6 @@ class AKTrack(models.Model): ...@@ -212,20 +212,6 @@ class AKTrack(models.Model):
return self.name return self.name
class AKTag(models.Model):
""" An AKTag is a keyword given to an AK by (one of) its owner(s).
"""
name = models.CharField(max_length=64, unique=True, verbose_name=_('Name'), help_text=_('Name of the AK Tag'))
class Meta:
verbose_name = _('AK Tag')
verbose_name_plural = _('AK Tags')
ordering = ['name']
def __str__(self):
return self.name
class AKRequirement(models.Model): class AKRequirement(models.Model):
""" An AKRequirement describes something needed to hold an AK, e.g. infrastructure. """ An AKRequirement describes something needed to hold an AK, e.g. infrastructure.
""" """
...@@ -261,7 +247,6 @@ class AK(models.Model): ...@@ -261,7 +247,6 @@ class AK(models.Model):
category = models.ForeignKey(to=AKCategory, on_delete=models.PROTECT, verbose_name=_('Category'), category = models.ForeignKey(to=AKCategory, on_delete=models.PROTECT, verbose_name=_('Category'),
help_text=_('Category of the AK')) help_text=_('Category of the AK'))
tags = models.ManyToManyField(to=AKTag, blank=True, verbose_name=_('Tags'), help_text=_('Tags provided by owners'))
track = models.ForeignKey(to=AKTrack, blank=True, on_delete=models.SET_NULL, null=True, verbose_name=_('Track'), track = models.ForeignKey(to=AKTrack, blank=True, on_delete=models.SET_NULL, null=True, verbose_name=_('Track'),
help_text=_('Track the AK belongs to')) help_text=_('Track the AK belongs to'))
...@@ -324,10 +309,6 @@ class AK(models.Model): ...@@ -324,10 +309,6 @@ class AK(models.Model):
def durations_list(self): def durations_list(self):
return ", ".join(str(slot.duration_simplified) for slot in self.akslot_set.all()) return ", ".join(str(slot.duration_simplified) for slot in self.akslot_set.all())
@property
def tags_list(self):
return ", ".join(str(tag) for tag in self.tags.all())
@property @property
def wish(self): def wish(self):
return self.owners.count() == 0 return self.owners.count() == 0
......
...@@ -210,7 +210,7 @@ ...@@ -210,7 +210,7 @@
<div class="card-body"> <div class="card-body">
<ul data-id="None" data-sync="false" class="ak-list"> <ul data-id="None" data-sync="false" class="ak-list">
{% for ak in aks_without_track %} {% for ak in aks_without_track %}
<li data-ak-id="{{ ak.pk }}" data-toggle="tooltip" data-placement="top" title="" data-title="{{ ak.tags_list }}"> <li data-ak-id="{{ ak.pk }}" data-toggle="tooltip" data-placement="top" title=""">
{{ ak.name }} ({{ ak.category }}) {{ ak.name }} ({{ ak.category }})
</li> </li>
{% endfor %} {% endfor %}
...@@ -229,7 +229,7 @@ ...@@ -229,7 +229,7 @@
<div class="card-body"> <div class="card-body">
<ul data-track-id="{{ track.pk }}" data-name="{{ track }}" data-sync="true" class="ak-list"> <ul data-track-id="{{ track.pk }}" data-name="{{ track }}" data-sync="true" class="ak-list">
{% for ak in track.ak_set.all %} {% for ak in track.ak_set.all %}
<li data-ak-id="{{ ak.pk }}" data-toggle="tooltip" data-placement="top" title="" data-title="{{ ak.tags_list }}"> <li data-ak-id="{{ ak.pk }}" data-toggle="tooltip" data-placement="top" title="">
{{ ak.name }} ({{ ak.category }}) {{ ak.name }} ({{ ak.category }})
</li> </li>
{% endfor %} {% endfor %}
......
...@@ -46,14 +46,6 @@ class AKForm(AvailabilitiesFormMixin, forms.ModelForm): ...@@ -46,14 +46,6 @@ class AKForm(AvailabilitiesFormMixin, forms.ModelForm):
self.fields["conflicts"].widget.attrs = {'class': 'chosen-select'} self.fields["conflicts"].widget.attrs = {'class': 'chosen-select'}
self.fields["prerequisites"].widget.attrs = {'class': 'chosen-select'} self.fields["prerequisites"].widget.attrs = {'class': 'chosen-select'}
help_tags_addition = _('Separate multiple tags with comma or semicolon')
# Add text fields for tags
self.fields["tags_raw"] = forms.CharField(
required=False,
label=AK.tags.field.verbose_name,
help_text=f"{AK.tags.field.help_text} ({help_tags_addition})")
self.fields['category'].queryset = AKCategory.objects.filter(event=self.initial.get('event')) self.fields['category'].queryset = AKCategory.objects.filter(event=self.initial.get('event'))
self.fields['requirements'].queryset = AKRequirement.objects.filter(event=self.initial.get('event')) self.fields['requirements'].queryset = AKRequirement.objects.filter(event=self.initial.get('event'))
self.fields['prerequisites'].queryset = AK.objects.filter(event=self.initial.get('event')).exclude( self.fields['prerequisites'].queryset = AK.objects.filter(event=self.initial.get('event')).exclude(
...@@ -142,15 +134,6 @@ class AKSubmissionForm(AKForm): ...@@ -142,15 +134,6 @@ class AKSubmissionForm(AKForm):
return availabilities return availabilities
class AKEditForm(AKForm):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
# Add existing tags to tag raw field
self.fields["tags_raw"].initial = "; ".join(str(tag) for tag in self.instance.tags.all())
class AKWishForm(AKForm): class AKWishForm(AKForm):
class Meta(AKForm.Meta): class Meta(AKForm.Meta):
exclude = ['owners', 'link', 'protocol_link'] exclude = ['owners', 'link', 'protocol_link']
......
...@@ -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-01-01 16:07+0100\n" "POT-Creation-Date: 2023-01-01 20:05+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,20 +17,16 @@ msgstr "" ...@@ -17,20 +17,16 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#: AKSubmission/forms.py:49 #: AKSubmission/forms.py:71
msgid "Separate multiple tags with comma or semicolon"
msgstr "Mehrere Tags mit Komma oder Semikolon trennen"
#: AKSubmission/forms.py:79
#, python-format #, python-format
msgid "\"%(duration)s\" is not a valid duration" msgid "\"%(duration)s\" is not a valid duration"
msgstr "\"%(duration)s\" ist keine gültige Dauer" msgstr "\"%(duration)s\" ist keine gültige Dauer"
#: AKSubmission/forms.py:130 #: AKSubmission/forms.py:122
msgid "Duration(s)" msgid "Duration(s)"
msgstr "Dauer(n)" msgstr "Dauer(n)"
#: AKSubmission/forms.py:132 #: AKSubmission/forms.py:124
msgid "" msgid ""
"Enter at least one planned duration (in hours). If your AK should have " "Enter at least one planned duration (in hours). If your AK should have "
"multiple slots, use multiple lines" "multiple slots, use multiple lines"
...@@ -38,28 +34,28 @@ msgstr "" ...@@ -38,28 +34,28 @@ 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/forms.py:179
#: AKSubmission/templates/AKSubmission/ak_detail.html:315 #: AKSubmission/templates/AKSubmission/ak_detail.html:309
msgid "Start" msgid "Start"
msgstr "Start" msgstr "Start"
#: AKSubmission/forms.py:193 #: AKSubmission/forms.py:180
#: AKSubmission/templates/AKSubmission/ak_detail.html:316 #: AKSubmission/templates/AKSubmission/ak_detail.html:310
msgid "End" msgid "End"
msgstr "Ende" msgstr "Ende"
#: AKSubmission/forms.py:194 #: AKSubmission/forms.py:181
#: AKSubmission/templates/AKSubmission/ak_detail.html:245 #: AKSubmission/templates/AKSubmission/ak_detail.html:239
#: AKSubmission/templates/AKSubmission/akslot_delete.html:35 #: AKSubmission/templates/AKSubmission/akslot_delete.html:35
msgid "Duration" msgid "Duration"
msgstr "Dauer" msgstr "Dauer"
#: AKSubmission/forms.py:195 #: AKSubmission/forms.py:182
#: AKSubmission/templates/AKSubmission/ak_detail.html:247 #: AKSubmission/templates/AKSubmission/ak_detail.html:241
msgid "Room" msgid "Room"
msgstr "Raum" msgstr "Raum"
#: AKSubmission/forms.py:199 #: AKSubmission/forms.py:186
#: AKSubmission/templates/AKSubmission/ak_history.html:11 #: AKSubmission/templates/AKSubmission/ak_history.html:11
#: AKSubmission/templates/AKSubmission/akslot_delete.html:31 #: AKSubmission/templates/AKSubmission/akslot_delete.html:31
msgid "AK" msgid "AK"
...@@ -68,7 +64,7 @@ msgstr "AK" ...@@ -68,7 +64,7 @@ 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
#: AKSubmission/templates/AKSubmission/ak_overview.html:29 #: AKSubmission/templates/AKSubmission/ak_overview.html:22
#: AKSubmission/templates/AKSubmission/akmessage_add.html:13 #: AKSubmission/templates/AKSubmission/akmessage_add.html:13
#: AKSubmission/templates/AKSubmission/akowner_create_update.html:12 #: AKSubmission/templates/AKSubmission/akowner_create_update.html:12
#: AKSubmission/templates/AKSubmission/akslot_add_update.html:12 #: AKSubmission/templates/AKSubmission/akslot_add_update.html:12
...@@ -98,12 +94,12 @@ msgid "Interest" ...@@ -98,12 +94,12 @@ msgid "Interest"
msgstr "Interesse" msgstr "Interesse"
#: AKSubmission/templates/AKSubmission/ak_detail.html:102 #: AKSubmission/templates/AKSubmission/ak_detail.html:102
#: AKSubmission/templates/AKSubmission/ak_table.html:57 #: AKSubmission/templates/AKSubmission/ak_table.html:55
msgid "Show Interest" msgid "Show Interest"
msgstr "Interesse bekunden" msgstr "Interesse bekunden"
#: AKSubmission/templates/AKSubmission/ak_detail.html:108 #: AKSubmission/templates/AKSubmission/ak_detail.html:108
#: AKSubmission/templates/AKSubmission/ak_table.html:48 #: AKSubmission/templates/AKSubmission/ak_table.html:46
msgid "Open external link" msgid "Open external link"
msgstr "Externen Link öffnen" msgstr "Externen Link öffnen"
...@@ -125,15 +121,15 @@ msgid "Add confidential message to organizers" ...@@ -125,15 +121,15 @@ msgid "Add confidential message to organizers"
msgstr "Sende eine private Nachricht an das Organisationsteam" msgstr "Sende eine private Nachricht an das Organisationsteam"
#: AKSubmission/templates/AKSubmission/ak_detail.html:124 #: AKSubmission/templates/AKSubmission/ak_detail.html:124
#: AKSubmission/templates/AKSubmission/ak_detail.html:275 #: AKSubmission/templates/AKSubmission/ak_detail.html:269
#: AKSubmission/templates/AKSubmission/ak_edit.html:16 #: AKSubmission/templates/AKSubmission/ak_edit.html:16
#: AKSubmission/templates/AKSubmission/ak_table.html:53 #: AKSubmission/templates/AKSubmission/ak_table.html:51
msgid "Edit" msgid "Edit"
msgstr "Bearbeiten" msgstr "Bearbeiten"
#: AKSubmission/templates/AKSubmission/ak_detail.html:129 #: AKSubmission/templates/AKSubmission/ak_detail.html:129
#: AKSubmission/templates/AKSubmission/ak_history.html:31 #: AKSubmission/templates/AKSubmission/ak_history.html:31
#: AKSubmission/templates/AKSubmission/ak_table.html:35 #: AKSubmission/templates/AKSubmission/ak_table.html:34
msgid "AK Wish" msgid "AK Wish"
msgstr "AK-Wunsch" msgstr "AK-Wunsch"
...@@ -165,7 +161,7 @@ msgstr "" ...@@ -165,7 +161,7 @@ msgstr ""
" " " "
#: AKSubmission/templates/AKSubmission/ak_detail.html:149 #: AKSubmission/templates/AKSubmission/ak_detail.html:149
#: AKSubmission/templates/AKSubmission/ak_detail.html:283 #: AKSubmission/templates/AKSubmission/ak_detail.html:277
msgid "Go to virtual room" msgid "Go to virtual room"
msgstr "Zum virtuellen Raum" msgstr "Zum virtuellen Raum"
...@@ -196,47 +192,42 @@ msgid "(Category Default)" ...@@ -196,47 +192,42 @@ msgid "(Category Default)"
msgstr "(Kategorievoreinstellung)" msgstr "(Kategorievoreinstellung)"
#: AKSubmission/templates/AKSubmission/ak_detail.html:188 #: AKSubmission/templates/AKSubmission/ak_detail.html:188
#: AKSubmission/templates/AKSubmission/ak_table.html:12
msgid "Tags"
msgstr "Tags"
#: AKSubmission/templates/AKSubmission/ak_detail.html:194
msgid "Reso intention?" msgid "Reso intention?"
msgstr "Resoabsicht?" msgstr "Resoabsicht?"
#: AKSubmission/templates/AKSubmission/ak_detail.html:201 #: AKSubmission/templates/AKSubmission/ak_detail.html:195
msgid "Requirements" msgid "Requirements"
msgstr "Anforderungen" msgstr "Anforderungen"
#: AKSubmission/templates/AKSubmission/ak_detail.html:214 #: AKSubmission/templates/AKSubmission/ak_detail.html:208
msgid "Conflicting AKs" msgid "Conflicting AKs"
msgstr "AK-Konflikte" msgstr "AK-Konflikte"
#: AKSubmission/templates/AKSubmission/ak_detail.html:222 #: AKSubmission/templates/AKSubmission/ak_detail.html:216
msgid "Prerequisite AKs" msgid "Prerequisite AKs"
msgstr "Vorausgesetzte AKs" msgstr "Vorausgesetzte AKs"
#: AKSubmission/templates/AKSubmission/ak_detail.html:230 #: AKSubmission/templates/AKSubmission/ak_detail.html:224
msgid "Notes" msgid "Notes"
msgstr "Notizen" msgstr "Notizen"
#: AKSubmission/templates/AKSubmission/ak_detail.html:243 #: AKSubmission/templates/AKSubmission/ak_detail.html:237
msgid "When?" msgid "When?"
msgstr "Wann?" msgstr "Wann?"
#: AKSubmission/templates/AKSubmission/ak_detail.html:278 #: AKSubmission/templates/AKSubmission/ak_detail.html:272
msgid "Delete" msgid "Delete"
msgstr "Löschen" msgstr "Löschen"
#: AKSubmission/templates/AKSubmission/ak_detail.html:289 #: AKSubmission/templates/AKSubmission/ak_detail.html:283
msgid "Schedule" msgid "Schedule"
msgstr "Schedule" msgstr "Schedule"
#: AKSubmission/templates/AKSubmission/ak_detail.html:301 #: AKSubmission/templates/AKSubmission/ak_detail.html:295
msgid "Add another slot" msgid "Add another slot"
msgstr "Einen neuen AK-Slot hinzufügen" msgstr "Einen neuen AK-Slot hinzufügen"
#: AKSubmission/templates/AKSubmission/ak_detail.html:311 #: AKSubmission/templates/AKSubmission/ak_detail.html:305
msgid "Possible Times" msgid "Possible Times"
msgstr "Mögliche Zeiten" msgstr "Mögliche Zeiten"
...@@ -244,7 +235,7 @@ msgstr "Mögliche Zeiten" ...@@ -244,7 +235,7 @@ msgstr "Mögliche Zeiten"
#: 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
#: AKSubmission/templates/AKSubmission/ak_overview.html:12 #: AKSubmission/templates/AKSubmission/ak_overview.html:12
#: AKSubmission/templates/AKSubmission/ak_overview.html:40 #: AKSubmission/templates/AKSubmission/ak_overview.html:33
#: AKSubmission/templates/AKSubmission/akmessage_add.html:7 #: AKSubmission/templates/AKSubmission/akmessage_add.html:7
#: AKSubmission/templates/AKSubmission/akowner_create_update.html:7 #: AKSubmission/templates/AKSubmission/akowner_create_update.html:7
#: AKSubmission/templates/AKSubmission/akslot_add_update.html:7 #: AKSubmission/templates/AKSubmission/akslot_add_update.html:7
...@@ -283,12 +274,12 @@ msgid "Time" ...@@ -283,12 +274,12 @@ msgid "Time"
msgstr "Zeit" msgstr "Zeit"
#: AKSubmission/templates/AKSubmission/ak_history.html:48 #: AKSubmission/templates/AKSubmission/ak_history.html:48
#: AKSubmission/templates/AKSubmission/ak_table.html:26 #: AKSubmission/templates/AKSubmission/ak_table.html:25
msgid "Present results of this AK" msgid "Present results of this AK"
msgstr "Die Ergebnisse dieses AKs vorstellen" msgstr "Die Ergebnisse dieses AKs vorstellen"
#: AKSubmission/templates/AKSubmission/ak_history.html:52 #: AKSubmission/templates/AKSubmission/ak_history.html:52
#: AKSubmission/templates/AKSubmission/ak_table.html:30 #: AKSubmission/templates/AKSubmission/ak_table.html:29
msgid "Intends to submit a resolution" msgid "Intends to submit a resolution"
msgstr "Beabsichtigt eine Resolution einzureichen" msgstr "Beabsichtigt eine Resolution einzureichen"
...@@ -300,19 +291,19 @@ msgstr "Alle AKs" ...@@ -300,19 +291,19 @@ msgstr "Alle AKs"
msgid "Tracks" msgid "Tracks"
msgstr "Tracks" msgstr "Tracks"
#: AKSubmission/templates/AKSubmission/ak_overview.html:30 #: AKSubmission/templates/AKSubmission/ak_overview.html:23
msgid "AK List" msgid "AK List"
msgstr "AK-Liste" msgstr "AK-Liste"
#: AKSubmission/templates/AKSubmission/ak_overview.html:36 #: AKSubmission/templates/AKSubmission/ak_overview.html:29
msgid "Add AK" msgid "Add AK"
msgstr "AK hinzufügen" msgstr "AK hinzufügen"
#: AKSubmission/templates/AKSubmission/ak_table.html:44 #: AKSubmission/templates/AKSubmission/ak_table.html:42
msgid "Details" msgid "Details"
msgstr "Details" msgstr "Details"
#: AKSubmission/templates/AKSubmission/ak_table.html:68 #: AKSubmission/templates/AKSubmission/ak_table.html:66
msgid "There are no AKs in this category yet" msgid "There are no AKs in this category yet"
msgstr "Es gibt noch keine AKs in dieser Kategorie" msgstr "Es gibt noch keine AKs in dieser Kategorie"
...@@ -432,52 +423,52 @@ msgstr "" ...@@ -432,52 +423,52 @@ msgstr ""
msgid "Currently planned AKs" msgid "Currently planned AKs"
msgstr "Aktuell geplante AKs" msgstr "Aktuell geplante AKs"
#: AKSubmission/views.py:193 #: AKSubmission/views.py:181
msgid "Event inactive. Cannot create or update." msgid "Event inactive. Cannot create or update."
msgstr "Event inaktiv. Hinzufügen/Bearbeiten nicht möglich." msgstr "Event inaktiv. Hinzufügen/Bearbeiten nicht möglich."
#: AKSubmission/views.py:209 #: AKSubmission/views.py:197
msgid "AK successfully created" msgid "AK successfully created"
msgstr "AK erfolgreich angelegt" msgstr "AK erfolgreich angelegt"
#: AKSubmission/views.py:264 #: AKSubmission/views.py:247
msgid "AK successfully updated" msgid "AK successfully updated"
msgstr "AK erfolgreich aktualisiert" msgstr "AK erfolgreich aktualisiert"
#: AKSubmission/views.py:310 #: AKSubmission/views.py:285
#, python-brace-format #, python-brace-format
msgid "Added '{owner}' as new owner of '{ak.name}'" msgid "Added '{owner}' as new owner of '{ak.name}'"
msgstr "'{owner}' als neue Leitung von '{ak.name}' hinzugefügt" msgstr "'{owner}' als neue Leitung von '{ak.name}' hinzugefügt"
#: AKSubmission/views.py:351 #: AKSubmission/views.py:326
msgid "Person Info successfully updated" msgid "Person Info successfully updated"
msgstr "Personen-Info erfolgreich aktualisiert" msgstr "Personen-Info erfolgreich aktualisiert"
#: AKSubmission/views.py:371 #: AKSubmission/views.py:346
msgid "No user selected" msgid "No user selected"
msgstr "Keine Person ausgewählt" msgstr "Keine Person ausgewählt"
#: AKSubmission/views.py:398 #: AKSubmission/views.py:373
msgid "AK Slot successfully added" msgid "AK Slot successfully added"
msgstr "AK-Slot erfolgreich angelegt" msgstr "AK-Slot erfolgreich angelegt"
#: AKSubmission/views.py:412 #: AKSubmission/views.py:387
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:422 #: AKSubmission/views.py:397
msgid "AK Slot successfully updated" msgid "AK Slot successfully updated"
msgstr "AK-Slot erfolgreich aktualisiert" msgstr "AK-Slot erfolgreich aktualisiert"
#: AKSubmission/views.py:435 #: AKSubmission/views.py:410
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:445 #: AKSubmission/views.py:420
msgid "AK Slot successfully deleted" msgid "AK Slot successfully deleted"
msgstr "AK-Slot erfolgreich angelegt" msgstr "AK-Slot erfolgreich angelegt"
#: AKSubmission/views.py:467 #: AKSubmission/views.py:442
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"
......
...@@ -184,12 +184,6 @@ ...@@ -184,12 +184,6 @@
</td> </td>
</tr> </tr>
{% endif %} {% endif %}
<tr>
<td>{% trans "Tags" %}</td>
<td>
{% tag_list ak.tags.all ak.event.slug %}
</td>
</tr>
<tr> <tr>
<td>{% trans "Reso intention?" %}</td> <td>{% trans "Reso intention?" %}</td>
<td> <td>
......
...@@ -13,13 +13,6 @@ ...@@ -13,13 +13,6 @@
{% endblock %} {% endblock %}
{% block imports %} {% block imports %}
<style>
/* Prevent wrapping of buttons in AK table */
.table td:nth-child(5) {
white-space: nowrap;
}
</style>
{% include "AKSubmission/ak_interest_script.html" %} {% include "AKSubmission/ak_interest_script.html" %}
{% endblock %} {% endblock %}
......
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
<th>{% trans "Name" %}</th> <th>{% trans "Name" %}</th>
<th>{% trans "Who?" %}</th> <th>{% trans "Who?" %}</th>
<th>{% trans 'Category' %}</th> <th>{% trans 'Category' %}</th>
<th>{% trans "Tags" %}</th>
<th></th> <th></th>
</tr> </tr>
</thead> </thead>
...@@ -38,8 +37,7 @@ ...@@ -38,8 +37,7 @@
{% endif %} {% endif %}
</td> </td>
<td>{% category_linked_badge ak.category event.slug %}</td> <td>{% category_linked_badge ak.category event.slug %}</td>
<td>{% tag_list ak.tags.all event.slug %}</td> <td class="text-right" style="white-space: nowrap;">
<td class="text-right">
<a href="{% url 'submit:ak_detail' event_slug=ak.event.slug pk=ak.pk %}" data-toggle="tooltip" <a href="{% url 'submit:ak_detail' event_slug=ak.event.slug pk=ak.pk %}" data-toggle="tooltip"
title="{% trans 'Details' %}" title="{% trans 'Details' %}"
class="btn btn-primary">{% fa5_icon 'info' 'fas' %}</a> class="btn btn-primary">{% fa5_icon 'info' 'fas' %}</a>
......
{% for tag in tags.all %}
<a href="{% url 'submit:ak_list_by_tag' event_slug=event_slug tag_pk=tag.pk %}"><span class="badge badge-info">{{ tag }}</span></a>
{% endfor %}
...@@ -11,11 +11,6 @@ def bool_symbol(bool_val): ...@@ -11,11 +11,6 @@ def bool_symbol(bool_val):
return fa5_icon("times", "fas") return fa5_icon("times", "fas")
@register.inclusion_tag("AKSubmission/tags_list.html")
def tag_list(tags, event_slug):
return {"tags": tags, "event_slug": event_slug}
@register.inclusion_tag("AKSubmission/tracks_list.html") @register.inclusion_tag("AKSubmission/tracks_list.html")
def track_list(tracks, event_slug): def track_list(tracks, event_slug):
return {"tracks": tracks, "event_slug": event_slug} return {"tracks": tracks, "event_slug": event_slug}
......
...@@ -18,7 +18,6 @@ urlpatterns = [ ...@@ -18,7 +18,6 @@ urlpatterns = [
path('akslot/<int:pk>/delete/', views.AKSlotDeleteView.as_view(), name='akslot_delete'), path('akslot/<int:pk>/delete/', views.AKSlotDeleteView.as_view(), name='akslot_delete'),
path('aks/', views.AKOverviewView.as_view(), name='ak_list'), path('aks/', views.AKOverviewView.as_view(), name='ak_list'),
path('aks/category/<int:category_pk>/', views.AKListByCategoryView.as_view(), name='ak_list_by_category'), path('aks/category/<int:category_pk>/', views.AKListByCategoryView.as_view(), name='ak_list_by_category'),
path('aks/tag/<int:tag_pk>/', views.AKListByTagView.as_view(), name='ak_list_by_tag'),
path('aks/track/<int:track_pk>/', views.AKListByTrackView.as_view(), name='ak_list_by_track'), path('aks/track/<int:track_pk>/', views.AKListByTrackView.as_view(), name='ak_list_by_track'),
path('owner/', views.AKOwnerCreateView.as_view(), name='akowner_create'), path('owner/', views.AKOwnerCreateView.as_view(), name='akowner_create'),
path('new/', views.AKOwnerSelectDispatchView.as_view(), name='akowner_select'), path('new/', views.AKOwnerSelectDispatchView.as_view(), name='akowner_select'),
......
...@@ -13,11 +13,12 @@ from django.views import View ...@@ -13,11 +13,12 @@ from django.views import View
from django.views.generic import ListView, DetailView, CreateView, UpdateView, DeleteView, TemplateView from django.views.generic import ListView, DetailView, CreateView, UpdateView, DeleteView, TemplateView
from AKModel.availability.models import Availability from AKModel.availability.models import Availability
from AKModel.models import AK, AKCategory, AKTag, AKOwner, AKSlot, AKTrack, AKOrgaMessage from AKModel.models import AK, AKCategory, AKOwner, AKSlot, AKTrack, AKOrgaMessage
from AKModel.views import EventSlugMixin from AKModel.views import EventSlugMixin
from AKModel.views import FilterByEventSlugMixin from AKModel.views import FilterByEventSlugMixin
from AKSubmission.api import ak_interest_indication_active from AKSubmission.api import ak_interest_indication_active
from AKSubmission.forms import AKWishForm, AKOwnerForm, AKEditForm, AKSubmissionForm, AKDurationForm, AKOrgaMessageForm from AKSubmission.forms import AKWishForm, AKOwnerForm, AKSubmissionForm, AKDurationForm, AKOrgaMessageForm, \
AKForm
class SubmissionErrorNotConfiguredView(EventSlugMixin, TemplateView): class SubmissionErrorNotConfiguredView(EventSlugMixin, TemplateView):
...@@ -108,18 +109,6 @@ class AKListByCategoryView(AKOverviewView): ...@@ -108,18 +109,6 @@ class AKListByCategoryView(AKOverviewView):
return self.category.name return self.category.name
class AKListByTagView(AKOverviewView):
def dispatch(self, request, *args, **kwargs):
self.tag = get_object_or_404(AKTag, pk=kwargs['tag_pk'])
return super().dispatch(request, *args, **kwargs)
def filter_aks(self, context, category):
return self.tag.ak_set.filter(event=self.event, category=category)
def get_table_title(self, context):
return f"{_('AKs with Tag')} = {self.tag.name}"
class AKListByTrackView(AKOverviewView): class AKListByTrackView(AKOverviewView):
def dispatch(self, request, *args, **kwargs): def dispatch(self, request, *args, **kwargs):
self.track = get_object_or_404(AKTrack, pk=kwargs['track_pk']) self.track = get_object_or_404(AKTrack, pk=kwargs['track_pk'])
...@@ -218,11 +207,6 @@ class AKAndAKWishSubmissionView(EventSlugMixin, EventInactiveRedirectMixin, Crea ...@@ -218,11 +207,6 @@ class AKAndAKWishSubmissionView(EventSlugMixin, EventInactiveRedirectMixin, Crea
# Try to save AK and get redirect URL # Try to save AK and get redirect URL
super_form_valid = super().form_valid(form) super_form_valid = super().form_valid(form)
# Set tags (and generate them if necessary)
for tag_name in form.cleaned_data["tag_names"]:
tag, was_created = AKTag.objects.get_or_create(name=tag_name)
self.object.tags.add(tag)
# Generate slot(s) (but not for wishes) # Generate slot(s) (but not for wishes)
if "durations" in form.cleaned_data: if "durations" in form.cleaned_data:
for duration in form.cleaned_data["durations"]: for duration in form.cleaned_data["durations"]:
...@@ -258,7 +242,7 @@ class AKWishSubmissionView(AKAndAKWishSubmissionView): ...@@ -258,7 +242,7 @@ class AKWishSubmissionView(AKAndAKWishSubmissionView):
class AKEditView(EventSlugMixin, EventInactiveRedirectMixin, UpdateView): class AKEditView(EventSlugMixin, EventInactiveRedirectMixin, UpdateView):
model = AK model = AK
template_name = 'AKSubmission/ak_edit.html' template_name = 'AKSubmission/ak_edit.html'
form_class = AKEditForm form_class = AKForm
def get_success_url(self): def get_success_url(self):
messages.add_message(self.request, messages.SUCCESS, _("AK successfully updated")) messages.add_message(self.request, messages.SUCCESS, _("AK successfully updated"))
...@@ -274,14 +258,6 @@ class AKEditView(EventSlugMixin, EventInactiveRedirectMixin, UpdateView): ...@@ -274,14 +258,6 @@ class AKEditView(EventSlugMixin, EventInactiveRedirectMixin, UpdateView):
super_form_valid = super().form_valid(form) super_form_valid = super().form_valid(form)
# Detach existing tags
self.object.tags.clear()
# Set tags (and generate them if necessary)
for tag_name in form.cleaned_data["tag_names"]:
tag, was_created = AKTag.objects.get_or_create(name=tag_name)
self.object.tags.add(tag)
# Did this AK change from wish to AK or vice versa? # Did this AK change from wish to AK or vice versa?
new_owner_count = self.object.owners.count() new_owner_count = self.object.owners.count()
# Now AK: # Now AK:
......
...@@ -41,10 +41,6 @@ for entry in exported_entries: ...@@ -41,10 +41,6 @@ for entry in exported_entries:
elif entry['model'] == "AKModel.event": elif entry['model'] == "AKModel.event":
if int(entry['pk']) == event_id: if int(entry['pk']) == event_id:
entries_out.append(entry) entries_out.append(entry)
# Backup tags
elif entry['model'] == "AKModel.aktag":
# No restriction needed, backup all tags
entries_out.append(entry)
else: else:
# This should normally not happen (all other models should have a reference to the event) # This should normally not happen (all other models should have a reference to the event)
entries_without_event += 1 entries_without_event += 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment