Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 16 additions & 7 deletions source/pricing.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ class="ud-single-pricing first-item{{ $content->isActive ? ' active' : ''}} wow
<section id="pricing" class="ud-pricing">
<div class="container">

@php
$comparePlans = array_map(static fn ($planName) => [
'key' => strtolower($planName),
'label' => $planName,
], array_keys((array) $page->prices));
@endphp

<h2 class="display-6 text-center mb-4">{{ $page->t('Compare plans')}}</h2>

<div class="table-responsive">
Expand All @@ -65,20 +72,22 @@ class="ud-single-pricing first-item{{ $content->isActive ? ' active' : ''}} wow
<thead>
<tr>
<th style="width: 34%;"></th>
<th style="width: 22%;">{{ $page->t('Basic') }}</th>
<th style="width: 22%;">{{ $page->t('Business') }}</th>
@foreach ($comparePlans as $plan)
<th style="width: 22%;">{{ $page->t($plan['label']) }}</th>
@endforeach
</tr>
</thead>
@foreach($page->optionsServicesLibresign as $item => $optionList)
<tbody>
<tr>
<th scope="row" class="text-start">{{ $page->t($optionList->service) }}</th>
@foreach (['basic', 'business'] as $item)
@foreach ($comparePlans as $plan)
@php($planValue = $optionList->{$plan['key']} ?? null)
<td>
@if (is_bool($optionList->$item))
<i class="lni lni-{{ $optionList->$item == true ? 'checkmark text-success' : 'close text-danger'}}"></i>
@else
{{ $page->t($optionList->$item) }}
@if (is_bool($planValue))
<i class="lni lni-{{ $planValue == true ? 'checkmark text-success' : 'close text-danger'}}"></i>
@elseif (is_string($planValue) && $planValue !== '')
{{ $page->t($planValue) }}
@endif
</td>
@endforeach
Expand Down
Loading