Main category sub category style changed
This commit is contained in:
parent
5a602cbb73
commit
c9f4cf530c
|
|
@ -49,17 +49,13 @@
|
|||
<x-index.bulkaction.all />
|
||||
</x-table.th>
|
||||
|
||||
<x-table.th class="w-5/12">
|
||||
<x-table.th class="w-6/12">
|
||||
<x-sortablelink column="name" title="{{ trans('general.name') }}" />
|
||||
</x-table.th>
|
||||
|
||||
<x-table.th class="w-5/12">
|
||||
<x-table.th class="w-6/12">
|
||||
<x-sortablelink column="type" title="{{ trans_choice('general.types', 1) }}" />
|
||||
</x-table.th>
|
||||
|
||||
<x-table.th class="w-2/12">
|
||||
{{ trans('general.color') }}
|
||||
</x-table.th>
|
||||
</x-table.tr>
|
||||
</x-table.thead>
|
||||
|
||||
|
|
@ -74,26 +70,32 @@
|
|||
/>
|
||||
</x-table.td>
|
||||
|
||||
<x-table.td class="w-5/12">
|
||||
@if ($item->sub_categories->count())
|
||||
<div class="flex items-center font-bold">
|
||||
{{ $item->name }}
|
||||
|
||||
<x-table.td class="w-6/12">
|
||||
<div class="flex items-center">
|
||||
@if ($item->sub_categories->count())
|
||||
<x-tooltip id="tooltip-category-{{ $item->id }}" placement="bottom" message="{{ trans('categories.collapse') }}">
|
||||
<button
|
||||
type="button"
|
||||
class="w-4 h-4 flex items-center justify-center mx-2 leading-none align-text-top rounded-lg bg-gray-500 hover:bg-gray-700"
|
||||
class="w-4 h-4 flex items-center justify-center mx-2 leading-none align-text-top rounded-lg"
|
||||
node="child-{{ $item->id }}"
|
||||
onClick="toggleSub('child-{{ $item->id }}', event)"
|
||||
>
|
||||
<span class="material-icons transform rotate-90 transition-all text-lg leading-none align-middle text-white">chevron_right</span>
|
||||
<span class="material-icons transform rotate-90 -ml-2 transition-all text-xl leading-none align-middle rounded-full bg-{{ $item->color }} text-white" style="background-color:{{ $item->color }};">chevron_right</span>
|
||||
</button>
|
||||
</x-tooltip>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center font-bold">
|
||||
{{ $item->name }}
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<span class="font-bold">
|
||||
{{ $item->name }}
|
||||
</span>
|
||||
<div class="flex items-center">
|
||||
<span class="material-icons text-{{ $item->color }}" class="text-3xl" style="color:{{ $item->color }};">circle</span>
|
||||
|
||||
<span class="font-bold ltr:ml-2 rtl:mr-2">
|
||||
{{ $item->name }}
|
||||
</span>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (! $item->enabled)
|
||||
|
|
@ -101,7 +103,7 @@
|
|||
@endif
|
||||
</x-table.td>
|
||||
|
||||
<x-table.td class="w-5/12">
|
||||
<x-table.td class="w-6/12">
|
||||
@if (! empty($types[$item->type]))
|
||||
{{ $types[$item->type] }}
|
||||
@else
|
||||
|
|
@ -109,10 +111,6 @@
|
|||
@endif
|
||||
</x-table.td>
|
||||
|
||||
<x-table.td class="w-2/12">
|
||||
<span class="material-icons text-{{ $item->color }}" class="text-3xl" style="color:{{ $item->color }};">circle</span>
|
||||
</x-table.td>
|
||||
|
||||
<x-table.td kind="action">
|
||||
<x-table.actions :model="$item" />
|
||||
</x-table.td>
|
||||
|
|
@ -130,4 +128,4 @@
|
|||
</x-slot>
|
||||
|
||||
<x-script folder="settings" file="categories" />
|
||||
</x-layouts.admin>
|
||||
</x-layouts.admin>
|
||||
|
|
@ -4,28 +4,30 @@
|
|||
<x-index.bulkaction.single id="{{ $sub_category->id }}" name="{{ $sub_category->name }}" />
|
||||
</x-table.td>
|
||||
|
||||
<x-table.td class="w-5/12 ltr:pr-6 rtl:pl-6 py-4 ltr:text-left rtl:text-right whitespace-nowrap text-sm font-medium text-black truncate" style="padding-left: {{ $tree_level * 15 }}px;">
|
||||
@if ($sub_category->sub_categories->count())
|
||||
<div class="flex items-center font-bold">
|
||||
<span class="material-icons transform mr-1 text-lg leading-none">subdirectory_arrow_right</span>
|
||||
|
||||
{{ $sub_category->name }}
|
||||
|
||||
<x-table.td class="relative w-6/12 py-4 ltr:text-left rtl:text-right whitespace-nowrap text-sm font-medium text-black truncate" style="padding-left: {{ $tree_level * 30 }}px;">
|
||||
<div class="flex items-center ml-2">
|
||||
@if ($sub_category->sub_categories->count())
|
||||
<x-tooltip id="tooltip-category-{{ $parent_category->id }}" placement="bottom" message="{{ trans('categories.collapse') }}">
|
||||
<button
|
||||
type="button"
|
||||
class="w-4 h-4 flex items-center justify-center mx-2 leading-none align-text-top rounded-lg bg-gray-500 hover:bg-gray-700"
|
||||
class="w-4 h-4 flex items-center justify-center mx-2 leading-none align-text-top rounded-lg "
|
||||
node="child-{{ $sub_category->id }}"
|
||||
onClick="toggleSub('child-{{ $sub_category->id }}', event)"
|
||||
onClick="toggleSub('child-{{ $sub_category->id }}', event)"
|
||||
>
|
||||
<span class="material-icons transform rotate-90 transition-all text-lg leading-none align-middle text-white">chevron_right</span>
|
||||
<span class="material-icons -ml-2 transform rotate-90 transition-all text-xl leading-none align-middle rounded-full text-white bg-{{ $sub_category->color }}" style="background-color:{{ $sub_category->color }};">chevron_right</span>
|
||||
</button>
|
||||
</x-tooltip>
|
||||
</div>
|
||||
<div class="flex items-center font-bold table-submenu">
|
||||
{{ $sub_category->name }}
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<div class="flex items-center font-bold">
|
||||
<span class="material-icons transform mr-1 text-lg leading-none">subdirectory_arrow_right</span>
|
||||
{{ $sub_category->name }}
|
||||
<div class="flex items-center ml-2">
|
||||
<span class="material-icons text-3xl text-{{ $sub_category->color }}" style="color:{{ $sub_category->color }};">circle</span>
|
||||
|
||||
<div class="flex items-center font-bold table-submenu ltr:ml-2 rtl:mr-2">
|
||||
{{ $sub_category->name }}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
|
@ -34,7 +36,7 @@
|
|||
@endif
|
||||
</x-table.td>
|
||||
|
||||
<x-table.td class="w-5/12 ltr:pr-6 rtl:pl-6 py-4 ltr:text-left rtl:text-right whitespace-nowrap text-sm font-normal text-black cursor-pointer truncate">
|
||||
<x-table.td class="w-6/12 py-4 ltr:text-left rtl:text-right whitespace-nowrap text-sm font-normal text-black cursor-pointer truncate">
|
||||
@if (! empty($types[$item->type]))
|
||||
{{ $types[$item->type] }}
|
||||
@else
|
||||
|
|
@ -42,10 +44,6 @@
|
|||
@endif
|
||||
</x-table.td>
|
||||
|
||||
<x-table.td class="ltr:pr-6 rtl:pl-6 py-4 ltr:text-left rtl:text-right whitespace-nowrap text-sm font-normal text-black cursor-pointer w-2/12 relative">
|
||||
<span class="material-icons text-3xl text-{{ $sub_category->color }}" style="color:{{ $sub_category->color }};">circle</span>
|
||||
</x-table.td>
|
||||
|
||||
<x-table.td kind="action">
|
||||
<x-table.actions :model="$sub_category" />
|
||||
</x-table.td>
|
||||
|
|
@ -59,4 +57,4 @@
|
|||
@foreach($sub_category->sub_categories as $sub_category)
|
||||
@include('settings.categories.sub_category', ['parent_category' => $parent_category, 'sub_category' => $sub_category, 'tree_level' => $tree_level])
|
||||
@endforeach
|
||||
@endif
|
||||
@endif
|
||||
Loading…
Reference in New Issue