From 34bf41bbde856770803128ae89ae95777bed0570 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20H=C3=A4ttasch?= <benjamin.haettasch@fachschaft.informatik.tu-darmstadt.de> Date: Sun, 1 Jan 2023 20:19:48 +0100 Subject: [PATCH] Remove tags This remove the AKTags model and its usage in views, forms, templates, translations, and backup script This implements #164 --- AKModel/admin.py | 11 +- AKModel/fixtures/model.json | 12 - AKModel/locale/de_DE/LC_MESSAGES/django.po | 303 ++++++++---------- AKModel/migrations/0056_remove_tags.py | 20 ++ AKModel/models.py | 19 -- .../admin/AKScheduling/manage_tracks.html | 4 +- AKSubmission/forms.py | 17 - .../locale/de_DE/LC_MESSAGES/django.po | 105 +++--- .../templates/AKSubmission/ak_detail.html | 6 - .../templates/AKSubmission/ak_overview.html | 7 - .../templates/AKSubmission/ak_table.html | 4 +- .../templates/AKSubmission/tags_list.html | 3 - .../templatetags/tags_AKSubmission.py | 5 - AKSubmission/urls.py | 1 - AKSubmission/views.py | 32 +- Utils/json_export.py | 4 - 16 files changed, 217 insertions(+), 336 deletions(-) create mode 100644 AKModel/migrations/0056_remove_tags.py delete mode 100644 AKSubmission/templates/AKSubmission/tags_list.html diff --git a/AKModel/admin.py b/AKModel/admin.py index 6a60c38e..caa7eed7 100644 --- a/AKModel/admin.py +++ b/AKModel/admin.py @@ -15,7 +15,7 @@ from simple_history.admin import SimpleHistoryAdmin from AKModel.availability.forms import AvailabilitiesFormMixin 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 from AKModel.urls import get_admin_urls_event_wizard, get_admin_urls_event from AKModel.views import CVMarkResolvedView, CVSetLevelViolationView, CVSetLevelWarningView, AKResetInterestView, \ @@ -134,15 +134,6 @@ class AKTrackAdmin(admin.ModelAdmin): 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) class AKRequirementAdmin(admin.ModelAdmin): model = AKRequirement diff --git a/AKModel/fixtures/model.json b/AKModel/fixtures/model.json index 4f55ea95..d848041d 100644 --- a/AKModel/fixtures/model.json +++ b/AKModel/fixtures/model.json @@ -153,13 +153,6 @@ "event": 2 } }, -{ - "model": "AKModel.aktag", - "pk": 1, - "fields": { - "name": "metametameta" - } -}, { "model": "AKModel.akrequirement", "pk": 1, @@ -382,7 +375,6 @@ "owners": [ 1 ], - "tags": [], "requirements": [ 3 ], @@ -410,9 +402,6 @@ "owners": [ 2 ], - "tags": [ - 1 - ], "requirements": [], "conflicts": [], "prerequisites": [] @@ -436,7 +425,6 @@ "interest_counter": 0, "event": 2, "owners": [], - "tags": [], "requirements": [ 4 ], diff --git a/AKModel/locale/de_DE/LC_MESSAGES/django.po b/AKModel/locale/de_DE/LC_MESSAGES/django.po index 5fe67517..b33558d0 100644 --- a/AKModel/locale/de_DE/LC_MESSAGES/django.po +++ b/AKModel/locale/de_DE/LC_MESSAGES/django.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-01-01 19:22+0100\n" +"POT-Creation-Date: 2023-01-01 20:05+0100\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" @@ -33,47 +33,47 @@ msgstr "Plan veröffentlichen" msgid "Unpublish plan" msgstr "Plan verbergen" -#: AKModel/admin.py:161 +#: AKModel/admin.py:152 msgid "Wish" msgstr "AK-Wunsch" -#: AKModel/admin.py:167 +#: AKModel/admin.py:158 msgid "Is wish" msgstr "Ist ein Wunsch" -#: AKModel/admin.py:168 +#: AKModel/admin.py:159 msgid "Is not a wish" msgstr "Ist kein Wunsch" -#: AKModel/admin.py:212 +#: AKModel/admin.py:203 msgid "Export to wiki syntax" msgstr "In Wiki-Syntax exportieren" -#: AKModel/admin.py:221 +#: AKModel/admin.py:212 msgid "Cannot export AKs from more than one event at the same time." msgstr "Kann nicht AKs von mehreren Events zur selben Zeit exportieren." -#: AKModel/admin.py:236 AKModel/views.py:476 +#: AKModel/admin.py:227 AKModel/views.py:476 msgid "Reset interest in AKs" msgstr "Interesse an AKs zurücksetzen" -#: AKModel/admin.py:241 AKModel/views.py:486 +#: AKModel/admin.py:232 AKModel/views.py:486 msgid "Reset AKs' interest counters" msgstr "Interessenszähler der AKs zurücksetzen" -#: AKModel/admin.py:325 AKModel/admin.py:332 +#: AKModel/admin.py:316 AKModel/admin.py:323 msgid "AK Details" msgstr "AK-Details" -#: AKModel/admin.py:384 AKModel/views.py:446 +#: AKModel/admin.py:375 AKModel/views.py:446 msgid "Mark Constraint Violations as manually resolved" msgstr "Markiere Constraintverletzungen als manuell behoben" -#: AKModel/admin.py:389 AKModel/views.py:456 +#: AKModel/admin.py:380 AKModel/views.py:456 msgid "Set Constraint Violations to level \"violation\"" msgstr "Constraintverletzungen auf Level \"Violation\" setzen" -#: AKModel/admin.py:394 AKModel/views.py:466 +#: AKModel/admin.py:385 AKModel/views.py:466 msgid "Set Constraint Violations to level \"warning\"" msgstr "Constraintverletzungen auf Level \"Warning\" setzen" @@ -103,16 +103,16 @@ msgid "Please fill in your availabilities!" msgstr "Bitte Verfügbarkeiten eintragen!" #: AKModel/availability/models.py:38 AKModel/models.py:56 AKModel/models.py:128 -#: AKModel/models.py:183 AKModel/models.py:202 AKModel/models.py:234 -#: AKModel/models.py:288 AKModel/models.py:357 AKModel/models.py:390 -#: AKModel/models.py:461 AKModel/models.py:502 AKModel/models.py:667 +#: AKModel/models.py:183 AKModel/models.py:202 AKModel/models.py:220 +#: AKModel/models.py:273 AKModel/models.py:338 AKModel/models.py:371 +#: AKModel/models.py:442 AKModel/models.py:483 AKModel/models.py:648 msgid "Event" msgstr "Event" #: AKModel/availability/models.py:39 AKModel/models.py:129 -#: AKModel/models.py:184 AKModel/models.py:203 AKModel/models.py:235 -#: AKModel/models.py:289 AKModel/models.py:358 AKModel/models.py:391 -#: AKModel/models.py:462 AKModel/models.py:503 AKModel/models.py:668 +#: AKModel/models.py:184 AKModel/models.py:203 AKModel/models.py:221 +#: AKModel/models.py:274 AKModel/models.py:339 AKModel/models.py:372 +#: AKModel/models.py:443 AKModel/models.py:484 AKModel/models.py:649 msgid "Associated event" msgstr "Zugehöriges Event" @@ -124,8 +124,8 @@ msgstr "Person" msgid "Person whose availability this is" msgstr "Person deren Verfügbarkeit hier abgebildet wird" -#: AKModel/availability/models.py:56 AKModel/models.py:361 -#: AKModel/models.py:380 AKModel/models.py:511 +#: AKModel/availability/models.py:56 AKModel/models.py:342 +#: AKModel/models.py:361 AKModel/models.py:492 msgid "Room" msgstr "Raum" @@ -133,8 +133,8 @@ msgstr "Raum" msgid "Room whose availability this is" msgstr "Raum dessen Verfügbarkeit hier abgebildet wird" -#: AKModel/availability/models.py:65 AKModel/models.py:297 -#: AKModel/models.py:379 AKModel/models.py:456 +#: AKModel/availability/models.py:65 AKModel/models.py:282 +#: AKModel/models.py:360 AKModel/models.py:437 msgid "AK" msgstr "AK" @@ -143,7 +143,7 @@ msgid "AK whose availability this is" msgstr "Verfügbarkeiten" #: AKModel/availability/models.py:74 AKModel/models.py:187 -#: AKModel/models.py:517 +#: AKModel/models.py:498 msgid "AK Category" msgstr "AK-Kategorie" @@ -155,56 +155,56 @@ msgstr "AK-Kategorie, deren Verfügbarkeit hier abgebildet wird" msgid "Availabilities" msgstr "Verfügbarkeiten" -#: AKModel/forms.py:43 +#: AKModel/forms.py:42 msgid "Copy ak requirements and ak categories of existing event" msgstr "AK-Anforderungen und AK-Kategorien eines existierenden Events kopieren" -#: AKModel/forms.py:44 +#: AKModel/forms.py:43 msgid "You can choose what to copy in the next step" msgstr "" "Im nächsten Schritt kann ausgewählt werden, was genau kopiert werden soll" -#: AKModel/forms.py:52 +#: AKModel/forms.py:51 msgid "Copy ak categories" msgstr "AK-Kategorien kopieren" -#: AKModel/forms.py:59 +#: AKModel/forms.py:58 msgid "Copy ak requirements" msgstr "AK-Anforderungen kopieren" -#: AKModel/forms.py:78 +#: AKModel/forms.py:79 msgid "Copy dashboard buttons" msgstr "Dashboard-Buttons kopieren" -#: AKModel/forms.py:102 +#: AKModel/forms.py:103 msgid "# next AKs" msgstr "# nächste AKs" -#: AKModel/forms.py:103 +#: AKModel/forms.py:104 msgid "How many next AKs should be shown on a slide?" msgstr "Wie viele nächste AKs sollen auf einer Folie angezeigt werden?" -#: AKModel/forms.py:106 +#: AKModel/forms.py:107 msgid "Presentation only?" msgstr "Nur Vorstellung?" -#: AKModel/forms.py:108 AKModel/forms.py:115 +#: AKModel/forms.py:109 AKModel/forms.py:116 msgid "Yes" msgstr "Ja" -#: AKModel/forms.py:108 AKModel/forms.py:115 +#: AKModel/forms.py:109 AKModel/forms.py:116 msgid "No" msgstr "Nein" -#: AKModel/forms.py:110 +#: AKModel/forms.py:111 msgid "Restrict AKs to those that asked for chance to be presented?" msgstr "AKs auf solche, die um eine Vorstellung gebeten haben, einschränken?" -#: AKModel/forms.py:113 +#: AKModel/forms.py:114 msgid "Space for notes in wishes?" msgstr "Platz für Notizen bei den Wünschen?" -#: AKModel/forms.py:117 +#: AKModel/forms.py:118 msgid "" "Create symbols indicating space to note down owners and timeslots for " "wishes, e.g., to be filled out on a touch screen while presenting?" @@ -213,11 +213,11 @@ msgstr "" "fürWünsche markieren, z.B. um während der Präsentation auf einem Touchscreen " "ausgefüllt zu werden?" -#: AKModel/forms.py:123 AKModel/models.py:661 +#: AKModel/forms.py:124 AKModel/models.py:642 msgid "Default Slots" msgstr "Standardslots" -#: AKModel/forms.py:125 +#: AKModel/forms.py:126 msgid "" "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." @@ -226,11 +226,11 @@ msgstr "" "Einträge zu löschen. Oder Start- und End-Eingabe verwenden, um der " "Kalenderansicht neue Einträge hinzuzufügen." -#: AKModel/forms.py:135 +#: AKModel/forms.py:136 msgid "New rooms" msgstr "Neue Räume" -#: AKModel/forms.py:136 +#: AKModel/forms.py:137 msgid "" "Enter room details in CSV format. Required colum is \"name\", optional " "colums are \"location\", \"capacity\", and \"url\" for online/hybrid rooms. " @@ -240,13 +240,12 @@ msgstr "" "Spalten sind \"location\", \"capacity\", und \"url\" for Online-/" "HybridräumeTrennzeichen: Semikolon" -#: AKModel/forms.py:147 +#: AKModel/forms.py:148 msgid "CSV must contain a name column" msgstr "CSV muss eine name-Spalte enthalten" #: AKModel/models.py:18 AKModel/models.py:175 AKModel/models.py:199 -#: AKModel/models.py:218 AKModel/models.py:232 AKModel/models.py:250 -#: AKModel/models.py:349 +#: AKModel/models.py:218 AKModel/models.py:236 AKModel/models.py:330 msgid "Name" msgstr "Name" @@ -412,7 +411,7 @@ msgstr "Instutution" msgid "Uni etc." msgstr "Universität o.ä." -#: AKModel/models.py:126 AKModel/models.py:259 +#: AKModel/models.py:126 AKModel/models.py:245 msgid "Web Link" msgstr "Internet Link" @@ -420,7 +419,7 @@ msgstr "Internet Link" msgid "Link to Homepage" msgstr "Link zu Homepage oder Webseite" -#: AKModel/models.py:132 AKModel/models.py:510 +#: AKModel/models.py:132 AKModel/models.py:491 msgid "AK Owner" msgstr "AK-Leitung" @@ -440,7 +439,7 @@ msgstr "Farbe" msgid "Color for displaying" msgstr "Farbe für die Anzeige" -#: AKModel/models.py:177 AKModel/models.py:253 +#: AKModel/models.py:177 AKModel/models.py:239 msgid "Description" msgstr "Beschreibung" @@ -477,135 +476,115 @@ msgid "AK Tracks" msgstr "AK-Tracks" #: AKModel/models.py:218 -msgid "Name of the AK Tag" -msgstr "Name das AK-Tags" - -#: AKModel/models.py:221 -msgid "AK Tag" -msgstr "AK-Tag" - -#: AKModel/models.py:222 -msgid "AK Tags" -msgstr "AK-Tags" - -#: AKModel/models.py:232 msgid "Name of the Requirement" msgstr "Name der Anforderung" -#: AKModel/models.py:238 AKModel/models.py:514 +#: AKModel/models.py:224 AKModel/models.py:495 msgid "AK Requirement" msgstr "AK-Anforderung" -#: AKModel/models.py:239 +#: AKModel/models.py:225 msgid "AK Requirements" msgstr "AK-Anforderungen" -#: AKModel/models.py:250 +#: AKModel/models.py:236 msgid "Name of the AK" msgstr "Name des AKs" -#: AKModel/models.py:251 +#: AKModel/models.py:237 msgid "Short Name" msgstr "Kurzer Name" -#: AKModel/models.py:252 +#: AKModel/models.py:238 msgid "Name displayed in the schedule" msgstr "Name zur Anzeige im AK-Plan" -#: AKModel/models.py:253 +#: AKModel/models.py:239 msgid "Description of the AK" msgstr "Beschreibung des AKs" -#: AKModel/models.py:255 +#: AKModel/models.py:241 msgid "Owners" msgstr "Leitungen" -#: AKModel/models.py:256 +#: AKModel/models.py:242 msgid "Those organizing the AK" msgstr "Menschen, die den AK organisieren und halten" -#: AKModel/models.py:259 +#: AKModel/models.py:245 msgid "Link to wiki page" msgstr "Link zur Wiki Seite" -#: AKModel/models.py:260 +#: AKModel/models.py:246 msgid "Protocol Link" msgstr "Protokolllink" -#: AKModel/models.py:260 +#: AKModel/models.py:246 msgid "Link to protocol" msgstr "Link zum Protokoll" -#: AKModel/models.py:262 +#: AKModel/models.py:248 msgid "Category" msgstr "Kategorie" -#: AKModel/models.py:263 +#: AKModel/models.py:249 msgid "Category of the AK" msgstr "Kategorie des AKs" -#: AKModel/models.py:264 -msgid "Tags" -msgstr "Tags" - -#: AKModel/models.py:264 -msgid "Tags provided by owners" -msgstr "Tags, die durch die AK-Leitung vergeben wurden" - -#: AKModel/models.py:265 +#: AKModel/models.py:250 msgid "Track" msgstr "Track" -#: AKModel/models.py:266 +#: AKModel/models.py:251 msgid "Track the AK belongs to" msgstr "Track zu dem der AK gehört" -#: AKModel/models.py:268 +#: AKModel/models.py:253 msgid "Resolution Intention" msgstr "Resolutionsabsicht" -#: AKModel/models.py:269 +#: AKModel/models.py:254 msgid "Intends to submit a resolution" msgstr "Beabsichtigt eine Resolution einzureichen" -#: AKModel/models.py:270 +#: AKModel/models.py:255 msgid "Present this AK" msgstr "AK präsentieren" -#: AKModel/models.py:271 +#: AKModel/models.py:256 msgid "Present results of this AK" msgstr "Die Ergebnisse dieses AKs vorstellen" -#: AKModel/models.py:273 AKModel/templates/admin/AKModel/status.html:105 +#: AKModel/models.py:258 AKModel/templates/admin/AKModel/status.html:105 msgid "Requirements" msgstr "Anforderungen" -#: AKModel/models.py:274 +#: AKModel/models.py:259 msgid "AK's Requirements" msgstr "Anforderungen des AKs" -#: AKModel/models.py:276 +#: AKModel/models.py:261 msgid "Conflicting AKs" msgstr "AK-Konflikte" -#: AKModel/models.py:277 +#: AKModel/models.py:262 msgid "AKs that conflict and thus must not take place at the same time" msgstr "" "AKs, die Konflikte haben und deshalb nicht gleichzeitig stattfinden dürfen" -#: AKModel/models.py:278 +#: AKModel/models.py:263 msgid "Prerequisite AKs" msgstr "Vorausgesetzte AKs" -#: AKModel/models.py:279 +#: AKModel/models.py:264 msgid "AKs that should precede this AK in the schedule" msgstr "AKs die im AK-Plan vor diesem AK stattfinden müssen" -#: AKModel/models.py:281 +#: AKModel/models.py:266 msgid "Organizational Notes" msgstr "Notizen zur Organisation" -#: AKModel/models.py:282 +#: AKModel/models.py:267 msgid "" "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/" @@ -615,287 +594,287 @@ msgstr "" "Anmerkungen bitte den Button für Direktnachrichten verwenden (nach dem " "Anlegen/Bearbeiten)." -#: AKModel/models.py:284 +#: AKModel/models.py:269 msgid "Interest" msgstr "Interesse" -#: AKModel/models.py:284 +#: AKModel/models.py:269 msgid "Expected number of people" msgstr "Erwartete Personenzahl" -#: AKModel/models.py:285 +#: AKModel/models.py:270 msgid "Interest Counter" msgstr "Interessenszähler" -#: AKModel/models.py:286 +#: AKModel/models.py:271 msgid "People who have indicated interest online" msgstr "Anzahl Personen, die online Interesse bekundet haben" -#: AKModel/models.py:291 +#: AKModel/models.py:276 msgid "Export?" msgstr "Export?" -#: AKModel/models.py:292 +#: AKModel/models.py:277 msgid "Include AK in wiki export?" msgstr "AK bei Wiki-Export berücksichtigen?" -#: AKModel/models.py:298 AKModel/models.py:505 +#: AKModel/models.py:283 AKModel/models.py:486 #: AKModel/templates/admin/AKModel/status.html:57 #: AKModel/templates/admin/AKModel/status.html:64 AKModel/views.py:374 msgid "AKs" msgstr "AKs" -#: AKModel/models.py:349 +#: AKModel/models.py:330 msgid "Name or number of the room" msgstr "Name oder Nummer des Raums" -#: AKModel/models.py:350 +#: AKModel/models.py:331 msgid "Location" msgstr "Ort" -#: AKModel/models.py:351 +#: AKModel/models.py:332 msgid "Name or number of the location" msgstr "Name oder Nummer des Ortes" -#: AKModel/models.py:352 +#: AKModel/models.py:333 msgid "Capacity" msgstr "Kapazität" -#: AKModel/models.py:353 +#: AKModel/models.py:334 msgid "Maximum number of people (-1 for unlimited)." msgstr "Maximale Personenzahl (-1 wenn unbeschränkt)." -#: AKModel/models.py:354 +#: AKModel/models.py:335 msgid "Properties" msgstr "Eigenschaften" -#: AKModel/models.py:355 +#: AKModel/models.py:336 msgid "AK requirements fulfilled by the room" msgstr "AK-Anforderungen, die dieser Raum erfüllt" -#: AKModel/models.py:362 AKModel/templates/admin/AKModel/status.html:40 +#: AKModel/models.py:343 AKModel/templates/admin/AKModel/status.html:40 msgid "Rooms" msgstr "Räume" -#: AKModel/models.py:379 +#: AKModel/models.py:360 msgid "AK being mapped" msgstr "AK, der zugeordnet wird" -#: AKModel/models.py:381 +#: AKModel/models.py:362 msgid "Room the AK will take place in" msgstr "Raum in dem der AK stattfindet" -#: AKModel/models.py:382 AKModel/models.py:664 +#: AKModel/models.py:363 AKModel/models.py:645 msgid "Slot Begin" msgstr "Beginn des Slots" -#: AKModel/models.py:382 AKModel/models.py:664 +#: AKModel/models.py:363 AKModel/models.py:645 msgid "Time and date the slot begins" msgstr "Zeit und Datum zu der der AK beginnt" -#: AKModel/models.py:384 +#: AKModel/models.py:365 msgid "Duration" msgstr "Dauer" -#: AKModel/models.py:385 +#: AKModel/models.py:366 msgid "Length in hours" msgstr "Länge in Stunden" -#: AKModel/models.py:387 +#: AKModel/models.py:368 msgid "Scheduling fixed" msgstr "Planung fix" -#: AKModel/models.py:388 +#: AKModel/models.py:369 msgid "Length and time of this AK should not be changed" msgstr "Dauer und Zeit dieses AKs sollten nicht verändert werden" -#: AKModel/models.py:393 +#: AKModel/models.py:374 msgid "Last update" msgstr "Letzte Aktualisierung" -#: AKModel/models.py:396 +#: AKModel/models.py:377 msgid "AK Slot" msgstr "AK-Slot" -#: AKModel/models.py:397 AKModel/models.py:507 +#: AKModel/models.py:378 AKModel/models.py:488 msgid "AK Slots" msgstr "AK-Slot" -#: AKModel/models.py:419 AKModel/models.py:428 +#: AKModel/models.py:400 AKModel/models.py:409 msgid "Not scheduled yet" msgstr "Noch nicht geplant" -#: AKModel/models.py:457 +#: AKModel/models.py:438 msgid "AK this message belongs to" msgstr "AK zu dem die Nachricht gehört" -#: AKModel/models.py:458 +#: AKModel/models.py:439 msgid "Message text" msgstr "Nachrichtentext" -#: AKModel/models.py:459 +#: AKModel/models.py:440 msgid "Message to the organizers. This is not publicly visible." msgstr "" "Nachricht an die Organisator*innen. Diese ist nicht öffentlich sichtbar." -#: AKModel/models.py:465 +#: AKModel/models.py:446 msgid "AK Orga Message" msgstr "AK-Organachricht" -#: AKModel/models.py:466 +#: AKModel/models.py:447 msgid "AK Orga Messages" msgstr "AK-Organachrichten" -#: AKModel/models.py:475 +#: AKModel/models.py:456 msgid "Constraint Violation" msgstr "Constraintverletzung" -#: AKModel/models.py:476 AKModel/templates/admin/AKModel/status.html:87 +#: AKModel/models.py:457 AKModel/templates/admin/AKModel/status.html:87 msgid "Constraint Violations" msgstr "Constraintverletzungen" -#: AKModel/models.py:480 +#: AKModel/models.py:461 msgid "Owner has two parallel slots" msgstr "Leitung hat zwei Slots parallel" -#: AKModel/models.py:481 +#: AKModel/models.py:462 msgid "AK Slot was scheduled outside the AK's availabilities" msgstr "AK Slot wurde außerhalb der Verfügbarkeit des AKs platziert" -#: AKModel/models.py:482 +#: AKModel/models.py:463 msgid "Room has two AK slots scheduled at the same time" msgstr "Raum hat zwei AK Slots gleichzeitig" -#: AKModel/models.py:483 +#: AKModel/models.py:464 msgid "Room does not satisfy the requirement of the scheduled AK" msgstr "Room erfüllt die Anforderungen des platzierten AKs nicht" -#: AKModel/models.py:484 +#: AKModel/models.py:465 msgid "AK Slot is scheduled at the same time as an AK listed as a conflict" msgstr "" "AK Slot wurde wurde zur gleichen Zeit wie ein Konflikt des AKs platziert" -#: AKModel/models.py:485 +#: AKModel/models.py:466 msgid "AK Slot is scheduled before an AK listed as a prerequisite" msgstr "AK Slot wurde vor einem als Voraussetzung gelisteten AK platziert" -#: AKModel/models.py:487 +#: AKModel/models.py:468 msgid "" "AK Slot for AK with intention to submit a resolution is scheduled after " "resolution deadline" msgstr "" "AK Slot eines AKs mit Resoabsicht wurde nach der Resodeadline platziert" -#: AKModel/models.py:488 +#: AKModel/models.py:469 msgid "AK Slot in a category is outside that categories availabilities" msgstr "AK Slot wurde außerhalb der Verfügbarkeiten seiner Kategorie" -#: AKModel/models.py:489 +#: AKModel/models.py:470 msgid "Two AK Slots for the same AK scheduled at the same time" msgstr "Zwei AK Slots eines AKs wurden zur selben Zeit platziert" -#: AKModel/models.py:490 +#: AKModel/models.py:471 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" -#: AKModel/models.py:491 +#: AKModel/models.py:472 msgid "AK Slot is scheduled outside the event's availabilities" msgstr "AK Slot wurde außerhalb der Verfügbarkeit des Events platziert" -#: AKModel/models.py:494 +#: AKModel/models.py:475 msgid "Warning" msgstr "Warnung" -#: AKModel/models.py:495 +#: AKModel/models.py:476 msgid "Violation" msgstr "Verletzung" -#: AKModel/models.py:497 +#: AKModel/models.py:478 msgid "Type" msgstr "Art" -#: AKModel/models.py:498 +#: AKModel/models.py:479 msgid "Type of violation, i.e. what kind of constraint was violated" msgstr "Art der Verletzung, gibt an welche Art Constraint verletzt wurde" -#: AKModel/models.py:499 +#: AKModel/models.py:480 msgid "Level" msgstr "Level" -#: AKModel/models.py:500 +#: AKModel/models.py:481 msgid "Severity level of the violation" msgstr "Schweregrad der Verletzung" -#: AKModel/models.py:506 +#: AKModel/models.py:487 msgid "AK(s) belonging to this constraint" msgstr "AK(s), die zu diesem Constraint gehören" -#: AKModel/models.py:508 +#: AKModel/models.py:489 msgid "AK Slot(s) belonging to this constraint" msgstr "AK Slot(s), die zu diesem Constraint gehören" -#: AKModel/models.py:510 +#: AKModel/models.py:491 msgid "AK Owner belonging to this constraint" msgstr "AK Leitung(en), die zu diesem Constraint gehören" -#: AKModel/models.py:512 +#: AKModel/models.py:493 msgid "Room belonging to this constraint" msgstr "Raum, der zu diesem Constraint gehört" -#: AKModel/models.py:515 +#: AKModel/models.py:496 msgid "AK Requirement belonging to this constraint" msgstr "AK Anforderung, die zu diesem Constraint gehört" -#: AKModel/models.py:517 +#: AKModel/models.py:498 msgid "AK Category belonging to this constraint" msgstr "AK Kategorie, di zu diesem Constraint gehört" -#: AKModel/models.py:519 +#: AKModel/models.py:500 msgid "Comment" msgstr "Kommentar" -#: AKModel/models.py:519 +#: AKModel/models.py:500 msgid "Comment or further details for this violation" msgstr "Kommentar oder weitere Details zu dieser Vereletzung" -#: AKModel/models.py:522 +#: AKModel/models.py:503 msgid "Timestamp" msgstr "Timestamp" -#: AKModel/models.py:522 +#: AKModel/models.py:503 msgid "Time of creation" msgstr "Zeitpunkt der ERstellung" -#: AKModel/models.py:523 +#: AKModel/models.py:504 msgid "Manually Resolved" msgstr "Manuell behoben" -#: AKModel/models.py:524 +#: AKModel/models.py:505 msgid "Mark this violation manually as resolved" msgstr "Markiere diese Verletzung manuell als behoben" -#: AKModel/models.py:551 +#: AKModel/models.py:532 #: AKModel/templates/admin/AKModel/requirements_overview.html:27 msgid "Details" msgstr "Details" -#: AKModel/models.py:660 +#: AKModel/models.py:641 msgid "Default Slot" msgstr "Standardslot" -#: AKModel/models.py:665 +#: AKModel/models.py:646 msgid "Slot End" msgstr "Ende des Slots" -#: AKModel/models.py:665 +#: AKModel/models.py:646 msgid "Time and date the slot ends" msgstr "Zeit und Datum zu der der Slot endet" -#: AKModel/models.py:670 +#: AKModel/models.py:651 msgid "Primary categories" msgstr "Primäre Kategorien" -#: AKModel/models.py:671 +#: AKModel/models.py:652 msgid "Categories that should be assigned to this slot primarily" msgstr "Kategorieren, die diesem Slot primär zugewiesen werden sollen" diff --git a/AKModel/migrations/0056_remove_tags.py b/AKModel/migrations/0056_remove_tags.py new file mode 100644 index 00000000..d9aa0828 --- /dev/null +++ b/AKModel/migrations/0056_remove_tags.py @@ -0,0 +1,20 @@ +# 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', + ), + ] diff --git a/AKModel/models.py b/AKModel/models.py index 03e0bc32..ac24085a 100644 --- a/AKModel/models.py +++ b/AKModel/models.py @@ -212,20 +212,6 @@ class AKTrack(models.Model): 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): """ An AKRequirement describes something needed to hold an AK, e.g. infrastructure. """ @@ -261,7 +247,6 @@ class AK(models.Model): category = models.ForeignKey(to=AKCategory, on_delete=models.PROTECT, verbose_name=_('Category'), 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'), help_text=_('Track the AK belongs to')) @@ -324,10 +309,6 @@ class AK(models.Model): def durations_list(self): 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 def wish(self): return self.owners.count() == 0 diff --git a/AKScheduling/templates/admin/AKScheduling/manage_tracks.html b/AKScheduling/templates/admin/AKScheduling/manage_tracks.html index f1a19e8c..3c0cd30f 100644 --- a/AKScheduling/templates/admin/AKScheduling/manage_tracks.html +++ b/AKScheduling/templates/admin/AKScheduling/manage_tracks.html @@ -210,7 +210,7 @@ <div class="card-body"> <ul data-id="None" data-sync="false" class="ak-list"> {% 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 }}) </li> {% endfor %} @@ -229,7 +229,7 @@ <div class="card-body"> <ul data-track-id="{{ track.pk }}" data-name="{{ track }}" data-sync="true" class="ak-list"> {% 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 }}) </li> {% endfor %} diff --git a/AKSubmission/forms.py b/AKSubmission/forms.py index ed3eacfb..862e41d9 100644 --- a/AKSubmission/forms.py +++ b/AKSubmission/forms.py @@ -46,14 +46,6 @@ class AKForm(AvailabilitiesFormMixin, forms.ModelForm): self.fields["conflicts"].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['requirements'].queryset = AKRequirement.objects.filter(event=self.initial.get('event')) self.fields['prerequisites'].queryset = AK.objects.filter(event=self.initial.get('event')).exclude( @@ -142,15 +134,6 @@ class AKSubmissionForm(AKForm): 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 Meta(AKForm.Meta): exclude = ['owners', 'link', 'protocol_link'] diff --git a/AKSubmission/locale/de_DE/LC_MESSAGES/django.po b/AKSubmission/locale/de_DE/LC_MESSAGES/django.po index 623a98af..c0d16bb1 100644 --- a/AKSubmission/locale/de_DE/LC_MESSAGES/django.po +++ b/AKSubmission/locale/de_DE/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\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" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -17,20 +17,16 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: AKSubmission/forms.py:49 -msgid "Separate multiple tags with comma or semicolon" -msgstr "Mehrere Tags mit Komma oder Semikolon trennen" - -#: AKSubmission/forms.py:79 +#: AKSubmission/forms.py:71 #, python-format msgid "\"%(duration)s\" is not a valid duration" msgstr "\"%(duration)s\" ist keine gültige Dauer" -#: AKSubmission/forms.py:130 +#: AKSubmission/forms.py:122 msgid "Duration(s)" msgstr "Dauer(n)" -#: AKSubmission/forms.py:132 +#: AKSubmission/forms.py:124 msgid "" "Enter at least one planned duration (in hours). If your AK should have " "multiple slots, use multiple lines" @@ -38,28 +34,28 @@ msgstr "" "Mindestens eine geplante Dauer (in Stunden) angeben. Wenn der AK mehrere " "Slots haben soll, mehrere Zeilen verwenden" -#: AKSubmission/forms.py:192 -#: AKSubmission/templates/AKSubmission/ak_detail.html:315 +#: AKSubmission/forms.py:179 +#: AKSubmission/templates/AKSubmission/ak_detail.html:309 msgid "Start" msgstr "Start" -#: AKSubmission/forms.py:193 -#: AKSubmission/templates/AKSubmission/ak_detail.html:316 +#: AKSubmission/forms.py:180 +#: AKSubmission/templates/AKSubmission/ak_detail.html:310 msgid "End" msgstr "Ende" -#: AKSubmission/forms.py:194 -#: AKSubmission/templates/AKSubmission/ak_detail.html:245 +#: AKSubmission/forms.py:181 +#: AKSubmission/templates/AKSubmission/ak_detail.html:239 #: AKSubmission/templates/AKSubmission/akslot_delete.html:35 msgid "Duration" msgstr "Dauer" -#: AKSubmission/forms.py:195 -#: AKSubmission/templates/AKSubmission/ak_detail.html:247 +#: AKSubmission/forms.py:182 +#: AKSubmission/templates/AKSubmission/ak_detail.html:241 msgid "Room" msgstr "Raum" -#: AKSubmission/forms.py:199 +#: AKSubmission/forms.py:186 #: AKSubmission/templates/AKSubmission/ak_history.html:11 #: AKSubmission/templates/AKSubmission/akslot_delete.html:31 msgid "AK" @@ -68,7 +64,7 @@ msgstr "AK" #: AKSubmission/templates/AKSubmission/ak_detail.html:22 #: AKSubmission/templates/AKSubmission/ak_edit.html:13 #: 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/akowner_create_update.html:12 #: AKSubmission/templates/AKSubmission/akslot_add_update.html:12 @@ -98,12 +94,12 @@ msgid "Interest" msgstr "Interesse" #: AKSubmission/templates/AKSubmission/ak_detail.html:102 -#: AKSubmission/templates/AKSubmission/ak_table.html:57 +#: AKSubmission/templates/AKSubmission/ak_table.html:55 msgid "Show Interest" msgstr "Interesse bekunden" #: 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" msgstr "Externen Link öffnen" @@ -125,15 +121,15 @@ msgid "Add confidential message to organizers" msgstr "Sende eine private Nachricht an das Organisationsteam" #: 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_table.html:53 +#: AKSubmission/templates/AKSubmission/ak_table.html:51 msgid "Edit" msgstr "Bearbeiten" #: AKSubmission/templates/AKSubmission/ak_detail.html:129 #: AKSubmission/templates/AKSubmission/ak_history.html:31 -#: AKSubmission/templates/AKSubmission/ak_table.html:35 +#: AKSubmission/templates/AKSubmission/ak_table.html:34 msgid "AK Wish" msgstr "AK-Wunsch" @@ -165,7 +161,7 @@ msgstr "" " " #: 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" msgstr "Zum virtuellen Raum" @@ -196,47 +192,42 @@ msgid "(Category Default)" msgstr "(Kategorievoreinstellung)" #: 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?" msgstr "Resoabsicht?" -#: AKSubmission/templates/AKSubmission/ak_detail.html:201 +#: AKSubmission/templates/AKSubmission/ak_detail.html:195 msgid "Requirements" msgstr "Anforderungen" -#: AKSubmission/templates/AKSubmission/ak_detail.html:214 +#: AKSubmission/templates/AKSubmission/ak_detail.html:208 msgid "Conflicting AKs" msgstr "AK-Konflikte" -#: AKSubmission/templates/AKSubmission/ak_detail.html:222 +#: AKSubmission/templates/AKSubmission/ak_detail.html:216 msgid "Prerequisite AKs" msgstr "Vorausgesetzte AKs" -#: AKSubmission/templates/AKSubmission/ak_detail.html:230 +#: AKSubmission/templates/AKSubmission/ak_detail.html:224 msgid "Notes" msgstr "Notizen" -#: AKSubmission/templates/AKSubmission/ak_detail.html:243 +#: AKSubmission/templates/AKSubmission/ak_detail.html:237 msgid "When?" msgstr "Wann?" -#: AKSubmission/templates/AKSubmission/ak_detail.html:278 +#: AKSubmission/templates/AKSubmission/ak_detail.html:272 msgid "Delete" msgstr "Löschen" -#: AKSubmission/templates/AKSubmission/ak_detail.html:289 +#: AKSubmission/templates/AKSubmission/ak_detail.html:283 msgid "Schedule" msgstr "Schedule" -#: AKSubmission/templates/AKSubmission/ak_detail.html:301 +#: AKSubmission/templates/AKSubmission/ak_detail.html:295 msgid "Add another slot" msgstr "Einen neuen AK-Slot hinzufügen" -#: AKSubmission/templates/AKSubmission/ak_detail.html:311 +#: AKSubmission/templates/AKSubmission/ak_detail.html:305 msgid "Possible Times" msgstr "Mögliche Zeiten" @@ -244,7 +235,7 @@ msgstr "Mögliche Zeiten" #: AKSubmission/templates/AKSubmission/ak_history.html:11 #: AKSubmission/templates/AKSubmission/ak_overview.html:8 #: 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/akowner_create_update.html:7 #: AKSubmission/templates/AKSubmission/akslot_add_update.html:7 @@ -283,12 +274,12 @@ msgid "Time" msgstr "Zeit" #: 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" msgstr "Die Ergebnisse dieses AKs vorstellen" #: 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" msgstr "Beabsichtigt eine Resolution einzureichen" @@ -300,19 +291,19 @@ msgstr "Alle AKs" msgid "Tracks" msgstr "Tracks" -#: AKSubmission/templates/AKSubmission/ak_overview.html:30 +#: AKSubmission/templates/AKSubmission/ak_overview.html:23 msgid "AK List" msgstr "AK-Liste" -#: AKSubmission/templates/AKSubmission/ak_overview.html:36 +#: AKSubmission/templates/AKSubmission/ak_overview.html:29 msgid "Add AK" msgstr "AK hinzufügen" -#: AKSubmission/templates/AKSubmission/ak_table.html:44 +#: AKSubmission/templates/AKSubmission/ak_table.html:42 msgid "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" msgstr "Es gibt noch keine AKs in dieser Kategorie" @@ -432,52 +423,52 @@ msgstr "" msgid "Currently planned AKs" msgstr "Aktuell geplante AKs" -#: AKSubmission/views.py:193 +#: AKSubmission/views.py:181 msgid "Event inactive. Cannot create or update." msgstr "Event inaktiv. Hinzufügen/Bearbeiten nicht möglich." -#: AKSubmission/views.py:209 +#: AKSubmission/views.py:197 msgid "AK successfully created" msgstr "AK erfolgreich angelegt" -#: AKSubmission/views.py:264 +#: AKSubmission/views.py:247 msgid "AK successfully updated" msgstr "AK erfolgreich aktualisiert" -#: AKSubmission/views.py:310 +#: AKSubmission/views.py:285 #, 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 +#: AKSubmission/views.py:326 msgid "Person Info successfully updated" msgstr "Personen-Info erfolgreich aktualisiert" -#: AKSubmission/views.py:371 +#: AKSubmission/views.py:346 msgid "No user selected" msgstr "Keine Person ausgewählt" -#: AKSubmission/views.py:398 +#: AKSubmission/views.py:373 msgid "AK Slot successfully added" msgstr "AK-Slot erfolgreich angelegt" -#: AKSubmission/views.py:412 +#: AKSubmission/views.py:387 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:422 +#: AKSubmission/views.py:397 msgid "AK Slot successfully updated" msgstr "AK-Slot erfolgreich aktualisiert" -#: AKSubmission/views.py:435 +#: AKSubmission/views.py:410 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:445 +#: AKSubmission/views.py:420 msgid "AK Slot successfully deleted" msgstr "AK-Slot erfolgreich angelegt" -#: AKSubmission/views.py:467 +#: AKSubmission/views.py:442 msgid "Message to organizers successfully saved" msgstr "Nachricht an die Organisator*innen erfolgreich gespeichert" diff --git a/AKSubmission/templates/AKSubmission/ak_detail.html b/AKSubmission/templates/AKSubmission/ak_detail.html index 0222d6a4..48587bfc 100644 --- a/AKSubmission/templates/AKSubmission/ak_detail.html +++ b/AKSubmission/templates/AKSubmission/ak_detail.html @@ -184,12 +184,6 @@ </td> </tr> {% endif %} - <tr> - <td>{% trans "Tags" %}</td> - <td> - {% tag_list ak.tags.all ak.event.slug %} - </td> - </tr> <tr> <td>{% trans "Reso intention?" %}</td> <td> diff --git a/AKSubmission/templates/AKSubmission/ak_overview.html b/AKSubmission/templates/AKSubmission/ak_overview.html index b487f168..6dc2b394 100644 --- a/AKSubmission/templates/AKSubmission/ak_overview.html +++ b/AKSubmission/templates/AKSubmission/ak_overview.html @@ -13,13 +13,6 @@ {% endblock %} {% 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" %} {% endblock %} diff --git a/AKSubmission/templates/AKSubmission/ak_table.html b/AKSubmission/templates/AKSubmission/ak_table.html index ba15c259..3a32927c 100644 --- a/AKSubmission/templates/AKSubmission/ak_table.html +++ b/AKSubmission/templates/AKSubmission/ak_table.html @@ -9,7 +9,6 @@ <th>{% trans "Name" %}</th> <th>{% trans "Who?" %}</th> <th>{% trans 'Category' %}</th> - <th>{% trans "Tags" %}</th> <th></th> </tr> </thead> @@ -38,8 +37,7 @@ {% endif %} </td> <td>{% category_linked_badge ak.category event.slug %}</td> - <td>{% tag_list ak.tags.all event.slug %}</td> - <td class="text-right"> + <td class="text-right" style="white-space: nowrap;"> <a href="{% url 'submit:ak_detail' event_slug=ak.event.slug pk=ak.pk %}" data-toggle="tooltip" title="{% trans 'Details' %}" class="btn btn-primary">{% fa5_icon 'info' 'fas' %}</a> diff --git a/AKSubmission/templates/AKSubmission/tags_list.html b/AKSubmission/templates/AKSubmission/tags_list.html deleted file mode 100644 index e12860cc..00000000 --- a/AKSubmission/templates/AKSubmission/tags_list.html +++ /dev/null @@ -1,3 +0,0 @@ -{% 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 %} diff --git a/AKSubmission/templatetags/tags_AKSubmission.py b/AKSubmission/templatetags/tags_AKSubmission.py index 7be35e1e..d7578416 100644 --- a/AKSubmission/templatetags/tags_AKSubmission.py +++ b/AKSubmission/templatetags/tags_AKSubmission.py @@ -11,11 +11,6 @@ def bool_symbol(bool_val): 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") def track_list(tracks, event_slug): return {"tracks": tracks, "event_slug": event_slug} diff --git a/AKSubmission/urls.py b/AKSubmission/urls.py index 213ea0e1..d0c478c6 100644 --- a/AKSubmission/urls.py +++ b/AKSubmission/urls.py @@ -18,7 +18,6 @@ urlpatterns = [ path('akslot/<int:pk>/delete/', views.AKSlotDeleteView.as_view(), name='akslot_delete'), 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/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('owner/', views.AKOwnerCreateView.as_view(), name='akowner_create'), path('new/', views.AKOwnerSelectDispatchView.as_view(), name='akowner_select'), diff --git a/AKSubmission/views.py b/AKSubmission/views.py index 04433474..796d05d3 100644 --- a/AKSubmission/views.py +++ b/AKSubmission/views.py @@ -13,11 +13,12 @@ from django.views import View from django.views.generic import ListView, DetailView, CreateView, UpdateView, DeleteView, TemplateView 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 FilterByEventSlugMixin 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): @@ -108,18 +109,6 @@ class AKListByCategoryView(AKOverviewView): 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): def dispatch(self, request, *args, **kwargs): self.track = get_object_or_404(AKTrack, pk=kwargs['track_pk']) @@ -218,11 +207,6 @@ class AKAndAKWishSubmissionView(EventSlugMixin, EventInactiveRedirectMixin, Crea # 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, was_created = AKTag.objects.get_or_create(name=tag_name) - self.object.tags.add(tag) - # Generate slot(s) (but not for wishes) if "durations" in form.cleaned_data: for duration in form.cleaned_data["durations"]: @@ -258,7 +242,7 @@ class AKWishSubmissionView(AKAndAKWishSubmissionView): class AKEditView(EventSlugMixin, EventInactiveRedirectMixin, UpdateView): model = AK template_name = 'AKSubmission/ak_edit.html' - form_class = AKEditForm + form_class = AKForm def get_success_url(self): messages.add_message(self.request, messages.SUCCESS, _("AK successfully updated")) @@ -274,14 +258,6 @@ class AKEditView(EventSlugMixin, EventInactiveRedirectMixin, UpdateView): 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? new_owner_count = self.object.owners.count() # Now AK: diff --git a/Utils/json_export.py b/Utils/json_export.py index a3a8af71..146bd254 100644 --- a/Utils/json_export.py +++ b/Utils/json_export.py @@ -41,10 +41,6 @@ for entry in exported_entries: elif entry['model'] == "AKModel.event": if int(entry['pk']) == event_id: entries_out.append(entry) - # Backup tags - elif entry['model'] == "AKModel.aktag": - # No restriction needed, backup all tags - entries_out.append(entry) else: # This should normally not happen (all other models should have a reference to the event) entries_without_event += 1 -- GitLab