mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-10 07:34:06 -08:00
Show accessory image on view page
This commit is contained in:
parent
5db7a7c196
commit
237acdcff0
|
@ -111,6 +111,15 @@ class SettingsServiceProvider extends ServiceProvider
|
|||
return url('/').'/uploads/companies/';
|
||||
});
|
||||
|
||||
// Accessories paths and URLs
|
||||
\App::singleton('accessories_upload_path', function(){
|
||||
return public_path('/uploads/accessories/');
|
||||
});
|
||||
|
||||
\App::singleton('accessories_upload_url', function(){
|
||||
return url('/').'/uploads/accessories/';
|
||||
});
|
||||
|
||||
|
||||
|
||||
// Set the monetary locale to the configured locale to make helper::parseFloat work.
|
||||
|
|
|
@ -88,13 +88,22 @@
|
|||
<!-- side address column -->
|
||||
<div class="col-md-3">
|
||||
|
||||
@if ($accessory->image!='')
|
||||
<div class="col-md-12 text-center" style="padding-bottom: 15px;">
|
||||
<img src="{{ app('accessories_upload_url') }}/{{ $accessory->image }}" class="img-responsive img-thumbnail" alt="{{ $accessory->name }}">
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="text-center">
|
||||
@can('checkout', \App\Models\Accessory::class)
|
||||
<a href="{{ route('checkout/accessory', $accessory->id) }}" style="margin-right:5px;" class="btn btn-info btn-sm" {{ (($accessory->numRemaining() > 0 ) ? '' : ' disabled') }}>{{ trans('general.checkout') }}</a>
|
||||
@endcan
|
||||
</div>
|
||||
|
||||
|
||||
<h4>{{ trans('admin/accessories/general.about_accessories_title') }}</h4>
|
||||
<p>{{ trans('admin/accessories/general.about_accessories_text') }} </p>
|
||||
<div class="text-center">
|
||||
@can('checkout', \App\Models\Accessory::class)
|
||||
<a href="{{ route('checkout/accessory', $accessory->id) }}" style="margin-right:5px;" class="btn btn-info btn-sm" {{ (($accessory->numRemaining() > 0 ) ? '' : ' disabled') }}>{{ trans('general.checkout') }}</a>
|
||||
@endcan
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue