fixed custom theme [bug] for post and product

master
A1Gard 5 days ago
parent d03e6d7a72
commit 5e23901d9b

@ -63,7 +63,9 @@ class AreaController extends Controller
default:
return abort(404);
}
if ($m == null){
return abort(404);
}
$valids = [];
foreach ($area->segment as $seg) {
if (File::exists(resource_path() . '/views/segments/' . $seg)) {
@ -190,7 +192,10 @@ class AreaController extends Controller
}
}
foreach (json_decode($request->input('removed')) as $id) {
Part::where('id', $id)->first()->delete();
$i = Part::where('id', $id)->first();
if ($i != null) {
$i->delete();
}
}
\Artisan::call('client');

@ -103,7 +103,7 @@
<h1>
@if(isset($item))
{{__("Edit post")}} [{{$item->title}}]
{{__("Edit post")}} [{{$item->title}}] <a href="{{route('admin.area.design.model',['post','Post',$item->id])}}" class="btn btn-secondary"> <i class="ri-palette-line"></i> </a>
@else
{{__("Add new post")}}
@endif

@ -81,7 +81,7 @@
<div id="step1">
<div class="card">
<div class="card-header">
{{__("Basic data")}}
{{__("Basic data")}} @if(isset($item)) <a href="{{route('admin.area.design.model',['product','Product',$item->id])}}" class="btn btn-secondary float-end"> <i class="ri-palette-line"></i> </a> @endif
</div>
<div class="card-body">
@include('admin.products.sub-pages.product-step1')

@ -10,8 +10,8 @@
@include($p['blade'],['data' => $p['data']])
@endforeach
@endif
@foreach(getParts($area,$post) as $part)
@php($p = $part->getBladeWithData($post))
@foreach(getParts($area,'post'.$post->id) as $part)
@php($p = $part->getBladeWithData())
@include($p['blade'],['data' => $p['data']])
@endforeach
@if(findArea($area,$post)->use_default)

@ -11,10 +11,10 @@
@include($p['blade'],['data' => $p['data']])
@endforeach
@endif
@foreach(getParts($area,$product) as $part)
@php($p = $part->getBladeWithData($product))
@include($p['blade'],['data' => $p['data']])
@endforeach
@foreach(getParts($area,'$product'.$product->id) as $part)
@php($p = $part->getBladeWithData())
@include($p['blade'],['data' => $p['data']])
@endforeach
@if(findArea($area,$product)->use_default)
@foreach(getParts('defaultFooter') as $part)
@php($p = $part->getBladeWithData())

Loading…
Cancel
Save