rename to attachment
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
from django.contrib import admin
|
||||
from django.db.models import F
|
||||
|
||||
from .models import TopicGroup, Topic, Documentation, Etherpad, FileUpload
|
||||
from .models import TopicGroup, Topic, Attachment, Etherpad, FileUpload
|
||||
from .forms import (
|
||||
TopicGroupAdminForm,
|
||||
TopicAdminForm,
|
||||
DocumentationAdminForm,
|
||||
AttachmentAdminForm,
|
||||
EtherpadAdminForm,
|
||||
FileUploadAdminForm,
|
||||
TopicInlineForm,
|
||||
DocumentationInlineForm,
|
||||
AttachmentInlineForm,
|
||||
EtherpadInlineForm,
|
||||
FileUploadInlineForm,
|
||||
)
|
||||
@@ -25,12 +25,12 @@ class TopicInline(admin.TabularInline):
|
||||
readonly_fields = ("slug",)
|
||||
|
||||
|
||||
class DocumentationInline(admin.TabularInline):
|
||||
model = Documentation
|
||||
form = DocumentationInlineForm
|
||||
class AttachmentInline(admin.TabularInline):
|
||||
model = Attachment
|
||||
form = AttachmentInlineForm
|
||||
extra = 0
|
||||
verbose_name = "Dokumentation"
|
||||
verbose_name_plural = "Dokumentation-Übersicht"
|
||||
verbose_name = "Anhang Ordner"
|
||||
verbose_name_plural = "Anhang Ordner"
|
||||
readonly_fields = ("slug",)
|
||||
|
||||
|
||||
@@ -122,7 +122,7 @@ class TopicAdmin(admin.ModelAdmin):
|
||||
},
|
||||
),
|
||||
)
|
||||
inlines = (DocumentationInline,)
|
||||
inlines = (AttachmentInline,)
|
||||
|
||||
list_filter = ["topic_group", "archive"]
|
||||
list_display = ["title", "topic_group", "archive"]
|
||||
@@ -152,9 +152,9 @@ class TopicAdmin(admin.ModelAdmin):
|
||||
super().save_model(request, obj, form, change)
|
||||
|
||||
|
||||
class DocumentationAdmin(admin.ModelAdmin):
|
||||
form = DocumentationAdminForm
|
||||
model = Documentation
|
||||
class AttachmentAdmin(admin.ModelAdmin):
|
||||
form = AttachmentAdminForm
|
||||
model = Attachment
|
||||
|
||||
readonly_fields = ("slug",)
|
||||
fieldsets = (
|
||||
@@ -211,12 +211,12 @@ class EtherpadAdmin(admin.ModelAdmin):
|
||||
model = Etherpad
|
||||
|
||||
list_filter = [
|
||||
"documentation",
|
||||
"attachment",
|
||||
]
|
||||
list_display = [
|
||||
"title",
|
||||
"date",
|
||||
"documentation",
|
||||
"attachment",
|
||||
]
|
||||
ordering = ["-date"]
|
||||
|
||||
@@ -249,11 +249,11 @@ class FileUploadAdmin(admin.ModelAdmin):
|
||||
model = FileUpload
|
||||
|
||||
list_filter = [
|
||||
"documentation",
|
||||
"attachment",
|
||||
]
|
||||
list_display = [
|
||||
"title",
|
||||
"documentation",
|
||||
"attachment",
|
||||
]
|
||||
|
||||
def add_view(self, request, form_url="", extra_context=None):
|
||||
@@ -282,6 +282,6 @@ class FileUploadAdmin(admin.ModelAdmin):
|
||||
|
||||
admin.site.register(TopicGroup, TopicGroupAdmin)
|
||||
admin.site.register(Topic, TopicAdmin)
|
||||
admin.site.register(Documentation, DocumentationAdmin)
|
||||
admin.site.register(Attachment, AttachmentAdmin)
|
||||
admin.site.register(Etherpad, EtherpadAdmin)
|
||||
admin.site.register(FileUpload, FileUploadAdmin)
|
||||
|
||||
@@ -4,7 +4,7 @@ from django.forms.widgets import HiddenInput
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from tasks.models import Task, TaskList
|
||||
from .models import TopicGroup, Topic, Documentation, Etherpad, FileUpload
|
||||
from .models import TopicGroup, Topic, Attachment, Etherpad, FileUpload
|
||||
|
||||
|
||||
class DateInput(forms.DateInput):
|
||||
@@ -48,9 +48,9 @@ class TopicAdminForm(forms.ModelForm):
|
||||
widgets = {"description": CKEditorUploadingWidget(config_name="default")}
|
||||
|
||||
|
||||
class DocumentationAdminForm(forms.ModelForm):
|
||||
class AttachmentAdminForm(forms.ModelForm):
|
||||
class Meta:
|
||||
model = Documentation
|
||||
model = Attachment
|
||||
fields = "__all__"
|
||||
|
||||
labels = {
|
||||
@@ -73,7 +73,7 @@ class EtherpadAdminForm(forms.ModelForm):
|
||||
fields = [
|
||||
"title",
|
||||
"date",
|
||||
"documentation",
|
||||
"attachment",
|
||||
]
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ class FileUploadAdminForm(forms.ModelForm):
|
||||
fields = [
|
||||
"title",
|
||||
"file_field",
|
||||
"documentation",
|
||||
"attachment",
|
||||
]
|
||||
|
||||
|
||||
@@ -103,9 +103,9 @@ class TopicInlineForm(forms.ModelForm):
|
||||
}
|
||||
|
||||
|
||||
class DocumentationInlineForm(forms.ModelForm):
|
||||
class AttachmentInlineForm(forms.ModelForm):
|
||||
class Meta:
|
||||
model = Documentation
|
||||
model = Attachment
|
||||
fields = [
|
||||
"title",
|
||||
"shortterm",
|
||||
@@ -125,7 +125,7 @@ class EtherpadInlineForm(forms.ModelForm):
|
||||
fields = [
|
||||
"title",
|
||||
"date",
|
||||
"documentation",
|
||||
"attachment",
|
||||
]
|
||||
|
||||
labels = {
|
||||
@@ -189,9 +189,9 @@ class TopicUpdateForm(forms.ModelForm):
|
||||
}
|
||||
|
||||
|
||||
class DocumentationCreateForm(forms.ModelForm):
|
||||
class AttachmentCreateForm(forms.ModelForm):
|
||||
class Meta:
|
||||
model = Documentation
|
||||
model = Attachment
|
||||
|
||||
fields = [
|
||||
"title",
|
||||
@@ -211,9 +211,9 @@ class DocumentationCreateForm(forms.ModelForm):
|
||||
}
|
||||
|
||||
|
||||
class DocumentationUpdateForm(forms.ModelForm):
|
||||
class AttachmentUpdateForm(forms.ModelForm):
|
||||
class Meta:
|
||||
model = Documentation
|
||||
model = Attachment
|
||||
|
||||
fields = [
|
||||
"title",
|
||||
@@ -240,7 +240,7 @@ class EtherpadForm(forms.ModelForm):
|
||||
fields = [
|
||||
"title",
|
||||
"date",
|
||||
"documentation",
|
||||
"attachment",
|
||||
]
|
||||
|
||||
labels = {
|
||||
@@ -250,7 +250,7 @@ class EtherpadForm(forms.ModelForm):
|
||||
|
||||
widgets = {
|
||||
"date": DateInput(format=("%Y-%m-%d")),
|
||||
"documentation": HiddenInput,
|
||||
"attachment": HiddenInput,
|
||||
}
|
||||
|
||||
|
||||
@@ -260,9 +260,9 @@ class FileUploadForm(forms.ModelForm):
|
||||
fields = [
|
||||
"title",
|
||||
"file_field",
|
||||
"documentation",
|
||||
"attachment",
|
||||
]
|
||||
|
||||
widgets = {
|
||||
"documentation": HiddenInput,
|
||||
"attachment": HiddenInput,
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ class Topic(models.Model):
|
||||
super().save(*args, **kwargs)
|
||||
|
||||
|
||||
class Documentation(models.Model):
|
||||
class Attachment(models.Model):
|
||||
title = models.CharField(verbose_name="Titel", max_length=128)
|
||||
|
||||
shortterm = models.CharField(max_length=10, unique=True)
|
||||
@@ -96,8 +96,8 @@ class Documentation(models.Model):
|
||||
objects = models.Manager()
|
||||
|
||||
class Meta:
|
||||
verbose_name = "Dokumentation"
|
||||
verbose_name_plural = "3. Dokumentationen"
|
||||
verbose_name = "Anhang Ordner"
|
||||
verbose_name_plural = "3. Anhang Ordner"
|
||||
|
||||
constraints = [
|
||||
UniqueConstraint(fields=["slug", "topic"], name="unique_intern_slug_topic"),
|
||||
@@ -115,7 +115,7 @@ class Documentation(models.Model):
|
||||
"slug": self.slug,
|
||||
}
|
||||
|
||||
return reverse("intern:docu", kwargs=kwargs)
|
||||
return reverse("intern:attachment", kwargs=kwargs)
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
if not self.slug:
|
||||
@@ -131,7 +131,7 @@ class Etherpad(models.Model):
|
||||
etherpad_key = models.CharField(max_length=50, blank=True)
|
||||
date = models.DateField(verbose_name="Datum", default=date.today)
|
||||
|
||||
documentation = models.ForeignKey(Documentation, on_delete=models.CASCADE)
|
||||
attachment = models.ForeignKey(Attachment, on_delete=models.CASCADE)
|
||||
|
||||
objects = models.Manager()
|
||||
|
||||
@@ -141,7 +141,7 @@ class Etherpad(models.Model):
|
||||
|
||||
constraints = [
|
||||
UniqueConstraint(
|
||||
fields=["title", "date", "documentation"], name="unique_intern_etherpad"
|
||||
fields=["title", "date", "attachment"], name="unique_intern_etherpad"
|
||||
),
|
||||
]
|
||||
|
||||
@@ -149,9 +149,9 @@ class Etherpad(models.Model):
|
||||
return (
|
||||
slugify(self.date)
|
||||
+ "-"
|
||||
+ self.documentation.topic.slug
|
||||
+ self.attachment.topic.slug
|
||||
+ "-"
|
||||
+ self.documentation.slug
|
||||
+ self.attachment.slug
|
||||
+ "-"
|
||||
+ self.slug
|
||||
)
|
||||
@@ -187,7 +187,7 @@ class FileUpload(models.Model):
|
||||
)
|
||||
date = models.DateField(verbose_name="Datum", default=date.today)
|
||||
|
||||
documentation = models.ForeignKey(Documentation, on_delete=models.CASCADE)
|
||||
attachment = models.ForeignKey(Attachment, on_delete=models.CASCADE)
|
||||
|
||||
objects = models.Manager()
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@ from django.urls import path
|
||||
from . import apps
|
||||
from . import views
|
||||
from .views import (
|
||||
DocumentationCreateView,
|
||||
DocumentationUpdateView,
|
||||
AttachmentCreateView,
|
||||
AttachmentUpdateView,
|
||||
EtherpadCreateView,
|
||||
FileUploadCreateView,
|
||||
TaskCreateView,
|
||||
@@ -29,16 +29,16 @@ urlpatterns = [
|
||||
name="topic-update",
|
||||
),
|
||||
path(
|
||||
"<slug:slug>/docu-create/",
|
||||
DocumentationCreateView.as_view(),
|
||||
name="docu-create",
|
||||
"<slug:slug>/attachment-create/",
|
||||
AttachmentCreateView.as_view(),
|
||||
name="attachment-create",
|
||||
),
|
||||
path("<slug:slug>/create/", TaskCreateView.as_view(), name="task-create"),
|
||||
path("<slug:topic_slug>/<slug:slug>/", views.show_docu, name="docu"),
|
||||
path("<slug:topic_slug>/<slug:slug>/", views.show_attachment, name="attachment"),
|
||||
path(
|
||||
"<slug:topic_slug>/<slug:slug>/update/",
|
||||
DocumentationUpdateView.as_view(),
|
||||
name="docu-update",
|
||||
AttachmentUpdateView.as_view(),
|
||||
name="attachment-update",
|
||||
),
|
||||
path(
|
||||
"<slug:topic_slug>/<slug:slug>/etherpad-create/",
|
||||
|
||||
@@ -15,14 +15,14 @@ from documents.etherpadlib import add_ep_cookie
|
||||
from tasks.forms import InternTaskCreateForm
|
||||
from tasks.models import Task
|
||||
from .forms import (
|
||||
DocumentationCreateForm,
|
||||
DocumentationUpdateForm,
|
||||
AttachmentCreateForm,
|
||||
AttachmentUpdateForm,
|
||||
EtherpadForm,
|
||||
FileUploadForm,
|
||||
TopicCreateForm,
|
||||
TopicUpdateForm,
|
||||
)
|
||||
from .models import TopicGroup, Topic, Documentation, Etherpad, FileUpload
|
||||
from .models import TopicGroup, Topic, Attachment, Etherpad, FileUpload
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -50,7 +50,7 @@ def show_topic(request, slug=None):
|
||||
if not active_topic:
|
||||
raise Http404("wrong topic")
|
||||
|
||||
docu = Documentation.objects.filter(topic__slug=slug).order_by("title")
|
||||
attachments = Attachment.objects.filter(topic__slug=slug).order_by("title")
|
||||
|
||||
tasks = None
|
||||
if active_topic.task_list:
|
||||
@@ -65,7 +65,7 @@ def show_topic(request, slug=None):
|
||||
|
||||
context = {
|
||||
"active_topic": active_topic,
|
||||
"docus": docu,
|
||||
"attachments": attachments,
|
||||
"tasks": tasks,
|
||||
}
|
||||
|
||||
@@ -73,12 +73,12 @@ def show_topic(request, slug=None):
|
||||
|
||||
|
||||
@authenticated_user
|
||||
def show_docu(request, topic_slug=None, slug=None):
|
||||
active_docu = Documentation.objects.filter(
|
||||
def show_attachment(request, topic_slug=None, slug=None):
|
||||
attachment = Attachment.objects.filter(
|
||||
Q(topic__slug=topic_slug) & Q(slug=slug)
|
||||
).first()
|
||||
if not active_docu:
|
||||
raise Http404("wrong docu")
|
||||
if not attachment:
|
||||
raise Http404("wrong attachment")
|
||||
|
||||
active_topic = Topic.objects.filter(slug=topic_slug).first()
|
||||
|
||||
@@ -106,20 +106,20 @@ def show_docu(request, topic_slug=None, slug=None):
|
||||
messages.info(request, "; ".join(elem))
|
||||
|
||||
initial = {
|
||||
"documentation": active_docu,
|
||||
"attachment": attachment,
|
||||
}
|
||||
|
||||
form_add_etherpad = EtherpadForm(initial=initial)
|
||||
form_add_file = FileUploadForm(initial=initial)
|
||||
|
||||
files = FileUpload.objects.filter(documentation=active_docu)
|
||||
files = FileUpload.objects.filter(attachment=attachment)
|
||||
|
||||
docus = Etherpad.objects.filter(documentation=active_docu).order_by("-date")
|
||||
etherpads = deque([])
|
||||
etherpads = Etherpad.objects.filter(attachment=attachment).order_by("-date")
|
||||
etherpad_list = deque([])
|
||||
|
||||
# list of etherpad url-link of any etherpads
|
||||
for elem in docus:
|
||||
etherpads.append(
|
||||
for elem in etherpads:
|
||||
etherpad_list.append(
|
||||
{
|
||||
"title": elem.title,
|
||||
"date": elem.date,
|
||||
@@ -131,12 +131,12 @@ def show_docu(request, topic_slug=None, slug=None):
|
||||
"form_add_etherpad": form_add_etherpad,
|
||||
"form_add_file": form_add_file,
|
||||
"active_topic": active_topic,
|
||||
"active_docu": active_docu,
|
||||
"documents": etherpads,
|
||||
"attachment": attachment,
|
||||
"etherpads": etherpad_list,
|
||||
"files": files,
|
||||
}
|
||||
|
||||
response = render(request, "intern/docu.html", context)
|
||||
response = render(request, "intern/attachment.html", context)
|
||||
|
||||
try:
|
||||
response = add_ep_cookie(request, response)
|
||||
@@ -200,10 +200,10 @@ class TopicUpdateView(LoginRequiredMixin, UpdateView):
|
||||
return reverse("intern:topic", kwargs=context)
|
||||
|
||||
|
||||
class DocumentationCreateView(LoginRequiredMixin, CreateView):
|
||||
model = Documentation
|
||||
template_name = "intern/docu/docu_create.html"
|
||||
form_class = DocumentationCreateForm
|
||||
class AttachmentCreateView(LoginRequiredMixin, CreateView):
|
||||
model = Attachment
|
||||
template_name = "intern/attachment/attachment_create.html"
|
||||
form_class = AttachmentCreateForm
|
||||
|
||||
slug = None
|
||||
|
||||
@@ -230,10 +230,10 @@ class DocumentationCreateView(LoginRequiredMixin, CreateView):
|
||||
return reverse("intern:topic", kwargs=context)
|
||||
|
||||
|
||||
class DocumentationUpdateView(LoginRequiredMixin, UpdateView):
|
||||
model = Documentation
|
||||
template_name = "intern/docu/docu_update.html"
|
||||
form_class = DocumentationUpdateForm
|
||||
class AttachmentUpdateView(LoginRequiredMixin, UpdateView):
|
||||
model = Attachment
|
||||
template_name = "intern/attachment/attachment_update.html"
|
||||
form_class = AttachmentUpdateForm
|
||||
|
||||
topic_slug = None
|
||||
slug = None
|
||||
@@ -248,9 +248,9 @@ class DocumentationUpdateView(LoginRequiredMixin, UpdateView):
|
||||
self.topic_slug = self.kwargs.get("topic_slug")
|
||||
self.slug = self.kwargs.get("slug")
|
||||
|
||||
active_docu = Documentation.objects.filter(slug=self.slug).first()
|
||||
attachment = Attachment.objects.filter(slug=self.slug).first()
|
||||
context = {
|
||||
"documentation": active_docu,
|
||||
"attachment": attachment,
|
||||
}
|
||||
|
||||
return context
|
||||
@@ -261,7 +261,7 @@ class DocumentationUpdateView(LoginRequiredMixin, UpdateView):
|
||||
"slug": self.slug,
|
||||
}
|
||||
|
||||
return reverse("intern:docu", kwargs=context)
|
||||
return reverse("intern:attachment", kwargs=context)
|
||||
|
||||
|
||||
class EtherpadCreateView(LoginRequiredMixin, CreateView):
|
||||
@@ -282,9 +282,9 @@ class EtherpadCreateView(LoginRequiredMixin, CreateView):
|
||||
self.topic_slug = self.kwargs.get("topic_slug")
|
||||
self.slug = self.kwargs.get("slug")
|
||||
|
||||
active_docu = Documentation.objects.filter(slug=self.slug).first()
|
||||
attachment = Attachment.objects.filter(slug=self.slug).first()
|
||||
context = {
|
||||
"documentation": active_docu,
|
||||
"attachment": attachment,
|
||||
}
|
||||
|
||||
return context
|
||||
@@ -295,7 +295,7 @@ class EtherpadCreateView(LoginRequiredMixin, CreateView):
|
||||
"slug": self.slug,
|
||||
}
|
||||
|
||||
return reverse("intern:docu", kwargs=context)
|
||||
return reverse("intern:attachment", kwargs=context)
|
||||
|
||||
|
||||
class FileUploadCreateView(LoginRequiredMixin, CreateView):
|
||||
@@ -317,9 +317,9 @@ class FileUploadCreateView(LoginRequiredMixin, CreateView):
|
||||
self.topic_slug = self.kwargs.get("topic_slug")
|
||||
self.slug = self.kwargs.get("slug")
|
||||
|
||||
active_docu = Documentation.objects.filter(slug=self.kwargs.get("slug")).first()
|
||||
attachment = Attachment.objects.filter(slug=self.kwargs.get("slug")).first()
|
||||
context = {
|
||||
"documentation": active_docu,
|
||||
"attachment": attachment,
|
||||
}
|
||||
|
||||
return context
|
||||
@@ -330,7 +330,7 @@ class FileUploadCreateView(LoginRequiredMixin, CreateView):
|
||||
"slug": self.slug,
|
||||
}
|
||||
|
||||
return reverse("intern:docu", kwargs=context)
|
||||
return reverse("intern:attachment", kwargs=context)
|
||||
|
||||
|
||||
class TaskCreateView(LoginRequiredMixin, CreateView):
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<h3>
|
||||
<a href="{% url 'intern:index' %}#{{ active_topic.topic_group.slug }}">{{ active_topic.topic_group.title }}</a>
|
||||
/ <a href="{% url 'intern:topic' active_topic.slug %}">{{ active_topic.title }}</a>
|
||||
/ {{ active_docu.title }}
|
||||
/ {{ attachment.title }}
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
@@ -17,14 +17,14 @@
|
||||
{% if request.user.is_authenticated %}
|
||||
<div class="grid-x grid-padding-x padding-top-1">
|
||||
<div class="cell large-3 medium-4 small-12">
|
||||
<a class="button" href="{% url 'intern:docu-update' active_topic.slug active_docu.slug %}">Beschreibung bearbeiten</a>
|
||||
<a class="button" href="{% url 'intern:attachment-update' active_topic.slug attachment.slug %}">Beschreibung bearbeiten</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if active_docu.description %}
|
||||
{% if attachment.description %}
|
||||
<div class="padding-top-1 padding-left-1 padding-right-1">
|
||||
{{ active_docu.description|safe }}
|
||||
{{ attachment.description|safe }}
|
||||
<hr>
|
||||
</div>
|
||||
{% endif %}
|
||||
@@ -32,7 +32,7 @@
|
||||
<div class="grid-x grid-padding-x">
|
||||
<div class="cell">
|
||||
Etherpad Dokumente:
|
||||
<a href="{% url 'intern:etherpad-create' active_topic.slug active_docu.slug %}">
|
||||
<a href="{% url 'intern:etherpad-create' active_topic.slug attachment.slug %}">
|
||||
<div class="news-hero-compact">
|
||||
<div class="news-hero-compact-text">
|
||||
<p style="margin-bottom: 0rem;">+ neues Etherpad erstellen</p>
|
||||
@@ -40,21 +40,21 @@
|
||||
</div>
|
||||
</a>
|
||||
|
||||
{% for document in documents %}
|
||||
<a href="{{ document.etherpad_key }}">
|
||||
{% for etherpad in etherpads %}
|
||||
<a href="{{ etherpad.etherpad_key }}">
|
||||
<div class="news-hero-compact">
|
||||
<div class="news-hero-compact-text">
|
||||
<p style="margin-bottom: 0rem;">{{ document.title }}</p>
|
||||
<p style="margin-bottom: 0rem;">{{ etherpad.title }}</p>
|
||||
</div>
|
||||
<div class="news-hero-compact-right">
|
||||
<p style="margin-bottom: 0rem;">{{ document.date }}</p>
|
||||
<p style="margin-bottom: 0rem;">{{ etherpad.date }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
{% endfor %}
|
||||
|
||||
Dokumente:
|
||||
<a href="{% url 'intern:file-create' active_topic.slug active_docu.slug %}">
|
||||
<a href="{% url 'intern:file-create' active_topic.slug attachment.slug %}">
|
||||
<div class="news-hero-compact">
|
||||
<div class="news-hero-compact-text">
|
||||
<p style="margin-bottom: 0rem;">+ neue Datei hochladen</p>
|
||||
@@ -9,7 +9,7 @@
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
<h2>Neue Dokumentation erstellen</h2>
|
||||
<h2>Neuen Anhang Ordner erstellen</h2>
|
||||
<div class="grid-x">
|
||||
<div class="cell">
|
||||
<form action="" method="post" enctype="multipart/form-data">
|
||||
@@ -4,15 +4,15 @@
|
||||
<div class="grid-container">
|
||||
<div class="grid-x padding-top-1">
|
||||
<div class="cell large-3 medium-4 small-12">
|
||||
<a class="button" href="{% url 'intern:docu' topic_slug slug %}">Zurück</a>
|
||||
<a class="button" href="{% url 'intern:attachment' topic_slug slug %}">Zurück</a>
|
||||
</div>
|
||||
<div class="cell large-3 medium-4 small-12">
|
||||
<a class="button" href="{% url 'admin:intern_documentation_change' documentation.id %}">Dokumentation im Admin bearbeiten</a>
|
||||
<a class="button" href="{% url 'admin:intern_attachment_change' attachment.id %}">Anhang Ordner im Admin bearbeiten</a>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
<h2>Dokumentation '{{ documentation.title }}' bearbeiten</h2>
|
||||
<h2>Anhang Ordner '{{ attachment.title }}' bearbeiten</h2>
|
||||
<div class="grid-x">
|
||||
<div class="cell">
|
||||
<form action="" method="post" enctype="multipart/form-data">
|
||||
@@ -4,7 +4,7 @@
|
||||
<div class="grid-container">
|
||||
<div class="grid-x padding-top-1">
|
||||
<div class="cell large-3 medium-4 small-12">
|
||||
<a class="button" href="{% url 'intern:docu' topic_slug slug %}">Zurück</a>
|
||||
<a class="button" href="{% url 'intern:attachment' topic_slug slug %}">Zurück</a>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<div class="grid-container">
|
||||
<div class="grid-x padding-top-1">
|
||||
<div class="cell large-3 medium-4 small-12">
|
||||
<a class="button" href="{% url 'intern:docu' topic_slug slug %}">Zurück</a>
|
||||
<a class="button" href="{% url 'intern:attachment' topic_slug slug %}">Zurück</a>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
@@ -44,12 +44,12 @@
|
||||
{% endif %}
|
||||
|
||||
<div class="grid-x grid-padding-x">
|
||||
{% for docu in docus %}
|
||||
{% for attachment in attachments %}
|
||||
<div class="cell large-2 medium-4 small-6">
|
||||
<a href="{% url 'intern:docu' active_topic.slug docu.slug %}">
|
||||
<a href="{% url 'intern:attachment' active_topic.slug attachment.slug %}">
|
||||
<div class="intern-topic">
|
||||
<div class="intern-topic-text">
|
||||
{{ docu.title }}
|
||||
{{ attachment.title }}
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
@@ -57,7 +57,7 @@
|
||||
{% endfor %}
|
||||
|
||||
<div class="cell large-2 medium-4 small-6">
|
||||
<a href="{% url 'intern:docu-create' active_topic.slug %}">
|
||||
<a href="{% url 'intern:attachment-create' active_topic.slug %}">
|
||||
<div class="intern-topic">
|
||||
<div class="intern-topic-text">
|
||||
+
|
||||
|
||||
Reference in New Issue
Block a user