fix merge-conflict
This commit is contained in:
@@ -42,6 +42,7 @@ urlpatterns = [
|
|||||||
path("posts/", include("posts.urls")),
|
path("posts/", include("posts.urls")),
|
||||||
path("tasks/", include("tasks.urls"), name="tasks"),
|
path("tasks/", include("tasks.urls"), name="tasks"),
|
||||||
path("intern/", include("intern.urls"), name="intern"),
|
path("intern/", include("intern.urls"), name="intern"),
|
||||||
|
path('pages/', include('django.contrib.flatpages.urls')),
|
||||||
path(
|
path(
|
||||||
"sitemap.xml",
|
"sitemap.xml",
|
||||||
sitemap,
|
sitemap,
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
|
|
||||||
from .models import TopicGroup, Topic, Documentation
|
from .models import TopicGroup, Topic, Documentation, Document
|
||||||
from .forms import TopicGroupAdminForm, TopicAdminForm
|
from .forms import TopicGroupAdminForm, TopicAdminForm, DocumentationAdminForm, DocumentAdminForm
|
||||||
|
|
||||||
|
|
||||||
class DocumentationInline(admin.TabularInline):
|
class DocumentationInline(admin.TabularInline):
|
||||||
model = Documentation
|
model = Documentation
|
||||||
|
form = DocumentationAdminForm
|
||||||
extra = 0
|
extra = 0
|
||||||
verbose_name = "Dokument"
|
verbose_name = "Dokument"
|
||||||
verbose_name_plural = "Dokument-Übersicht"
|
verbose_name_plural = "Dokument-Übersicht"
|
||||||
@@ -13,9 +14,11 @@ class DocumentationInline(admin.TabularInline):
|
|||||||
|
|
||||||
class TopicInline(admin.TabularInline):
|
class TopicInline(admin.TabularInline):
|
||||||
model = Topic
|
model = Topic
|
||||||
|
form = TopicAdminForm
|
||||||
extra = 0
|
extra = 0
|
||||||
verbose_name = "Topic"
|
verbose_name = "Thema"
|
||||||
verbose_name_plural = "Topic-Übersicht"
|
verbose_name_plural = "Themen"
|
||||||
|
show_change_link = True
|
||||||
|
|
||||||
|
|
||||||
class TopicGroupAdmin(admin.ModelAdmin):
|
class TopicGroupAdmin(admin.ModelAdmin):
|
||||||
@@ -24,6 +27,8 @@ class TopicGroupAdmin(admin.ModelAdmin):
|
|||||||
search_fields = ("title", )
|
search_fields = ("title", )
|
||||||
inlines = (TopicInline,)
|
inlines = (TopicInline,)
|
||||||
|
|
||||||
|
list_display = ["title", "order",]
|
||||||
|
|
||||||
def save_model(self, request, obj, form, change):
|
def save_model(self, request, obj, form, change):
|
||||||
obj.created_by = request.user
|
obj.created_by = request.user
|
||||||
super().save_model(request, obj, form, change)
|
super().save_model(request, obj, form, change)
|
||||||
@@ -35,23 +40,39 @@ class TopicAdmin(admin.ModelAdmin):
|
|||||||
search_fields = ("title",)
|
search_fields = ("title",)
|
||||||
inlines = (DocumentationInline,)
|
inlines = (DocumentationInline,)
|
||||||
|
|
||||||
|
list_filter = ["archive",]
|
||||||
|
list_display = ["title", "topic_group", "archive",]
|
||||||
|
|
||||||
def save_model(self, request, obj, form, change):
|
def save_model(self, request, obj, form, change):
|
||||||
obj.created_by = request.user
|
obj.created_by = request.user
|
||||||
super().save_model(request, obj, form, change)
|
super().save_model(request, obj, form, change)
|
||||||
|
|
||||||
|
|
||||||
"""
|
|
||||||
class DocumentationAdmin(admin.ModelAdmin):
|
class DocumentationAdmin(admin.ModelAdmin):
|
||||||
form = DocumentationAdminForm
|
form = DocumentationAdminForm
|
||||||
model = Documentation
|
model = Documentation
|
||||||
|
|
||||||
list_display = ["title", "topic"]
|
list_display = ["title", "topic",]
|
||||||
|
|
||||||
def save_model(self, request, obj, form, change):
|
def save_model(self, request, obj, form, change):
|
||||||
obj.created_by = request.user
|
obj.created_by = request.user
|
||||||
super().save_model(request, obj, form, change)
|
super().save_model(request, obj, form, change)
|
||||||
"""
|
|
||||||
|
|
||||||
|
class DocumentAdmin(admin.ModelAdmin):
|
||||||
|
form = DocumentAdminForm
|
||||||
|
model = Document
|
||||||
|
|
||||||
|
list_filter = ["documentation",]
|
||||||
|
list_display = ["title", "date", "documentation",]
|
||||||
|
ordering = ["-date"]
|
||||||
|
|
||||||
|
def save_model(self, request, obj, form, change):
|
||||||
|
obj.created_by = request.user
|
||||||
|
super().save_model(request, obj, form, change)
|
||||||
|
|
||||||
|
|
||||||
admin.site.register(TopicGroup, TopicGroupAdmin)
|
admin.site.register(TopicGroup, TopicGroupAdmin)
|
||||||
admin.site.register(Topic, TopicAdmin)
|
admin.site.register(Topic, TopicAdmin)
|
||||||
#admin.site.register(Documentation, DocumentationAdmin)
|
#admin.site.register(Documentation, DocumentationAdmin)
|
||||||
|
admin.site.register(Document, DocumentAdmin)
|
||||||
|
|||||||
@@ -1,11 +1,14 @@
|
|||||||
|
from ckeditor_uploader.widgets import CKEditorUploadingWidget
|
||||||
from django import forms
|
from django import forms
|
||||||
from django.utils.translation import gettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
from ckeditor_uploader.widgets import CKEditorUploadingWidget
|
|
||||||
|
|
||||||
from .models import TopicGroup, Topic, Documentation, Document
|
from .models import TopicGroup, Topic, Documentation, Document
|
||||||
|
|
||||||
|
|
||||||
|
class DateInput(forms.DateInput):
|
||||||
|
input_type = "date"
|
||||||
|
|
||||||
|
|
||||||
class TopicGroupAdminForm(forms.ModelForm):
|
class TopicGroupAdminForm(forms.ModelForm):
|
||||||
class Meta:
|
class Meta:
|
||||||
model = TopicGroup
|
model = TopicGroup
|
||||||
@@ -19,6 +22,7 @@ class TopicAdminForm(forms.ModelForm):
|
|||||||
model = Topic
|
model = Topic
|
||||||
fields = [
|
fields = [
|
||||||
"title",
|
"title",
|
||||||
|
"archive",
|
||||||
"description",
|
"description",
|
||||||
"topic_group",
|
"topic_group",
|
||||||
]
|
]
|
||||||
@@ -31,10 +35,22 @@ class DocumentationAdminForm(forms.ModelForm):
|
|||||||
model = Documentation
|
model = Documentation
|
||||||
fields = [
|
fields = [
|
||||||
"title",
|
"title",
|
||||||
|
"placeholder",
|
||||||
"description",
|
"description",
|
||||||
"topic",
|
"topic",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
widgets = {"description": CKEditorUploadingWidget(config_name="default")}
|
||||||
|
|
||||||
|
|
||||||
|
class DocumentAdminForm(forms.ModelForm):
|
||||||
|
class Meta:
|
||||||
|
model = Document
|
||||||
|
fields = [
|
||||||
|
"title",
|
||||||
|
"documentation",
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
class DocumentForm(forms.ModelForm):
|
class DocumentForm(forms.ModelForm):
|
||||||
class Meta:
|
class Meta:
|
||||||
@@ -42,8 +58,16 @@ class DocumentForm(forms.ModelForm):
|
|||||||
|
|
||||||
fields = [
|
fields = [
|
||||||
"title",
|
"title",
|
||||||
|
"date",
|
||||||
]
|
]
|
||||||
|
|
||||||
labels = {
|
labels = {
|
||||||
"title": _("Titel des Protokolls"),
|
"title": _("Titel"),
|
||||||
|
"date": _("Datum"),
|
||||||
|
}
|
||||||
|
|
||||||
|
widgets = {
|
||||||
|
"date": DateInput(
|
||||||
|
format=("%d-%m-%Y"),
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,19 +1,30 @@
|
|||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
from datetime import date
|
||||||
|
from django.core.validators import ValidationError
|
||||||
from django.db import models
|
from django.db import models
|
||||||
|
from django.db.models.constraints import UniqueConstraint
|
||||||
|
from django.utils import timezone
|
||||||
from django.utils.text import slugify
|
from django.utils.text import slugify
|
||||||
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
from documents import createPadifNotExists
|
from documents import createPadifNotExists
|
||||||
from urllib.request import URLError
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class TopicGroup(models.Model):
|
class TopicGroup(models.Model):
|
||||||
title = models.CharField(max_length=128)
|
title = models.CharField(verbose_name="Titel", max_length=128)
|
||||||
|
|
||||||
slug = models.SlugField(unique=True, blank=True)
|
slug = models.SlugField(unique=True, blank=True)
|
||||||
|
|
||||||
|
order = models.PositiveSmallIntegerField(verbose_name="Reihenfolge", unique=True, null=True, blank=True)
|
||||||
|
|
||||||
objects = models.Manager()
|
objects = models.Manager()
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
verbose_name = "Themenbereich"
|
||||||
|
verbose_name_plural = "Themenbereiche"
|
||||||
|
|
||||||
def save(self, *args, **kwargs):
|
def save(self, *args, **kwargs):
|
||||||
if not self.slug:
|
if not self.slug:
|
||||||
self.slug = slugify(self.title)
|
self.slug = slugify(self.title)
|
||||||
@@ -25,15 +36,21 @@ class TopicGroup(models.Model):
|
|||||||
|
|
||||||
|
|
||||||
class Topic(models.Model):
|
class Topic(models.Model):
|
||||||
title = models.CharField(max_length=128)
|
title = models.CharField(verbose_name="Titel", max_length=128)
|
||||||
|
|
||||||
slug = models.SlugField(unique=True, blank=True)
|
slug = models.SlugField(unique=True, blank=True)
|
||||||
|
|
||||||
|
archive = models.BooleanField(verbose_name="Archiv", default=False)
|
||||||
|
|
||||||
description = models.TextField(null=True, blank=True)
|
description = models.TextField(null=True, blank=True)
|
||||||
|
|
||||||
topic_group = models.ForeignKey(TopicGroup, on_delete=models.CASCADE)
|
topic_group = models.ForeignKey(TopicGroup, on_delete=models.CASCADE, verbose_name="Themenbereich")
|
||||||
|
|
||||||
objects = models.Manager()
|
objects = models.Manager()
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
verbose_name = "Thema"
|
||||||
|
verbose_name_plural = "Themen"
|
||||||
|
|
||||||
def save(self, *args, **kwargs):
|
def save(self, *args, **kwargs):
|
||||||
if not self.slug:
|
if not self.slug:
|
||||||
self.slug = slugify(self.title)
|
self.slug = slugify(self.title)
|
||||||
@@ -45,9 +62,10 @@ class Topic(models.Model):
|
|||||||
|
|
||||||
|
|
||||||
class Documentation(models.Model):
|
class Documentation(models.Model):
|
||||||
title = models.CharField(max_length=128)
|
title = models.CharField(verbose_name="Titel", max_length=128)
|
||||||
|
slug = models.SlugField(blank=True)
|
||||||
|
placeholder = models.CharField(verbose_name="Platzhalter", max_length=128, default="Titel")
|
||||||
|
|
||||||
slug = models.SlugField(unique=True, blank=True)
|
|
||||||
description = models.TextField(null=True, blank=True)
|
description = models.TextField(null=True, blank=True)
|
||||||
|
|
||||||
topic = models.ForeignKey(Topic, on_delete=models.CASCADE)
|
topic = models.ForeignKey(Topic, on_delete=models.CASCADE)
|
||||||
@@ -61,41 +79,45 @@ class Documentation(models.Model):
|
|||||||
super().save(*args, **kwargs)
|
super().save(*args, **kwargs)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.title
|
return self.topic.title + " / " + self.title
|
||||||
|
|
||||||
|
|
||||||
class Document(models.Model):
|
class Document(models.Model):
|
||||||
title = models.CharField(max_length=128)
|
title = models.CharField(verbose_name="Titel", max_length=128)
|
||||||
|
|
||||||
etherpad_key = models.CharField(max_length=128, null=True, blank=True)
|
etherpad_key = models.CharField(max_length=128, null=True, blank=True)
|
||||||
|
date = models.DateField(verbose_name="Datum", default=date.today)
|
||||||
|
|
||||||
documentation = models.ForeignKey(Documentation, on_delete=models.CASCADE)
|
documentation = models.ForeignKey(Documentation, on_delete=models.CASCADE)
|
||||||
|
|
||||||
objects = models.Manager()
|
objects = models.Manager()
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
verbose_name = "Dokument"
|
||||||
|
verbose_name_plural = "Dokumente"
|
||||||
|
|
||||||
|
constraints = [
|
||||||
|
UniqueConstraint(fields=['title', 'date'], name='unique_title_and_date'),
|
||||||
|
]
|
||||||
|
|
||||||
|
'''
|
||||||
|
pre save signal
|
||||||
|
def clean(self):
|
||||||
|
pad_name = slugify(self.date + "-" + self.documentation.topic.slug + "-" + self.documentation.slug + "-" + slugify(self.title)
|
||||||
|
|
||||||
|
if len(pad_name) > 50:
|
||||||
|
print(pad_name)
|
||||||
|
raise ValidationError(
|
||||||
|
_('Name zum Erstellen des Etherpads ist zu lange - max. 50 Zeichen. (Länge: %(length)s) (Name: %(pad_name)s)'),
|
||||||
|
params={'length': len(pad_name), 'pad_name': pad_name},
|
||||||
|
)
|
||||||
|
'''
|
||||||
|
|
||||||
def save(self, *args, **kwargs):
|
def save(self, *args, **kwargs):
|
||||||
try:
|
|
||||||
self.etherpad_key = createPadifNotExists(
|
self.etherpad_key = createPadifNotExists(
|
||||||
self.documentation.topic.slug
|
slugify(self.date) + "-" + self.documentation.topic.slug + "-" + self.documentation.slug + "-" + slugify(self.title)
|
||||||
+ "-"
|
|
||||||
+ self.documentation.slug
|
|
||||||
+ "-"
|
|
||||||
+ slugify(self.title)
|
|
||||||
)
|
)
|
||||||
except URLError as error:
|
|
||||||
logger.info(
|
|
||||||
"Can't create a Etherpad '%s' from the slug. Error: %s",
|
|
||||||
slugify(self.title),
|
|
||||||
error,
|
|
||||||
)
|
|
||||||
self.etherpad_key = None
|
|
||||||
|
|
||||||
super().save(*args, **kwargs)
|
super().save(*args, **kwargs)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.title
|
return self.title
|
||||||
|
|
||||||
|
|
||||||
class Protocol(Document):
|
|
||||||
event_start = models.DateTimeField(null=True, blank=True)
|
|
||||||
event_end = models.DateTimeField(null=True, blank=True)
|
|
||||||
|
|||||||
@@ -6,5 +6,5 @@ from . import views
|
|||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path("", views.index, name="intern"),
|
path("", views.index, name="intern"),
|
||||||
path("<str:slug>", views.show_topic, name="topic"),
|
path("<str:slug>", views.show_topic, name="topic"),
|
||||||
path("<str:slug>/<str:foo>", views.show_docu, name="docu"),
|
path("<str:topic_slug>/<str:slug>", views.show_docu, name="docu"),
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
from django.contrib import messages
|
||||||
|
from django.db.models import F, Q
|
||||||
from django.http import HttpResponseRedirect
|
from django.http import HttpResponseRedirect
|
||||||
from django.shortcuts import render
|
from django.shortcuts import render
|
||||||
from documents.api import get_pad_link
|
from documents.api import get_pad_link
|
||||||
|
from documents.etherpadlib import add_ep_cookie
|
||||||
from collections import deque
|
from collections import deque
|
||||||
|
|
||||||
from .forms import DocumentForm
|
from .forms import DocumentForm
|
||||||
@@ -12,12 +15,9 @@ logger = logging.getLogger(__name__)
|
|||||||
|
|
||||||
|
|
||||||
def index(request):
|
def index(request):
|
||||||
|
topic = deque(Topic.objects.filter(archive=False).order_by(F('topic_group__order').asc(nulls_last=True), 'topic_group', 'title'))
|
||||||
topic_group = deque(TopicGroup.objects.all())
|
|
||||||
topic = Topic.objects.all()
|
|
||||||
|
|
||||||
context = {
|
context = {
|
||||||
"topic_group": topic_group,
|
|
||||||
"topic": topic,
|
"topic": topic,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -25,15 +25,10 @@ def index(request):
|
|||||||
|
|
||||||
|
|
||||||
def show_topic(request, slug=None):
|
def show_topic(request, slug=None):
|
||||||
|
|
||||||
topic_group = deque(TopicGroup.objects.all())
|
|
||||||
topic = deque(Topic.objects.all())
|
|
||||||
active_topic = Topic.objects.filter(slug=slug).first()
|
active_topic = Topic.objects.filter(slug=slug).first()
|
||||||
docu = deque(Documentation.objects.filter(topic__slug=slug))
|
docu = deque(Documentation.objects.filter(topic__slug=slug).order_by('title'))
|
||||||
|
|
||||||
context = {
|
context = {
|
||||||
"topic_group": topic_group,
|
|
||||||
"topic": topic,
|
|
||||||
"active_topic": active_topic,
|
"active_topic": active_topic,
|
||||||
"docus": docu,
|
"docus": docu,
|
||||||
}
|
}
|
||||||
@@ -41,10 +36,9 @@ def show_topic(request, slug=None):
|
|||||||
return render(request, "intern/topic.html", context)
|
return render(request, "intern/topic.html", context)
|
||||||
|
|
||||||
|
|
||||||
def show_docu(request, slug=None, foo=None):
|
def show_docu(request, topic_slug=None, slug=None):
|
||||||
|
active_docu = Documentation.objects.filter(Q(topic__slug=topic_slug) & Q(slug=slug)).first()
|
||||||
active_docu = Documentation.objects.filter(slug=foo).first()
|
active_topic = Topic.objects.filter(slug=topic_slug).first()
|
||||||
active_topic = Topic.objects.filter(slug=slug).first()
|
|
||||||
|
|
||||||
if request.method == "POST":
|
if request.method == "POST":
|
||||||
if "btn_input" in request.POST:
|
if "btn_input" in request.POST:
|
||||||
@@ -58,22 +52,28 @@ def show_docu(request, slug=None, foo=None):
|
|||||||
|
|
||||||
return HttpResponseRedirect(request.path)
|
return HttpResponseRedirect(request.path)
|
||||||
|
|
||||||
form = DocumentForm()
|
else:
|
||||||
docus = deque(Document.objects.filter(documentation=active_docu))
|
for elem in list(form.errors.values()):
|
||||||
|
messages.info(request, '; '.join(elem))
|
||||||
|
|
||||||
|
initial = {
|
||||||
|
"title": active_docu.placeholder,
|
||||||
|
}
|
||||||
|
|
||||||
|
form = DocumentForm(initial=initial)
|
||||||
|
|
||||||
|
docus = deque(Document.objects.filter(documentation=active_docu).order_by('-date'))
|
||||||
documents = deque([])
|
documents = deque([])
|
||||||
|
|
||||||
|
# list of etherpad url-link of any documents
|
||||||
for elem in docus:
|
for elem in docus:
|
||||||
try:
|
|
||||||
documents.append(
|
documents.append(
|
||||||
{
|
{
|
||||||
"title": elem.title,
|
"title": elem.title,
|
||||||
|
"date": elem.date,
|
||||||
"etherpad_key": get_pad_link(elem.etherpad_key),
|
"etherpad_key": get_pad_link(elem.etherpad_key),
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
except Exception as e:
|
|
||||||
logger.error(
|
|
||||||
"Can't get the agenda link from '%s'. Error: %s", elem.etherpad_key, e
|
|
||||||
)
|
|
||||||
|
|
||||||
context = {
|
context = {
|
||||||
"formset": form,
|
"formset": form,
|
||||||
@@ -82,4 +82,11 @@ def show_docu(request, slug=None, foo=None):
|
|||||||
"documents": documents,
|
"documents": documents,
|
||||||
}
|
}
|
||||||
|
|
||||||
return render(request, "intern/docu.html", context)
|
response = render(request, "intern/docu.html", context)
|
||||||
|
|
||||||
|
try:
|
||||||
|
response = add_ep_cookie(request, response)
|
||||||
|
except Exception as e:
|
||||||
|
logger.info("Etherpad Server doesn't work. Error: %s", e)
|
||||||
|
|
||||||
|
return response
|
||||||
|
|||||||
@@ -2,9 +2,7 @@
|
|||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="grid-container">
|
<div class="grid-container">
|
||||||
|
|
||||||
<div class="grid-x grid-padding-x padding-top-1">
|
<div class="grid-x grid-padding-x padding-top-1">
|
||||||
|
|
||||||
<div class="cell large-2 medium-4 small-6">
|
<div class="cell large-2 medium-4 small-6">
|
||||||
<a href="{% url 'intern' %}">
|
<a href="{% url 'intern' %}">
|
||||||
<div class="internheader">
|
<div class="internheader">
|
||||||
@@ -28,48 +26,61 @@
|
|||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="intern-hero">
|
<div class="intern-hero">
|
||||||
|
{% if active_docu.description %}
|
||||||
|
<div class="padding-top-1 padding-left-1 padding-right-1">
|
||||||
{{ active_docu.description|safe }}
|
{{ active_docu.description|safe }}
|
||||||
|
|
||||||
<div class="grid-x grid-padding-x">
|
|
||||||
<ul>
|
|
||||||
{% for document in documents %}
|
|
||||||
<li><a href="{{ document.etherpad_key }}">{{ document.title }}</a></li>
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
<h2>Neues Protokoll hinzufügen</h2>
|
{% endif %}
|
||||||
|
|
||||||
<form action="" method="post">
|
<form action="" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
|
|
||||||
<div class="grid-x grid-margin-x">
|
<div class="grid-x grid-padding-x padding-top-1">
|
||||||
|
|
||||||
{{ formset.management_form }}
|
{{ formset.management_form }}
|
||||||
|
|
||||||
{% for form in formset %}
|
{% for form in formset %}
|
||||||
<div class="cell medium-3 large-2 small-10">
|
<div class="cell medium-3 large-2 small-10">
|
||||||
{{ form.label }}
|
|
||||||
{{ form }}
|
{{ form }}
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
{{ formset.non_field_errors }}
|
||||||
|
|
||||||
<div class="cell medium-3 large-2 small-10 align-self-bottom">
|
<div class="cell medium-3 large-2 small-10 align-self-bottom">
|
||||||
<input type="submit" class="button" name="btn_input" value="Hinzufügen">
|
<input type="submit" class="button" name="btn_input" value="Hinzufügen">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
</div>
|
{% for message in messages %}
|
||||||
|
<p id="messages" style="background-color: red">{{message}}</p>
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<div class="grid-x grid-padding-x">
|
||||||
|
<div class="cell">
|
||||||
|
{% for document in documents %}
|
||||||
|
<a href="{{ document.etherpad_key }}">
|
||||||
|
<div class="news-hero-compact">
|
||||||
|
<div class="news-hero-compact-text">
|
||||||
|
<p style="margin-bottom: 0rem;">{{ document.title }}</p>
|
||||||
|
</div>
|
||||||
|
<div class="news-hero-compact-right">
|
||||||
|
<p style="margin-bottom: 0rem;">{{ document.date }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -2,9 +2,7 @@
|
|||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="grid-container">
|
<div class="grid-container">
|
||||||
|
|
||||||
<div class="grid-x grid-padding-x padding-top-1">
|
<div class="grid-x grid-padding-x padding-top-1">
|
||||||
|
|
||||||
<div class="cell large-2 medium-4 small-6">
|
<div class="cell large-2 medium-4 small-6">
|
||||||
<a href="{% url 'intern' %}">
|
<a href="{% url 'intern' %}">
|
||||||
<div class="internheader">
|
<div class="internheader">
|
||||||
@@ -20,15 +18,17 @@
|
|||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="intern-hero">
|
<div class="intern-hero">
|
||||||
|
{% if active_topic.description %}
|
||||||
|
<div class="padding-top-1 padding-left-1 padding-right-1">
|
||||||
{{ active_topic.description|safe }}
|
{{ active_topic.description|safe }}
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<div class="grid-x grid-padding-x">
|
||||||
<div class="grid-x grid-padding-x padding-top-1">
|
|
||||||
{% for docu in docus %}
|
{% for docu in docus %}
|
||||||
<div class="cell large-2 medium-4 small-6">
|
<div class="cell large-2 medium-4 small-6">
|
||||||
<a href="{% url 'docu' active_topic.slug docu.slug %}">
|
<a href="{% url 'docu' active_topic.slug docu.slug %}">
|
||||||
@@ -41,9 +41,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
Reference in New Issue
Block a user