Fixed UI bug where download button was missing for non-images
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
4b2d35e05d
commit
16fcc6dc44
2 changed files with 8 additions and 5 deletions
|
@ -396,6 +396,7 @@ return [
|
||||||
'alt_uploaded_image_thumbnail' => 'Uploaded thumbnail',
|
'alt_uploaded_image_thumbnail' => 'Uploaded thumbnail',
|
||||||
'placeholder_kit' => 'Select a kit',
|
'placeholder_kit' => 'Select a kit',
|
||||||
'file_not_found' => 'File not found',
|
'file_not_found' => 'File not found',
|
||||||
|
'preview_not_available' => '(no preview)',
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -868,13 +868,15 @@
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@if ($file->filename)
|
@if (($file->filename) && (Storage::exists('private_uploads/users/'.$file->filename)))
|
||||||
@if ((Storage::exists('private_uploads/users/'.$file->filename)) && ( Helper::checkUploadIsImage($file->get_src('users'))))
|
@if (Helper::checkUploadIsImage($file->get_src('users')))
|
||||||
<a href="{{ route('show/userfile', ['userId' => $user->id, 'fileId' => $file->id, 'download' => 'false']) }}" data-toggle="lightbox" data-type="image"><img src="{{ route('show/userfile', ['userId' => $user->id, 'fileId' => $file->id]) }}" class="img-thumbnail" style="max-width: 50px;"></a>
|
<a href="{{ route('show/userfile', ['userId' => $user->id, 'fileId' => $file->id, 'download' => 'false']) }}" data-toggle="lightbox" data-type="image"><img src="{{ route('show/userfile', ['userId' => $user->id, 'fileId' => $file->id]) }}" class="img-thumbnail" style="max-width: 50px;"></a>
|
||||||
@else
|
@else
|
||||||
<i class="fa fa-times text-danger" aria-hidden="true"></i>
|
{{ trans('general.preview_not_available') }}
|
||||||
{{ trans('general.file_not_found') }}
|
|
||||||
@endif
|
@endif
|
||||||
|
@else
|
||||||
|
<i class="fa fa-times text-danger" aria-hidden="true"></i>
|
||||||
|
{{ trans('general.file_not_found') }}
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
@ -891,7 +893,7 @@
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@if ($file->filename)
|
@if ($file->filename)
|
||||||
@if ((Storage::exists('private_uploads/users/'.$file->filename)) && ( Helper::checkUploadIsImage($file->get_src('users'))))
|
@if (Storage::exists('private_uploads/users/'.$file->filename))
|
||||||
<a href="{{ route('show/userfile', [$user->id, $file->id]) }}" class="btn btn-default">
|
<a href="{{ route('show/userfile', [$user->id, $file->id]) }}" class="btn btn-default">
|
||||||
<i class="fas fa-download" aria-hidden="true"></i>
|
<i class="fas fa-download" aria-hidden="true"></i>
|
||||||
<span class="sr-only">{{ trans('general.download') }}</span>
|
<span class="sr-only">{{ trans('general.download') }}</span>
|
||||||
|
|
Loading…
Add table
Reference in a new issue