-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FEATURE ✨ Improvements with templates
- Loading branch information
Showing
5 changed files
with
55 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<x-ba-admin-layout title="Details for {{$model->title ?? $model->name}}"> | ||
|
||
<div class="bg-white shadow overflow-hidden sm:rounded-b-lg border-t-2 border-{{$config->color ?? 'blue-500'}}"> | ||
|
||
{{-- Card Top Header --}} | ||
<div class="px-4 py-5 sm:px-6 flex justify-between bg-gray-50"> | ||
<div> | ||
<h3 class="text-lg leading-6 font-medium text-gray-900"> | ||
{{__('Details for')}} <span class="font-bold">{{$model->title}}</span> | ||
</h3> | ||
<p class="mt-1 max-w-2xl text-sm text-gray-500"> | ||
{{ __('Record of type') }} {{$config->name_to_use}} | ||
</p> | ||
</div> | ||
<div class="my-auto flex gap-x-2"> | ||
@if( View::exists('admin.'.$config->modelsname().'._form')) | ||
<x-ba-admin-button href="{{$config->getEditUrl($model->getKey())}}" class="py-1 bg-blue-500">Edit</x-ba-admin-button> | ||
@endif | ||
<x-ba-delete-button action="{{$config->getDestroyUrl($model->getKey()) }}" /> | ||
</div> | ||
|
||
</div> | ||
|
||
<div class="border-t border-gray-200 px-4 py-5 sm:p-0"> | ||
<dl class="sm:divide-y sm:divide-gray-200"> | ||
@foreach($attributesToShow as $attribute) | ||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-5 sm:gap-4 sm:px-6"> | ||
<dt class="text-sm font-medium text-gray-500"> | ||
{{$attribute}} | ||
</dt> | ||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-4"> | ||
@if($model->$attribute === true) <i class="fad fa-check-square text-green-300"></i> @endif | ||
@if($model->$attribute === false) <i class="fal fa-square"></i> @endif | ||
{{ is_object($model->$attribute) ? 'Object - cannot show details' : $model->$attribute }} | ||
</dd> | ||
</div> | ||
@endforeach | ||
|
||
</dl> | ||
</div> | ||
<div class="text-sm text-gray-400 px-6 float-right"> | ||
Last updated <span class="font-bold">{{$model->updated_at->diffForHumans()}}</span> ({{$model->updated_at}}) | ||
<span class="text-blue-300">|</span> | ||
Created <span class="font-bold">{{$model->created_at->diffForHumans()}}</span> ({{$model->created_at}}) | ||
</div> | ||
</div> | ||
|
||
|
||
</x-ba-admin-layout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters