Просмотр файла resources/views/app/_upload_image.blade.php

Размер файла: 1.59Kb
  1. <?php
  2. $click = empty($paste) ? null : 'return pasteImage(this);';
  3. $pointer = empty($paste) ? null : 'cursor-pointer';
  4. ?>
  5.  
  6. <div class="js-files mb-3">
  7. @if ($files->isNotEmpty())
  8. @foreach ($files as $file)
  9. <span class="js-file">
  10. <span onclick="{{ $click }}" class="{{ $pointer }}">{{ resizeImage($file->hash, ['width' => 100]) }}</span>
  11. <a href="#" onclick="return deleteFile(this);" data-id="{{ $file->id }}" data-type="{{ $type }}" data-token="{{ csrf_token() }}"><i class="fas fa-times"></i></a>
  12. </span>
  13. @endforeach
  14. @endif
  15. </div>
  16.  
  17. <div class="js-image-template d-none">
  18. <span class="js-file">
  19. <span onclick="{{ $click }}" class="{{ $pointer }}"><img src="#" width="100" alt="" class="img-fluid"></span>
  20. <a href="#" onclick="return deleteFile(this);" data-type="{{ $type }}" data-token="{{ csrf_token() }}"><i class="fas fa-times"></i></a>
  21. </span>
  22. </div>
  23.  
  24. <div class="mb-3">
  25. <label for="file" class="btn btn-sm btn-secondary mb-1 form-label">
  26. <input id="file" type="file" name="file" accept="image/*" onchange="return submitImage(this, {{ $paste ?? false }});" data-id="{{ $id ?? 0 }}" data-type="{{ $type }}" data-token="{{ csrf_token() }}" hidden>
  27. {{ __('main.attach_image') }}&hellip;
  28. </label>
  29. </div>
  30.  
  31. <p class="text-muted fst-italic">
  32. {{ __('main.max_file_upload') }}: {{ setting('maxfiles') }}<br>
  33. {{ __('main.max_file_weight') }}: {{ formatSize(setting('filesize')) }}<br>
  34. {{ __('main.valid_file_extensions') }}: jpg, jpeg, gif, png<br>
  35. {{ __('main.min_image_size') }}: 100px
  36. </p>