@extends('admin.layouts.master') @section('content')

{{ trans('app.category_groups') }}

@can('create', \App\Models\CategoryGroup::class) {{ trans('app.bulk_translation_import') }} {{ trans('app.add_category_group') }} @endcan
@can('massDelete', \App\Models\CategoryGroup::class) @endcan @foreach ($categoryGrps as $categoryGrp) @can('massDelete', \App\Models\CategoryGroup::class) @endcan @endforeach
{{ trans('app.background_image') }} {{ trans('app.cover_image') }} {{ trans('app.category_group') }} {{ trans('app.sub_groups') }} {{ trans('app.order') }}  
@if (Storage::exists(optional($categoryGrp->backgroundImage)->path)) {{ trans('app.background_image') }} @endif @if (Storage::exists(optional($categoryGrp->coverImage)->path)) {{ trans('app.cover_image') }} @endif
{{ $categoryGrp->name }} @unless ($categoryGrp->active) {{ trans('app.inactive') }} @endunless
@if ($categoryGrp->description) {!! Str::limit($categoryGrp->description, 220) !!} @endif
{{ $categoryGrp->sub_groups_count }} {{ $categoryGrp->order }} @can('update', $categoryGrp)   @endcan @can('delete', $categoryGrp) {!! Form::open(['route' => ['admin.catalog.categoryGroup.trash', $categoryGrp->id], 'method' => 'delete', 'class' => 'data-form']) !!} {!! Form::button('', ['type' => 'submit', 'class' => 'confirm ajax-silent', 'title' => trans('app.trash'), 'data-toggle' => 'tooltip', 'data-placement' => 'top']) !!} {!! Form::close() !!} @endcan

@can('massDelete', \App\Models\CategoryGroup::class) {!! Form::open(['route' => ['admin.catalog.categoryGroup.emptyTrash'], 'method' => 'delete', 'class' => 'data-form']) !!} {!! Form::button('', ['type' => 'submit', 'class' => 'confirm btn btn-default btn-flat ajax-silent', 'title' => trans('help.empty_trash'), 'data-toggle' => 'tooltip', 'data-placement' => 'right']) !!} {!! Form::close() !!} @else @endcan {{ trans('app.trash') }}

@foreach ($trashes as $trash) @endforeach
{{ trans('app.category_group') }} {{ trans('app.deleted_at') }} {{ trans('app.option') }}
{{ $trash->name }}
@if ($trash->description) {!! Str::limit($trash->description, 220) !!} @endif
{{ $trash->deleted_at->diffForHumans() }} @can('delete', $trash)   {!! Form::open(['route' => ['admin.catalog.categoryGroup.destroy', $trash->id], 'method' => 'delete', 'class' => 'data-form']) !!} {!! Form::button('', ['type' => 'submit', 'class' => 'confirm ajax-silent', 'title' => trans('app.delete_permanently'), 'data-toggle' => 'tooltip', 'data-placement' => 'top']) !!} {!! Form::close() !!} @endcan
@endsection