Skip to content
Snippets Groups Projects
Commit 0ef613db authored by Benjamin Hättasch's avatar Benjamin Hättasch
Browse files

Improve AK categories

Add description to category model
Show tabbed list of different categories of AKs on submission overview
parent 1e5ef94e
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\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"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -11,13 +11,13 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: availability.py:38 models.py:20 models.py:40 models.py:104 models.py:152
#: models.py:183 models.py:208
#: availability.py:38 models.py:20 models.py:40 models.py:105 models.py:153
#: models.py:184 models.py:209
msgid "Event"
msgstr "Event"
#: availability.py:39 models.py:41 models.py:105 models.py:153 models.py:184
#: models.py:209
#: availability.py:39 models.py:41 models.py:106 models.py:154 models.py:185
#: models.py:210
msgid "Associated event"
msgstr "Zugehöriges Event"
......@@ -29,7 +29,7 @@ msgstr "Person"
msgid "Person whose availability this is"
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"
msgstr "Raum"
......@@ -37,7 +37,7 @@ msgstr "Raum"
msgid "Room whose availability this is"
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"
msgstr "AK"
......@@ -47,7 +47,7 @@ msgstr "AK"
msgid "AK whose availability this is"
msgstr "Verfügbarkeiten"
#: availability.py:74 models.py:62
#: availability.py:74 models.py:63
msgid "AK Category"
msgstr "AK Kategorie"
......@@ -63,8 +63,8 @@ msgstr "Verfügbarkeit"
msgid "Availabilities"
msgstr "Verfügbarkeiten"
#: models.py:9 models.py:58 models.py:73 models.py:88 models.py:102
#: models.py:119 models.py:176
#: models.py:9 models.py:58 models.py:74 models.py:89 models.py:103
#: models.py:120 models.py:177
msgid "Name"
msgstr "Name"
......@@ -142,7 +142,7 @@ msgstr "Instutution"
msgid "Uni etc."
msgstr "Universität o.ä."
#: models.py:38 models.py:128
#: models.py:38 models.py:129
msgid "Web Link"
msgstr "Internet Link"
......@@ -162,231 +162,235 @@ msgstr "AK Leitungen"
msgid "Name of the AK Category"
msgstr "Name des AK Kategorie"
#: models.py:59 models.py:74
#: models.py:59 models.py:75
msgid "Color"
msgstr "Farbe"
#: models.py:59 models.py:74
#: models.py:59 models.py:75
msgid "Color for displaying"
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"
msgstr "AK Kategorien"
#: models.py:73
#: models.py:74
msgid "Name of the AK Track"
msgstr "Name des AK Tracks"
#: models.py:77
#: models.py:78
msgid "AK Track"
msgstr "AK Track"
#: models.py:78
#: models.py:79
msgid "AK Tracks"
msgstr "AK Tracks"
#: models.py:88
#: models.py:89
msgid "Name of the AK Tag"
msgstr "Name das AK Tags"
#: models.py:91
#: models.py:92
msgid "AK Tag"
msgstr "AK Tag"
#: models.py:92
#: models.py:93
msgid "AK Tags"
msgstr "AK Tags"
#: models.py:102
#: models.py:103
msgid "Name of the Requirement"
msgstr "Name der Anforderung"
#: models.py:108
#: models.py:109
msgid "AK Requirement"
msgstr "AK Anforderung"
#: models.py:109
#: models.py:110
msgid "AK Requirements"
msgstr "AK Anforderungen"
#: models.py:119
#: models.py:120
msgid "Name of the AK"
msgstr "Name des AKs"
#: models.py:120
#: models.py:121
msgid "Short Name"
msgstr "Kurzer Name"
#: models.py:121
#: models.py:122
msgid "Name displayed in the schedule"
msgstr "Name zur Anzeige im AK Plan"
#: models.py:122
msgid "Description"
msgstr "Beschreibung"
#: models.py:122
#: models.py:123
msgid "Description of the AK"
msgstr "Beschreibung des AKs"
#: models.py:124
#: models.py:125
msgid "Owners"
msgstr "Leitungen"
#: models.py:125
#: models.py:126
msgid "Those organizing the AK"
msgstr "Menschen, die den AK organisieren und halten"
#: models.py:128
#: models.py:129
msgid "Link to wiki page"
msgstr "Link zur Wiki Seite"
#: models.py:130
#: models.py:131
msgid "Category"
msgstr "Kategorie"
#: models.py:131
#: models.py:132
msgid "Category of the AK"
msgstr "Kategorie des AKs"
#: models.py:132
#: models.py:133
msgid "Tags"
msgstr "Tags"
#: models.py:132
#: models.py:133
msgid "Tags provided by owners"
msgstr "Tags, die durch die AK Leitung vergeben wurden"
#: models.py:133
#: models.py:134
msgid "Track"
msgstr "Track"
#: models.py:134
#: models.py:135
msgid "Track the AK belongs to"
msgstr "Track zu dem der AK gehört"
#: models.py:136
#: models.py:137
msgid "Resolution Intention"
msgstr "Resolutionsabsicht"
#: models.py:137
#: models.py:138
msgid "Intends to submit a resolution"
msgstr "Beabsichtigt eine Resolution einzureichen"
#: models.py:138
#: models.py:139
msgid "Present this AK"
msgstr "AK Präsentieren"
#: models.py:138
#: models.py:139
msgid "Present results of this AK"
msgstr "Die Ergebnisse dieses AKs vorstellen"
#: models.py:140
#: models.py:141
msgid "Requirements"
msgstr "Anforderungen"
#: models.py:141
#: models.py:142
msgid "AK's Requirements"
msgstr "Anforderungen des AKs"
#: models.py:143
#: models.py:144
msgid "Conflicting AKs"
msgstr "AK Konflikte"
#: models.py:144
#: models.py:145
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"
#: models.py:145
#: models.py:146
msgid "Prerequisite AKs"
msgstr "Vorausgesetzte AKs"
#: models.py:146
#: models.py:147
msgid "AKs that should precede this AK in the schedule"
msgstr "AKS die im AK Plan vor diesem AK stattfinden müssen"
#: models.py:148
#: models.py:149
msgid "Internal Notes"
msgstr "Interne Notizen"
#: models.py:148
#: models.py:149
msgid "Notes to organizers"
msgstr "Notizen an die Organisator*innen"
#: models.py:150
#: models.py:151
msgid "Interest"
msgstr "Interesse"
#: models.py:150
#: models.py:151
msgid "Expected number of people"
msgstr "Erwartete Personenzahl"
#: models.py:157
#: models.py:158
msgid "AKs"
msgstr "AKs"
#: models.py:176
#: models.py:177
msgid "Name or number of the room"
msgstr "Name oder Nummer des Raums"
#: models.py:177
#: models.py:178
msgid "Building"
msgstr "Gebäude"
#: models.py:178
#: models.py:179
msgid "Name or number of the building"
msgstr "Name oder Nummer des Gebäudes"
#: models.py:179
#: models.py:180
msgid "Capacity"
msgstr "Kapazität"
#: models.py:179
#: models.py:180
msgid "Maximum number of people"
msgstr "Maximale Personenzahl"
#: models.py:180
#: models.py:181
msgid "Properties"
msgstr "Eigenschaften"
#: models.py:181
#: models.py:182
msgid "AK requirements fulfilled by the room"
msgstr "AK Anforderungen, die dieser Raum erfüllt"
#: models.py:188
#: models.py:189
msgid "Rooms"
msgstr "Räume"
#: models.py:201
#: models.py:202
msgid "AK being mapped"
msgstr "AK, der zugeordnet wird"
#: models.py:203
#: models.py:204
msgid "Room the AK will take place in"
msgstr "Raum in dem der AK stattfindet"
#: models.py:204
#: models.py:205
msgid "Slot Begin"
msgstr "Beginn des Slots"
#: models.py:204
#: models.py:205
msgid "Time and date the slot begins"
msgstr "Zeit und Datum zu der der AK beginnt"
#: models.py:205
#: models.py:206
msgid "Duration"
msgstr "Dauer"
#: models.py:206
#: models.py:207
msgid "Length in hours"
msgstr "Länge in Stunden"
#: models.py:212
#: models.py:213
msgid "AK Slot"
msgstr "AK Slot"
#: models.py:213
#: models.py:214
msgid "AK Slots"
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):
"""
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'))
description = models.TextField(blank=True, verbose_name=_("Description"), help_text=_("Short description of this AK Category"))
class Meta:
verbose_name = _('AK Category')
......
......@@ -25,6 +25,25 @@
<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 }}</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 }}:</b> {{ category.description }}</p>
{% include "AKSubmission/ak_list_table.html" %}
</div>
{% endfor %}
</div>
{% endblock %}
......@@ -12,6 +12,23 @@ class SubmissionOverviewView(FilterByEventSlugMixin, ListView):
template_name = "AKSubmission/submission_overview.html"
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 = []
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))
aks_for_category.append(ak)
context["categories"] = categories
return context
class AKDetailView(DetailView):
model = AK
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment