Compare commits

...
1 Commits
Author SHA1 Message Date
kantarciandClaude Opus 5 5a8d67a638 Fassung 1.0.1: die laufende Fassung steht in der Verwaltung
CMS quality / php (8.2) (push) Canceled after 0s
CMS quality / php (8.4) (push) Canceled after 0s
CMS quality / browser (push) Canceled after 0s
CMS quality / mysql (push) Canceled after 0s
Eine kleine, von außen sichtbare Änderung - sie ist der Prüfstein für das
Update: nach dem Einspielen muss in der Seitenleiste 1.0.1 stehen, und der
Weg dorthin muss die Schritte gegangen sein, die der Updater verspricht.

Die Fassung kommt über eine Twig-Funktion in die Vorlage, nicht über einen
globalen Dienst: die Vorlagen bekommen genau diese eine lesende Antwort und
nicht einen Updater mit update() darauf.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-12 20:11:21 +02:00
4 changed files with 28 additions and 1 deletions

No files matched your search

+1 -1
View File
@@ -1 +1 @@
1.0.0
1.0.1
+1
View File
@@ -600,3 +600,4 @@ details.card > summary:hover { background: #fafbf8 }
.check-bad { color: var(--danger) }
.log-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px }
.log-list code { font-size: 11px; overflow-wrap: anywhere }
.shell-version { margin: 0 0 4px; padding: 0 10px; font-size: 10px; color: var(--shell-muted) }
+25
View File
@@ -0,0 +1,25 @@
<?php
namespace App\Twig;
use App\Ops\Updater;
use Twig\Extension\AbstractExtension;
use Twig\TwigFunction;
/**
* The running version, for the administration shell.
*
* A function rather than a global, so the templates get exactly this one read-only answer and not
* a whole updater with an update() method on it.
*/
final class VersionExtension extends AbstractExtension
{
public function __construct(private Updater $updater)
{
}
public function getFunctions(): array
{
return [new TwigFunction('kant_version', $this->updater->version(...))];
}
}
+1
View File
@@ -31,6 +31,7 @@
</ul>
</nav>
<div class="shell-foot">
<p class="shell-version">Fassung {{ kant_version() }}</p>
<a class="shell-user" href="{{ path('admin_account') }}"{{ nav|default('') == 'account' ? ' aria-current="page"' : '' }}><span class="shell-avatar" aria-hidden="true">{{ app.user.userIdentifier|first|upper }}</span><strong>{{ app.user.userIdentifier }}</strong></a>
<form action="{{ path('admin_logout') }}" method="post">
<input type="hidden" name="_csrf_token" value="{{ csrf_token('logout') }}">