mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 16:31:08 -05:00
Fix duplicate menus in moderation dashboard:
- Move navigation to separate moderation_nav.html partial - Include navigation only once in dashboard.html base template - Remove duplicate navigation from child templates
This commit is contained in:
@@ -164,50 +164,15 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="moderation-nav">
|
{% include "moderation/partials/moderation_nav.html" %}
|
||||||
<div class="moderation-nav-container">
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<a href="{% url 'moderation:dashboard' %}"
|
|
||||||
class="{% if request.resolver_match.url_name == 'dashboard' %}active{% endif %}"
|
|
||||||
hx-get="{% url 'moderation:dashboard' %}"
|
|
||||||
hx-target="#submissions-content"
|
|
||||||
hx-push-url="true">
|
|
||||||
<i class="fas fa-tachometer-alt"></i>
|
|
||||||
Dashboard
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="{% url 'moderation:edit_submissions' %}"
|
|
||||||
class="{% if request.resolver_match.url_name == 'edit_submissions' %}active{% endif %}"
|
|
||||||
hx-get="{% url 'moderation:edit_submissions' %}"
|
|
||||||
hx-target="#submissions-content"
|
|
||||||
hx-push-url="true">
|
|
||||||
<i class="fas fa-edit"></i>
|
|
||||||
Edit Submissions
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="{% url 'moderation:photo_submissions' %}"
|
|
||||||
class="{% if request.resolver_match.url_name == 'photo_submissions' %}active{% endif %}"
|
|
||||||
hx-get="{% url 'moderation:photo_submissions' %}"
|
|
||||||
hx-target="#submissions-content"
|
|
||||||
hx-push-url="true">
|
|
||||||
<i class="fas fa-image"></i>
|
|
||||||
Photo Submissions
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="moderation-content">
|
<div class="moderation-content">
|
||||||
{% block moderation_content %}
|
|
||||||
<div id="submissions-content">
|
<div id="submissions-content">
|
||||||
{% include "moderation/partials/submission_list.html" %}
|
{% block moderation_content %}
|
||||||
</div>
|
{% include "moderation/partials/dashboard_content.html" %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div id="loading-indicator"
|
<div id="loading-indicator"
|
||||||
class="fixed inset-0 flex items-center justify-center htmx-indicator bg-black/20 dark:bg-black/40">
|
class="fixed inset-0 flex items-center justify-center htmx-indicator bg-black/20 dark:bg-black/40">
|
||||||
|
|||||||
38
templates/moderation/partials/moderation_nav.html
Normal file
38
templates/moderation/partials/moderation_nav.html
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
{% load static %}
|
||||||
|
|
||||||
|
<div class="moderation-nav">
|
||||||
|
<div class="moderation-nav-container">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<a href="{% url 'moderation:dashboard' %}"
|
||||||
|
class="{% if request.resolver_match.url_name == 'dashboard' %}active{% endif %}"
|
||||||
|
hx-get="{% url 'moderation:dashboard' %}"
|
||||||
|
hx-target="#submissions-content"
|
||||||
|
hx-push-url="true">
|
||||||
|
<i class="fas fa-tachometer-alt"></i>
|
||||||
|
Dashboard
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="{% url 'moderation:edit_submissions' %}"
|
||||||
|
class="{% if request.resolver_match.url_name == 'edit_submissions' %}active{% endif %}"
|
||||||
|
hx-get="{% url 'moderation:edit_submissions' %}"
|
||||||
|
hx-target="#submissions-content"
|
||||||
|
hx-push-url="true">
|
||||||
|
<i class="fas fa-edit"></i>
|
||||||
|
Edit Submissions
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="{% url 'moderation:photo_submissions' %}"
|
||||||
|
class="{% if request.resolver_match.url_name == 'photo_submissions' %}active{% endif %}"
|
||||||
|
hx-get="{% url 'moderation:photo_submissions' %}"
|
||||||
|
hx-target="#submissions-content"
|
||||||
|
hx-push-url="true">
|
||||||
|
<i class="fas fa-image"></i>
|
||||||
|
Photo Submissions
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
Reference in New Issue
Block a user