🆕 NEW FEATURES: - Wiki-style Geschichte (History) section with rich text editor - Image upload support for history pages - Quill.js rich text editor with formatting options - Slug-based URLs for SEO-friendly history pages - Image galleries with descriptions and alt-text support 🔧 MODELS: - GeschichteSeite: Main history pages with rich content - GeschichteBild: Image attachments for history pages - Auto-generated slugs, sorting, publishing controls 📝 TEMPLATES: - geschichte/liste.html: Card-based overview of all history pages - geschichte/detail.html: Full page view with image gallery - geschichte/form.html: Rich text editor for creating/editing pages - geschichte/bild_form.html: Image upload interface 🎨 UI IMPROVEMENTS: - Reorganized navigation menu into logical groups: * Menschen & Finanzen (People & Finance) * Immobilien & Land (Real Estate & Land) * Verwaltung (Administration) * Geschichte (History) - More compact menu design saving horizontal space - Better grouping with dropdown headers 🛠️ TECHNICAL: - Rich text editor with Quill.js integration - Image upload with validation and optimization - Permission-based access controls - Responsive design for all screen sizes - Proper breadcrumb navigation - Auto-slug generation from titles
131 lines
4.8 KiB
HTML
131 lines
4.8 KiB
HTML
{% extends 'base.html' %}
|
|
{% load help_tags %}
|
|
|
|
{% block title %}{{ title }}{% endblock %}
|
|
|
|
{% block extra_css %}
|
|
<style>
|
|
.geschichte-content {
|
|
line-height: 1.7;
|
|
}
|
|
.geschichte-content h1, .geschichte-content h2, .geschichte-content h3 {
|
|
margin-top: 2rem;
|
|
margin-bottom: 1rem;
|
|
color: #2c5234;
|
|
}
|
|
.geschichte-content p {
|
|
margin-bottom: 1rem;
|
|
}
|
|
.geschichte-bilder {
|
|
margin: 2rem 0;
|
|
}
|
|
.geschichte-bild {
|
|
margin-bottom: 2rem;
|
|
}
|
|
.geschichte-bild img {
|
|
max-width: 100%;
|
|
height: auto;
|
|
border-radius: 8px;
|
|
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
|
|
}
|
|
.bild-beschreibung {
|
|
font-style: italic;
|
|
color: #666;
|
|
margin-top: 0.5rem;
|
|
}
|
|
</style>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<nav aria-label="breadcrumb">
|
|
<ol class="breadcrumb">
|
|
<li class="breadcrumb-item"><a href="{% url 'stiftung:dashboard' %}">Dashboard</a></li>
|
|
<li class="breadcrumb-item"><a href="{% url 'stiftung:geschichte_list' %}">Geschichte</a></li>
|
|
<li class="breadcrumb-item active" aria-current="page">{{ seite.titel }}</li>
|
|
</ol>
|
|
</nav>
|
|
|
|
<div class="row">
|
|
<div class="col-lg-8">
|
|
<div class="card shadow">
|
|
<div class="card-header bg-primary text-white d-flex justify-content-between align-items-center">
|
|
<h5 class="mb-0">
|
|
<i class="fas fa-book-open me-2"></i>{{ seite.titel }}
|
|
</h5>
|
|
<div class="btn-group">
|
|
{% if perms.stiftung.change_geschichteseite %}
|
|
<a href="{% url 'stiftung:geschichte_edit' slug=seite.slug %}" class="btn btn-light btn-sm">
|
|
<i class="fas fa-edit me-1"></i>Bearbeiten
|
|
</a>
|
|
{% endif %}
|
|
{% if perms.stiftung.add_geschichtebild %}
|
|
<a href="{% url 'stiftung:geschichte_bild_upload' slug=seite.slug %}" class="btn btn-light btn-sm">
|
|
<i class="fas fa-image me-1"></i>Bild hinzufügen
|
|
</a>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
<div class="card-body">
|
|
<div class="geschichte-content">
|
|
{{ seite.inhalt|linebreaks }}
|
|
</div>
|
|
|
|
{% if bilder %}
|
|
<div class="geschichte-bilder">
|
|
<h4><i class="fas fa-images me-2"></i>Bildergalerie</h4>
|
|
{% for bild in bilder %}
|
|
<div class="geschichte-bild">
|
|
<img src="{{ bild.bild.url }}" alt="{{ bild.alt_text|default:bild.titel }}" class="img-fluid">
|
|
<div class="bild-beschreibung">
|
|
<strong>{{ bild.titel }}</strong>
|
|
{% if bild.beschreibung %}
|
|
<br>{{ bild.beschreibung }}
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
<div class="card-footer text-muted">
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<small>
|
|
<i class="fas fa-user me-1"></i>
|
|
Erstellt von: {{ seite.erstellt_von.get_full_name|default:seite.erstellt_von.username }}
|
|
am {{ seite.erstellt_am|date:"d.m.Y H:i" }}
|
|
</small>
|
|
</div>
|
|
<div class="col-md-6 text-md-end">
|
|
<small>
|
|
<i class="fas fa-clock me-1"></i>
|
|
Zuletzt aktualisiert: {{ seite.aktualisiert_am|date:"d.m.Y H:i" }}
|
|
{% if seite.aktualisiert_von %}
|
|
von {{ seite.aktualisiert_von.get_full_name|default:seite.aktualisiert_von.username }}
|
|
{% endif %}
|
|
</small>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-lg-4">
|
|
<div class="card">
|
|
<div class="card-header bg-secondary text-white">
|
|
<h6 class="mb-0"><i class="fas fa-list me-2"></i>Weitere Seiten</h6>
|
|
</div>
|
|
<div class="card-body">
|
|
<!-- This could be populated with other history pages -->
|
|
<p class="text-muted small">Navigation zu anderen Geschichtsseiten wird hier angezeigt.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="mt-3">
|
|
<a href="{% url 'stiftung:geschichte_list' %}" class="btn btn-secondary">
|
|
<i class="fas fa-arrow-left me-1"></i>Zurück zur Übersicht
|
|
</a>
|
|
</div>
|
|
{% endblock %} |