munin/templates/entry-versions.html
Thomas Adamek 466f1e40af Workspaces, Änderungshistorie, Papierkorb, Nutzungsübersicht, Hilfe
Umsetzung der Ausbaustufen 2.1, 3.6, 3.8, 3.9, 4.1, 4.2, 4.4, 4.6,
5.1–5.4 (Details in AUSBAUSTUFEN.md).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 07:44:52 +02:00

67 lines
2.7 KiB
HTML

{{template "kopf" .}}
<div class="seitenkopf">
<div class="seitenkopf-titel">
<h1>Verlauf {{template "hilfelink" "weboberflaeche#verlauf-und-vergleich"}}</h1>
<span class="hilfe">
<a href="/p/{{.Project.Slug}}/e/{{.Data.Entry.Slug}}">{{.Data.Entry.Title}}</a> ·
aktuell Fassung {{.Data.Entry.Version}}
</span>
</div>
</div>
<div class="tabelle-huelle">
<table class="tabelle">
<thead>
<tr>
<th class="zahl">Fassung</th>
<th>Zugang</th>
<th>Abgelöst am</th>
<th class="schmal rechts">Aktionen</th>
</tr>
</thead>
<tbody>
<tr>
<td class="zahl">{{.Data.Entry.Version}}</td>
<td>{{if .Data.Entry.Author}}{{.Data.Entry.Author}}{{else}}<span class="hilfe">unbekannt</span>{{end}}</td>
<td class="hilfe"><span class="marke betont">aktuell</span></td>
<td class="schmal rechts"></td>
</tr>
{{$slug := .Project.Slug}}
{{$eslug := .Data.Entry.Slug}}
{{/* Innerhalb von range zeigt der Punkt auf die jeweilige Fassung.
Was von außen gebraucht wird, merken wir uns vorher in Variablen. */}}
{{$aktuell := .Data.Entry.Version}}
{{$darfSchreiben := .Session.CanWrite}}
{{$csrf := .CSRFToken}}
{{range .Data.Versions}}
<tr>
<td class="zahl">{{.Version}}</td>
<td>{{if .Author}}{{.Author}}{{else}}<span class="hilfe">unbekannt</span>{{end}}</td>
<td class="hilfe">{{datum .CreatedAt}}</td>
<td class="schmal rechts">
<div class="reihe">
<a href="/p/{{$slug}}/e/{{$eslug}}/versions/{{.Version}}">Änderungen ansehen</a>
{{if $darfSchreiben}}
<form method="POST" action="/p/{{$slug}}/e/{{$eslug}}/versions/{{.Version}}/restore" class="reihe"
data-confirm="Fassung {{.Version}} wiederherstellen? Der aktuelle Stand bleibt im Verlauf erhalten.">
<input type="hidden" name="csrf_token" value="{{$csrf}}">
<input type="hidden" name="current_version" value="{{$aktuell}}">
<button type="submit" class="zweitrangig">Wiederherstellen</button>
</form>
{{end}}
</div>
</td>
</tr>
{{end}}
</tbody>
</table>
</div>
{{if not .Data.Versions}}
<div class="leer">
<p>Für diese Fassung gibt es noch keine Vorgänger.</p>
</div>
{{end}}
{{template "fuss" .}}