mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-26 22:19:41 -08:00
fdb5b3baf1
* Allow sorting by months for depreciation list view * Added dataTableLayout to standardize the list display table * Implement the dataTableLayout() on the list view blade * Split the view into tabs so we can combine asset depreciations and license depreciations * Updated depreciation view to use tabbed interface for assets and licenses * Added asset models to depreciation details page * Make asset model category sortable * Added cateory as allowed to be sorted on * Added category sort scope * Removed offset variable * Small fixes to asset modes display in depreciation to bulk edit models
109 lines
4.7 KiB
PHP
Executable file
109 lines
4.7 KiB
PHP
Executable file
@extends('layouts/default')
|
|
|
|
{{-- Page title --}}
|
|
@section('title')
|
|
|
|
@if (Request::get('status')=='deleted')
|
|
{{ trans('admin/models/general.view_deleted') }}
|
|
{{ trans('admin/models/table.title') }}
|
|
@else
|
|
{{ trans('admin/models/general.view_models') }}
|
|
@endif
|
|
@parent
|
|
@stop
|
|
|
|
{{-- Page title --}}
|
|
@section('header_right')
|
|
@can('create', \App\Models\AssetModel::class)
|
|
<a href="{{ route('models.create') }}" class="btn btn-primary pull-right"></i> {{ trans('general.create') }}</a>
|
|
@endcan
|
|
|
|
@if (Request::get('status')=='deleted')
|
|
<a class="btn btn-default pull-right" href="{{ route('models.index') }}" style="margin-right: 5px;">{{ trans('admin/models/general.view_models') }}</a>
|
|
@else
|
|
<a class="btn btn-default pull-right" href="{{ route('models.index', ['status' => 'deleted']) }}" style="margin-right: 5px;">{{ trans('admin/models/general.view_deleted') }}</a>
|
|
@endif
|
|
|
|
@stop
|
|
|
|
|
|
{{-- Page content --}}
|
|
@section('content')
|
|
|
|
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<div class="box box-default">
|
|
<div class="box-body">
|
|
{{ Form::open([
|
|
'method' => 'POST',
|
|
'route' => ['models.bulkedit.index'],
|
|
'class' => 'form-inline',
|
|
'id' => 'bulkForm']) }}
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
|
|
@if (Request::get('status')!='deleted')
|
|
<div id="toolbar">
|
|
<label for="bulk_actions" class="sr-only">Bulk Actions</label>
|
|
<select name="bulk_actions" class="form-control select2" aria-label="bulk_actions" style="width: 300px;">
|
|
<option value="edit">Bulk Edit</option>
|
|
<option value="delete">Bulk Delete</option>
|
|
</select>
|
|
<button class="btn btn-primary" id="bulkEdit" disabled>Go</button>
|
|
</div>
|
|
@endif
|
|
<div class="table-responsive">
|
|
<table
|
|
data-cookie-id-table="modelsTable"
|
|
data-pagination="true"
|
|
data-id-table="modelsTable"
|
|
data-search="true"
|
|
data-side-pagination="server"
|
|
data-show-columns="true"
|
|
data-toolbar="#toolbar"
|
|
data-show-export="true"
|
|
data-show-refresh="true"
|
|
data-sort-order="asc"
|
|
id="modelsTable"
|
|
data-url="{{ route('api.models.index', ['status'=> e(Request::get('status'))]) }}"
|
|
class="table table-striped snipe-table"
|
|
data-export-options='{
|
|
"fileName": "export-asset-models-{{ date('Y-m-d') }}",
|
|
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
|
}'>
|
|
|
|
<thead>
|
|
<tr>
|
|
<th data-checkbox="true" data-field="checkbox"></th>
|
|
<th data-sortable="true" data-field="id" data-visible="false">{{ trans('general.id') }}</th>
|
|
<th data-sortable="true" data-field="name" data-formatter="modelsLinkFormatter">{{ trans('general.name') }}</th>
|
|
<th data-sortable="true" data-field="image" data-formatter="imageFormatter" data-visible="false">{{ trans('admin/hardware/table.image') }}</th>
|
|
<th data-sortable="true" data-field="manufacturer" data-formatter="manufacturersLinkObjFormatter">{{ trans('general.manufacturer') }}</th>
|
|
<th data-sortable="true" data-field="model_number">{{ trans('admin/models/table.modelnumber') }}</th>
|
|
<th data-sortable="true" data-field="assets_count">{{ trans('admin/models/table.numassets') }}</th>
|
|
<th data-sortable="false" data-field="depreciation" data-formatter="depreciationsLinkObjFormatter">{{ trans('general.depreciation') }}</th>
|
|
<th data-sortable="true" data-field="category" data-formatter="categoriesLinkObjFormatter">{{ trans('general.category') }}</th>
|
|
<th data-sortable="true" data-field="eol">{{ trans('general.eol') }}</th>
|
|
<th data-sortable="false" data-field="fieldset" data-formatter="fieldsetsLinkObjFormatter">{{ trans('admin/models/general.fieldset') }}</th>
|
|
<th data-sortable="true" data-field="notes">{{ trans('general.notes') }}</th>
|
|
<th data-switchable="false" data-formatter="modelsActionsFormatter" data-searchable="false" data-sortable="false" data-field="actions">{{ trans('table.actions') }}</th>
|
|
</tr>
|
|
</thead>
|
|
</table>
|
|
{{ Form::close() }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div><!-- /.box-body -->
|
|
</div><!-- /.box -->
|
|
</div>
|
|
</div>
|
|
|
|
@stop
|
|
|
|
@section('moar_scripts')
|
|
@include ('partials.bootstrap-table', ['exportFile' => 'models-export', 'search' => true])
|
|
|
|
@stop
|