@section('site_title', formatTitle([__('Documents'), config('settings.title')])) @include('shared.breadcrumbs', ['breadcrumbs' => [ ['url' => route('dashboard'), 'title' => __('Home')], ['title' => __('Documents')] ]])

{{ __('Documents') }}

{{ __('New') }}
{{ __('Documents') }}
@include('shared.message') @if(count($documents) == 0) {{ __('No results found.') }} @else
{{ __('Name') }}
{{ __('Template') }}
{{ __('Words') }}
{{ __('Created at') }}
@foreach($documents as $document)
@if($document->template->isCustom()) {{ $document->template->icon }} @else @include('icons.' . $document->template->icon, ['class' => 'fill-current width-4 height-4 text-' . categoryColor($document->template->category_id)]) @endif
{{ $document->name }} @if($document->favorite)
@include('icons.star', ['class' => 'fill-current width-4 height-4 flex-shrink-0'])
@endif
{{ Str::substr(strip_tags($document->result) ?? __('No data') . '.', 0, 100) }}
{{ number_format($document->words, 0, __('.'), __(',')) }}
{{ $document->created_at->diffForHumans() }}
@include('documents.partials.menu')
@endforeach
{{ __('Showing :from-:to of :total', ['from' => $documents->firstItem(), 'to' => $documents->lastItem(), 'total' => $documents->total()]) }}
{{ $documents->onEachSide(1)->links() }}
@endif