ok
This commit is contained in:
@ -0,0 +1,70 @@
|
||||
@extends('layouts/default')
|
||||
|
||||
{{-- Page title --}}
|
||||
@section('title')
|
||||
{{ trans('general.bulk.delete.header', ['object_type' => trans_choice('general.location_plural', $valid_count)]) }}
|
||||
@parent
|
||||
@stop
|
||||
|
||||
@section('header_right')
|
||||
<a href="{{ URL::previous() }}" class="btn btn-primary pull-right">
|
||||
{{ trans('general.back') }}</a>
|
||||
@stop
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<!-- left column -->
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
<form class="form-horizontal" method="post" action="{{ route('locations.bulkdelete.store') }}" autocomplete="off" role="form">
|
||||
{{csrf_field()}}
|
||||
<div class="box box-default">
|
||||
<div class="box-header with-border">
|
||||
<h2 class="box-title" style="color: red">{{ trans_choice('general.bulk.delete.warn', $valid_count, ['count' => $valid_count,'object_type' => trans_choice('general.location_plural', $valid_count)]) }}</h2>
|
||||
</div>
|
||||
|
||||
<div class="box-body">
|
||||
<table class="table table-striped table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="col-md-1">
|
||||
<label>
|
||||
<input type="checkbox" id="checkAll" checked="checked">
|
||||
</label>
|
||||
</td>
|
||||
<td class="col-md-10">{{ trans('general.name') }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($locations as $location)
|
||||
<tr{!! (($location->assets_count > 0 ) ? ' class="danger"' : '') !!}>
|
||||
<td>
|
||||
<input type="checkbox" name="ids[]" class="{ ($location->isDeletable() ? '' : ' disabled') }}" value="{{ $location->id }}" {!! (($location->isDeletable()) ? ' checked="checked"' : ' disabled') !!}>
|
||||
</td>
|
||||
<td>{{ $location->name }}</td>
|
||||
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div><!-- /.box-body -->
|
||||
|
||||
<div class="box-footer text-right">
|
||||
<a class="btn btn-link pull-left" href="{{ URL::previous() }}">{{ trans('button.cancel') }}</a>
|
||||
<button type="submit" class="btn btn-success" id="submit-button"><i class="fas fa-check icon-white" aria-hidden="true"></i> {{ trans('general.delete') }}</button>
|
||||
</div><!-- /.box-footer -->
|
||||
</div><!-- /.box -->
|
||||
</form>
|
||||
</div> <!-- .col-md-12-->
|
||||
</div><!--.row-->
|
||||
@stop
|
||||
@section('moar_scripts')
|
||||
<script>
|
||||
|
||||
|
||||
$("#checkAll").change(function () {
|
||||
$("input:checkbox").prop('checked', $(this).prop("checked"));
|
||||
});
|
||||
|
||||
</script>
|
||||
@stop
|
51
Production/SNIPE-IT/resources/views/locations/edit.blade.php
Normal file
51
Production/SNIPE-IT/resources/views/locations/edit.blade.php
Normal file
@ -0,0 +1,51 @@
|
||||
@extends('layouts/edit-form', [
|
||||
'createText' => trans('admin/locations/table.create') ,
|
||||
'updateText' => trans('admin/locations/table.update'),
|
||||
'topSubmit' => true,
|
||||
'helpPosition' => 'right',
|
||||
'helpText' => trans('admin/locations/table.about_locations'),
|
||||
'formAction' => (isset($item->id)) ? route('locations.update', ['location' => $item->id]) : route('locations.store'),
|
||||
])
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('inputFields')
|
||||
@include ('partials.forms.edit.name', ['translated_name' => trans('admin/locations/table.name')])
|
||||
|
||||
<!-- parent -->
|
||||
@include ('partials.forms.edit.location-select', ['translated_name' => trans('admin/locations/table.parent'), 'fieldname' => 'parent_id'])
|
||||
|
||||
<!-- Manager-->
|
||||
@include ('partials.forms.edit.user-select', ['translated_name' => trans('admin/users/table.manager'), 'fieldname' => 'manager_id'])
|
||||
|
||||
@include ('partials.forms.edit.phone')
|
||||
@include ('partials.forms.edit.fax')
|
||||
|
||||
<!-- Currency -->
|
||||
<div class="form-group {{ $errors->has('currency') ? ' has-error' : '' }}">
|
||||
<label for="currency" class="col-md-3 control-label">
|
||||
{{ trans('admin/locations/table.currency') }}
|
||||
</label>
|
||||
<div class="col-md-9{{ (Helper::checkIfRequired($item, 'currency')) ? ' required' : '' }}">
|
||||
{{ Form::text('currency', old('currency', $item->currency), array('class' => 'form-control','placeholder' => 'USD', 'maxlength'=>'3', 'style'=>'width: 60px;', 'aria-label'=>'currency')) }}
|
||||
{!! $errors->first('currency', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include ('partials.forms.edit.address')
|
||||
|
||||
<!-- LDAP Search OU -->
|
||||
@if ($snipeSettings->ldap_enabled == 1)
|
||||
<div class="form-group {{ $errors->has('ldap_ou') ? ' has-error' : '' }}">
|
||||
<label for="ldap_ou" class="col-md-3 control-label">
|
||||
{{ trans('admin/locations/table.ldap_ou') }}
|
||||
</label>
|
||||
<div class="col-md-7{{ (Helper::checkIfRequired($item, 'ldap_ou')) ? ' required' : '' }}">
|
||||
{{ Form::text('ldap_ou', old('ldap_ou', $item->ldap_ou), array('class' => 'form-control')) }}
|
||||
{!! $errors->first('ldap_ou', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@include ('partials.forms.edit.image-upload', ['image_path' => app('locations_upload_path')])
|
||||
@stop
|
||||
|
@ -0,0 +1,61 @@
|
||||
@extends('layouts/default')
|
||||
|
||||
{{-- Page title --}}
|
||||
@section('title')
|
||||
{{ trans('general.locations') }}
|
||||
@parent
|
||||
@stop
|
||||
|
||||
@section('header_right')
|
||||
@can('create', \App\Models\Location::class)
|
||||
<a href="{{ route('locations.create') }}" class="btn btn-primary pull-right">
|
||||
{{ trans('general.create') }}</a>
|
||||
@endcan
|
||||
@stop
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
<div class="table-responsive">
|
||||
|
||||
@include('partials.locations-bulk-actions')
|
||||
|
||||
<table
|
||||
data-columns="{{ \App\Presenters\LocationPresenter::dataTableLayout() }}"
|
||||
data-cookie-id-table="locationTable"
|
||||
data-click-to-select="true"
|
||||
data-pagination="true"
|
||||
data-id-table="locationTable"
|
||||
data-toolbar="#locationsBulkEditToolbar"
|
||||
data-bulk-button-id="#bulkLocationsEditButton"
|
||||
data-bulk-form-id="#locationsBulkForm"
|
||||
data-search="true"
|
||||
data-show-footer="true"
|
||||
data-side-pagination="server"
|
||||
data-show-columns="true"
|
||||
data-show-fullscreen="true"
|
||||
data-show-export="true"
|
||||
data-show-refresh="true"
|
||||
data-sort-order="asc"
|
||||
id="locationTable"
|
||||
class="table table-striped snipe-table"
|
||||
data-url="{{ route('api.locations.index') }}"
|
||||
data-export-options='{
|
||||
"fileName": "export-locations-{{ date('Y-m-d') }}",
|
||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
||||
}'>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
@include ('partials.bootstrap-table', ['exportFile' => 'locations-export', 'search' => true])
|
||||
|
||||
@stop
|
180
Production/SNIPE-IT/resources/views/locations/print.blade.php
Normal file
180
Production/SNIPE-IT/resources/views/locations/print.blade.php
Normal file
@ -0,0 +1,180 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title>{{ trans('general.assigned_to', array('name' => $location->present()->fullName())) }} </title>
|
||||
<style>
|
||||
body {
|
||||
font-family: "Arial, Helvetica", sans-serif;
|
||||
}
|
||||
table.inventory {
|
||||
border: solid #000;
|
||||
border-width: 1px 1px 1px 1px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@page {
|
||||
size: A4;
|
||||
}
|
||||
table.inventory th, table.inventory td {
|
||||
border: solid #000;
|
||||
border-width: 0 1px 1px 0;
|
||||
padding: 3px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.print-logo {
|
||||
max-height: 40px;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@if ($snipeSettings->logo_print_assets=='1')
|
||||
@if ($snipeSettings->brand == '3')
|
||||
|
||||
<h3>
|
||||
@if ($snipeSettings->logo!='')
|
||||
<img class="print-logo" src="{{ config('app.url') }}/uploads/{{ $snipeSettings->logo }}">
|
||||
@endif
|
||||
{{ $snipeSettings->site_name }}
|
||||
</h3>
|
||||
@elseif ($snipeSettings->brand == '2')
|
||||
@if ($snipeSettings->logo!='')
|
||||
<img class="print-logo" src="{{ config('app.url') }}/uploads/{{ $snipeSettings->logo }}">
|
||||
@endif
|
||||
@else
|
||||
<h3>{{ $snipeSettings->site_name }}</h3>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
<h2>{{ trans('general.assigned_to', array('name' => $location->present()->fullName())) }}</h2>
|
||||
@if ($parent)
|
||||
{{ $parent->present()->fullName() }}
|
||||
@endif
|
||||
|
||||
@if ($manager)
|
||||
<b>{{ trans('general.manager') }}</b> {{ $manager->present()->fullName() }}<br>
|
||||
@endif
|
||||
<b>{{ trans('general.date') }}</b> {{ \App\Helpers\Helper::getFormattedDateObject(now(), 'datetime', false) }}<br><br>
|
||||
|
||||
@if ($users->count() > 0)
|
||||
@php
|
||||
$counter = 1;
|
||||
@endphp
|
||||
<table class="inventory">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="6">{{ trans('general.users') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 5px;"></th>
|
||||
<th style="width: 25%;">{{ trans('general.company') }}</th>
|
||||
<th style="width: 25%;">{{ trans('admin/locations/table.user_name') }}</th>
|
||||
<th style="width: 10%;">{{ trans('general.employee_number') }}</th>
|
||||
<th style="width: 20%;">{{ trans('admin/locations/table.department') }}</th>
|
||||
<th style="width: 20%;">{{ trans('admin/locations/table.location') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@foreach ($users as $user)
|
||||
|
||||
<tr>
|
||||
<td>{{ $counter }}</td>
|
||||
<td>{{ (($user) && ($user->company)) ? $user->company->name : '' }}</td>
|
||||
<td>{{ ($user) ? $user->first_name .' '. $user->last_name : '' }}</td>
|
||||
<td>{{ ($user) ? $user->employee_num : '' }}</td>
|
||||
<td>{{ (($user) && ($user->department)) ? $user->department->name : '' }}</td>
|
||||
<td>{{ (($user) && ($user->location)) ? $user->location->name : '' }}</td>
|
||||
</tr>
|
||||
@php
|
||||
$counter++
|
||||
@endphp
|
||||
@endforeach
|
||||
</table>
|
||||
@endif
|
||||
|
||||
|
||||
|
||||
@if ($assets->count() > 0)
|
||||
<br><br>
|
||||
<table class="inventory">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="10">{{ trans('general.assets') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 20px;"></th>
|
||||
<th style="width: 10%;">{{ trans('admin/locations/table.asset_tag') }}</th>
|
||||
<th style="width: 10%;">{{ trans('admin/locations/table.asset_name') }}</th>
|
||||
<th style="width: 10%;">{{ trans('admin/locations/table.asset_category') }}</th>
|
||||
<th style="width: 10%;">{{ trans('admin/locations/table.asset_manufacturer') }}</th>
|
||||
<th style="width: 15%;">{{ trans('admin/locations/table.asset_model') }}</th>
|
||||
<th style="width: 15%;">{{ trans('admin/locations/table.asset_serial') }}</th>
|
||||
<th style="width: 10%;">{{ trans('admin/locations/table.asset_location') }}</th>
|
||||
<th style="width: 10%;">{{ trans('admin/locations/table.asset_checked_out') }}</th>
|
||||
<th style="width: 10%;">{{ trans('admin/locations/table.asset_expected_checkin') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@php
|
||||
$counter = 1;
|
||||
@endphp
|
||||
|
||||
@foreach ($assets as $asset)
|
||||
@php
|
||||
if($snipeSettings->show_archived_in_list != 1 && $asset->assetstatus->archived == 1){
|
||||
continue;
|
||||
}
|
||||
@endphp
|
||||
<tr>
|
||||
<td>{{ $counter }}</td>
|
||||
<td>{{ $asset->asset_tag }}</td>
|
||||
<td>{{ $asset->name }}</td>
|
||||
<td>{{ (($asset->model) && ($asset->model->category)) ? $asset->model->category->name : '' }}</td>
|
||||
<td>{{ (($asset->model) && ($asset->model->manufacturer)) ? $asset->model->manufacturer->name : '' }}</td>
|
||||
<td>{{ ($asset->model) ? $asset->model->name : '' }}</td>
|
||||
<td>{{ $asset->serial }}</td>
|
||||
<td>{{ $asset->location->name }}</td>
|
||||
<td>{{ \App\Helpers\Helper::getFormattedDateObject( $asset->last_checkout, 'datetime', false) }}</td>
|
||||
<td>{{ \App\Helpers\Helper::getFormattedDateObject( $asset->expected_checkin, 'datetime', false) }}</td>
|
||||
</tr>
|
||||
@php
|
||||
$counter++
|
||||
@endphp
|
||||
@endforeach
|
||||
</table>
|
||||
@endif
|
||||
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<table>
|
||||
<tr>
|
||||
<td>{{ trans('admin/locations/table.signed_by_asset_auditor') }}</td>
|
||||
<td><br>------------------------------------------------------ <br></td>
|
||||
<td>{{ trans('admin/locations/table.date') }}</td>
|
||||
<td><br>------------------------------ <br></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>{{ trans('admin/locations/table.signed_by_finance_auditor') }}</td>
|
||||
<td><br>------------------------------------------------------ <br></td>
|
||||
<td>{{ trans('admin/locations/table.date') }}</td>
|
||||
<td><br>------------------------------ <br></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>{{ trans('admin/locations/table.signed_by_location_manager') }}</td>
|
||||
<td><br>------------------------------------------------------ <br></td>
|
||||
<td>{{ trans('admin/locations/table.date') }}</td>
|
||||
<td><br>------------------------------ <br></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
445
Production/SNIPE-IT/resources/views/locations/view.blade.php
Normal file
445
Production/SNIPE-IT/resources/views/locations/view.blade.php
Normal file
@ -0,0 +1,445 @@
|
||||
@extends('layouts/default')
|
||||
|
||||
{{-- Page title --}}
|
||||
@section('title')
|
||||
|
||||
{{ trans('general.location') }}:
|
||||
{{ $location->name }}
|
||||
|
||||
@parent
|
||||
@stop
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs hidden-print">
|
||||
|
||||
<li class="active">
|
||||
<a href="#users" data-toggle="tab">
|
||||
<span class="hidden-lg hidden-md">
|
||||
<i class="fas fa-users fa-2x"></i>
|
||||
</span>
|
||||
<span class="hidden-xs hidden-sm">
|
||||
{{ trans('general.users') }}
|
||||
{!! ($location->users->count() > 0 ) ? '<badge class="badge badge-secondary">'.number_format($location->users->count()).'</badge>' : '' !!}
|
||||
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="#assets" data-toggle="tab">
|
||||
<span class="hidden-lg hidden-md">
|
||||
<i class="fas fa-barcode fa-2x" aria-hidden="true"></i>
|
||||
</span>
|
||||
<span class="hidden-xs hidden-sm">
|
||||
{{ trans('admin/locations/message.current_location') }}
|
||||
{!! ($location->assets()->AssetsForShow()->count() > 0 ) ? '<badge class="badge badge-secondary">'.number_format($location->assets()->AssetsForShow()->count()).'</badge>' : '' !!}
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
<a href="#rtd_assets" data-toggle="tab">
|
||||
<span class="hidden-lg hidden-md">
|
||||
<i class="fas fa-barcode fa-2x" aria-hidden="true"></i>
|
||||
</span>
|
||||
<span class="hidden-xs hidden-sm">
|
||||
{{ trans('admin/hardware/form.default_location') }}
|
||||
{!! ($location->rtd_assets()->AssetsForShow()->count() > 0 ) ? '<badge class="badge badge-secondary">'.number_format($location->rtd_assets()->AssetsForShow()->count()).'</badge>' : '' !!}
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="#assets_assigned" data-toggle="tab">
|
||||
<span class="hidden-lg hidden-md">
|
||||
<i class="fas fa-barcode fa-2x" aria-hidden="true"></i>
|
||||
</span>
|
||||
<span class="hidden-xs hidden-sm">
|
||||
{{ trans('admin/locations/message.assigned_assets') }}
|
||||
{!! ($location->assignedAssets()->AssetsForShow()->count() > 0 ) ? '<badge class="badge badge-secondary">'.number_format($location->assignedAssets()->AssetsForShow()->count()).'</badge>' : '' !!}
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
<a href="#accessories" data-toggle="tab">
|
||||
<span class="hidden-lg hidden-md">
|
||||
<i class="fas fa-keyboard fa-2x" aria-hidden="true"></i>
|
||||
</span>
|
||||
<span class="hidden-xs hidden-sm">
|
||||
{{ trans('general.accessories') }}
|
||||
{!! ($location->accessories->count() > 0 ) ? '<badge class="badge badge-secondary">'.number_format($location->accessories->count()).'</badge>' : '' !!}
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="#consumables" data-toggle="tab">
|
||||
<span class="hidden-lg hidden-md">
|
||||
<i class="fas fa-tint fa-2x" aria-hidden="true"></i>
|
||||
</span>
|
||||
<span class="hidden-xs hidden-sm">
|
||||
{{ trans('general.consumables') }}
|
||||
{!! ($location->consumables->count() > 0 ) ? '<badge class="badge badge-secondary">'.number_format($location->consumables->count()).'</badge>' : '' !!}
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="#components" data-toggle="tab">
|
||||
<span class="hidden-lg hidden-md">
|
||||
<i class="fas fa-hdd fa-2x" aria-hidden="true"></i>
|
||||
</span>
|
||||
<span class="hidden-xs hidden-sm">
|
||||
{{ trans('general.components') }}
|
||||
{!! ($location->components->count() > 0 ) ? '<badge class="badge badge-secondary">'.number_format($location->components->count()).'</badge>' : '' !!}
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="#history" data-toggle="tab">
|
||||
<span class="hidden-lg hidden-md">
|
||||
<i class="fas fa-hdd fa-2x" aria-hidden="true"></i>
|
||||
</span>
|
||||
<span class="hidden-xs hidden-sm">
|
||||
{{ trans('general.history') }}
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="users">
|
||||
<h2 class="box-title">{{ trans('general.users') }}</h2>
|
||||
<div class="table table-responsive">
|
||||
@include('partials.users-bulk-actions')
|
||||
<table
|
||||
data-columns="{{ \App\Presenters\UserPresenter::dataTableLayout() }}"
|
||||
data-cookie-id-table="usersTable"
|
||||
data-pagination="true"
|
||||
data-id-table="usersTable"
|
||||
data-search="true"
|
||||
data-side-pagination="server"
|
||||
data-show-columns="true"
|
||||
data-show-export="true"
|
||||
data-show-refresh="true"
|
||||
data-sort-order="asc"
|
||||
data-toolbar="#userBulkEditToolbar"
|
||||
data-bulk-button-id="#bulkUserEditButton"
|
||||
data-bulk-form-id="#usersBulkForm"
|
||||
data-click-to-select="true"
|
||||
id="usersTable"
|
||||
class="table table-striped snipe-table"
|
||||
data-url="{{route('api.users.index', ['location_id' => $location->id])}}"
|
||||
data-export-options='{
|
||||
"fileName": "export-locations-{{ str_slug($location->name) }}-users-{{ date('Y-m-d') }}",
|
||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
||||
}'>
|
||||
|
||||
</table>
|
||||
</div><!-- /.table-responsive -->
|
||||
</div><!-- /.tab-pane -->
|
||||
|
||||
<div class="tab-pane" id="assets">
|
||||
<h2 class="box-title">{{ trans('admin/locations/message.current_location') }}</h2>
|
||||
|
||||
<div class="table table-responsive">
|
||||
@include('partials.asset-bulk-actions')
|
||||
<table
|
||||
data-columns="{{ \App\Presenters\AssetPresenter::dataTableLayout() }}"
|
||||
data-cookie-id-table="assetsListingTable"
|
||||
data-pagination="true"
|
||||
data-id-table="assetsListingTable"
|
||||
data-search="true"
|
||||
data-side-pagination="server"
|
||||
data-show-columns="true"
|
||||
data-show-export="true"
|
||||
data-show-refresh="true"
|
||||
data-sort-order="asc"
|
||||
data-toolbar="#assetsBulkEditToolbar"
|
||||
data-bulk-button-id="#bulkAssetEditButton"
|
||||
data-bulk-form-id="#assetsBulkForm"
|
||||
data-click-to-select="true"
|
||||
id="assetsListingTable"
|
||||
class="table table-striped snipe-table"
|
||||
data-url="{{route('api.assets.index', ['location_id' => $location->id]) }}"
|
||||
data-export-options='{
|
||||
"fileName": "export-locations-{{ str_slug($location->name) }}-assets-{{ date('Y-m-d') }}",
|
||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
||||
}'>
|
||||
</table>
|
||||
|
||||
</div><!-- /.table-responsive -->
|
||||
</div><!-- /.tab-pane -->
|
||||
|
||||
<div class="tab-pane" id="assets_assigned">
|
||||
<h2 class="box-title">
|
||||
{{ trans('admin/locations/message.assigned_assets') }}
|
||||
</h2>
|
||||
|
||||
<div class="table table-responsive">
|
||||
@include('partials.asset-bulk-actions', ['id_divname' => 'AssignedAssetsBulkEditToolbar', 'id_formname' => 'assignedAssetsBulkForm', 'id_button' => 'AssignedbulkAssetEditButton'])
|
||||
<table
|
||||
data-columns="{{ \App\Presenters\AssetPresenter::dataTableLayout() }}"
|
||||
data-cookie-id-table="assetsAssignedListingTable"
|
||||
data-pagination="true"
|
||||
data-id-table="assetsAssignedListingTable"
|
||||
data-search="true"
|
||||
data-side-pagination="server"
|
||||
data-show-columns="true"
|
||||
data-show-export="true"
|
||||
data-show-refresh="true"
|
||||
data-sort-order="asc"
|
||||
data-toolbar="#AssignedAssetsBulkEditToolbar"
|
||||
data-bulk-button-id="#AssignedbulkAssetEditButton"
|
||||
data-bulk-form-id="#assignedAssetsBulkForm"
|
||||
data-click-to-select="true"
|
||||
id="assetsListingTable"
|
||||
class="table table-striped snipe-table"
|
||||
data-url="{{route('api.assets.index', ['assigned_to' => $location->id, 'assigned_type' => \App\Models\Location::class]) }}"
|
||||
data-export-options='{
|
||||
"fileName": "export-locations-{{ str_slug($location->name) }}-assets-{{ date('Y-m-d') }}",
|
||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
||||
}'>
|
||||
</table>
|
||||
|
||||
</div><!-- /.table-responsive -->
|
||||
</div><!-- /.tab-pane -->
|
||||
|
||||
<div class="tab-pane" id="rtd_assets">
|
||||
<h2 class="box-title">{{ trans('admin/hardware/form.default_location') }}</h2>
|
||||
|
||||
<div class="table table-responsive">
|
||||
@include('partials.asset-bulk-actions', ['id_divname' => 'RTDassetsBulkEditToolbar', 'id_formname' => 'RTDassets', 'id_button' => 'RTDbulkAssetEditButton'])
|
||||
<table
|
||||
data-columns="{{ \App\Presenters\AssetPresenter::dataTableLayout() }}"
|
||||
data-cookie-id-table="RTDassetsListingTable"
|
||||
data-pagination="true"
|
||||
data-id-table="RTDassetsListingTable"
|
||||
data-search="true"
|
||||
data-side-pagination="server"
|
||||
data-show-columns="true"
|
||||
data-show-export="true"
|
||||
data-show-refresh="true"
|
||||
data-sort-order="asc"
|
||||
data-toolbar="#RTDassetsBulkEditToolbar"
|
||||
data-bulk-button-id="#RTDbulkAssetEditButton"
|
||||
data-bulk-form-id="#RTDassetsBulkEditToolbar"
|
||||
data-click-to-select="true"
|
||||
id="RTDassetsListingTable"
|
||||
class="table table-striped snipe-table"
|
||||
data-url="{{route('api.assets.index', ['rtd_location_id' => $location->id]) }}"
|
||||
data-export-options='{
|
||||
"fileName": "export-rtd-locations-{{ str_slug($location->name) }}-assets-{{ date('Y-m-d') }}",
|
||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
||||
}'>
|
||||
</table>
|
||||
|
||||
</div><!-- /.table-responsive -->
|
||||
</div><!-- /.tab-pane -->
|
||||
|
||||
|
||||
|
||||
<div class="tab-pane" id="accessories">
|
||||
<h2 class="box-title">{{ trans('general.accessories') }}</h2>
|
||||
<div class="table table-responsive">
|
||||
<table
|
||||
data-columns="{{ \App\Presenters\AccessoryPresenter::dataTableLayout() }}"
|
||||
data-cookie-id-table="accessoriesListingTable"
|
||||
data-pagination="true"
|
||||
data-id-table="accessoriesListingTable"
|
||||
data-search="true"
|
||||
data-side-pagination="server"
|
||||
data-show-columns="true"
|
||||
data-show-export="true"
|
||||
data-show-refresh="true"
|
||||
data-sort-order="asc"
|
||||
id="accessoriesListingTable"
|
||||
class="table table-striped snipe-table"
|
||||
data-url="{{route('api.accessories.index', ['location_id' => $location->id]) }}"
|
||||
data-export-options='{
|
||||
"fileName": "export-locations-{{ str_slug($location->name) }}-accessories-{{ date('Y-m-d') }}",
|
||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
||||
}'>
|
||||
</table>
|
||||
</div><!-- /.table-responsive -->
|
||||
</div><!-- /.tab-pane -->
|
||||
|
||||
|
||||
<div class="tab-pane" id="consumables">
|
||||
<h2 class="box-title">{{ trans('general.consumables') }}</h2>
|
||||
|
||||
<div class="table table-responsive">
|
||||
<table
|
||||
data-columns="{{ \App\Presenters\ConsumablePresenter::dataTableLayout() }}"
|
||||
data-cookie-id-table="consumablesListingTable"
|
||||
data-pagination="true"
|
||||
data-id-table="consumablesListingTable"
|
||||
data-search="true"
|
||||
data-side-pagination="server"
|
||||
data-show-columns="true"
|
||||
data-show-export="true"
|
||||
data-show-refresh="true"
|
||||
data-sort-order="asc"
|
||||
id="consumablesListingTable"
|
||||
class="table table-striped snipe-table"
|
||||
data-url="{{route('api.consumables.index', ['location_id' => $location->id]) }}"
|
||||
data-export-options='{
|
||||
"fileName": "export-locations-{{ str_slug($location->name) }}-consumables-{{ date('Y-m-d') }}",
|
||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
||||
}'>
|
||||
</table>
|
||||
|
||||
</div><!-- /.table-responsive -->
|
||||
</div><!-- /.tab-pane -->
|
||||
|
||||
<div class="tab-pane" id="components">
|
||||
<h2 class="box-title">{{ trans('general.components') }}</h2>
|
||||
<div class="table table-responsive">
|
||||
|
||||
<table
|
||||
data-columns="{{ \App\Presenters\ComponentPresenter::dataTableLayout() }}"
|
||||
data-cookie-id-table="componentsTable"
|
||||
data-pagination="true"
|
||||
data-id-table="componentsTable"
|
||||
data-search="true"
|
||||
data-side-pagination="server"
|
||||
data-show-columns="true"
|
||||
data-show-export="true"
|
||||
data-show-refresh="true"
|
||||
data-sort-order="asc"
|
||||
id="componentsTable"
|
||||
class="table table-striped snipe-table"
|
||||
data-url="{{route('api.components.index', ['location_id' => $location->id])}}"
|
||||
data-export-options='{
|
||||
"fileName": "export-locations-{{ str_slug($location->name) }}-components-{{ date('Y-m-d') }}",
|
||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
||||
}'>
|
||||
|
||||
</table>
|
||||
</div><!-- /.table-responsive -->
|
||||
</div><!-- /.tab-pane -->
|
||||
|
||||
<div class="tab-pane" id="history">
|
||||
<h2 class="box-title">{{ trans('general.history') }}</h2>
|
||||
<!-- checked out assets table -->
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<table
|
||||
class="table table-striped snipe-table"
|
||||
id="assetHistory"
|
||||
data-pagination="true"
|
||||
data-id-table="assetHistory"
|
||||
data-search="true"
|
||||
data-side-pagination="server"
|
||||
data-show-columns="true"
|
||||
data-show-fullscreen="true"
|
||||
data-show-refresh="true"
|
||||
data-sort-order="desc"
|
||||
data-sort-name="created_at"
|
||||
data-show-export="true"
|
||||
data-export-options='{
|
||||
"fileName": "export-location-asset-{{ $location->id }}-history",
|
||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
||||
}'
|
||||
|
||||
data-url="{{ route('api.activity.index', ['target_id' => $location->id, 'target_type' => 'location']) }}"
|
||||
data-cookie-id-table="assetHistory"
|
||||
data-cookie="true">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-visible="true" data-field="icon" style="width: 40px;" class="hidden-xs" data-formatter="iconFormatter">{{ trans('admin/hardware/table.icon') }}</th>
|
||||
<th class="col-sm-2" data-visible="true" data-field="action_date" data-formatter="dateDisplayFormatter">{{ trans('general.date') }}</th>
|
||||
<th class="col-sm-1" data-visible="true" data-field="admin" data-formatter="usersLinkObjFormatter">{{ trans('general.admin') }}</th>
|
||||
<th class="col-sm-1" data-visible="true" data-field="action_type">{{ trans('general.action') }}</th>
|
||||
<th class="col-sm-2" data-visible="true" data-field="item" data-formatter="polymorphicItemFormatter">{{ trans('general.item') }}</th>
|
||||
<th class="col-sm-2" data-visible="true" data-field="target" data-formatter="polymorphicItemFormatter">{{ trans('general.target') }}</th>
|
||||
<th class="col-sm-2" data-field="note">{{ trans('general.notes') }}</th>
|
||||
<th class="col-md-3" data-field="signature_file" data-visible="false" data-formatter="imageFormatter">{{ trans('general.signature') }}</th>
|
||||
<th class="col-md-3" data-visible="false" data-field="file" data-visible="false" data-formatter="fileUploadFormatter">{{ trans('general.download') }}</th>
|
||||
<th class="col-sm-2" data-field="log_meta" data-visible="true" data-formatter="changeLogFormatter">{{ trans('admin/hardware/table.changed')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div> <!-- /.row -->
|
||||
</div> <!-- /.tab-pane history -->
|
||||
|
||||
</div><!--/.col-md-9-->
|
||||
</div><!--/.col-md-9-->
|
||||
</div><!--/.col-md-9-->
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="col-md-12">
|
||||
<a href="{{ route('locations.edit', ['location' => $location->id]) }}" style="width: 100%;" class="btn btn-sm btn-primary pull-left">{{ trans('admin/locations/table.update') }} </a>
|
||||
</div>
|
||||
<div class="col-md-12" style="padding-top: 5px;">
|
||||
<a href="{{ route('locations.print_assigned', ['locationId' => $location->id]) }}" style="width: 100%;" class="btn btn-sm btn-default pull-left">{{ trans('admin/locations/table.print_assigned') }} </a>
|
||||
</div>
|
||||
<div class="col-md-12" style="padding-top: 5px; padding-bottom: 20px;">
|
||||
<a href="{{ route('locations.print_all_assigned', ['locationId' => $location->id]) }}" style="width: 100%;" class="btn btn-sm btn-default pull-left">{{ trans('admin/locations/table.print_all_assigned') }} </a>
|
||||
</div>
|
||||
|
||||
|
||||
@if ($location->image!='')
|
||||
<div class="col-md-12 text-center" style="padding-bottom: 20px;">
|
||||
<img src="{{ Storage::disk('public')->url('locations/'.e($location->image)) }}" class="img-responsive img-thumbnail" style="width:100%" alt="{{ $location->name }}">
|
||||
</div>
|
||||
@endif
|
||||
<div class="col-md-12">
|
||||
<ul class="list-unstyled" style="line-height: 25px; padding-bottom: 20px;">
|
||||
@if ($location->address!='')
|
||||
<li>{{ $location->address }}</li>
|
||||
@endif
|
||||
@if ($location->address2!='')
|
||||
<li>{{ $location->address2 }}</li>
|
||||
@endif
|
||||
@if (($location->city!='') || ($location->state!='') || ($location->zip!=''))
|
||||
<li>{{ $location->city }} {{ $location->state }} {{ $location->zip }}</li>
|
||||
@endif
|
||||
@if ($location->manager)
|
||||
<li>{{ trans('admin/users/table.manager') }}: {!! $location->manager->present()->nameUrl() !!}</li>
|
||||
@endif
|
||||
@if ($location->parent)
|
||||
<li>{{ trans('admin/locations/table.parent') }}: {!! $location->parent->present()->nameUrl() !!}</li>
|
||||
@endif
|
||||
@if ($location->ldap_ou)
|
||||
<li>{{ trans('admin/locations/table.ldap_ou') }}: {{ $location->ldap_ou }}</li>
|
||||
@endif
|
||||
</ul>
|
||||
|
||||
@if (($location->state!='') && ($location->country!='') && (config('services.google.maps_api_key')))
|
||||
<div class="col-md-12 text-center">
|
||||
<img src="https://maps.googleapis.com/maps/api/staticmap?markers={{ urlencode($location->address.','.$location->city.' '.$location->state.' '.$location->country.' '.$location->zip) }}&size=700x500&maptype=roadmap&key={{ config('services.google.maps_api_key') }}" class="img-thumbnail" style="width:100%" alt="Map">
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
@include ('partials.bootstrap-table', [
|
||||
'exportFile' => 'locations-export',
|
||||
'search' => true
|
||||
])
|
||||
|
||||
@stop
|
Reference in New Issue
Block a user