From 71a7176a6e89bb46354828f6ee55934a4da45c29 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 1 Nov 2022 19:28:57 -0700 Subject: [PATCH] Updated component blade Signed-off-by: snipe --- resources/views/components/view.blade.php | 212 +++++++++++++++++----- 1 file changed, 171 insertions(+), 41 deletions(-) diff --git a/resources/views/components/view.blade.php b/resources/views/components/view.blade.php index 3b08cf236a..d7b494566b 100644 --- a/resources/views/components/view.blade.php +++ b/resources/views/components/view.blade.php @@ -48,61 +48,188 @@ @endcan @stop - {{-- Page content --}} @section('content') - +{{-- Page content --}}
-
-
-
-
-
- + + + + + @can('components.files', $component) +
  • + + + + +
  • + @endcan + + @can('update', Component::class) + +
  • + + {{ trans('button.upload') }} + +
  • + @endcan + + +
    + +
    +
    + +
    + + + + + + + + + +
    + {{ trans('general.asset') }} + + {{ trans('general.qty') }} + + {{ trans('general.notes') }} + + {{ trans('general.date') }} + + {{ trans('general.checkin') }}/{{ trans('general.checkout') }} +
    + +
    +
    + + + @can('components.files', $component) +
    + +
    + - - - - - + + + + + + + + -
    - {{ trans('general.asset') }} - - {{ trans('general.qty') }} - - {{ trans('general.notes') }} - - {{ trans('general.date') }} - - {{ trans('general.checkin') }}/{{ trans('general.checkout') }} - {{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') }}
    + + @if ($component->uploads->count() > 0) + @foreach ($component->uploads as $file) + + + + {{ Helper::filetype_icon($file->filename) }} + + + @if ($file->filename) + @if ( Helper::checkUploadIsImage($file->get_src('components'))) + + @endif + @endif + + + {{ $file->filename }} + + + {{ @Helper::formatFilesizeUnits(Storage::exists('private_uploads/components/'.$file->filename) ? Storage::size('private_uploads/components/'.$file->filename) : '') }} + + + + @if ($file->note) + {{ $file->note }} + @endif + + + @if ($file->filename) + + + {{ trans('general.download') }} + + @endif + + {{ $file->created_at }} + + + + {{ trans('general.delete') }} + + + + @endforeach + @else + + {{ trans('general.no_results') }} + + @endif + +
    -
    -
    +
    + @endcan +
    @@ -156,6 +283,9 @@ +@can('update', Component::class) + @include ('modals.upload-file', ['item_type' => 'component', 'item_id' => $component->id]) +@endcan @stop @section('moar_scripts')