diff --git a/resources/views/consumables/view.blade.php b/resources/views/consumables/view.blade.php index c406264a7..2cd3ac5be 100644 --- a/resources/views/consumables/view.blade.php +++ b/resources/views/consumables/view.blade.php @@ -18,55 +18,180 @@
-
- @if ($consumable->id) -
-
-

{{ $consumable->name }}

-
-
- @endif -
-
-
-
+ + -
+ + +
+ + + @can('consumables.files', $consumable) +
+ +
+ + + + + + + + + + + + + + + @if ($consumable->uploads->count() > 0) + @foreach ($consumable->uploads as $file) + + + + + + + + + + + + @endforeach + @else + + + + @endif + +
{{trans('general.file_type')}}{{ trans('general.image') }}{{ trans('general.file_name') }}{{ trans('general.filesize') }}{{ trans('general.notes') }}{{ trans('general.download') }}{{ trans('general.created_at') }}{{ trans('table.actions') }}
+ + {{ Helper::filetype_icon($file->filename) }} + + + @if ($file->filename) + @if ( Helper::checkUploadIsImage($file->get_src('consumables'))) + + @endif + @endif + + {{ $file->filename }} + + {{ Helper::formatFilesizeUnits(Storage::size('private_uploads/consumables/'.$file->filename)) }} + + @if ($file->note) + {{ $file->note }} + @endif + + @if ($file->filename) + + + {{ trans('general.download') }} + + @endif + {{ $file->created_at }} + + + {{ trans('general.delete') }} + +
{{ trans('general.no_results') }}
+
+
+ @endcan +
-
-
+
+ + + +
@@ -163,6 +288,11 @@ @stop +@can('update', \App\Models\Consumable::class) + @include ('modals.upload-file', ['item_type' => 'consumable', 'item_id' => $consumable->id]) +@endcan + + @section('moar_scripts') @include ('partials.bootstrap-table', ['exportFile' => 'consumable' . $consumable->name . '-export', 'search' => false]) @stop