mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-10 23:54:12 -08:00
Merge branch 'develop'
This commit is contained in:
commit
6f886d3d6e
|
@ -90,7 +90,7 @@ class AssetModelsController extends Controller
|
|||
if (Input::file('image')) {
|
||||
|
||||
$image = Input::file('image');
|
||||
$file_name = slug($image->getClientOriginalName()) . "." . $image->getClientOriginalExtension();
|
||||
$file_name = str_slug($image->getClientOriginalName()) . "." . $image->getClientOriginalExtension();
|
||||
$path = public_path('uploads/models/');
|
||||
|
||||
if ($image->getClientOriginalExtension()!='svg') {
|
||||
|
|
|
@ -872,7 +872,7 @@ class Asset extends Depreciable
|
|||
}
|
||||
|
||||
if ($fieldname =='location') {
|
||||
$query->whereHas('defaultLoc', function ($query) use ($search_val) {
|
||||
$query->whereHas('location', function ($query) use ($search_val) {
|
||||
$query->where('locations.name', 'LIKE', '%' . $search_val . '%');
|
||||
});
|
||||
}
|
||||
|
@ -935,8 +935,11 @@ class Asset extends Depreciable
|
|||
}
|
||||
}
|
||||
|
||||
if ($fieldname!='category') {
|
||||
$query->orWhere('assets.'.$fieldname, 'LIKE', '%' . $search_val . '%');
|
||||
}
|
||||
|
||||
|
||||
$query->orWhere('assets.'.$fieldname, 'LIKE', '%' . $search_val . '%');
|
||||
|
||||
|
||||
});
|
||||
|
|
|
@ -48,12 +48,14 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
@foreach ($requestedItems as $request)
|
||||
|
||||
@if ($request->requestable)
|
||||
<tr>
|
||||
{{ csrf_field() }}
|
||||
<td>
|
||||
@if ($request->itemType() == "asset")
|
||||
@if (($request->itemType() == "asset") && ($request->requestable))
|
||||
<a href="{{ $request->requestable->getImageUrl() }}" data-toggle="lightbox" data-type="image"><img src="{{ $request->requestable->getImageUrl() }}" style="max-height: {{ $snipeSettings->thumbnail_max_h }}px; width: auto;" class="img-responsive"></a>
|
||||
@else
|
||||
@elseif (($request->itemType() == "asset_model") && ($request->requestable))
|
||||
<a href="{{ url('/') }}/uploads/models/{{ $request->requestable->image }}" data-toggle="lightbox" data-type="image"><img src="{{ url('/') }}/uploads/models/{{ $request->requestable->image }}" style="max-height: {{ $snipeSettings->thumbnail_max_h }}px; width: auto;" class="img-responsive"></a>
|
||||
@endif
|
||||
|
||||
|
@ -102,6 +104,7 @@
|
|||
|
||||
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
Loading…
Reference in a new issue