Documents ready
This commit is contained in:
@@ -9,9 +9,9 @@
|
||||
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
|
||||
<div class="bg-white overflow-hidden shadow-sm sm:rounded-lg">
|
||||
<div class="p-6 bg-white border-b border-gray-200">
|
||||
<a href="{{ route('documents.create')}}">
|
||||
<a href="{{ route('documents.create') }}">
|
||||
<button class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-full">
|
||||
<i class="fa fa-add pr-2"></i>{{__('Create doucment')}}
|
||||
<i class="fa fa-add pr-2"></i>{{ __('Create doucment') }}
|
||||
</button>
|
||||
</a>
|
||||
|
||||
@@ -19,37 +19,37 @@
|
||||
<table class="table table-sm border-b border-gray-200">
|
||||
<tr class="border border-gray-200">
|
||||
<th class="p-2 border border-gray-200">
|
||||
{{ __('Title')}}
|
||||
{{ __('Title') }}
|
||||
</th>
|
||||
<th class="p-2 border border-gray-200">
|
||||
{{ __('Actions')}}
|
||||
{{ __('Actions') }}
|
||||
</th>
|
||||
</tr>
|
||||
@forelse ( $documents as $document)
|
||||
<tr class="border border-gray-200">
|
||||
<td class="p-2 border border-gray-200">{{ $document->name }}</td>
|
||||
<td class="p-2 border border-gray-200">
|
||||
<div class="text-center">
|
||||
{{-- <a href="{{ route('projects.show',$project->id) }}">
|
||||
<i class="fa fa-eye text-green-500 hover:text-green-700 px-2 text-lg"></i>
|
||||
</a>
|
||||
<a href="{{ route('projects.edit',$project->id) }}">
|
||||
<i class="fa fa-edit text-blue-500 hover:text-blue-700 px-2 text-lg"></i>
|
||||
</a>
|
||||
<form class="inline-block" action="{{ route('projects.destroy', $project->id) }}" method="POST" onsubmit="return confirm('{{ __('Are you sure remove project ').$project->name.'?' }}');">
|
||||
<input type="hidden" name="_method" value="DELETE">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}">
|
||||
<button type="submit">
|
||||
<i class="fa fa-trash text-red-500 hover:text-red-700 px-2 text-lg"></i>
|
||||
</button>
|
||||
</form> --}}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@forelse ($top_documents as $document)
|
||||
<tr class="border border-gray-200">
|
||||
<td class="p-2 border border-gray-200">{{ $document->name }}</td>
|
||||
<td class="p-2 border border-gray-200">
|
||||
<div class="text-center">
|
||||
@include('documents.actions', ['document' => $document])
|
||||
</div>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
@if (count($document->childs))
|
||||
@php
|
||||
$level = 1;
|
||||
@endphp
|
||||
@include('documents.tableChild', [
|
||||
'childs' => $document->childs,
|
||||
'level' => $level,
|
||||
])
|
||||
@endif
|
||||
|
||||
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="2" class="p-2 border border-gray-200 text-center">No Documents!</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="p-2 border border-gray-200 text-center">No Documents!</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</table>
|
||||
</div>
|
||||
@@ -57,4 +57,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</x-app-layout>
|
||||
</x-app-layout>
|
||||
|
||||
Reference in New Issue
Block a user