Ideenbox-Moderation und Wochenüberblick per E-Mail (0.36.0)
Some checks failed
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 6m49s
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 7m19s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 7m29s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 7m39s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 9m38s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 9m25s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 7m57s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 8m4s
CI / Bekannte Sicherheitslücken in Paketen (pull_request) Successful in 46s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m9s

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Friederich Loheide 2026-09-27 15:17:47 +00:00
parent 11c5ef5baf
commit f9922f7308
172 changed files with 1524 additions and 363 deletions

View file

@ -3,6 +3,7 @@
namespace Inhaus\Plugins\Events;
use App\Dashboard\Widgets;
use App\Digest\Digest;
use App\Editorial\Editorial;
use App\Media\ImagePaths;
use App\Media\MediaUsages;
@ -23,6 +24,19 @@ class EventsPlugin extends Plugin
{
public function register(): void
{
// Wochenüberblick: Termine der nächsten zwei Wochen
$this->app->make(Digest::class)->add('events', 'Termine', 20, fn (User $user) => Event::query()
->upcoming()->visibleTo($user)->where('starts_at', '<=', now()->addDays(14))->limit(8)->get()
->map(fn (Event $event) => [
'title' => $event->title,
'url' => route('events.show', $event),
'meta' => collect([
$event->starts_at->timezone(config('app.timezone'))->translatedFormat($event->all_day ? 'D, d.m.' : 'D, d.m., H:i \\U\\h\\r'),
$event->location,
$event->registration_enabled ? 'mit Anmeldung' : null,
])->filter()->implode(' · '),
])->all());
$this->app->make(GlobalSearch::class)->add('events', 'Termine', 'calendar-days', fn (...$args) => app(EventSearch::class)(...$args), sort: 20);
$this->app->make(Navigation::class)->add('events', 'Termine', '/termine', active: 'events.*', sort: 30);