Lasse Bilder im Text den Rechten des Textes folgen, gib Bild- und PDF-Adressen ohne Ablauf aus und belege die Abnahme
- Bilder im Text folgen dem Recht am Text; eine eigene Fähigkeit für Bilder ist nicht nötig (ADR-51, fachliche Entscheidung zur Bestätigung). - Bildadresse und PDF-Adresse des Dokuments laufen nicht ab; jeder Abruf entscheidet neu. - Die Fähigkeit text:laden ist im Rechteprofil wählbar. - Dokumentkapitel in der Medienansicht verweisen auf ihr Dokument; die Pille nennt jetzt auch Dokumentkapitel (MedienFilterDialogTest bewusst angepasst). - Abnahmeprotokoll mit Bildern unter docs/ux/verwaltung/abnahme/dokumente. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8a44c5886b
commit
81037b9868
56 files changed
+222
-95
No files matched your search
@@ -5,12 +5,15 @@
|
||||
use App\Domain\Catalog\Composition;
|
||||
use App\Domain\Catalog\CompositionKind;
|
||||
use App\Domain\Catalog\CompositionVersion;
|
||||
use App\Domain\Catalog\ContentElement;
|
||||
use App\Domain\Catalog\ContentElementVersion;
|
||||
use App\Domain\Catalog\ContentService;
|
||||
use App\Domain\Catalog\ContentVersionStatus;
|
||||
use App\Domain\Catalog\EditorialContentKind;
|
||||
use App\Filament\Resources\Documents\Pages\EditDocument;
|
||||
use App\Filament\Resources\Exercises\Pages\EditExercise as EditModule;
|
||||
use App\Filament\Support\EditorialCatalog;
|
||||
use App\Filament\Support\MediaLibrary;
|
||||
use App\Models\User;
|
||||
use Filament\Facades\Filament;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
@@ -206,6 +209,22 @@ private function documentVersion(string $title, string $chapterTitle): Compositi
|
||||
return $content->publishComposition($document, [['role' => 'Kapitel', 'target' => $chapter]]);
|
||||
}
|
||||
|
||||
public function test_a_chapter_shows_in_the_media_library_with_a_link_to_its_document_and_stays_out_of_the_default_list(): void
|
||||
{
|
||||
[$component, $document] = $this->open();
|
||||
$component->call('addChapter', 1)->call('selectChapter', 0)->set('partTitle', 'Grundlagen')->call('saveDraft');
|
||||
$element = ContentElement::query()->where('working_title', 'Grundlagen')->firstOrFail();
|
||||
|
||||
$library = app(MediaLibrary::class);
|
||||
$card = $library->cardFor($element->fresh(), true);
|
||||
|
||||
$this->assertSame('Dokumentkapitel', $card['editorialKind']);
|
||||
$this->assertSame('Trainerhandbuch', $card['exercise']['title']);
|
||||
$this->assertSame('Dokument', $card['exercise']['kind']);
|
||||
$this->assertStringEndsWith('/dokumente/'.$document->getKey(), (string) $card['exercise']['url']);
|
||||
$this->assertTrue(EditorialContentKind::query()->where('slug', 'dokumentkapitel')->firstOrFail()->isAutomatic(), 'Wie die Übungsabschnitte nur automatisch gesetzt und standardmäßig ausgeblendet.');
|
||||
}
|
||||
|
||||
public function test_a_chapter_cannot_be_saved_without_a_title(): void
|
||||
{
|
||||
[$component] = $this->open();
|
||||
|
||||
Reference in new issue
Block a user