fix bug in verwaltung textblöcke
This commit is contained in:
1 parent
731a2d8aee
commit
79ccecf579
2 files changed
+8
-1
No files matched your search
@@ -17,7 +17,6 @@ class CreateProjektInhaltsverzeichnis
|
||||
foreach ($inhaltsverzeichnis as $key => $value) {
|
||||
|
||||
$key++;
|
||||
$text = Textblock::where('id', $value->textblock_id)->first();
|
||||
$inhalt = new ProjektInhaltsverzeichnis;
|
||||
$inhalt->projekte_id = $record->id;
|
||||
$inhalt->inhaltsverzeichnis_id = $value->id;
|
||||
@@ -32,8 +31,12 @@ class CreateProjektInhaltsverzeichnis
|
||||
$inhalt->neue_seite = $value->neue_seite;
|
||||
$inhalt->no_edit = $value->no_edit;
|
||||
$inhalt->textblock_name = $text->name ?? '';
|
||||
|
||||
$text = Textblock::where('id', $value->textblock_id)->first();
|
||||
|
||||
$inhalt->textblock = $text->textblock ?? '';
|
||||
$inhalt->textblock2 = $text->textblock2 ?? '';
|
||||
|
||||
$inhalt->save();
|
||||
|
||||
}
|
||||
|
||||
@@ -20,7 +20,9 @@ use Illuminate\Support\HtmlString;
|
||||
@endif
|
||||
|
||||
</x-slot>
|
||||
@if (isset($record->textblock))
|
||||
{{ new HtmlString(RichContentRenderer::make($record->textblock)->toHtml()) }}
|
||||
@endif
|
||||
</x-filament::fieldset>
|
||||
<?php
|
||||
if($record->textblock2 != ""){
|
||||
@@ -35,7 +37,9 @@ if($record->textblock2 != ""){
|
||||
<span class="text-blue-600 dark:text-blue-400">Textblock Abschnitt B</span>
|
||||
@endif
|
||||
</x-slot>
|
||||
@if (isset($record->textblock2))
|
||||
{{ new HtmlString(RichContentRenderer::make($record->textblock2)->toHtml()) }}
|
||||
@endif
|
||||
</x-filament::fieldset>
|
||||
<?php
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user