snipe-it/resources/views/account/requestable-assets.blade.php

99 lines
3.3 KiB
PHP
Raw Normal View History

2016-03-25 01:18:05 -07:00
@extends('layouts/default')
@section('title0')
{{ trans('admin/hardware/general.requestable') }}
{{ 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 box-default">
<div class="box-body">
@if ($assets->count() > 0)
<div class="table-responsive">
<table class="table table-striped">
<thead>
2016-07-29 11:55:16 -07:00
<tr role="row">
2016-03-25 01:18:05 -07:00
<th class="col-md-3" bSortable="true">{{ trans('admin/hardware/table.asset_model') }}</th>
<th class="col-md-3" bSortable="true">{{ trans('admin/hardware/table.serial') }}</th>
<th class="col-md-2" bSortable="true">{{ trans('admin/hardware/table.location') }}</th>
2016-07-29 11:55:16 -07:00
<th class="col-md-2" bSortable="true">{{ trans('admin/hardware/table.status') }}</th>
<th class="col-md-2" bSortable="true">{{ trans('admin/hardware/form.expected_checkin') }}</th>
2016-03-25 01:18:05 -07:00
<th class="col-md-1 actions" bSortable="false">{{ trans('table.actions') }}</th>
</tr>
</thead>
<tbody>
@foreach ($assets as $asset)
<tr>
<td>{{ $asset->model->name }}</td>
@if (\App\Models\Setting::getSettings()->display_asset_name)
<td>{{ $asset->name }}</td>
@endif
<td>{{ $asset->serial }}</td>
2016-07-29 11:55:16 -07:00
2016-03-25 01:18:05 -07:00
<td>
@if ($asset->assigneduser && $asset->assetloc)
2016-07-29 11:55:16 -07:00
{{ $asset->assetloc->name }}
2016-03-25 01:18:05 -07:00
@elseif ($asset->defaultLoc)
2016-07-29 11:55:16 -07:00
{{ $asset->defaultLoc->name }}
2016-03-25 01:18:05 -07:00
@endif
</td>
2016-07-29 11:55:16 -07:00
@if ($asset->assigned_to != '' && $asset->assigned_to > 0)
<td>Checked out</td>
@else
<td>{{ trans('admin/hardware/general.requestable') }}</td>
@endif
<td>{{ $asset->expected_checkin }}</td>
2016-03-25 01:18:05 -07:00
<td>
<a href="{{ route('account/request-asset', $asset->id) }}" class="btn btn-info btn-sm" title="{{ trans('button.request') }}">{{ trans('button.request') }}</a>
</td>
</tr>
@endforeach
</tbody>
</table>
@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>
@stop