Increased image size to 800px, added lightboxes
This commit is contained in:
@@ -94,7 +94,7 @@ class AccessoriesController extends Controller
|
||||
$file_name = "accessory-".str_random(18).'.'.$ext;
|
||||
$path = public_path('/uploads/accessories');
|
||||
if ($image->getClientOriginalExtension()!='svg') {
|
||||
Image::make($image->getRealPath())->resize(null, 250, function ($constraint) {
|
||||
Image::make($image->getRealPath())->resize(null, 800, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
})->save($path.'/'.$file_name);
|
||||
@@ -173,7 +173,7 @@ class AccessoriesController extends Controller
|
||||
$file_name = "accessory-".str_random(18).'.'.$ext;
|
||||
$path = public_path('/uploads/accessories');
|
||||
if ($image->getClientOriginalExtension()!='svg') {
|
||||
Image::make($image->getRealPath())->resize(null, 250, function ($constraint) {
|
||||
Image::make($image->getRealPath())->resize(null, 800, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
})->save($path.'/'.$file_name);
|
||||
|
||||
@@ -97,7 +97,7 @@ class AssetModelsController extends Controller
|
||||
$path = app('models_upload_path');
|
||||
|
||||
if ($image->getClientOriginalExtension()!='svg') {
|
||||
Image::make($image->getRealPath())->resize(500, null, function ($constraint) {
|
||||
Image::make($image->getRealPath())->resize(800, null, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
})->save($path.'/'.$file_name);
|
||||
@@ -194,7 +194,7 @@ class AssetModelsController extends Controller
|
||||
$file_name = $model->id.'-'.str_slug($image->getClientOriginalName()) . "." . $image->getClientOriginalExtension();
|
||||
|
||||
if ($image->getClientOriginalExtension()!='svg') {
|
||||
Image::make($image->getRealPath())->resize(500, null, function ($constraint) {
|
||||
Image::make($image->getRealPath())->resize(800, null, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
})->save(app('models_upload_path').$file_name);
|
||||
|
||||
@@ -163,7 +163,7 @@ class AssetsController extends Controller
|
||||
}
|
||||
$path = public_path('uploads/assets/'.$file_name);
|
||||
try {
|
||||
Image::make($image)->resize(500, 500, function ($constraint) {
|
||||
Image::make($image)->resize(800, 800, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
})->save($path);
|
||||
@@ -359,7 +359,7 @@ class AssetsController extends Controller
|
||||
$file_name = str_random(25).".".$extension;
|
||||
$path = public_path('uploads/assets/'.$file_name);
|
||||
try {
|
||||
Image::make($image)->resize(500, 500, function ($constraint) {
|
||||
Image::make($image)->resize(800, 800, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
})->save($path);
|
||||
|
||||
@@ -87,7 +87,7 @@ class CategoriesController extends Controller
|
||||
$image = $request->file('image');
|
||||
$file_name = str_random(25).".".$image->getClientOriginalExtension();
|
||||
$path = public_path('uploads/categories/'.$file_name);
|
||||
Image::make($image->getRealPath())->resize(200, null, function ($constraint) {
|
||||
Image::make($image->getRealPath())->resize(800, null, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
})->save($path);
|
||||
@@ -164,7 +164,7 @@ class CategoriesController extends Controller
|
||||
$file_name = $category->id.'-'.str_slug($image->getClientOriginalName()) . "." . $image->getClientOriginalExtension();
|
||||
|
||||
if ($image->getClientOriginalExtension()!='svg') {
|
||||
Image::make($image->getRealPath())->resize(500, null, function ($constraint) {
|
||||
Image::make($image->getRealPath())->resize(800, null, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
})->save(app('categories_upload_path').$file_name);
|
||||
|
||||
@@ -67,7 +67,7 @@ final class CompaniesController extends Controller
|
||||
$image = $request->file('image');
|
||||
$file_name = str_random(25).".".$image->getClientOriginalExtension();
|
||||
$path = public_path('uploads/companies/'.$file_name);
|
||||
Image::make($image->getRealPath())->resize(200, null, function ($constraint) {
|
||||
Image::make($image->getRealPath())->resize(800, null, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
})->save($path);
|
||||
@@ -133,7 +133,7 @@ final class CompaniesController extends Controller
|
||||
$file_name = $company->id.'-'.str_slug($image->getClientOriginalName()) . "." . $image->getClientOriginalExtension();
|
||||
|
||||
if ($image->getClientOriginalExtension()!='svg') {
|
||||
Image::make($image->getRealPath())->resize(500, null, function ($constraint) {
|
||||
Image::make($image->getRealPath())->resize(800, null, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
})->save(app('companies_upload_path').$file_name);
|
||||
|
||||
@@ -95,7 +95,7 @@ class ComponentsController extends Controller
|
||||
$image = $request->file('image');
|
||||
$file_name = str_random(25).".".$image->getClientOriginalExtension();
|
||||
$path = public_path('uploads/components/'.$file_name);
|
||||
Image::make($image->getRealPath())->resize(200, null, function ($constraint) {
|
||||
Image::make($image->getRealPath())->resize(800, null, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
})->save($path);
|
||||
@@ -168,7 +168,7 @@ class ComponentsController extends Controller
|
||||
$image = $request->file('image');
|
||||
$file_name = str_random(25).".".$image->getClientOriginalExtension();
|
||||
$path = public_path('uploads/components/'.$file_name);
|
||||
Image::make($image->getRealPath())->resize(200, null, function ($constraint) {
|
||||
Image::make($image->getRealPath())->resize(800, null, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
})->save($path);
|
||||
|
||||
@@ -91,7 +91,7 @@ class ConsumablesController extends Controller
|
||||
$image = $request->file('image');
|
||||
$file_name = str_random(25).".".$image->getClientOriginalExtension();
|
||||
$path = public_path('uploads/consumables/'.$file_name);
|
||||
Image::make($image->getRealPath())->resize(200, null, function ($constraint) {
|
||||
Image::make($image->getRealPath())->resize(800, null, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
})->save($path);
|
||||
@@ -162,7 +162,7 @@ class ConsumablesController extends Controller
|
||||
$image = $request->file('image');
|
||||
$file_name = str_random(25).".".$image->getClientOriginalExtension();
|
||||
$path = public_path('uploads/consumables/'.$file_name);
|
||||
Image::make($image->getRealPath())->resize(200, null, function ($constraint) {
|
||||
Image::make($image->getRealPath())->resize(800, null, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
})->save($path);
|
||||
|
||||
@@ -57,7 +57,7 @@ class DepartmentsController extends Controller
|
||||
$image = $request->file('image');
|
||||
$file_name = str_random(25).".".$image->getClientOriginalExtension();
|
||||
$path = public_path('uploads/departments/'.$file_name);
|
||||
Image::make($image->getRealPath())->resize(200, null, function ($constraint) {
|
||||
Image::make($image->getRealPath())->resize(800, null, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
})->save($path);
|
||||
@@ -176,7 +176,7 @@ class DepartmentsController extends Controller
|
||||
$file_name = $department->id.'-'.str_slug($image->getClientOriginalName()) . "." . $image->getClientOriginalExtension();
|
||||
|
||||
if ($image->getClientOriginalExtension()!='svg') {
|
||||
Image::make($image->getRealPath())->resize(500, null, function ($constraint) {
|
||||
Image::make($image->getRealPath())->resize(800, null, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
})->save(app('departments_upload_path').$file_name);
|
||||
|
||||
@@ -101,7 +101,7 @@ class LocationsController extends Controller
|
||||
$image = $request->file('image');
|
||||
$file_name = str_random(25).".".$image->getClientOriginalExtension();
|
||||
$path = public_path('uploads/locations/'.$file_name);
|
||||
Image::make($image->getRealPath())->resize(600, null, function ($constraint) {
|
||||
Image::make($image->getRealPath())->resize(800, null, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
})->save($path);
|
||||
@@ -185,7 +185,7 @@ class LocationsController extends Controller
|
||||
$file_name = $location->id.'-'.str_slug($image->getClientOriginalName()) . "." . $image->getClientOriginalExtension();
|
||||
|
||||
if ($image->getClientOriginalExtension()!='svg') {
|
||||
Image::make($image->getRealPath())->resize(600, null, function ($constraint) {
|
||||
Image::make($image->getRealPath())->resize(800, null, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
})->save(app('locations_upload_path').$file_name);
|
||||
|
||||
@@ -81,7 +81,7 @@ class ManufacturersController extends Controller
|
||||
$image = $request->file('image');
|
||||
$file_name = str_slug($image->getClientOriginalName()).".".$image->getClientOriginalExtension();
|
||||
$path = public_path('uploads/manufacturers/'.$file_name);
|
||||
Image::make($image->getRealPath())->resize(200, null, function ($constraint) {
|
||||
Image::make($image->getRealPath())->resize(800, null, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
})->save($path);
|
||||
@@ -155,7 +155,7 @@ class ManufacturersController extends Controller
|
||||
$file_name = $manufacturer->id.'-'.str_slug($image->getClientOriginalName()) . "." . $image->getClientOriginalExtension();
|
||||
|
||||
if ($image->getClientOriginalExtension()!='svg') {
|
||||
Image::make($image->getRealPath())->resize(500, null, function ($constraint) {
|
||||
Image::make($image->getRealPath())->resize(800, null, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
})->save(app('manufacturers_upload_path').$file_name);
|
||||
|
||||
@@ -83,7 +83,7 @@ class SuppliersController extends Controller
|
||||
$image = $request->file('image');
|
||||
$file_name = str_random(25).".".$image->getClientOriginalExtension();
|
||||
$path = public_path('uploads/suppliers/'.$file_name);
|
||||
Image::make($image->getRealPath())->resize(200, null, function ($constraint) {
|
||||
Image::make($image->getRealPath())->resize(800, null, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
})->save($path);
|
||||
@@ -159,7 +159,7 @@ class SuppliersController extends Controller
|
||||
$file_name = $supplier->id.'-'.str_slug($image->getClientOriginalName()) . "." . $image->getClientOriginalExtension();
|
||||
|
||||
if ($image->getClientOriginalExtension()!='svg') {
|
||||
Image::make($image->getRealPath())->resize(500, null, function ($constraint) {
|
||||
Image::make($image->getRealPath())->resize(800, null, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
})->save(app('suppliers_upload_path').$file_name);
|
||||
|
||||
@@ -120,6 +120,25 @@ class SettingsServiceProvider extends ServiceProvider
|
||||
return url('/').'/uploads/accessories/';
|
||||
});
|
||||
|
||||
// Consumables paths and URLs
|
||||
\App::singleton('consumables_upload_path', function(){
|
||||
return public_path('/uploads/consumables/');
|
||||
});
|
||||
|
||||
\App::singleton('consumables_upload_url', function(){
|
||||
return url('/').'/uploads/consumables/';
|
||||
});
|
||||
|
||||
|
||||
// Components paths and URLs
|
||||
\App::singleton('components_upload_path', function(){
|
||||
return public_path('/uploads/components/');
|
||||
});
|
||||
|
||||
\App::singleton('components_upload_url', function(){
|
||||
return url('/').'/uploads/components/';
|
||||
});
|
||||
|
||||
|
||||
|
||||
// Set the monetary locale to the configured locale to make helper::parseFloat work.
|
||||
|
||||
@@ -22,20 +22,20 @@
|
||||
@include ('partials.forms.edit.quantity')
|
||||
@include ('partials.forms.edit.minimum_quantity')
|
||||
|
||||
|
||||
<!-- Image -->
|
||||
|
||||
<div class="form-group {{ $errors->has('image') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="image">{{ trans('general.image_upload') }}</label>
|
||||
<div class="col-md-5">
|
||||
<label class="btn btn-default">
|
||||
{{ trans('button.select_file') }}
|
||||
<input type="file" name="image" accept="image/gif,image/jpeg,image/png,image/svg" hidden>
|
||||
</label>
|
||||
<p class="help-block">Accepted filetypes are jpg, png, gif and svg</p>
|
||||
{!! $errors->first('image', '<span class="alert-msg">:message</span>') !!}
|
||||
@if ($item->image)
|
||||
<div class="form-group {{ $errors->has('image_delete') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="image_delete">{{ trans('general.image_delete') }}</label>
|
||||
<div class="col-md-5">
|
||||
{{ Form::checkbox('image_delete') }}
|
||||
<img src="{{ url('/') }}/uploads/accessories/{{ $item->image }}" />
|
||||
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@include ('partials.forms.edit.image-upload')
|
||||
|
||||
|
||||
@stop
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
|
||||
@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 }}">
|
||||
<a href="{{ app('accessories_upload_url') }}{{ $accessory->image }}" data-toggle="lightbox"><img src="{{ app('accessories_upload_url') }}{{ $accessory->image }}" class="img-responsive img-thumbnail" alt="{{ $accessory->name }}"></a>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
@@ -86,9 +86,10 @@
|
||||
<!-- side address column -->
|
||||
<div class="col-md-3">
|
||||
@if ($component->image!='')
|
||||
<div class="col-md-12" style="padding-bottom: 5px;">
|
||||
<img src="{{ url('/') }}/uploads/components/{{ $component->image }}">
|
||||
<div class="col-md-12 text-center" style="padding-bottom: 15px;">
|
||||
<a href="{{ app('components_upload_url') }}{{ $component->image }}" data-toggle="lightbox"><img src="{{ app('components_upload_url') }}{{ $component->image }}" class="img-responsive img-thumbnail" alt="{{ $component->name }}"></a>
|
||||
</div>
|
||||
|
||||
@endif
|
||||
|
||||
@if ($component->serial!='')
|
||||
|
||||
@@ -69,14 +69,11 @@
|
||||
<div class="col-md-3">
|
||||
|
||||
@if ($consumable->image!='')
|
||||
<div class="col-md-12" style="padding-bottom: 5px;">
|
||||
<img src="{{ url('/') }}/uploads/consumables/{{ $consumable->image }}">
|
||||
<div class="col-md-12 text-center" style="padding-bottom: 15px;">
|
||||
<a href="{{ app('consumables_upload_url') }}/{{ $consumable->image }}" data-toggle="lightbox"><img src="{{ app('consumables_upload_url') }}/{{ $consumable->image }}" class="img-responsive img-thumbnail" alt="{{ $consumable->name }}"></a>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<h4>{{ trans('admin/consumables/general.about_consumables_title') }}</h4>
|
||||
<p>{{ trans('admin/consumables/general.about_consumables_text') }} </p>
|
||||
|
||||
@if ($consumable->purchase_date)
|
||||
<div class="col-md-12" style="padding-bottom: 5px;">
|
||||
<strong>{{ trans('general.purchase_date') }}: </strong>
|
||||
@@ -119,6 +116,10 @@
|
||||
{{ $consumable->order_number }}
|
||||
</div>
|
||||
@endif
|
||||
<div class="col-md-12" style="padding-bottom: 5px;">
|
||||
<h4>{{ trans('admin/consumables/general.about_consumables_title') }}</h4>
|
||||
<p>{{ trans('admin/consumables/general.about_consumables_text') }} </p>
|
||||
</div>
|
||||
</div> <!-- /.col-md-3-->
|
||||
</div> <!-- /.row-->
|
||||
|
||||
|
||||
@@ -496,10 +496,15 @@
|
||||
</div><!-- /col-md-8 -->
|
||||
|
||||
<div class="col-md-4">
|
||||
|
||||
@if ($asset->image)
|
||||
<img src="{{ url('/') }}/uploads/assets/{{{ $asset->image }}}" class="assetimg img-responsive">
|
||||
<div class="col-md-12 text-center" style="padding-bottom: 15px;">
|
||||
<a href="{{ url('/') }}/uploads/assets/{{ $asset->image }}" data-toggle="lightbox"><img src="{{ url('/') }}/uploads/assets/{{{ $asset->image }}}" class="assetimg img-responsive"></a>
|
||||
</div>
|
||||
@elseif (($asset->model) && ($asset->model->image!=''))
|
||||
<img src="{{ url('/') }}/uploads/models/{{{ $asset->model->image }}}" class="assetimg img-responsive">
|
||||
<div class="col-md-12 text-center" style="padding-bottom: 15px;">
|
||||
<a href="{{ url('/') }}/uploads/models/{{ $asset->model->image }}" data-toggle="lightbox"><img src="{{ url('/') }}/uploads/models/{{ $asset->model->image }}" class="assetimg img-responsive"></a>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($snipeSettings->qr_code=='1')
|
||||
|
||||
Reference in New Issue
Block a user