Merge branch 'develop'
This commit is contained in:
commit
6008eec205
13 changed files with 335 additions and 175 deletions
|
@ -38,6 +38,7 @@ use Symfony\Component\HttpFoundation\File\Exception\FileException;
|
||||||
use TCPDF;
|
use TCPDF;
|
||||||
use Validator;
|
use Validator;
|
||||||
use View;
|
use View;
|
||||||
|
use App\Models\CheckoutRequest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class controls all actions related to assets for
|
* This class controls all actions related to assets for
|
||||||
|
@ -1243,4 +1244,14 @@ class AssetsController extends Controller
|
||||||
return redirect()->to("hardware")->with('success', trans('admin/hardware/message.audit.success'));
|
return redirect()->to("hardware")->with('success', trans('admin/hardware/message.audit.success'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getRequestedIndex($id = null)
|
||||||
|
{
|
||||||
|
if ($id) {
|
||||||
|
$requestedItems = CheckoutRequest::where('user_id', $id)->with('user', 'requestedItem')->get();
|
||||||
|
}
|
||||||
|
$requestedItems = CheckoutRequest::with('user', 'requestedItem')->get();
|
||||||
|
return view('hardware/requested', compact('requestedItems'));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,11 +74,6 @@ class ViewAssetsController extends Controller
|
||||||
return view('account/requestable-assets', compact('user', 'assets', 'models'));
|
return view('account/requestable-assets', compact('user', 'assets', 'models'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getRequestedIndex()
|
|
||||||
{
|
|
||||||
$requestedItems = CheckoutRequest::with('user', 'requestedItem')->get();
|
|
||||||
return view('admin/requested-assets', compact('requestedItems'));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public function getRequestItem($itemType, $itemId = null)
|
public function getRequestItem($itemType, $itemId = null)
|
||||||
|
|
|
@ -78,6 +78,18 @@ class AssetModelPresenter extends Presenter
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generate img tag to this models image.
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function imageSrc()
|
||||||
|
{
|
||||||
|
if (!empty($this->image)) {
|
||||||
|
return url('/') . '/uploads/models/' . $this->image;
|
||||||
|
}
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Url to view this item.
|
* Url to view this item.
|
||||||
* @return string
|
* @return string
|
||||||
|
|
|
@ -280,6 +280,26 @@ class AssetPresenter extends Presenter
|
||||||
return $imagePath;
|
return $imagePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generate img tag to this items image.
|
||||||
|
* @return mixed|string
|
||||||
|
*/
|
||||||
|
public function imageSrc()
|
||||||
|
{
|
||||||
|
$imagePath = '';
|
||||||
|
if ($this->image && !empty($this->image)) {
|
||||||
|
$imagePath = $this->image;
|
||||||
|
return 'poop';
|
||||||
|
} elseif ($this->model && !empty($this->model->image)) {
|
||||||
|
$imagePath = $this->model->image;
|
||||||
|
return 'fart';
|
||||||
|
}
|
||||||
|
if (!empty($imagePath)) {
|
||||||
|
return config('app.url').'/uploads/assets/'.$imagePath;
|
||||||
|
}
|
||||||
|
return $imagePath;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get Displayable Name
|
* Get Displayable Name
|
||||||
* @return string
|
* @return string
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
return array (
|
return array (
|
||||||
'app_version' => 'v4.1.0',
|
'app_version' => 'v4.1.0',
|
||||||
'build_version' => 'beta2',
|
'build_version' => '37',
|
||||||
'hash_version' => 'g3b498ef',
|
'hash_version' => 'g48207fc',
|
||||||
'full_hash' => 'v4.1.0-beta2-3-g3b498ef',
|
'full_hash' => 'v4.1.0-37-g48207fc',
|
||||||
);
|
);
|
||||||
|
|
|
@ -33,18 +33,27 @@
|
||||||
@if ($assets->count() > 0)
|
@if ($assets->count() > 0)
|
||||||
|
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="table table-striped">
|
<table
|
||||||
|
name="requested-assets"
|
||||||
|
data-toolbar="#toolbar"
|
||||||
|
class="table table-striped snipe-table"
|
||||||
|
id="table"
|
||||||
|
data-advanced-search="true"
|
||||||
|
data-id-table="advancedTable"
|
||||||
|
data-cookie-id-table="requestableAssets">
|
||||||
<thead>
|
<thead>
|
||||||
<tr role="row">
|
<tr role="row">
|
||||||
<th class="col-md-3" bSortable="true">{{ trans('admin/hardware/table.asset_model') }}</th>
|
<th class="col-md-1" data-sortable="true">{{ trans('general.image') }}</th>
|
||||||
|
<th class="col-md-2" data-sortable="true">{{ trans('admin/hardware/table.asset_model') }}</th>
|
||||||
|
<th class="col-md-2" data-sortable="true">{{ trans('admin/models/table.modelnumber') }}</th>
|
||||||
@if ($snipeSettings->display_asset_name)
|
@if ($snipeSettings->display_asset_name)
|
||||||
<th class="col-md-3" bSortable="true">{{ trans('admin/hardware/form.name') }}</th>
|
<th class="col-md-2" data-sortable="true">{{ trans('admin/hardware/form.name') }}</th>
|
||||||
@endif
|
@endif
|
||||||
<th class="col-md-3" bSortable="true">{{ trans('admin/hardware/table.serial') }}</th>
|
<th class="col-md-3" data-sortable="true">{{ trans('admin/hardware/table.serial') }}</th>
|
||||||
<th class="col-md-2" bSortable="true">{{ trans('admin/hardware/table.location') }}</th>
|
<th class="col-md-2" data-sortable="true">{{ trans('admin/hardware/table.location') }}</th>
|
||||||
<th class="col-md-2" bSortable="true">{{ trans('admin/hardware/table.status') }}</th>
|
<th class="col-md-2" data-sortable="true">{{ trans('admin/hardware/table.status') }}</th>
|
||||||
<th class="col-md-2" bSortable="true">{{ trans('admin/hardware/form.expected_checkin') }}</th>
|
<th class="col-md-2" data-sortable="true">{{ trans('admin/hardware/form.expected_checkin') }}</th>
|
||||||
<th class="col-md-1 actions" bSortable="false">{{ trans('table.actions') }}</th>
|
<th class="col-md-1 actions" data-sortable="false">{{ trans('table.actions') }}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
@ -53,17 +62,30 @@
|
||||||
<tr>
|
<tr>
|
||||||
<form action="{{route('account/request-item', ['itemType' => 'asset', 'itemId' => $asset->id])}}" method="POST" accept-charset="utf-8">
|
<form action="{{route('account/request-item', ['itemType' => 'asset', 'itemId' => $asset->id])}}" method="POST" accept-charset="utf-8">
|
||||||
{{ csrf_field() }}
|
{{ csrf_field() }}
|
||||||
<td>{!! $asset->model->present()->nameUrl() !!}</td>
|
<td>
|
||||||
|
@if ($asset->getImageUrl())
|
||||||
|
<a href="{{ $asset->getImageUrl() }}" data-toggle="lightbox" data-type="image">
|
||||||
|
<img src="{{ $asset->getImageUrl() }}" style="max-height: {{ $snipeSettings->thumbnail_max_h }}px; width: auto;" class="img-responsive">
|
||||||
|
</a>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>{{ $asset->model->name }}
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{{ $asset->model->model_number }}
|
||||||
|
</td>
|
||||||
|
|
||||||
@if ($snipeSettings->display_asset_name)
|
@if ($snipeSettings->display_asset_name)
|
||||||
<td>{{ $asset->name }}</td>
|
<td>{{ $asset->name }}</td>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<td><a href="{{ $asset->present()->viewUrl() }}">{{ $asset->serial }}</a></td>
|
<td>{{ $asset->serial }}</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
@if ($asset->location)
|
@if ($asset->location)
|
||||||
{!! $asset->location->present()->nameUrl() !!}
|
{{ $asset->location->name }}
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
@if ($asset->assigned_to != '' && $asset->assigned_to > 0)
|
@if ($asset->assigned_to != '' && $asset->assigned_to > 0)
|
||||||
|
@ -106,13 +128,21 @@
|
||||||
|
|
||||||
@if ($models->count() > 0)
|
@if ($models->count() > 0)
|
||||||
<h4>Requestable Models</h4>
|
<h4>Requestable Models</h4>
|
||||||
<table class="table table-striped">
|
<table
|
||||||
|
name="requested-assets"
|
||||||
|
data-toolbar="#toolbar"
|
||||||
|
class="table table-striped snipe-table"
|
||||||
|
id="table"
|
||||||
|
data-advanced-search="true"
|
||||||
|
data-id-table="advancedTable"
|
||||||
|
data-cookie-id-table="requestableAssets">
|
||||||
<thead>
|
<thead>
|
||||||
<tr role="row">
|
<tr role="row">
|
||||||
<th class="col-md-6" bSortable="true">{{ trans('admin/hardware/table.asset_model') }}</th>
|
<th class="col-md-1" data-sortable="true">{{ trans('general.image') }}</th>
|
||||||
<th class="col-md-3" bSortable="true">{{ trans('admin/accessories/general.remaining') }}</th>
|
<th class="col-md-6" data-sortable="true">{{ trans('admin/hardware/table.asset_model') }}</th>
|
||||||
<th class="col-md-2" bSortable="true">{{ trans('general.quantity') }}</th>
|
<th class="col-md-3" data-sortable="true">{{ trans('admin/accessories/general.remaining') }}</th>
|
||||||
<th class="col-md-1 actions" bSortable="false">{{ trans('table.actions') }}</th>
|
<th class="col-md-2" data-sortable="true">{{ trans('general.quantity') }}</th>
|
||||||
|
<th class="col-md-1 actions" data-sortable="false">{{ trans('table.actions') }}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
|
@ -121,9 +151,18 @@
|
||||||
<tr>
|
<tr>
|
||||||
<form action="{{route('account/request-item', ['itemType' => 'asset_model', 'itemId' => $requestableModel->id])}}"
|
<form action="{{route('account/request-item', ['itemType' => 'asset_model', 'itemId' => $requestableModel->id])}}"
|
||||||
method="POST"
|
method="POST"
|
||||||
accept-charset="utf-8"
|
accept-charset="utf-8">
|
||||||
>
|
|
||||||
{{ csrf_field() }}
|
{{ csrf_field() }}
|
||||||
|
<td>
|
||||||
|
@if ($requestableModel->image)
|
||||||
|
<a href="{{ url('/') }}/uploads/models/{{ $requestableModel->image }}" data-toggle="lightbox" data-type="image">
|
||||||
|
<img src="{{ url('/') }}/uploads/models/{{ $requestableModel->image }}" style="max-height: {{ $snipeSettings->thumbnail_max_h }}px; width: auto;" class="img-responsive">
|
||||||
|
</a>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
|
||||||
<td>{{$requestableModel->name}}</td>
|
<td>{{$requestableModel->name}}</td>
|
||||||
<td>{{$requestableModel->assets->where('requestable', '1')->count()}}</td>
|
<td>{{$requestableModel->assets->where('requestable', '1')->count()}}</td>
|
||||||
<td><input type="text" name="request-quantity" value=""></td>
|
<td><input type="text" name="request-quantity" value=""></td>
|
||||||
|
@ -158,7 +197,14 @@
|
||||||
|
|
||||||
|
|
||||||
@section('moar_scripts')
|
@section('moar_scripts')
|
||||||
<script nonce="{{ csrf_token() }}">
|
@include ('partials.bootstrap-table', [
|
||||||
|
'exportFile' => 'requested-export',
|
||||||
|
'search' => true,
|
||||||
|
'clientSearch' => true,
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
<script nonce="{{ csrf_token() }}">
|
||||||
|
|
||||||
$( "a[name='Request']").click(function(event) {
|
$( "a[name='Request']").click(function(event) {
|
||||||
// event.preventDefault();
|
// event.preventDefault();
|
||||||
|
@ -169,3 +215,5 @@
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,74 +0,0 @@
|
||||||
@extends('layouts/default')
|
|
||||||
|
|
||||||
@section('title0')
|
|
||||||
{{ trans('admin/hardware/general.requested') }}
|
|
||||||
{{ trans('general.assets') }}
|
|
||||||
@stop
|
|
||||||
|
|
||||||
{{-- Page title --}}
|
|
||||||
@section('title')
|
|
||||||
@yield('title0') @parent
|
|
||||||
@stop
|
|
||||||
|
|
||||||
{{-- Page content --}}
|
|
||||||
@section('content')
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-12">
|
|
||||||
|
|
||||||
@if ($requestedItems->count() > 0)
|
|
||||||
<div class="table-responsive">
|
|
||||||
<table class="table table-striped">
|
|
||||||
<thead>
|
|
||||||
<tr role="row">
|
|
||||||
<th class="col-md-1">Item Type</th>
|
|
||||||
<th class="col-md-1">Item Name</th>
|
|
||||||
<th class="col-md-1" bSortable="true">{{ trans('admin/hardware/table.location') }}</th>
|
|
||||||
<th class="col-md-1" bSortable="true">{{ trans('admin/hardware/form.expected_checkin') }}</th>
|
|
||||||
<th class="col-md-1" bSortable="true">Requesting User</th>
|
|
||||||
<th class="col-md-1">Requested Date</th>
|
|
||||||
<th class="col-md-1 actions" bSortable="false">{{ trans('table.actions') }}</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
@foreach ($requestedItems as $request)
|
|
||||||
<tr>
|
|
||||||
<form action="#" method="POST" accept-charset="utf-8">
|
|
||||||
{{ csrf_field() }}
|
|
||||||
<td>{{ $request->itemType() }}</td>
|
|
||||||
<td>{{ $request->name() }}</td>
|
|
||||||
@if ($request->location())
|
|
||||||
<td>{{ $request->location()->name }}</td>
|
|
||||||
@else
|
|
||||||
<td></td>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
<td>
|
|
||||||
@if ($request->itemType() == "asset")
|
|
||||||
{{ $request->itemRequested()->expected_checkin }}
|
|
||||||
@else
|
|
||||||
"N/A"
|
|
||||||
@endif
|
|
||||||
</td>
|
|
||||||
<td>{{ $request->requestingUser()->present()->fullName() }}</td>
|
|
||||||
<td>{{$request->created_at}}</td>
|
|
||||||
<td>
|
|
||||||
</td>
|
|
||||||
</form>
|
|
||||||
</tr>
|
|
||||||
@endforeach
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@else
|
|
||||||
<div class="col-md-12">
|
|
||||||
<div class="alert alert-info alert-block">
|
|
||||||
<i class="fa fa-info-circle"></i>
|
|
||||||
{{ trans('general.no_results') }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
</div> <!-- .col-md-12> -->
|
|
||||||
</div> <!-- .row -->
|
|
||||||
@stop
|
|
134
resources/views/hardware/requested.blade.php
Normal file
134
resources/views/hardware/requested.blade.php
Normal file
|
@ -0,0 +1,134 @@
|
||||||
|
@extends('layouts/default')
|
||||||
|
|
||||||
|
@section('title0')
|
||||||
|
{{ trans('admin/hardware/general.requested') }}
|
||||||
|
{{ trans('general.assets') }}
|
||||||
|
@stop
|
||||||
|
|
||||||
|
{{-- Page title --}}
|
||||||
|
@section('title')
|
||||||
|
@yield('title0') @parent
|
||||||
|
@stop
|
||||||
|
|
||||||
|
{{-- Page content --}}
|
||||||
|
@section('content')
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="box">
|
||||||
|
<div class="box-body">
|
||||||
|
{{ Form::open([
|
||||||
|
'method' => 'POST',
|
||||||
|
'route' => ['hardware/bulkedit'],
|
||||||
|
'class' => 'form-inline',
|
||||||
|
'id' => 'bulkForm']) }}
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
|
||||||
|
@if ($requestedItems->count() > 0)
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table
|
||||||
|
name="requested-assets"
|
||||||
|
data-toolbar="#toolbar"
|
||||||
|
class="table table-striped snipe-table"
|
||||||
|
id="table"
|
||||||
|
data-advanced-search="true"
|
||||||
|
data-id-table="advancedTable"
|
||||||
|
data-cookie-id-table="requestedAssets">
|
||||||
|
<thead>
|
||||||
|
<tr role="row">
|
||||||
|
<th class="col-md-1">Image</th>
|
||||||
|
<th class="col-md-2">Item Name</th>
|
||||||
|
<th class="col-md-2" data-sortable="true">{{ trans('admin/hardware/table.location') }}</th>
|
||||||
|
<th class="col-md-2" data-sortable="true">{{ trans('admin/hardware/form.expected_checkin') }}</th>
|
||||||
|
<th class="col-md-3" data-sortable="true">Requesting User</th>
|
||||||
|
<th class="col-md-2">Requested Date</th>
|
||||||
|
<th class="col-md-1"></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@foreach ($requestedItems as $request)
|
||||||
|
<tr>
|
||||||
|
{{ csrf_field() }}
|
||||||
|
<td>
|
||||||
|
@if ($request->itemType() == "asset")
|
||||||
|
<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
|
||||||
|
<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
|
||||||
|
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
@if ($request->itemType() == "asset")
|
||||||
|
<a href="{{ url('/') }}/hardware/{{ $request->requestable->id }}">
|
||||||
|
{{ $request->name() }}
|
||||||
|
</a>
|
||||||
|
@elseif ($request->itemType() == "asset_model")
|
||||||
|
<a href="{{ url('/') }}/models/{{ $request->requestable->id }}">
|
||||||
|
{{ $request->name() }}
|
||||||
|
</a>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
</td>
|
||||||
|
@if ($request->location())
|
||||||
|
<td>{{ $request->location()->name }}</td>
|
||||||
|
@else
|
||||||
|
<td></td>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
<td>
|
||||||
|
@if ($request->itemType() == "asset")
|
||||||
|
{{ App\Helpers\Helper::getFormattedDateObject($request->requestable->expected_checkin, 'datetime', false) }}
|
||||||
|
@endif
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a href="{{ url('/') }}/users/{{ $request->requestingUser()->id }}">
|
||||||
|
{{ $request->requestingUser()->present()->fullName() }}
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
<td>{{ App\Helpers\Helper::getFormattedDateObject($request->created_at, 'datetime', false) }}</td>
|
||||||
|
<td>
|
||||||
|
@if ($request->itemType() == "asset")
|
||||||
|
@if ($request->requestable->assigned_to=='')
|
||||||
|
<a href="{{ url('/') }}/hardware/{{ $request->requestable->id }}/checkout" class="btn btn-sm bg-maroon" data-tooltip="true" title="Check this item out to a user">{{ trans('general.checkout') }}</a>
|
||||||
|
@else
|
||||||
|
<a href="{{ url('/') }}/hardware/{{ $request->requestable->id }}/checkin" class="btn btn-sm bg-purple" data-tooltip="true" title="Check this itemi">{{ trans('general.checkin') }}</a>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
@endif
|
||||||
|
</td>
|
||||||
|
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@else
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="alert alert-info alert-block">
|
||||||
|
<i class="fa fa-info-circle"></i>
|
||||||
|
{{ trans('general.no_results') }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div> <!-- .col-md-12> -->
|
||||||
|
</div> <!-- .row -->
|
||||||
|
@stop
|
||||||
|
|
||||||
|
@section('moar_scripts')
|
||||||
|
@include ('partials.bootstrap-table', [
|
||||||
|
'exportFile' => 'requested-export',
|
||||||
|
'search' => true,
|
||||||
|
'clientSearch' => true,
|
||||||
|
])
|
||||||
|
|
||||||
|
@stop
|
|
@ -397,13 +397,12 @@
|
||||||
<a href="{{ route('hardware/bulkcheckout') }}">
|
<a href="{{ route('hardware/bulkcheckout') }}">
|
||||||
{{ trans('general.bulk_checkout') }}</a>
|
{{ trans('general.bulk_checkout') }}</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li{!! (Request::is('hardware/requested') ? ' class="active>"' : '') !!}>
|
||||||
|
<a href="{{ route('assets.requested') }}">
|
||||||
|
{{ trans('general.requested') }}</a>
|
||||||
|
</li>
|
||||||
@endcan
|
@endcan
|
||||||
@can('view', \App\Models\Assetmodel::class)
|
|
||||||
<li{!! (Request::is('hardware/models*') ? ' class="active"' : '') !!}><a href="{{ route('models.index') }}">@lang('general.asset_models')</a></li>
|
|
||||||
@endcan
|
|
||||||
@can('view', \App\Models\Category::class)
|
|
||||||
<li><a href="{{ url('categories') }}" {!! (Request::is('settings/categories*') ? ' class="active"' : '') !!} >@lang('general.categories')</a></li>
|
|
||||||
@endcan
|
|
||||||
@can('create', \App\Models\Asset::class)
|
@can('create', \App\Models\Asset::class)
|
||||||
<li{!! (Request::query('Deleted') ? ' class="active"' : '') !!}><a href="{{ url('hardware?status=Deleted') }}">@lang('general.deleted')</a></li>
|
<li{!! (Request::query('Deleted') ? ' class="active"' : '') !!}><a href="{{ url('hardware?status=Deleted') }}">@lang('general.deleted')</a></li>
|
||||||
<li><a href="{{ route('maintenances.index') }}">@lang('general.asset_maintenances') </a></li>
|
<li><a href="{{ route('maintenances.index') }}">@lang('general.asset_maintenances') </a></li>
|
||||||
|
|
|
@ -35,7 +35,9 @@
|
||||||
@if ($model->id)
|
@if ($model->id)
|
||||||
<div class="box-header with-border">
|
<div class="box-header with-border">
|
||||||
<div class="box-heading">
|
<div class="box-heading">
|
||||||
<h3 class="box-title"> {{ $model->name }}</h3>
|
<h3 class="box-title"> {{ $model->name }}
|
||||||
|
{{ ($model->model_number) ? '(#'.$model->model_number.')' : '' }}
|
||||||
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
</div><!-- /.box-header -->
|
</div><!-- /.box-header -->
|
||||||
@endif
|
@endif
|
||||||
|
@ -67,85 +69,98 @@
|
||||||
|
|
||||||
<!-- side address column -->
|
<!-- side address column -->
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<h4>More Info:</h4>
|
<div class="box box-default">
|
||||||
<ul class="list-unstyled">
|
<div class="box-header with-border">
|
||||||
@if ($model->manufacturer)
|
<div class="box-heading">
|
||||||
<li>
|
<h3 class="box-title"> More Info:</h3>
|
||||||
{{ trans('general.manufacturer') }}:
|
</div>
|
||||||
@can('view', \App\Models\Manufacturer::class)
|
</div><!-- /.box-header -->
|
||||||
<a href="{{ route('manufacturers.show', $model->manufacturer->id) }}">
|
<div class="box-body">
|
||||||
{{ $model->manufacturer->name }}
|
|
||||||
</a>
|
@if ($model->image)
|
||||||
@else
|
<img src="{{ url('/') }}/uploads/models/{{ $model->image }}" class="img-responsive"></li>
|
||||||
{{ $model->manufacturer->name }}
|
@endif
|
||||||
@endcan
|
|
||||||
</li>
|
|
||||||
@endif
|
<ul class="list-unstyled" style="line-height: 25px;">
|
||||||
@if ($model->manufacturer->url)
|
@if ($model->manufacturer)
|
||||||
<li>
|
<li>
|
||||||
<i class="fa fa-globe"></i> <a href="{{ $model->manufacturer->url }}">{{ $model->manufacturer->url }}</a>
|
{{ trans('general.manufacturer') }}:
|
||||||
|
@can('view', \App\Models\Manufacturer::class)
|
||||||
|
<a href="{{ route('manufacturers.show', $model->manufacturer->id) }}">
|
||||||
|
{{ $model->manufacturer->name }}
|
||||||
|
</a>
|
||||||
|
@else
|
||||||
|
{{ $model->manufacturer->name }}
|
||||||
|
@endcan
|
||||||
</li>
|
</li>
|
||||||
@endif
|
@endif
|
||||||
|
@if ($model->manufacturer->url)
|
||||||
|
<li>
|
||||||
|
<i class="fa fa-globe"></i> <a href="{{ $model->manufacturer->url }}">{{ $model->manufacturer->url }}</a>
|
||||||
|
</li>
|
||||||
|
@endif
|
||||||
|
|
||||||
@if ($model->manufacturer->support_url)
|
@if ($model->manufacturer->support_url)
|
||||||
|
<li>
|
||||||
|
<i class="fa fa-life-ring"></i> <a href="{{ $model->manufacturer->support_url }}">{{ $model->manufacturer->support_url }}</a>
|
||||||
|
</li>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
@if ($model->manufacturer->support_phone)
|
||||||
|
<li>
|
||||||
|
<i class="fa fa-phone"></i> {{ $model->manufacturer->support_phone }}
|
||||||
|
</li>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
@if ($model->manufacturer->support_email)
|
||||||
|
<li>
|
||||||
|
<i class="fa fa-envelope"></i> <a href="mailto:{{ $model->manufacturer->support_email }}">{{ $model->manufacturer->support_email }}</a>
|
||||||
|
</li>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
@if ($model->model_number)
|
||||||
<li>
|
<li>
|
||||||
<i class="fa fa-life-ring"></i> <a href="{{ $model->manufacturer->support_url }}">{{ $model->manufacturer->support_url }}</a>
|
{{ trans('general.model_no') }}:
|
||||||
|
{{ $model->model_number }}
|
||||||
</li>
|
</li>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if ($model->manufacturer->support_phone)
|
@if ($model->depreciation)
|
||||||
<li>
|
<li>
|
||||||
<i class="fa fa-phone"></i> {{ $model->manufacturer->support_phone }}
|
{{ trans('general.depreciation') }}:
|
||||||
|
{{ $model->depreciation->name }} ({{ $model->depreciation->months.' '.trans('general.months')}})
|
||||||
</li>
|
</li>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if ($model->manufacturer->support_email)
|
@if ($model->eol)
|
||||||
<li>
|
<li>{{ trans('general.eol') }}:
|
||||||
<i class="fa fa-envelope"></i> <a href="mailto:{{ $model->manufacturer->support_email }}">{{ $model->manufacturer->support_email }}</a>
|
{{ $model->eol .' '. trans('general.months') }}
|
||||||
</li>
|
</li>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if ($model->model_number)
|
@if ($model->fieldset)
|
||||||
<li>
|
<li>{{ trans('admin/models/general.fieldset') }}:
|
||||||
{{ trans('general.model_no') }}:
|
<a href="{{ route('fieldsets.show', $model->fieldset->id) }}">{{ $model->fieldset->name }}</a>
|
||||||
{{ $model->model_number }}
|
</li>
|
||||||
</li>
|
@endif
|
||||||
@endif
|
|
||||||
|
|
||||||
@if ($model->depreciation)
|
|
||||||
<li>
|
|
||||||
{{ trans('general.depreciation') }}:
|
|
||||||
{{ $model->depreciation->name }} ({{ $model->depreciation->months.' '.trans('general.months')}})
|
|
||||||
</li>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
@if ($model->eol)
|
|
||||||
<li>{{ trans('general.eol') }}:
|
|
||||||
{{ $model->eol .' '. trans('general.months') }}
|
|
||||||
</li>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
@if ($model->fieldset)
|
@if ($model->deleted_at!='')
|
||||||
<li>{{ trans('admin/models/general.fieldset') }}:
|
<li><br /><a href="{{ route('restore/model', $model->id) }}" class="btn-flat large info ">{{ trans('admin/models/general.restore') }}</a></li>
|
||||||
<a href="{{ route('fieldsets.show', $model->fieldset->id) }}">{{ $model->fieldset->name }}</a>
|
@endif
|
||||||
</li>
|
</ul>
|
||||||
@endif
|
|
||||||
|
|
||||||
@if ($model->image)
|
@if ($model->note)
|
||||||
<li><br /><img src="{{ url('/') }}/uploads/models/{{ $model->image }}" class="img-responsive"></li>
|
Notes:
|
||||||
@endif
|
<p>
|
||||||
|
{!! $model->present()->note() !!}
|
||||||
@if ($model->deleted_at!='')
|
</p>
|
||||||
<li><br /><a href="{{ route('restore/model', $model->id) }}" class="btn-flat large info ">{{ trans('admin/models/general.restore') }}</a></li>
|
@endif
|
||||||
@endif
|
</div>
|
||||||
</ul>
|
</div>
|
||||||
|
</div>
|
||||||
@if ($model->note)
|
|
||||||
Notes:
|
|
||||||
<p>
|
|
||||||
{!! $model->present()->note() !!}
|
|
||||||
</p>
|
|
||||||
@endif
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@stop
|
@stop
|
||||||
|
|
|
@ -43,7 +43,7 @@ $('.snipe-table').bootstrapTable('destroy').bootstrapTable({
|
||||||
|
|
||||||
|
|
||||||
paginationVAlign: 'both',
|
paginationVAlign: 'both',
|
||||||
sidePagination: 'server',
|
sidePagination: '{{ (isset($clientSearch)) ? 'client' : 'server' }}',
|
||||||
sortable: true,
|
sortable: true,
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -187,8 +187,6 @@ Route::group([ 'prefix' => 'admin','middleware' => ['authorize:superuser']], fun
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
Route::get('requests', [ 'as' => 'requests', 'middleware' => 'authorize:admin', 'uses' => 'ViewAssetsController@getRequestedIndex']);
|
|
||||||
|
|
||||||
|
|
||||||
Route::resource('groups', 'GroupsController', [
|
Route::resource('groups', 'GroupsController', [
|
||||||
'middleware' => ['auth'],
|
'middleware' => ['auth'],
|
||||||
|
|
|
@ -22,6 +22,8 @@ Route::group(
|
||||||
'parameters' => ['maintenance' => 'maintenance_id', 'asset' => 'asset_id']
|
'parameters' => ['maintenance' => 'maintenance_id', 'asset' => 'asset_id']
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
Route::get('requested', [ 'as' => 'assets.requested', 'uses' => 'AssetsController@getRequestedIndex']);
|
||||||
|
|
||||||
Route::get('scan', [
|
Route::get('scan', [
|
||||||
'as' => 'asset.scan',
|
'as' => 'asset.scan',
|
||||||
'uses' => 'AssetsController@scan'
|
'uses' => 'AssetsController@scan'
|
||||||
|
|
Loading…
Add table
Reference in a new issue