add landing pages for meetups

This commit is contained in:
Benjamin Takats
2023-01-14 20:35:54 +01:00
parent 8120b13bff
commit 2f00e34e10
55 changed files with 3161 additions and 17 deletions

View File

@@ -0,0 +1,22 @@
@aware(['component'])
@php
$attributes = $attributes->merge(['wire:key' => 'empty-message-'.$component->id]);
$theme = $component->getTheme();
@endphp
@if ($theme === 'tailwind')
<tr {{ $attributes }}>
<td colspan="{{ $component->getColspanCount() }}">
<div class="flex justify-center items-center space-x-2 dark:bg-gray-800">
<span class="font-medium py-8 text-gray-400 text-lg dark:text-white">{{ $component->getEmptyMessage() }}</span>
</div>
</td>
</tr>
@elseif ($theme === 'bootstrap-4' || $theme === 'bootstrap-5')
<tr {{ $attributes }}>
<td colspan="{{ $component->getColspanCount() }}">
{{ $component->getEmptyMessage() }}
</td>
</tr>
@endif

View File

@@ -0,0 +1,66 @@
@aware(['component'])
@props(['row', 'rowIndex'])
@if ($component->collapsingColumnsAreEnabled() && $component->hasCollapsedColumns())
@php
$theme = $component->getTheme();
$columns = collect([]);
if ($component->shouldCollapseOnMobile() && $component->shouldCollapseOnTablet()) {
$columns->push($component->getCollapsedMobileColumns());
$columns->push($component->getCollapsedTabletColumns());
} elseif ($component->shouldCollapseOnTablet() && ! $component->shouldCollapseOnMobile()) {
$columns->push($component->getCollapsedTabletColumns());
} elseif ($component->shouldCollapseOnMobile() && ! $component->shouldCollapseOnTablet()) {
$columns->push($component->getCollapsedMobileColumns());
}
$columns = $columns->collapse();
// TODO: Column count
$colspan = $columns->count() + 1;
@endphp
@if ($theme === 'tailwind')
<tr
wire:key="row-{{ $rowIndex }}-collapsed-contents"
wire:loading.class.delay="opacity-50 dark:bg-gray-900 dark:opacity-60"
x-data
@toggle-row-content.window="$event.detail.row === {{ $rowIndex }} ? $el.classList.toggle('hidden') : null"
class="hidden md:hidden bg-white dark:bg-gray-700 dark:text-white"
>
<td class="pt-4 pb-2 px-4" colspan="{{ $colspan }}">
<div>
@foreach($columns as $colIndex => $column)
@continue($column->isHidden())
@continue($this->columnSelectIsEnabled() && ! $this->columnSelectIsEnabledForColumn($column))
<p class="block mb-2 @if($column->shouldCollapseOnMobile()) sm:hidden @endif @if($column->shouldCollapseOnTablet()) md:hidden @endif">
<strong>{{ $column->getTitle() }}</strong>: {{ $column->renderContents($row) }}
</p>
@endforeach
</div>
</td>
</tr>
@elseif ($theme === 'bootstrap-4' || $theme === 'bootstrap-5')
<tr
wire:key="row-{{ $rowIndex }}-collapsed-contents"
x-data
@toggle-row-content.window="$event.detail.row === {{ $rowIndex }} ? $el.classList.toggle('d-none') : null"
class="d-none d-md-none"
>
<td class="pt-3 p-2" colspan="{{ $colspan }}">
<div>
@foreach($columns as $colIndex => $column)
@continue($column->isHidden())
@continue($this->columnSelectIsEnabled() && ! $this->columnSelectIsEnabledForColumn($column))
<p class="d-block mb-2 @if($column->shouldCollapseOnMobile()) d-sm-none @endif @if($column->shouldCollapseOnTablet()) d-md-none @endif">
<strong>{{ $column->getTitle() }}</strong>: {{ $column->renderContents($row) }}
</p>
@endforeach
</div>
</td>
</tr>
@endif
@endif

View File

@@ -0,0 +1,43 @@
@aware(['component', 'row', 'rowIndex'])
@props(['column', 'colIndex'])
@php
$attributes = $attributes->merge(['wire:key' => 'cell-'.$rowIndex.'-'.$colIndex.'-'.$component->id]);
$theme = $component->getTheme();
$customAttributes = $component->getTdAttributes($column, $row, $colIndex, $rowIndex)
@endphp
@if ($theme === 'tailwind')
<td
@if ($column->isClickable())
onclick="window.open('{{ $component->getTableRowUrl($row) }}', '{{ $component->getTableRowUrlTarget($row) ?? '_self' }}')"
@endif
{{
$attributes->merge($customAttributes)
->class(['px-6 py-4 whitespace-nowrap text-sm font-medium dark:text-white' => $customAttributes['default'] ?? true])
->class(['hidden sm:table-cell' => $column && $column->shouldCollapseOnMobile()])
->class(['hidden md:table-cell' => $column && $column->shouldCollapseOnTablet()])
->except('default')
}}
>
{{ $slot }}
</td>
@elseif ($theme === 'bootstrap-4' || $theme === 'bootstrap-5')
<td
@if ($column->isClickable())
onclick="window.open('{{ $component->getTableRowUrl($row) }}', '{{ $component->getTableRowUrlTarget($row) ?? '_self' }}')"
style="cursor:pointer"
@endif
{{
$attributes->merge($customAttributes)
->class(['' => $customAttributes['default'] ?? true])
->class(['d-none d-sm-table-cell' => $column && $column->shouldCollapseOnMobile()])
->class(['d-none d-md-table-cell' => $column && $column->shouldCollapseOnTablet()])
->except('default')
}}
>
{{ $slot }}
</td>
@endif

View File

@@ -0,0 +1,43 @@
@aware(['component'])
@props(['row'])
@if ($component->bulkActionsAreEnabled() && $component->hasBulkActions())
@php
$theme = $component->getTheme();
@endphp
@if ($theme === 'tailwind')
<x-livewire-tables::table.td.plain>
<div class="inline-flex rounded-md shadow-sm">
<input
wire:model="selected"
wire:loading.attr.delay="disabled"
value="{{ $row->{$this->getPrimaryKey()} }}"
type="checkbox"
class="rounded border-gray-300 text-indigo-600 shadow-sm transition duration-150 ease-in-out focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 dark:bg-gray-900 dark:text-white dark:border-gray-600 dark:hover:bg-gray-600 dark:focus:bg-gray-600"
/>
</div>
</x-livewire-tables::table.td.plain>
@elseif ($theme === 'bootstrap-4')
<x-livewire-tables::table.td.plain>
<input
wire:model="selected"
wire:loading.attr.delay="disabled"
value="{{ $row->{$this->getPrimaryKey()} }}"
type="checkbox"
/>
</x-livewire-tables::table.td.plain>
@elseif ($theme === 'bootstrap-5')
<x-livewire-tables::table.td.plain>
<div class="form-check">
<input
wire:model="selected"
wire:loading.attr.delay="disabled"
value="{{ $row->{$this->getPrimaryKey()} }}"
type="checkbox"
class="form-check-input"
/>
</div>
</x-livewire-tables::table.td.plain>
@endif
@endif

View File

@@ -0,0 +1,24 @@
@aware(['component'])
@props(['column' => null, 'customAttributes' => []])
@php
$theme = $component->getTheme();
@endphp
@if ($theme === 'tailwind')
<td {{ $attributes
->merge($customAttributes)
->class(['px-6 py-4 whitespace-nowrap text-sm font-medium dark:text-white' => $customAttributes['default'] ?? true])
->class(['hidden sm:table-cell' => $column && $column->shouldCollapseOnMobile()])
->class(['hidden md:table-cell' => $column && $column->shouldCollapseOnTablet()])
->except('default')
}}>{{ $slot }}</td>
@elseif ($theme === 'bootstrap-4' || $theme === 'bootstrap-5')
<td {{ $attributes
->merge($customAttributes)
->class(['' => $customAttributes['default'] ?? true])
->class(['d-none d-sm-table-cell' => $column && $column->shouldCollapseOnMobile()])
->class(['d-none d-md-table-cell' => $column && $column->shouldCollapseOnTablet()])
->except('default')
}}>{{ $slot }}</td>
@endif

View File

@@ -0,0 +1,21 @@
@aware(['component'])
@php
$theme = $component->getTheme();
@endphp
@if ($this->currentlyReorderingIsEnabled())
@if ($theme === 'tailwind')
<x-livewire-tables::table.td.plain wire:sortable.handle>
<svg xmlns="http://www.w3.org/2000/svg" class="inline w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" />
</svg>
</x-livewire-tables::table.td.plain>
@elseif ($theme === 'bootstrap-4' || $theme === 'bootstrap-5')
<x-livewire-tables::table.td.plain wire:sortable.handle>
<svg xmlns="http://www.w3.org/2000/svg" class="d-inline" style="width:1em;height:1em;" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" />
</svg>
</x-livewire-tables::table.td.plain>
@endif
@endif

View File

@@ -0,0 +1,67 @@
@aware(['component'])
@props(['rowIndex', 'hidden' => false])
@if ($component->collapsingColumnsAreEnabled() && $component->hasCollapsedColumns())
@php
$theme = $component->getTheme();
@endphp
@if ($theme === 'tailwind')
<td
@if (! $hidden) x-data="{open:false}" @endif
{{
$attributes
->merge(['class' => 'p-3 table-cell text-center'])
->class([
'md:hidden' =>
(($component->shouldCollapseOnMobile() && $component->shouldCollapseOnTablet()) ||
($component->shouldCollapseOnTablet() && ! $component->shouldCollapseOnMobile()))
])
->class(['sm:hidden' => $component->shouldCollapseOnMobile() && ! $component->shouldCollapseOnTablet()])
}}
>
@if (! $hidden)
<button
x-on:click.prevent="$dispatch('toggle-row-content', {'row': {{ $rowIndex }}});open = !open"
>
<svg x-show="!open" xmlns="http://www.w3.org/2000/svg" class="text-green-600 h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v3m0 0v3m0-3h3m-3 0H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z" />
</svg>
<svg x-cloak x-show="open" xmlns="http://www.w3.org/2000/svg" class="text-yellow-600 h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z" />
</svg>
</button>
@endif
</td>
@elseif ($theme === 'bootstrap-4' || $theme === 'bootstrap-5')
<td
@if (! $hidden) x-data="{open:false}" @endif
{{
$attributes
->class([
'd-md-none' =>
(($component->shouldCollapseOnMobile() && $component->shouldCollapseOnTablet()) ||
($component->shouldCollapseOnTablet() && ! $component->shouldCollapseOnMobile()))
])
->class(['d-sm-none' => $component->shouldCollapseOnMobile() && ! $component->shouldCollapseOnTablet()])
}}
>
@if (! $hidden)
<button
x-on:click.prevent="$dispatch('toggle-row-content', {'row': {{ $rowIndex }}});open = !open"
class="p-0"
style="background:none;border:none;"
>
<svg x-show="!open" xmlns="http://www.w3.org/2000/svg" class="text-success" style="width:1.4em;height:1.4em;" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v3m0 0v3m0-3h3m-3 0H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z" />
</svg>
<svg x-cloak x-show="open" xmlns="http://www.w3.org/2000/svg" class="text-warning" style="width:1.4em;height:1.4em;" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z" />
</svg>
</button>
@endif
</td>
@endif
@endif

View File

@@ -0,0 +1,95 @@
@aware(['component'])
@props(['column', 'index'])
@php
$attributes = $attributes->merge(['wire:key' => 'header-col-'.$index.'-'.$component->id]);
$theme = $component->getTheme();
$customAttributes = $component->getThAttributes($column);
$customSortButtonAttributes = $component->getThSortButtonAttributes($column);
$direction = $column->hasField() ? $component->getSort($column->getColumnSelectName()) : null;
@endphp
@if ($theme === 'tailwind')
<th scope="col" {{
$attributes->merge($customAttributes)
->class(['px-6 py-3 text-left text-xs font-medium whitespace-nowrap text-gray-500 uppercase tracking-wider dark:bg-gray-800 dark:text-gray-400' => $customAttributes['default'] ?? true])
->class(['hidden sm:table-cell' => $column->shouldCollapseOnMobile()])
->class(['hidden md:table-cell' => $column->shouldCollapseOnTablet()])
->except('default')
}}>
@unless ($component->sortingIsEnabled() && $column->isSortable())
{{ $column->getTitle() }}
@else
<button
wire:click="sortBy('{{ $column->getColumnSelectName() }}')"
{{
$attributes->merge($customSortButtonAttributes)
->class(['flex items-center space-x-1 text-left text-xs leading-4 font-medium text-gray-500 uppercase tracking-wider group focus:outline-none dark:text-gray-400' => $customSortButtonAttributes['default'] ?? true])
->except(['default', 'wire:key'])
}}
>
<span>{{ $column->getTitle() }}</span>
<span class="relative flex items-center">
@if ($direction === 'asc')
<svg class="w-3 h-3 group-hover:opacity-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 15l7-7 7 7"></path>
</svg>
<svg class="w-3 h-3 opacity-0 group-hover:opacity-100 absolute" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path>
</svg>
@elseif ($direction === 'desc')
<svg class="w-3 h-3 opacity-0 group-hover:opacity-100 absolute" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z" />
</svg>
<svg class="w-3 h-3 group-hover:opacity-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path>
</svg>
@else
<svg class="w-3 h-3 opacity-0 group-hover:opacity-100 transition-opacity duration-300" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 15l7-7 7 7"></path>
</svg>
@endif
</span>
</button>
@endunless
</th>
@elseif ($theme === 'bootstrap-4' || $theme === 'bootstrap-5')
<th scope="col" {{
$attributes->merge($customAttributes)
->class(['' => $customAttributes['default'] ?? true])
->class(['d-none d-sm-table-cell' => $column->shouldCollapseOnMobile()])
->class(['d-none d-md-table-cell' => $column->shouldCollapseOnTablet()])
->except('default')
}}>
@unless ($component->sortingIsEnabled() && $column->isSortable())
{{ $column->getTitle() }}
@else
<div
class="d-flex align-items-center"
wire:click="sortBy('{{ $column->getColumnSelectName() }}')"
style="cursor:pointer;"
>
<span>{{ $column->getTitle() }}</span>
<span class="relative d-flex align-items-center">
@if ($direction === 'asc')
<svg xmlns="http://www.w3.org/2000/svg" class="ml-1" style="width:1em;height:1em;" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 15l7-7 7 7" />
</svg>
@elseif ($direction === 'desc')
<svg xmlns="http://www.w3.org/2000/svg" class="ml-1" style="width:1em;height:1em;" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7" />
</svg>
@else
<svg xmlns="http://www.w3.org/2000/svg" class="ml-1" style="width:1em;height:1em;" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4" />
</svg>
@endif
</span>
</div>
@endunless
</th>
@endif

View File

@@ -0,0 +1,36 @@
@aware(['component'])
@if ($component->bulkActionsAreEnabled() && $component->hasBulkActions())
@php
$theme = $component->getTheme();
@endphp
@if ($theme === 'tailwind')
<x-livewire-tables::table.th.plain>
<div class="inline-flex rounded-md shadow-sm">
<input
wire:model="selectAll"
type="checkbox"
class="rounded border-gray-300 text-indigo-600 shadow-sm transition duration-150 ease-in-out focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 dark:bg-gray-900 dark:text-white dark:border-gray-600 dark:hover:bg-gray-600 dark:focus:bg-gray-600"
/>
</div>
</x-livewire-tables::table.th.plain>
@elseif ($theme === 'bootstrap-4')
<x-livewire-tables::table.th.plain>
<input
wire:model="selectAll"
type="checkbox"
/>
</x-livewire-tables::table.th.plain>
@elseif ($theme === 'bootstrap-5')
<x-livewire-tables::table.th.plain>
<div class="form-check">
<input
wire:model="selectAll"
type="checkbox"
class="form-check-input"
/>
</div>
</x-livewire-tables::table.th.plain>
@endif
@endif

View File

@@ -0,0 +1,11 @@
@aware(['component'])
@php
$theme = $component->getTheme();
@endphp
@if ($theme === 'tailwind')
<th scope="col" {{ $attributes->merge(['class' => 'table-cell px-3 py-2 md:px-6 md:py-3 text-center md:text-left bg-gray-50 dark:bg-gray-800']) }}>{{ $slot }}</th>
@elseif ($theme === 'bootstrap-4' || $theme === 'bootstrap-5')
<th scope="col">{{ $slot }}</th>
@endif

View File

@@ -0,0 +1,5 @@
@aware(['component'])
@if ($this->currentlyReorderingIsEnabled())
<x-livewire-tables::table.th.plain />
@endif

View File

@@ -0,0 +1,37 @@
@aware(['component'])
@if ($component->collapsingColumnsAreEnabled() && $component->hasCollapsedColumns())
@php
$theme = $component->getTheme();
@endphp
@if ($theme === 'tailwind')
<th
scope="col"
{{
$attributes
->merge(['class' => 'table-cell dark:bg-gray-800'])
->class([
'md:hidden' =>
(($component->shouldCollapseOnMobile() && $component->shouldCollapseOnTablet()) ||
($component->shouldCollapseOnTablet() && ! $component->shouldCollapseOnMobile()))
])
->class(['sm:hidden' => $component->shouldCollapseOnMobile() && ! $component->shouldCollapseOnTablet()])
}}
></th>
@elseif ($theme === 'bootstrap-4' || $theme === 'bootstrap-5')
<th
scope="col"
{{
$attributes
->merge(['class' => 'd-table-cell'])
->class([
'd-md-none' =>
(($component->shouldCollapseOnMobile() && $component->shouldCollapseOnTablet()) ||
($component->shouldCollapseOnTablet() && ! $component->shouldCollapseOnMobile()))
])
->class(['d-sm-none' => $component->shouldCollapseOnMobile() && ! $component->shouldCollapseOnTablet()])
}}
></th>
@endif
@endif

View File

@@ -0,0 +1,45 @@
@aware(['component'])
@props(['row', 'rowIndex'])
@php
$attributes = $attributes->merge(['wire:key' => 'row-'.$rowIndex.'-'.$component->id]);
$theme = $component->getTheme();
$customAttributes = $this->getTrAttributes($row, $rowIndex);
@endphp
@if ($theme === 'tailwind')
<tr
wire:loading.class.delay="opacity-50 dark:bg-gray-900 dark:opacity-60"
@if ($component->reorderIsEnabled() && $component->currentlyReorderingIsEnabled())
wire:sortable.item="{{ $row->getKey() }}"
@endif
{{
$attributes->merge($customAttributes)
->class(['bg-white dark:bg-gray-700 dark:text-white' => ($customAttributes['default'] ?? true) && $rowIndex % 2 === 0])
->class(['bg-gray-50 dark:bg-gray-800 dark:text-white' => ($customAttributes['default'] ?? true) && $rowIndex % 2 !== 0])
->class(['cursor-pointer' => $component->hasTableRowUrl()])
->except('default')
}}
>
{{ $slot }}
</tr>
@elseif ($theme === 'bootstrap-4' || $theme === 'bootstrap-5')
<tr
wire:loading.class.delay=""
@if ($component->reorderIsEnabled() && $component->currentlyReorderingIsEnabled())
wire:sortable.item="{{ $row->getKey() }}"
@endif
{{
$attributes->merge($customAttributes)
->class(['' => ($customAttributes['default'] ?? true) && $rowIndex % 2 === 0])
->class(['' => ($customAttributes['default'] ?? true) && $rowIndex % 2 !== 0])
->except('default')
}}
>
{{ $slot }}
</tr>
@endif

View File

@@ -0,0 +1,119 @@
@aware(['component'])
@props(['rows'])
@if ($component->bulkActionsAreEnabled() && $component->hasBulkActions() && $component->hasSelected())
@php
$table = $component->getTableName();
$theme = $component->getTheme();
$colspan = $component->getColspanCount();
$selected = $component->getSelectedCount();
$selectAll = $component->selectAllIsEnabled();
@endphp
@if ($theme === 'tailwind')
<x-livewire-tables::table.tr.plain
wire:key="bulk-select-message-{{ $table }}"
class="bg-indigo-50 dark:bg-gray-900 dark:text-white"
>
<x-livewire-tables::table.td.plain :colspan="$colspan">
@if ($selectAll)
<div wire:key="all-selected-{{ $table }}">
<span>
@lang('You are currently selecting all')
<strong>{{ number_format($rows->total()) }}</strong>
@lang('rows').
</span>
<button
wire:click="clearSelected"
wire:loading.attr="disabled"
type="button"
class="ml-1 text-blue-600 underline text-gray-700 text-sm leading-5 font-medium focus:outline-none focus:text-gray-800 focus:underline transition duration-150 ease-in-out dark:text-white dark:hover:text-gray-400"
>
@lang('Deselect All')
</button>
</div>
@else
<div wire:key="some-selected-{{ $table }}">
<span>
@lang('You have selected')
<strong>{{ $selected }}</strong>
@lang('rows, do you want to select all')
<strong>{{ number_format($rows->total()) }}</strong>?
</span>
<button
wire:click="setAllSelected"
wire:loading.attr="disabled"
type="button"
class="ml-1 text-blue-600 underline text-gray-700 text-sm leading-5 font-medium focus:outline-none focus:text-gray-800 focus:underline transition duration-150 ease-in-out dark:text-white dark:hover:text-gray-400"
>
@lang('Select All')
</button>
<button
wire:click="clearSelected"
wire:loading.attr="disabled"
type="button"
class="ml-1 text-blue-600 underline text-gray-700 text-sm leading-5 font-medium focus:outline-none focus:text-gray-800 focus:underline transition duration-150 ease-in-out dark:text-white dark:hover:text-gray-400"
>
@lang('Deselect All')
</button>
</div>
@endif
</x-livewire-tables::table.td.plain>
</x-livewire-tables::table.tr.plain>
@elseif ($theme === 'bootstrap-4' || $theme === 'bootstrap-5')
<x-livewire-tables::table.tr.plain
wire:key="bulk-select-message-{{ $table }}"
>
<x-livewire-tables::table.td.plain :colspan="$colspan">
@if ($selectAll)
<div wire:key="all-selected-{{ $table }}">
<span>
@lang('You are currently selecting all')
<strong>{{ number_format($rows->total()) }}</strong>
@lang('rows').
</span>
<button
wire:click="clearSelected"
wire:loading.attr="disabled"
type="button"
class="btn btn-primary btn-sm"
>
@lang('Deselect All')
</button>
</div>
@else
<div wire:key="some-selected-{{ $table }}">
<span>
@lang('You have selected')
<strong>{{ $selected }}</strong>
@lang('rows, do you want to select all')
<strong>{{ number_format($rows->total()) }}</strong>?
</span>
<button
wire:click="setAllSelected"
wire:loading.attr="disabled"
type="button"
class="btn btn-primary btn-sm"
>
@lang('Select All')
</button>
<button
wire:click="clearSelected"
wire:loading.attr="disabled"
type="button"
class="btn btn-primary btn-sm"
>
@lang('Deselect All')
</button>
</div>
@endif
</x-livewire-tables::table.td.plain>
</x-livewire-tables::table.tr.plain>
@endif
@endif

View File

@@ -0,0 +1,30 @@
@aware(['component'])
@props(['rows'])
<x-livewire-tables::table.tr.plain
:customAttributes="$this->getFooterTrAttributes($rows)"
wire:key="footer-{{ $this->getTableName() }}"
>
@if ($this->currentlyReorderingIsEnabled())
<x-livewire-tables::table.td.plain />
@endif
@if ($this->bulkActionsAreEnabled() && $this->hasBulkActions())
<x-livewire-tables::table.td.plain />
@endif
@if ($this->collapsingColumnsAreEnabled() && $this->hasCollapsedColumns())
<x-livewire-tables::table.td.row-contents rowIndex="-1" :hidden="true" />
@endif
@foreach($this->getColumns() as $colIndex => $column)
@continue($column->isHidden())
@continue($this->columnSelectIsEnabled() && ! $this->columnSelectIsEnabledForColumn($column))
@continue($this->currentlyReorderingIsDisabled() && $column->isReorderColumn() && $this->hideReorderColumnUnlessReorderingIsEnabled())
<x-livewire-tables::table.td.plain :column="$column" :customAttributes="$this->getFooterTdAttributes($column, $rows, $colIndex)">
{{ $column->getFooterContents($rows) }}
</x-livewire-tables::table.td.plain>
@endforeach
</x-livewire-tables::table.tr.plain>

View File

@@ -0,0 +1,24 @@
@aware(['component'])
@props(['customAttributes' => []])
@php
$theme = $component->getTheme();
@endphp
@if ($theme === 'tailwind')
<tr {{ $attributes
->merge($customAttributes)
->class(['bg-white dark:bg-gray-700 dark:text-white' => $customAttributes['default'] ?? true])
->except('default')
}}>
{{ $slot }}
</tr>
@elseif ($theme === 'bootstrap-4' || $theme === 'bootstrap-5')
<tr {{ $attributes
->merge($customAttributes)
->class(['' => $customAttributes['default'] ?? true])
->except('default')
}}>
{{ $slot }}
</tr>
@endif

View File

@@ -0,0 +1,30 @@
@aware(['component'])
@props(['rows'])
<x-livewire-tables::table.tr.plain
:customAttributes="$this->getSecondaryHeaderTrAttributes($rows)"
wire:key="secondary-header-{{ $this->getTableName() }}"
>
@if ($this->currentlyReorderingIsEnabled())
<x-livewire-tables::table.td.plain />
@endif
@if ($this->bulkActionsAreEnabled() && $this->hasBulkActions())
<x-livewire-tables::table.td.plain />
@endif
@if ($this->collapsingColumnsAreEnabled() && $this->hasCollapsedColumns())
<x-livewire-tables::table.td.row-contents rowIndex="-1" :hidden="true" />
@endif
@foreach($this->getColumns() as $colIndex => $column)
@continue($column->isHidden())
@continue($this->columnSelectIsEnabled() && ! $this->columnSelectIsEnabledForColumn($column))
@continue($this->currentlyReorderingIsDisabled() && $column->isReorderColumn() && $this->hideReorderColumnUnlessReorderingIsEnabled())
<x-livewire-tables::table.td.plain :column="$column" :customAttributes="$this->getSecondaryHeaderTdAttributes($column, $rows, $colIndex)">
{{ $column->getSecondaryHeaderContents($rows) }}
</x-livewire-tables::table.td.plain>
@endforeach
</x-livewire-tables::table.tr.plain>