mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-13 17:14:10 -08:00
Added checks and filetype display
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
c49921f50f
commit
017884f843
|
@ -995,7 +995,8 @@
|
|||
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-visible="true" data-field="icon" data-sortable="true">{{trans('general.file_type')}}</th>
|
||||
<th data-visible="true" data-field="icon" data-sortable="true">{{trans('general.icon')}}</th>
|
||||
<th data-visible="true" data-field="type" data-sortable="true">{{trans('general.file_type')}}</th>
|
||||
<th class="col-md-2" data-searchable="true" data-visible="true" data-field="image">{{ trans('general.image') }}</th>
|
||||
<th class="col-md-2" data-searchable="true" data-visible="true" data-field="filename" data-sortable="true">{{ trans('general.file_name') }}</th>
|
||||
<th class="col-md-1" data-searchable="true" data-visible="true" data-field="filesize">{{ trans('general.filesize') }}</th>
|
||||
|
@ -1009,9 +1010,11 @@
|
|||
@foreach ($user->uploads as $file)
|
||||
<tr>
|
||||
<td>
|
||||
<i class="{{ Helper::filetype_icon($file->filename) }} icon-med" aria-hidden="true"></i>
|
||||
<i class="{{ Helper::filetype_icon($file->filename) }} icon-med" aria-hidden="true" data-tooltip="true" data-title="{{ pathinfo('private_uploads/users/'.$file->filename, PATHINFO_EXTENSION) }}"></i>
|
||||
<span class="sr-only">{{ Helper::filetype_icon($file->filename) }}</span>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
{{ pathinfo('private_uploads/users/'.$file->filename, PATHINFO_EXTENSION) }}
|
||||
</td>
|
||||
<td>
|
||||
@if (($file->filename) && (Storage::exists('private_uploads/users/'.$file->filename)))
|
||||
|
@ -1045,7 +1048,7 @@
|
|||
<span class="sr-only">{{ trans('general.download') }}</span>
|
||||
</a>
|
||||
|
||||
<a href="{{ route('show/userfile', [$user->id, $file->id, 'inline' => 'true']) }}" class="btn btn-sm btn-default" target="_blank">
|
||||
<a href="{{ \App\Helpers\StorageHelper::allowSafeInline('private_uploads/users/'.$file->filename) ? route('show/userfile', [$user->id, $file->id, 'inline' => 'true']) : '#' }}" class="btn btn-sm btn-default{{ \App\Helpers\StorageHelper::allowSafeInline('private_uploads/users/'.$file->filename) ? '' : ' disabled' }}" target="_blank">
|
||||
<x-icon type="external-link" />
|
||||
</a>
|
||||
@endif
|
||||
|
|
Loading…
Reference in a new issue