Globale Live-Suche, Kontaktkarten-Personensuche, neue Beitragsansicht, Termine mit Seitenleiste, Demo-Inhalte, Plugin-Upload-Fix
Some checks failed
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 3m24s
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 3m26s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 3m41s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 3m46s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 5m31s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 5m32s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 4m16s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 4m18s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m14s

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Friederich Loheide 2026-09-26 19:07:13 +00:00
parent 9b06e65802
commit b276e1c6d0
211 changed files with 3580 additions and 1072 deletions

View file

@ -0,0 +1,28 @@
<?php
namespace Inhaus\Plugins\Forms;
use App\Models\User;
use App\Search\GlobalSearch;
use Inhaus\Plugins\Forms\Models\Form;
/** Suchquelle für die globale Suche: offene Formulare */
class FormSearch
{
/**
* @return list<array<string, mixed>>
*/
public function __invoke(User $user, string $search, int $limit): array
{
$query = Form::query()->visibleTo($user)->where('is_open', true)
->where(fn ($q) => $q->whereNull('closes_at')->orWhere('closes_at', '>', now()));
GlobalSearch::whereTerms($query, ['title', 'description'], $search);
return $query->orderBy('title')->limit($limit)->get()->map(fn (Form $form) => [
'title' => $form->title,
'url' => $form->url(),
'excerpt' => GlobalSearch::excerpt($form->description, $search),
'meta' => 'Formular',
])->all();
}
}

View file

@ -8,6 +8,7 @@ use App\Pagebuilder\Blocks;
use App\Pagebuilder\BlockType;
use App\Pagebuilder\Field;
use App\Plugins\Plugin;
use App\Search\GlobalSearch;
use App\Support\Abilities;
use Illuminate\Support\Facades\Gate;
use Illuminate\Support\Facades\Schedule;
@ -18,6 +19,8 @@ class FormsPlugin extends Plugin
{
public function register(): void
{
$this->app->make(GlobalSearch::class)->add('forms', 'Formulare', 'clipboard-list', fn (...$args) => app(FormSearch::class)(...$args), sort: 60);
// Kein eigener Menüpunkt im Portal: Formulare werden in Seiten und Beiträge eingebunden.
// /formulare/{slug} bleibt als direkte Adresse (z. B. für Links in E-Mails).