From 67105528d1224a5ba809e528efffc9d4fb4a0786 Mon Sep 17 00:00:00 2001 From: akemidx Date: Wed, 3 May 2023 16:15:25 -0400 Subject: [PATCH] Buttons on the accessory view page --- .../lang/en/admin/accessories/general.php | 1 + resources/lang/en/general.php | 1 + resources/views/accessories/view.blade.php | 129 ++++-------------- 3 files changed, 26 insertions(+), 105 deletions(-) diff --git a/resources/lang/en/admin/accessories/general.php b/resources/lang/en/admin/accessories/general.php index 84a3e8338..bed7f38fa 100644 --- a/resources/lang/en/admin/accessories/general.php +++ b/resources/lang/en/admin/accessories/general.php @@ -17,5 +17,6 @@ return array( 'use_default_eula' => 'Use the primary default EULA instead.', 'use_default_eula_disabled' => 'Use the primary default EULA instead. No primary default EULA is set. Please add one in Settings.', 'clone' => 'Clone Accessory', + 'delete_disabled' => 'This accessory cannot be deleted yet because some items are still checked out.', ); diff --git a/resources/lang/en/general.php b/resources/lang/en/general.php index 328eb3209..57b08017f 100644 --- a/resources/lang/en/general.php +++ b/resources/lang/en/general.php @@ -92,6 +92,7 @@ return [ 'debug_warning_text' => 'This application is running in production mode with debugging enabled. This can expose sensitive data if your application is accessible to the outside world. Disable debug mode by setting the APP_DEBUG value in your .env file to false.', 'delete' => 'Delete', 'delete_confirm' => 'Are you sure you wish to delete :item?', + 'delete_confirm_no_undo' => 'Are you sure you wish to delete :item? This can not be undone.', 'deleted' => 'Deleted', 'delete_seats' => 'Deleted Seats', 'deletion_failed' => 'Deletion failed', diff --git a/resources/views/accessories/view.blade.php b/resources/views/accessories/view.blade.php index 8e1b082d9..94287265e 100644 --- a/resources/views/accessories/view.blade.php +++ b/resources/views/accessories/view.blade.php @@ -12,43 +12,6 @@ @parent @stop -{{-- Right header --}} -@section('header_right') - @can('manage', \App\Models\Accessory::class) - - @endcan -@stop - {{-- Page content --}} @section('content') {{-- Page content --}} @@ -271,13 +234,13 @@ - - - @endcan - - - + + @endcan + + + + @@ -351,44 +314,34 @@
@can('checkout', \App\Models\Accessory::class) - @endcan @can('update', \App\Models\Accessory::class) - @endcan @can('update', \App\Models\Accessory::class) - @endcan @can('delete', $accessory) @if ($accessory->users_count == 0) -
-
- -
+
+
@else -
- + @endif @endcan @@ -396,48 +349,6 @@
-
-
-
- - - - - - - - - - - - @if ($snipeSettings->require_accept_signature=='1') - - @endif - - -
{{ trans('general.record_created') }}{{ trans('general.admin') }}{{ trans('general.action') }}{{ trans('general.item') }}{{ trans('general.target') }}{{ trans('general.notes') }}{{ trans('general.date') }}{{ trans('general.signature') }}
-
-
-
-
-
- - @can('accessories.files', Accessory::class) @include ('modals.upload-file', ['item_type' => 'accessory', 'item_id' => $accessory->id]) @@ -448,5 +359,13 @@ @section('moar_scripts') + @include ('partials.bootstrap-table') @stop