!157 Fix tab_product module

* Fix tab_product module
This commit is contained in:
pushuo 2023-07-19 01:46:46 +00:00 committed by Edward Yang
parent b23a926dd5
commit 7e3f2be082
1 changed files with 5 additions and 2 deletions

View File

@ -1,18 +1,21 @@
<section class="module-item {{ $design ? 'module-item-design' : ''}}" id="module-{{ $module_id }}">
@include('design._partial._module_tool')
@php
$editableTabsValue = $content['editableTabsValue'] ?? 0;
@endphp
<div class="module-info module-tab-product">
<div class="module-title">{{ $content['title'] ?? '' }}</div>
<div class="container">
@if ($content['tabs'] ?? false)
<div class="nav justify-content-center mb-3">
@foreach ($content['tabs'] as $key => $tabs)
<a class="nav-link {{ ($design ? $content['editableTabsValue'] == $key : $loop->first) ? 'active' : '' }}" href="#tab-product-{{ $module_id }}-{{ $loop->index }}" data-bs-toggle="tab">{{ $tabs['title'] }}</a>
<a class="nav-link {{ ($design ? $editableTabsValue == $key : $loop->first) ? 'active' : '' }}" href="#tab-product-{{ $module_id }}-{{ $loop->index }}" data-bs-toggle="tab">{{ $tabs['title'] }}</a>
@endforeach
</div>
<div class="tab-content">
@foreach ($content['tabs'] as $key => $products)
<div class="tab-pane fade show {{ ($design ? $content['editableTabsValue'] == $key : $loop->first) ? 'active' : '' }}" id="tab-product-{{ $module_id }}-{{ $loop->index }}">
<div class="tab-pane fade show {{ ($design ? $editableTabsValue == $key : $loop->first) ? 'active' : '' }}" id="tab-product-{{ $module_id }}-{{ $loop->index }}">
<div class="row">
@if ($products['products'])
@foreach ($products['products'] as $product)