diff --git a/fet2020/intern/forms.py b/fet2020/intern/forms.py
index 344f2e9f..777a8ae4 100644
--- a/fet2020/intern/forms.py
+++ b/fet2020/intern/forms.py
@@ -152,14 +152,14 @@ class TopicCreateForm(forms.ModelForm):
model = Topic
fields = [
"title",
- "slug",
+ "shortterm",
"description",
"topic_group",
]
labels = {
"title": _("Titel"),
- "slug": _("Permalink"),
+ "shortterm": _("Kürzel für den Link"),
"description": _("Beschreibung"),
}
@@ -173,14 +173,14 @@ class TopicUpdateForm(forms.ModelForm):
model = Topic
fields = [
"title",
- "slug",
+ "shortterm",
"description",
"topic_group",
]
labels = {
"title": _("Titel"),
- "slug": _("Permalink"),
+ "shortterm": _("Kürzel für den Link"),
"description": _("Beschreibung"),
}
@@ -195,14 +195,14 @@ class AttachmentCreateForm(forms.ModelForm):
fields = [
"title",
- "slug",
+ "shortterm",
"description",
"topic",
]
labels = {
"title": _("Titel"),
- "slug": _("Permalink"),
+ "shortterm": _("Kürzel für den Link"),
"description": _("Beschreibung"),
}
@@ -217,14 +217,14 @@ class AttachmentUpdateForm(forms.ModelForm):
fields = [
"title",
- "slug",
+ "shortterm",
"description",
"topic",
]
labels = {
"title": _("Titel"),
- "slug": _("Permalink"),
+ "shortterm": _("Kürzel für den Link"),
"description": _("Beschreibung"),
}
diff --git a/fet2020/intern/views.py b/fet2020/intern/views.py
index ecb0b2a8..5756649e 100644
--- a/fet2020/intern/views.py
+++ b/fet2020/intern/views.py
@@ -156,19 +156,14 @@ class TopicCreateView(LoginRequiredMixin, CreateView):
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
- context["topic_group"] = self.slug
+
+ topic_group = TopicGroup.objects.filter(slug=self.slug).first()
+ context["topic_group"] = topic_group
+
return context
def get_initial(self):
self.slug = self.kwargs.get("topic_group")
- topic_group = TopicGroup.objects.filter(slug=self.slug).first()
-
- context = {
- "topic_group": topic_group,
- }
-
- return context
-
class TopicUpdateView(LoginRequiredMixin, UpdateView):
model = Topic
@@ -180,17 +175,14 @@ class TopicUpdateView(LoginRequiredMixin, UpdateView):
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context["slug"] = self.slug
+
+ topic = Topic.objects.filter(slug=self.slug).first()
+ context["topic"] = topic
+
return context
def get_initial(self):
self.slug = self.kwargs.get("slug")
- topic = Topic.objects.filter(slug=self.slug).first()
-
- context = {
- "topic": topic,
- }
-
- return context
def get_success_url(self):
context = {
@@ -210,17 +202,14 @@ class AttachmentCreateView(LoginRequiredMixin, CreateView):
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context["slug"] = self.slug
+
+ topic = Topic.objects.filter(slug=self.slug).first()
+ context["topic"]= topic
+
return context
def get_initial(self):
self.slug = self.kwargs.get("slug")
- topic = Topic.objects.filter(slug=self.slug).first()
-
- context = {
- "topic": topic,
- }
-
- return context
def get_success_url(self):
context = {
@@ -242,19 +231,15 @@ class AttachmentUpdateView(LoginRequiredMixin, UpdateView):
context = super().get_context_data(**kwargs)
context["topic_slug"] = self.topic_slug
context["slug"] = self.slug
+
+ attachment = Attachment.objects.filter(slug=self.slug).first()
+ context["attachment"] = attachment
return context
def get_initial(self):
self.topic_slug = self.kwargs.get("topic_slug")
self.slug = self.kwargs.get("slug")
- attachment = Attachment.objects.filter(slug=self.slug).first()
- context = {
- "attachment": attachment,
- }
-
- return context
-
def get_success_url(self):
context = {
"topic_slug": self.topic_slug,
@@ -274,21 +259,22 @@ class EtherpadCreateView(LoginRequiredMixin, CreateView):
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
+
+ self.topic_slug = self.kwargs.get("topic_slug")
+ self.slug = self.kwargs.get("slug")
+
context["topic_slug"] = self.topic_slug
context["slug"] = self.slug
+
+ attachment = Attachment.objects.filter(slug=self.slug).first()
+ context["attachment"] = attachment
+
return context
def get_initial(self):
self.topic_slug = self.kwargs.get("topic_slug")
self.slug = self.kwargs.get("slug")
- attachment = Attachment.objects.filter(slug=self.slug).first()
- context = {
- "attachment": attachment,
- }
-
- return context
-
def get_success_url(self):
context = {
"topic_slug": self.topic_slug,
@@ -308,22 +294,19 @@ class FileUploadCreateView(LoginRequiredMixin, CreateView):
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
+
context["topic_slug"] = self.topic_slug
context["slug"] = self.slug
+ attachment = Attachment.objects.filter(slug=self.kwargs.get("slug")).first()
+ context["attachment"] = attachment
+
return context
def get_initial(self):
self.topic_slug = self.kwargs.get("topic_slug")
self.slug = self.kwargs.get("slug")
- attachment = Attachment.objects.filter(slug=self.kwargs.get("slug")).first()
- context = {
- "attachment": attachment,
- }
-
- return context
-
def get_success_url(self):
context = {
"topic_slug": self.topic_slug,
@@ -348,18 +331,15 @@ class TaskCreateView(LoginRequiredMixin, CreateView):
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context["slug"] = self.slug
+
+ topic = Topic.objects.filter(slug=self.slug).first()
+ context["topic"] = topic
+ context["task_list"] = topic.task_list
+
return context
def get_initial(self):
self.slug = self.kwargs.get("slug")
- topic = Topic.objects.filter(slug=self.slug).first()
-
- context = {
- "topic": topic,
- "task_list": topic.task_list,
- }
-
- return context
def get_success_url(self):
context = {
diff --git a/fet2020/tasks/forms.py b/fet2020/tasks/forms.py
index 2182ca1e..ff48bb1b 100644
--- a/fet2020/tasks/forms.py
+++ b/fet2020/tasks/forms.py
@@ -175,6 +175,7 @@ class InternTaskCreateForm(TaskCreateForm):
fields = [
"title",
+ "shortterm",
"task_list",
"due_date",
"assigned_to",
@@ -183,6 +184,7 @@ class InternTaskCreateForm(TaskCreateForm):
labels = {
"title": _("Titel des Tasks"),
+ "shortterm": _("Kürzel für den Link"),
"task_list": _("Task-Gruppe"),
"due_date": _("Fälligkeitsdatum"),
"assigned_to": _("Zuweisen an"),
diff --git a/fet2020/templates/intern/attachment.html b/fet2020/templates/intern/attachment.html
index fefe4fa7..7a8fabed 100644
--- a/fet2020/templates/intern/attachment.html
+++ b/fet2020/templates/intern/attachment.html
@@ -1,81 +1,62 @@
-{% extends "layout.html" %}
+{% extends "base.html" %}
{% block content %}
-
-
-
-
-
- {% if request.user.is_authenticated %}
-
- {% endif %}
+
+
+ Intern
+
+
{% if attachment.description %}
-
+
{% endblock %}
diff --git a/fet2020/templates/intern/attachment/attachment_create.html b/fet2020/templates/intern/attachment/attachment_create.html
index 4c163d9b..a0fa4ee8 100644
--- a/fet2020/templates/intern/attachment/attachment_create.html
+++ b/fet2020/templates/intern/attachment/attachment_create.html
@@ -1,23 +1,45 @@
-{% extends "layout.html" %}
+{% extends 'base.html' %}
{% block content %}
-
-
-
-
-
Neuen Anhang Ordner erstellen
-
+
{% endblock %}
diff --git a/fet2020/templates/intern/attachment/attachment_update.html b/fet2020/templates/intern/attachment/attachment_update.html
index 36ee2cd0..b4c0f305 100644
--- a/fet2020/templates/intern/attachment/attachment_update.html
+++ b/fet2020/templates/intern/attachment/attachment_update.html
@@ -1,26 +1,45 @@
-{% extends "layout.html" %}
+{% extends 'base.html' %}
{% block content %}
-
-
-
-
-
Anhang Ordner '{{ attachment.title }}' bearbeiten
-
-
-
-
+
{% endblock %}
diff --git a/fet2020/templates/intern/etherpad_create.html b/fet2020/templates/intern/etherpad_create.html
index e4779a89..5c9ec01d 100644
--- a/fet2020/templates/intern/etherpad_create.html
+++ b/fet2020/templates/intern/etherpad_create.html
@@ -1,23 +1,40 @@
-{% extends "layout.html" %}
+{% extends 'base.html' %}
{% block content %}
-
-
-
-
-
Neues Etherpad erstellen
-
+
{% endblock %}
diff --git a/fet2020/templates/intern/file_create.html b/fet2020/templates/intern/file_create.html
index 15fc8942..a973f843 100644
--- a/fet2020/templates/intern/file_create.html
+++ b/fet2020/templates/intern/file_create.html
@@ -1,23 +1,40 @@
-{% extends "layout.html" %}
+{% extends 'base.html' %}
{% block content %}
-
-
-
-
-
Neue Datei hochladen
-
+
{% endblock %}
diff --git a/fet2020/templates/intern/index.html b/fet2020/templates/intern/index.html
index 6961ce93..0005fe94 100644
--- a/fet2020/templates/intern/index.html
+++ b/fet2020/templates/intern/index.html
@@ -1,85 +1,91 @@
-{% extends "layout.html" %}
+{% extends "base.html" %}
{% block content %}
-
-
- {% if request.user.is_authenticated %}
-
+
+
+ Intern
+
+ {% regroup topic by topic_group as topic_group_list %}
+ {% for topic_group in topic_group_list %}
+
+ {% endfor %}
+
+ {% for topic_group in empty_topic_groups %}
+
+ {% endfor %}
+
+ {% if archive_topic %}
+
{% endif %}
+
+
Neuer Themenbereich
-
- {% regroup topic by topic_group as topic_list %}
- {% for topic in topic_list %}
-
-
- {% if topic.grouper.short_description %}
- {{ topic.grouper.short_description }}
- {% endif %}
-
-
- {% for tp in topic.list %}
-
- {% endfor %}
-
-
- {% endfor %}
-
- {% for topic_group in empty_topic_groups %}
-
-
-
- {% endfor %}
-
- {% if archive_topic %}
-
-
-
- {% for tp in archive_topic %}
-
- {% endfor %}
-
- {% endif %}
-
+
{% endblock %}
diff --git a/fet2020/templates/intern/task_create.html b/fet2020/templates/intern/task_create.html
index 26db5a25..488a2793 100644
--- a/fet2020/templates/intern/task_create.html
+++ b/fet2020/templates/intern/task_create.html
@@ -1,23 +1,68 @@
-{% extends 'layout.html' %}
+{% extends 'base.html' %}
{% block content %}
-
-
-
-
-
Neuen Task hinzufügen
-
-
-
+
+
+ Task hinzufügen
+
+
{% csrf_token %}
- {{ form }}
-
-
-
+
+ {% if form.non_field_errors %}
+
+
+
Fehler:
+
{{ form.non_field_errors }}
+
+ {% endif %}
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
{% endblock %}
diff --git a/fet2020/templates/intern/topic.html b/fet2020/templates/intern/topic.html
index 202d9bea..89416462 100644
--- a/fet2020/templates/intern/topic.html
+++ b/fet2020/templates/intern/topic.html
@@ -1,71 +1,47 @@
-{% extends "layout.html" %}
+{% extends "base.html" %}
{% block content %}
-
-
-
-
-
-
- {% if active_topic.task_list %}
-
- {% endif %}
-
+
+
+ Intern
+
+
+
{% if active_topic.description %}
-
- {{ active_topic.description|safe }}
-
-
+
+ {{ active_topic.description|safe }}
+
{% endif %}
- {% if tasks %}
-
-
offene Tasks:
+
- {% for task in tasks %}
-
+
-
- {% endif %}
-
- {% for attachment in attachments %}
-
- {% endfor %}
-
-
-
+
+
+
+
-
+
+
+
+
+
{% endblock %}
diff --git a/fet2020/templates/intern/topic/topic_create.html b/fet2020/templates/intern/topic/topic_create.html
index d9332ac4..c67bf6b6 100644
--- a/fet2020/templates/intern/topic/topic_create.html
+++ b/fet2020/templates/intern/topic/topic_create.html
@@ -1,23 +1,45 @@
-{% extends "layout.html" %}
+{% extends 'base.html' %}
{% block content %}
-
-
-
-
-
Neues Thema erstellen
-
-
-
+
+
+ Thema hinzufügen
+
+
{% csrf_token %}
- {{ form }}
-
-
-
+
+ {% if form.non_field_errors %}
+
+
+
Fehler:
+
{{ form.non_field_errors }}
+
+ {% endif %}
+
+
+
+
+
+
+
+
+
-
+
{% endblock %}
diff --git a/fet2020/templates/intern/topic/topic_update.html b/fet2020/templates/intern/topic/topic_update.html
index e314aa94..8f427df6 100644
--- a/fet2020/templates/intern/topic/topic_update.html
+++ b/fet2020/templates/intern/topic/topic_update.html
@@ -1,26 +1,45 @@
-{% extends "layout.html" %}
+{% extends 'base.html' %}
{% block content %}
-
-
-
-
-
Thema '{{ topic.title }}' bearbeiten
-
-
-
+
+
+ Thema '{{ topic.title }}' bearbeiten
+
+
{% csrf_token %}
- {{ form }}
-
-
-
+
+ {% if form.non_field_errors %}
+
+
+
Fehler:
+
{{ form.non_field_errors }}
+
+ {% endif %}
+
+
+
+
+
+
+
+
+
-
+
{% endblock %}