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

Merge branch 'feature-aklist-by-category' into 'master'

Improve AK categories

See merge request !3
parents 1e5ef94e d304b8dc
Branches
No related tags found
No related merge requests found
...@@ -2,7 +2,7 @@ msgid "" ...@@ -2,7 +2,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-10-18 13:01+0000\n" "POT-Creation-Date: 2019-10-20 17:51+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
...@@ -11,13 +11,13 @@ msgstr "" ...@@ -11,13 +11,13 @@ 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"
#: availability.py:38 models.py:20 models.py:40 models.py:104 models.py:152 #: availability.py:38 models.py:20 models.py:40 models.py:105 models.py:153
#: models.py:183 models.py:208 #: models.py:184 models.py:209
msgid "Event" msgid "Event"
msgstr "Event" msgstr "Event"
#: availability.py:39 models.py:41 models.py:105 models.py:153 models.py:184 #: availability.py:39 models.py:41 models.py:106 models.py:154 models.py:185
#: models.py:209 #: models.py:210
msgid "Associated event" msgid "Associated event"
msgstr "Zugehöriges Event" msgstr "Zugehöriges Event"
...@@ -29,7 +29,7 @@ msgstr "Person" ...@@ -29,7 +29,7 @@ msgstr "Person"
msgid "Person whose availability this is" msgid "Person whose availability this is"
msgstr "Person deren Verfügbarkeit hier abgebildet wird" msgstr "Person deren Verfügbarkeit hier abgebildet wird"
#: availability.py:56 models.py:187 models.py:202 #: availability.py:56 models.py:188 models.py:203
msgid "Room" msgid "Room"
msgstr "Raum" msgstr "Raum"
...@@ -37,7 +37,7 @@ msgstr "Raum" ...@@ -37,7 +37,7 @@ msgstr "Raum"
msgid "Room whose availability this is" msgid "Room whose availability this is"
msgstr "Raum dessen Verfügbarkeit hier abgebildet wird" msgstr "Raum dessen Verfügbarkeit hier abgebildet wird"
#: availability.py:65 models.py:156 models.py:201 #: availability.py:65 models.py:157 models.py:202
msgid "AK" msgid "AK"
msgstr "AK" msgstr "AK"
...@@ -47,7 +47,7 @@ msgstr "AK" ...@@ -47,7 +47,7 @@ msgstr "AK"
msgid "AK whose availability this is" msgid "AK whose availability this is"
msgstr "Verfügbarkeiten" msgstr "Verfügbarkeiten"
#: availability.py:74 models.py:62 #: availability.py:74 models.py:63
msgid "AK Category" msgid "AK Category"
msgstr "AK Kategorie" msgstr "AK Kategorie"
...@@ -63,8 +63,8 @@ msgstr "Verfügbarkeit" ...@@ -63,8 +63,8 @@ msgstr "Verfügbarkeit"
msgid "Availabilities" msgid "Availabilities"
msgstr "Verfügbarkeiten" msgstr "Verfügbarkeiten"
#: models.py:9 models.py:58 models.py:73 models.py:88 models.py:102 #: models.py:9 models.py:58 models.py:74 models.py:89 models.py:103
#: models.py:119 models.py:176 #: models.py:120 models.py:177
msgid "Name" msgid "Name"
msgstr "Name" msgstr "Name"
...@@ -142,7 +142,7 @@ msgstr "Instutution" ...@@ -142,7 +142,7 @@ msgstr "Instutution"
msgid "Uni etc." msgid "Uni etc."
msgstr "Universität o.ä." msgstr "Universität o.ä."
#: models.py:38 models.py:128 #: models.py:38 models.py:129
msgid "Web Link" msgid "Web Link"
msgstr "Internet Link" msgstr "Internet Link"
...@@ -162,231 +162,235 @@ msgstr "AK Leitungen" ...@@ -162,231 +162,235 @@ msgstr "AK Leitungen"
msgid "Name of the AK Category" msgid "Name of the AK Category"
msgstr "Name des AK Kategorie" msgstr "Name des AK Kategorie"
#: models.py:59 models.py:74 #: models.py:59 models.py:75
msgid "Color" msgid "Color"
msgstr "Farbe" msgstr "Farbe"
#: models.py:59 models.py:74 #: models.py:59 models.py:75
msgid "Color for displaying" msgid "Color for displaying"
msgstr "Farbe für die Anzeige" msgstr "Farbe für die Anzeige"
#: models.py:63 #: models.py:60 models.py:123
msgid "Description"
msgstr "Beschreibung"
#: models.py:60
msgid "Short description of this AK Category"
msgstr "Beschreibung der AK-Kategorie"
#: models.py:64
msgid "AK Categories" msgid "AK Categories"
msgstr "AK Kategorien" msgstr "AK Kategorien"
#: models.py:73 #: models.py:74
msgid "Name of the AK Track" msgid "Name of the AK Track"
msgstr "Name des AK Tracks" msgstr "Name des AK Tracks"
#: models.py:77 #: models.py:78
msgid "AK Track" msgid "AK Track"
msgstr "AK Track" msgstr "AK Track"
#: models.py:78 #: models.py:79
msgid "AK Tracks" msgid "AK Tracks"
msgstr "AK Tracks" msgstr "AK Tracks"
#: models.py:88 #: models.py:89
msgid "Name of the AK Tag" msgid "Name of the AK Tag"
msgstr "Name das AK Tags" msgstr "Name das AK Tags"
#: models.py:91 #: models.py:92
msgid "AK Tag" msgid "AK Tag"
msgstr "AK Tag" msgstr "AK Tag"
#: models.py:92 #: models.py:93
msgid "AK Tags" msgid "AK Tags"
msgstr "AK Tags" msgstr "AK Tags"
#: models.py:102 #: models.py:103
msgid "Name of the Requirement" msgid "Name of the Requirement"
msgstr "Name der Anforderung" msgstr "Name der Anforderung"
#: models.py:108 #: models.py:109
msgid "AK Requirement" msgid "AK Requirement"
msgstr "AK Anforderung" msgstr "AK Anforderung"
#: models.py:109 #: models.py:110
msgid "AK Requirements" msgid "AK Requirements"
msgstr "AK Anforderungen" msgstr "AK Anforderungen"
#: models.py:119 #: models.py:120
msgid "Name of the AK" msgid "Name of the AK"
msgstr "Name des AKs" msgstr "Name des AKs"
#: models.py:120 #: models.py:121
msgid "Short Name" msgid "Short Name"
msgstr "Kurzer Name" msgstr "Kurzer Name"
#: models.py:121 #: models.py:122
msgid "Name displayed in the schedule" msgid "Name displayed in the schedule"
msgstr "Name zur Anzeige im AK Plan" msgstr "Name zur Anzeige im AK Plan"
#: models.py:122 #: models.py:123
msgid "Description"
msgstr "Beschreibung"
#: models.py:122
msgid "Description of the AK" msgid "Description of the AK"
msgstr "Beschreibung des AKs" msgstr "Beschreibung des AKs"
#: models.py:124 #: models.py:125
msgid "Owners" msgid "Owners"
msgstr "Leitungen" msgstr "Leitungen"
#: models.py:125 #: models.py:126
msgid "Those organizing the AK" msgid "Those organizing the AK"
msgstr "Menschen, die den AK organisieren und halten" msgstr "Menschen, die den AK organisieren und halten"
#: models.py:128 #: models.py:129
msgid "Link to wiki page" msgid "Link to wiki page"
msgstr "Link zur Wiki Seite" msgstr "Link zur Wiki Seite"
#: models.py:130 #: models.py:131
msgid "Category" msgid "Category"
msgstr "Kategorie" msgstr "Kategorie"
#: models.py:131 #: models.py:132
msgid "Category of the AK" msgid "Category of the AK"
msgstr "Kategorie des AKs" msgstr "Kategorie des AKs"
#: models.py:132 #: models.py:133
msgid "Tags" msgid "Tags"
msgstr "Tags" msgstr "Tags"
#: models.py:132 #: models.py:133
msgid "Tags provided by owners" msgid "Tags provided by owners"
msgstr "Tags, die durch die AK Leitung vergeben wurden" msgstr "Tags, die durch die AK Leitung vergeben wurden"
#: models.py:133 #: models.py:134
msgid "Track" msgid "Track"
msgstr "Track" msgstr "Track"
#: models.py:134 #: models.py:135
msgid "Track the AK belongs to" msgid "Track the AK belongs to"
msgstr "Track zu dem der AK gehört" msgstr "Track zu dem der AK gehört"
#: models.py:136 #: models.py:137
msgid "Resolution Intention" msgid "Resolution Intention"
msgstr "Resolutionsabsicht" msgstr "Resolutionsabsicht"
#: models.py:137 #: models.py:138
msgid "Intends to submit a resolution" msgid "Intends to submit a resolution"
msgstr "Beabsichtigt eine Resolution einzureichen" msgstr "Beabsichtigt eine Resolution einzureichen"
#: models.py:138 #: models.py:139
msgid "Present this AK" msgid "Present this AK"
msgstr "AK Präsentieren" msgstr "AK Präsentieren"
#: models.py:138 #: models.py:139
msgid "Present results of this AK" msgid "Present results of this AK"
msgstr "Die Ergebnisse dieses AKs vorstellen" msgstr "Die Ergebnisse dieses AKs vorstellen"
#: models.py:140 #: models.py:141
msgid "Requirements" msgid "Requirements"
msgstr "Anforderungen" msgstr "Anforderungen"
#: models.py:141 #: models.py:142
msgid "AK's Requirements" msgid "AK's Requirements"
msgstr "Anforderungen des AKs" msgstr "Anforderungen des AKs"
#: models.py:143 #: models.py:144
msgid "Conflicting AKs" msgid "Conflicting AKs"
msgstr "AK Konflikte" msgstr "AK Konflikte"
#: models.py:144 #: models.py:145
msgid "AKs that conflict and thus must not take place at the same time" msgid "AKs that conflict and thus must not take place at the same time"
msgstr "" msgstr ""
"AKs, die Konflikte haben und deshalb nicht gleichzeitig stattfinden dürfen" "AKs, die Konflikte haben und deshalb nicht gleichzeitig stattfinden dürfen"
#: models.py:145 #: models.py:146
msgid "Prerequisite AKs" msgid "Prerequisite AKs"
msgstr "Vorausgesetzte AKs" msgstr "Vorausgesetzte AKs"
#: models.py:146 #: models.py:147
msgid "AKs that should precede this AK in the schedule" msgid "AKs that should precede this AK in the schedule"
msgstr "AKS die im AK Plan vor diesem AK stattfinden müssen" msgstr "AKS die im AK Plan vor diesem AK stattfinden müssen"
#: models.py:148 #: models.py:149
msgid "Internal Notes" msgid "Internal Notes"
msgstr "Interne Notizen" msgstr "Interne Notizen"
#: models.py:148 #: models.py:149
msgid "Notes to organizers" msgid "Notes to organizers"
msgstr "Notizen an die Organisator*innen" msgstr "Notizen an die Organisator*innen"
#: models.py:150 #: models.py:151
msgid "Interest" msgid "Interest"
msgstr "Interesse" msgstr "Interesse"
#: models.py:150 #: models.py:151
msgid "Expected number of people" msgid "Expected number of people"
msgstr "Erwartete Personenzahl" msgstr "Erwartete Personenzahl"
#: models.py:157 #: models.py:158
msgid "AKs" msgid "AKs"
msgstr "AKs" msgstr "AKs"
#: models.py:176 #: models.py:177
msgid "Name or number of the room" msgid "Name or number of the room"
msgstr "Name oder Nummer des Raums" msgstr "Name oder Nummer des Raums"
#: models.py:177 #: models.py:178
msgid "Building" msgid "Building"
msgstr "Gebäude" msgstr "Gebäude"
#: models.py:178 #: models.py:179
msgid "Name or number of the building" msgid "Name or number of the building"
msgstr "Name oder Nummer des Gebäudes" msgstr "Name oder Nummer des Gebäudes"
#: models.py:179 #: models.py:180
msgid "Capacity" msgid "Capacity"
msgstr "Kapazität" msgstr "Kapazität"
#: models.py:179 #: models.py:180
msgid "Maximum number of people" msgid "Maximum number of people"
msgstr "Maximale Personenzahl" msgstr "Maximale Personenzahl"
#: models.py:180 #: models.py:181
msgid "Properties" msgid "Properties"
msgstr "Eigenschaften" msgstr "Eigenschaften"
#: models.py:181 #: models.py:182
msgid "AK requirements fulfilled by the room" msgid "AK requirements fulfilled by the room"
msgstr "AK Anforderungen, die dieser Raum erfüllt" msgstr "AK Anforderungen, die dieser Raum erfüllt"
#: models.py:188 #: models.py:189
msgid "Rooms" msgid "Rooms"
msgstr "Räume" msgstr "Räume"
#: models.py:201 #: models.py:202
msgid "AK being mapped" msgid "AK being mapped"
msgstr "AK, der zugeordnet wird" msgstr "AK, der zugeordnet wird"
#: models.py:203 #: models.py:204
msgid "Room the AK will take place in" msgid "Room the AK will take place in"
msgstr "Raum in dem der AK stattfindet" msgstr "Raum in dem der AK stattfindet"
#: models.py:204 #: models.py:205
msgid "Slot Begin" msgid "Slot Begin"
msgstr "Beginn des Slots" msgstr "Beginn des Slots"
#: models.py:204 #: models.py:205
msgid "Time and date the slot begins" msgid "Time and date the slot begins"
msgstr "Zeit und Datum zu der der AK beginnt" msgstr "Zeit und Datum zu der der AK beginnt"
#: models.py:205 #: models.py:206
msgid "Duration" msgid "Duration"
msgstr "Dauer" msgstr "Dauer"
#: models.py:206 #: models.py:207
msgid "Length in hours" msgid "Length in hours"
msgstr "Länge in Stunden" msgstr "Länge in Stunden"
#: models.py:212 #: models.py:213
msgid "AK Slot" msgid "AK Slot"
msgstr "AK Slot" msgstr "AK Slot"
#: models.py:213 #: models.py:214
msgid "AK Slots" msgid "AK Slots"
msgstr "AK Slot" msgstr "AK Slot"
# Generated by Django 2.2.6 on 2019-10-20 17:47
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('AKModel', '0015_ak_present_field'),
]
operations = [
migrations.AddField(
model_name='akcategory',
name='description',
field=models.TextField(blank=True, help_text='Short description of this AK Category', verbose_name='Description'),
),
]
...@@ -57,6 +57,7 @@ class AKCategory(models.Model): ...@@ -57,6 +57,7 @@ class AKCategory(models.Model):
""" """
name = models.CharField(max_length=64, unique=True, verbose_name=_('Name'), help_text=_('Name of the AK Category')) name = models.CharField(max_length=64, unique=True, verbose_name=_('Name'), help_text=_('Name of the AK Category'))
color = models.CharField(max_length=7, blank=True, verbose_name=_('Color'), help_text=_('Color for displaying')) color = models.CharField(max_length=7, blank=True, verbose_name=_('Color'), help_text=_('Color for displaying'))
description = models.TextField(blank=True, verbose_name=_("Description"), help_text=_("Short description of this AK Category"))
class Meta: class Meta:
verbose_name = _('AK Category') verbose_name = _('AK Category')
......
...@@ -137,3 +137,6 @@ BOOTSTRAP4 = { ...@@ -137,3 +137,6 @@ BOOTSTRAP4 = {
# Settings for FontAwesome # Settings for FontAwesome
FONTAWESOME_CSS_URL = "//cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.css" FONTAWESOME_CSS_URL = "//cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.css"
# Treat wishes as seperate category in submission views?
WISHES_AS_CATEGORY = True
...@@ -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: 2019-10-18 22:22+0000\n" "POT-Creation-Date: 2019-10-21 22:38+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
...@@ -28,6 +28,11 @@ msgstr "" ...@@ -28,6 +28,11 @@ msgstr ""
msgid "AK Submission" msgid "AK Submission"
msgstr "AK-Eintragung" msgstr "AK-Eintragung"
#: templates/AKSubmission/ak_detail.html:27
#: templates/AKSubmission/ak_list_table.html:30
msgid "AK Wish"
msgstr "AK-Wunsch"
#: templates/AKSubmission/ak_detail.html:30 #: templates/AKSubmission/ak_detail.html:30
#: templates/AKSubmission/ak_list_table.html:10 #: templates/AKSubmission/ak_list_table.html:10
msgid "Who?" msgid "Who?"
...@@ -87,7 +92,9 @@ msgstr "Reso" ...@@ -87,7 +92,9 @@ msgstr "Reso"
#: templates/AKSubmission/submission_overview.html:17 #: templates/AKSubmission/submission_overview.html:17
msgid "" msgid ""
"On this page you can see a list of current AKs, change them and add new ones." "On this page you can see a list of current AKs, change them and add new ones."
msgstr "Auf dieser Seite kannst du eine Liste von aktuellen AKs sehen, diese bearbeiten und neue hinzufügen." msgstr ""
"Auf dieser Seite kannst du eine Liste von aktuellen AKs sehen, diese "
"bearbeiten und neue hinzufügen."
#: templates/AKSubmission/submission_overview.html:20 #: templates/AKSubmission/submission_overview.html:20
msgid "Submit" msgid "Submit"
...@@ -104,3 +111,13 @@ msgstr "Neuer AK-Wunsch" ...@@ -104,3 +111,13 @@ msgstr "Neuer AK-Wunsch"
#: templates/AKSubmission/submission_overview.html:26 #: templates/AKSubmission/submission_overview.html:26
msgid "Current AKs" msgid "Current AKs"
msgstr "Aktuelle AKs" msgstr "Aktuelle AKs"
#: views.py:33
msgid "Wishes"
msgstr "Wünsche"
#: views.py:33
msgid "AKs one would like to have"
msgstr ""
"AKs die sich gewünscht wurden, aber bei denen noch nicht klar ist, wer sie "
"macht. Falls du dir das vorstellen kannst, trag dich einfach ein"
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<a href="#" class="btn btn-success">{% fontawesome_icon 'pencil-alt' %}</a> <a href="#" class="btn btn-success">{% fontawesome_icon 'pencil-alt' %}</a>
</div> </div>
<h2>{{ ak.name }}</h2> <h2>{% if ak.wish %}{% trans "AK Wish" %}: {% endif %}{{ ak.name }}</h2>
<table class="table table-borderless"> <table class="table table-borderless">
<tr><td>{% trans "Who?" %}</td><td>{{ ak.owners_list }}</td></tr> <tr><td>{% trans "Who?" %}</td><td>{{ ak.owners_list }}</td></tr>
......
...@@ -25,7 +25,13 @@ ...@@ -25,7 +25,13 @@
<span class="badge badge-dark badge-pill" title="{% trans 'Reso' %}">{% fontawesome_icon "scroll" %}</span> <span class="badge badge-dark badge-pill" title="{% trans 'Reso' %}">{% fontawesome_icon "scroll" %}</span>
{% endif %} {% endif %}
</td> </td>
<td>{{ ak.owners_list }}</td> <td>
{% if ak.wish %}
<span class="badge badge-dark badge-pill">{% trans "AK Wish" %}</span>
{% else %}
{{ ak.owners_list }}
{% endif %}
</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>{% tag_list ak.tags.all event.slug %}</td>
<td class="text-right"> <td class="text-right">
......
...@@ -25,6 +25,25 @@ ...@@ -25,6 +25,25 @@
<h2>{% trans "Current AKs" %}</h2> <h2>{% trans "Current AKs" %}</h2>
{% include "AKSubmission/ak_list_table.html" %} <noscript>
{% include "AKSubmission/ak_list_table.html" %}
</noscript>
<ul class="nav nav-tabs" style="margin-bottom:15px">
{% for category, _ in categories %}
<li class="nav-item">
<a class="nav-link {% if forloop.first %}active{% endif %}" data-toggle="tab" href="#category_{{ category.pk }}">{{ category.name }}</a>
</li>
{% endfor %}
</ul>
<div id="akListTabbed" class="tab-content">
{% for category, AKs in categories %}
<div class="tab-pane fade {% if forloop.first %}show active{% endif %}" id="category_{{ category.pk }}">
<p><b>{{ category.name }}:</b> {{ category.description }}</p>
{% include "AKSubmission/ak_list_table.html" %}
</div>
{% endfor %}
</div>
{% endblock %} {% endblock %}
...@@ -4,6 +4,7 @@ from django.views.generic import ListView, DetailView ...@@ -4,6 +4,7 @@ from django.views.generic import ListView, DetailView
from AKModel.models import AK, AKCategory, AKTag from AKModel.models import AK, AKCategory, AKTag
from AKModel.views import FilterByEventSlugMixin from AKModel.views import FilterByEventSlugMixin
from django.conf import settings
class SubmissionOverviewView(FilterByEventSlugMixin, ListView): class SubmissionOverviewView(FilterByEventSlugMixin, ListView):
...@@ -12,6 +13,30 @@ class SubmissionOverviewView(FilterByEventSlugMixin, ListView): ...@@ -12,6 +13,30 @@ class SubmissionOverviewView(FilterByEventSlugMixin, ListView):
template_name = "AKSubmission/submission_overview.html" template_name = "AKSubmission/submission_overview.html"
ordering = ['category'] ordering = ['category']
def get_context_data(self, *, object_list=None, **kwargs):
context = super().get_context_data(object_list=object_list, **kwargs)
# Sort AKs into different lists (by their category)
categories = []
aks_for_category = []
ak_wishes = []
current_category = None
for ak in context["AKs"]:
if ak.category != current_category:
current_category = ak.category
aks_for_category = []
categories.append((current_category, aks_for_category))
if settings.WISHES_AS_CATEGORY and ak.wish:
ak_wishes.append(ak)
else:
aks_for_category.append(ak)
if settings.WISHES_AS_CATEGORY:
categories.append(({"name":_("Wishes"), "pk": "wish", "description": _("AKs one would like to have")}, ak_wishes))
context["categories"] = categories
return context
class AKDetailView(DetailView): class AKDetailView(DetailView):
model = AK model = AK
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment