add topic_group-slug to every topic and attachment url
This commit is contained in:
@@ -8,9 +8,9 @@
|
||||
<h1 class="page-title">Intern</h1>
|
||||
<div class="flex flex-col gap-y-4 max-w-prose mx-auto text-gray-700 dark:text-gray-300">
|
||||
<aside class="flex gap-2 flex-wrap align-bottom text-sm sm:text-base text-gray-600 dark:text-gray-300">
|
||||
<a class="underline hover:text-gray-900 dark:hover:text-gray-100" href="{% url 'intern:index' %}#{{ active_topic.topic_group.slug }}">{{ active_topic.topic_group.title }}</a>
|
||||
<a class="underline hover:text-gray-900 dark:hover:text-gray-100" href="{% url 'intern:index' %}#{{ attachment.topic.topic_group.slug }}">{{ attachment.topic.topic_group.title }}</a>
|
||||
<span><i class="fa-solid fa-angle-right"></i></span>
|
||||
<a class="underline hover:text-gray-900 dark:hover:text-gray-100" href="{% url 'intern:topic' active_topic.slug %}">{{ active_topic.title }}</a>
|
||||
<a class="underline hover:text-gray-900 dark:hover:text-gray-100" href="{% url 'intern:topic' attachment.topic.topic_group.slug attachment.topic.slug %}">{{ attachment.topic.title }}</a>
|
||||
<span><i class="fa-solid fa-angle-right"></i></span>
|
||||
<span class="cursor-default">{{ attachment.title }}</span>
|
||||
</aside>
|
||||
@@ -29,7 +29,7 @@
|
||||
</a> -->
|
||||
</div>
|
||||
<div class="documentList rounded divide-y divide-gray-300 dark:divide-gray-600">
|
||||
<a href="{% url 'intern:etherpad-create' active_topic.slug attachment.slug %}" class="flex justify-between">
|
||||
<a href="{% url 'intern:etherpad-create' attachment.topic.topic_group.slug attachment.topic.slug attachment.slug %}" class="flex justify-between">
|
||||
<h3 class="text-gray-800 dark:text-gray-200"><i class="fa-solid fa-plus fa-fw mr-1"></i>Neues Etherpad erstellen</h2>
|
||||
</a>
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
<section>
|
||||
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-100">Dokumente:</h2>
|
||||
<div class="documentList rounded divide-y divide-gray-300 dark:divide-gray-600">
|
||||
<a href="{% url 'intern:file-create' active_topic.slug attachment.slug %}" class="flex justify-between">
|
||||
<a href="{% url 'intern:file-create' attachment.topic.topic_group.slug attachment.topic.slug attachment.slug %}" class="flex justify-between">
|
||||
<h3 class="text-gray-800 dark:text-gray-200"><i class="fa-solid fa-plus fa-fw mr-1"></i>Neues Dokument hochladen</h2>
|
||||
</a>
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<a href="{% url 'intern:attachment-update' active_topic.slug attachment.slug %}" class="btn btn-primary block place-self-end"><i class="fa-solid fa-pen-to-square mr-2"></i>Beschreibung bearbeiten</a>
|
||||
<a href="{% url 'intern:attachment-update' attachment.topic.topic_group.slug attachment.topic.slug attachment.slug %}" class="btn btn-primary block place-self-end"><i class="fa-solid fa-pen-to-square mr-2"></i>Beschreibung bearbeiten</a>
|
||||
</div>
|
||||
</main>
|
||||
{% endblock %}
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
{{ form.description }}
|
||||
</label>
|
||||
|
||||
<input type="hidden" name="topic" value="{{ topic.id }}" id="id_topic">
|
||||
<input type="hidden" name="topic" value="{{ attachment.topic.id }}" id="id_topic">
|
||||
|
||||
<input type="submit" class="block btn btn-primary" value="Bearbeiten">
|
||||
</form>
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
</div>
|
||||
<ul class="ml-7 w-fit" x-show="expandList" x-collapse>
|
||||
{% for topic in topic_group.list %}
|
||||
<li><a href="{% url 'intern:topic' topic.slug %}" class="w-full py-1 inline-block">{{ topic.title }}</a></li>
|
||||
<li><a href="{% url 'intern:topic' topic.topic_group.slug topic.slug %}" class="w-full py-1 inline-block">{{ topic.title }}</a></li>
|
||||
{% endfor %}
|
||||
<li class="py-1">
|
||||
<a href="{% url 'intern:topic-create' topic_group.grouper.slug %}" class="border border-gray-700 dark:border-gray-300 rounded px-1.5 py-1 text-sm sm:hidden">
|
||||
@@ -81,7 +81,7 @@
|
||||
</div>
|
||||
<ul class="ml-7 w-fit" x-show="expandList" x-collapse>
|
||||
{% for topic in archive_topic %}
|
||||
<li><a href="{% url 'intern:topic' topic.slug %}" class="w-full py-1 inline-block">{{ topic.title }}</a></li>
|
||||
<li><a href="{% url 'intern:topic' topic.topic_group.slug topic.slug %}" class="w-full py-1 inline-block">{{ topic.title }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
</select>
|
||||
</label>
|
||||
|
||||
<input type="hidden" name="task_list" value="{{ task_list.id }}" id="id_task_list">
|
||||
<input type="hidden" name="task_list" value="{{ topic.task_list.id }}" id="id_task_list">
|
||||
|
||||
<input type="submit" class="block btn btn-primary" value="Hinzufügen">
|
||||
</form>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}{{ active_topic.title }}{% endblock %}
|
||||
{% block title %}{{ topic.title }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<!-- Main Content -->
|
||||
@@ -8,14 +8,14 @@
|
||||
<h1 class="page-title">Intern</h1>
|
||||
<div class="flex flex-col gap-y-8 max-w-prose mx-auto text-gray-700 dark:text-gray-300">
|
||||
<aside class="flex gap-2 flex-wrap align-bottom text-sm sm:text-base text-gray-600 dark:text-gray-300">
|
||||
<a class="underline hover:text-gray-900 dark:hover:text-gray-100" href="{% url 'intern:index' %}#{{ active_topic.topic_group.slug }}">{{ active_topic.topic_group.title }}</a>
|
||||
<a class="underline hover:text-gray-900 dark:hover:text-gray-100" href="{% url 'intern:index' %}#{{ topic.topic_group.slug }}">{{ topic.topic_group.title }}</a>
|
||||
<span><i class="fa-solid fa-angle-right"></i></span>
|
||||
<span class="cursor-default">{{ active_topic.title }}</span>
|
||||
<span class="cursor-default">{{ topic.title }}</span>
|
||||
</aside>
|
||||
|
||||
{% if active_topic.description %}
|
||||
{% if topic.description %}
|
||||
<div class="db-page-content-left">
|
||||
{{ active_topic.description|safe }}
|
||||
{{ topic.description|safe }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
@@ -32,20 +32,20 @@
|
||||
|
||||
<ul class="flex flex-col gap-1 max-w-fit">
|
||||
{% for attachment in attachments %}
|
||||
<li><a href="{% url 'intern:attachment' active_topic.slug attachment.slug %}" class="py-1 inline-block">{{ attachment.title }}</a></li>
|
||||
<li><a href="{% url 'intern:attachment' topic.topic_group.slug topic.slug attachment.slug %}" class="py-1 inline-block">{{ attachment.title }}</a></li>
|
||||
{% endfor %}
|
||||
|
||||
<li class="mt-2">
|
||||
<a href="{% url 'intern:attachment-create' active_topic.slug %}" class="border border-gray-700 dark:border-gray-300 rounded px-1.5 py-1">
|
||||
<a href="{% url 'intern:attachment-create' topic.topic_group.slug topic.slug %}" class="border border-gray-700 dark:border-gray-300 rounded px-1.5 py-1">
|
||||
<i class="fa-solid fa-plus mr-1"></i>Eintrag hinzufügen
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<section class="flex flex-col sm:flex-row justify-end gap-4">
|
||||
<a href="{% url 'intern:topic-update' active_topic.slug %}" class="btn btn-primary block"><i class="fa-solid fa-pen-to-square mr-2"></i>Thema bearbeiten</a>
|
||||
{% if active_topic.task_list %}
|
||||
<a href="{% url 'intern:task-create' active_topic.slug %}" class="btn btn-primary block"><i class="fa-solid fa-plus-square mr-2"></i>Task hinzufügen</a>
|
||||
<a href="{% url 'intern:topic-update' topic.topic_group.slug topic.slug %}" class="btn btn-primary block"><i class="fa-solid fa-pen-to-square mr-2"></i>Thema bearbeiten</a>
|
||||
{% if topic.task_list %}
|
||||
<a href="{% url 'intern:task-create' topic.topic_group.slug topic.slug %}" class="btn btn-primary block"><i class="fa-solid fa-plus-square mr-2"></i>Task hinzufügen</a>
|
||||
{% endif %}
|
||||
</section>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user