Files
stiftung-management-system/app/templates/stiftung/geschichte/detail.html
Jan Remmer Siebels c289cc3c58 Fix payment system balance integration and add calendar functionality
- Implement automated payment tracking with Django signals
- Fix duplicate transaction creation with unique referenz system
- Add calendar system with CRUD operations and event management
- Reorganize navigation menu (rename sections, move admin functions)
- Replace Geschichte editor with EasyMDE markdown editor
- Add management commands for balance reconciliation
- Create missing transactions for previously paid payments
- Ensure account balances accurately reflect all payment activity

Features added:
- Calendar entries creation and administration via menu
- Payment status tracking with automatic balance updates
- Duplicate prevention for payment transactions
- Markdown editor with live preview for Geschichte pages
- Database reconciliation tools for payment/balance sync

Bug fixes:
- Resolved IntegrityError on payment status changes
- Fixed missing account balance updates for paid payments
- Prevented duplicate balance deductions on re-saves
- Corrected menu structure and admin function placement
2025-10-05 00:38:18 +02:00

140 lines
5.4 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|markdown_to_html }}
</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">
<div class="d-flex justify-content-between align-items-start mb-2">
<h6 class="mb-0">{{ bild.titel }}</h6>
{% if perms.stiftung.delete_geschichtebild %}
<a href="{% url 'stiftung:geschichte_bild_delete' slug=seite.slug bild_id=bild.id %}"
class="btn btn-outline-danger btn-sm"
title="Bild löschen">
<i class="fas fa-trash"></i>
</a>
{% endif %}
</div>
<img src="{{ bild.bild.url }}" alt="{{ bild.alt_text|default:bild.titel }}" class="img-fluid">
{% if bild.beschreibung %}
<div class="bild-beschreibung mt-2">
{{ bild.beschreibung }}
</div>
{% endif %}
</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 %}