Skip to content

A free open source IT asset/license management system

Moved to new component structure

snipee7f70ccd1f2f
diff --git a/resources/views/accessories/index.blade.php b/resources/views/accessories/index.blade.php
index 1bc038662e..5f67633828 100755
--- a/resources/views/accessories/index.blade.php
+++ b/resources/views/accessories/index.blade.php
@@ -9,37 +9,25 @@
{{-- Page content --}}
@section('content')
-
-<div class="row">
- <div class="col-md-12">
-
- <div class="box box-default">
- <div class="box-body">
-
- <table
- data-columns="{{ \App\Presenters\AccessoryPresenter::dataTableLayout() }}"
- data-cookie-id-table="accessoriesTable"
- data-id-table="accessoriesTable"
- data-side-pagination="server"
- data-show-footer="true"
- data-sort-order="asc"
- data-footer-style="footerStyle"
- id="accessoriesTable"
- data-buttons="accessoryButtons"
- class="table table-striped snipe-table"
- data-url="{{route('api.accessories.index') }}"
- data-export-options='{
- "fileName": "export-accessories-{{ date('Y-m-d') }}",
- "ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
- }'>
- </table>
- </div>
- </div>
- </div>
-</div>
-
+ <x-container>
+ <x-box>
+
+ <x-table
+ show_column_search="false"
+ show_footer="true"
+ buttons="accessoryButtons"
+ fixed_right_number="2"
+ fixed_number="1"
+ api_url="{{ route('api.accessories.index') }}"
+ :presenter="\App\Presenters\AccessoryPresenter::dataTableLayout()"
+ export_filename="export-accessories-{{ date('Y-m-d') }}"
+ />
+
+ </x-box>
+ </x-container>
@stop
+
@section('moar_scripts')
@include ('partials.bootstrap-table')
@stop
diff --git a/resources/views/categories/index.blade.php b/resources/views/categories/index.blade.php
index 4e39def44d..9f8754eef6 100755
--- a/resources/views/categories/index.blade.php
+++ b/resources/views/categories/index.blade.php
@@ -6,46 +6,34 @@
@parent
@stop
+
{{-- Page content --}}
@section('content')
<x-container>
<x-box>
- <x-tables.bulk-actions
- id_divname='categoriesBulkEditToolbar'
- action_route="{{route('categories.bulk.delete')}}"
- id_formname="categoriesBulkForm"
- id_button="bulkCategoryEditButton"
- model_name="category"
- >
- @can('delete', App\Models\Category::class)
- <option>Delete</option>
- @endcan
- </x-tables.bulk-actions>
+ <x-table.bulk-actions
+ id_divname='categoriesBulkEditToolbar'
+ action_route="{{route('categories.bulk.delete')}}"
+ id_formname="categoriesBulkForm"
+ id_button="bulkCategoryEditButton"
+ model_name="category"
+ >
+ @can('delete', App\Models\Category::class)
+ <option>Delete</option>
+ @endcan
+ </x-table.bulk-actions>
- <table
- data-columns="{{ \App\Presenters\CategoryPresenter::dataTableLayout() }}"
- data-cookie-id-table="categoryTable"
- data-id-table="categoryTable"
- data-side-pagination="server"
- data-sort-order="asc"
- id="categoryTable"
- {{-- begin stuff for bulk dropdown --}}
- data-toolbar="#categoriesBulkEditToolbar"
- data-bulk-button-id="#bulkCategoryEditButton"
- data-bulk-form-id="#categoriesBulkForm"
- {{-- end stuff for bulk dropdown --}}
- data-buttons="categoryButtons"
- class="table table-striped snipe-table"
- data-url="{{ route('api.categories.index') }}"
- data-export-options='{
- "fileName": "export-categories-{{ date('Y-m-d') }}",
- "ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
- }'>
- </table>
+ <x-table
+ buttons="categoryButtons"
+ fixed_right_number="1"
+ fixed_number="1"
+ api_url="{{ route('api.categories.index') }}"
+ :presenter="\App\Presenters\CategoryPresenter::dataTableLayout()"
+ export_filename="export-categories-{{ date('Y-m-d') }}"
+ />
</x-box>
</x-container>
-
@stop
@section('moar_scripts')
diff --git a/resources/views/components/index.blade.php b/resources/views/components/index.blade.php
index 2b3cb88450..2a304457e2 100644
--- a/resources/views/components/index.blade.php
+++ b/resources/views/components/index.blade.php
@@ -9,33 +9,23 @@
{{-- Page content --}}
@section('content')
-<div class="row">
- <div class="col-md-12">
- <div class="box box-default">
- <div class="box-body">
- <table
- data-columns="{{ \App\Presenters\ComponentPresenter::dataTableLayout() }}"
- data-cookie-id-table="componentsTable"
- data-id-table="componentsTable"
- data-side-pagination="server"
- data-footer-style="footerStyle"
- data-show-footer="true"
- data-sort-order="asc"
- data-sort-name="name"
- id="componentsTable"
- data-buttons="componentButtons"
- class="table table-striped snipe-table"
- data-url="{{ route('api.components.index') }}"
- data-export-options='{
- "fileName": "export-components-{{ date('Y-m-d') }}",
- "ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
- }'>
- </table>
- </div><!-- /.box-body -->
- </div><!-- /.box -->
- </div>
-</div>
-
+ <x-container>
+ <x-box>
+
+ <x-table
+ show_column_search="false"
+ show_advanced_search="true"
+ show_footer="true"
+ buttons="componentButtons"
+ fixed_right_number="2"
+ fixed_number="1"
+ api_url="{{ route('api.components.index') }}"
+ :presenter="\App\Presenters\ComponentPresenter::dataTableLayout()"
+ export_filename="export-components-{{ date('Y-m-d') }}"
+ />
+
+ </x-box>
+ </x-container>
@stop
@section('moar_scripts')
diff --git a/resources/views/consumables/index.blade.php b/resources/views/consumables/index.blade.php
index 0706475624..6ccb59049e 100644
--- a/resources/views/consumables/index.blade.php
+++ b/resources/views/consumables/index.blade.php
@@ -11,25 +11,17 @@
<x-container>
<x-box>
- <table
- data-columns="{{ \App\Presenters\ConsumablePresenter::dataTableLayout() }}"
- data-cookie-id-table="consumablesTable"
- data-id-table="consumablesTable"
- data-side-pagination="server"
- data-footer-style="footerStyle"
- data-show-footer="true"
- data-sort-order="asc"
- data-sort-name="name"
- data-toolbar="#toolbar"
- id="consumablesTable"
- data-buttons="consumableButtons"
- class="table table-striped snipe-table"
- data-url="{{ route('api.consumables.index') }}"
- data-export-options='{
- "fileName": "export-consumables-{{ date('Y-m-d') }}",
- "ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
- }'>
- </table>
+ <x-table
+ show_column_search="false"
+ show_advanced_search="true"
+ show_footer="true"
+ buttons="consumableButtons"
+ fixed_right_number="2"
+ fixed_number="1"
+ api_url="{{ route('api.consumables.index') }}"
+ :presenter="\App\Presenters\ConsumablePresenter::dataTableLayout()"
+ export_filename="export-consumables-{{ date('Y-m-d') }}"
+ />
</x-box>
</x-container>
diff --git a/resources/views/departments/index.blade.php b/resources/views/departments/index.blade.php
index 3c56cf9730..65249a8d49 100644
--- a/resources/views/departments/index.blade.php
+++ b/resources/views/departments/index.blade.php
@@ -10,29 +10,20 @@
@section('content')
<x-container>
<x-box>
-
- <table
- data-columns="{{ \App\Presenters\DepartmentPresenter::dataTableLayout() }}"
- data-cookie-id-table="departmentsTable"
- data-id-table="departmentsTable"
- data-side-pagination="server"
- data-sort-order="asc"
- id="departmentsTable"
- data-advanced-search="false"
- data-buttons="departmentButtons"
- class="table table-striped snipe-table"
- data-url="{{ route('api.departments.index') }}"
- data-export-options='{
- "fileName": "export-departments-{{ date('Y-m-d') }}",
- "ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
- }'>
- </table>
-
+ <x-table
+ show_column_search="false"
+ buttons="departmentButtons"
+ fixed_right_number="1"
+ fixed_number="1"
+ api_url="{{ route('api.departments.index') }}"
+ :presenter="\App\Presenters\DepartmentPresenter::dataTableLayout()"
+ export_filename="export-departments-{{ date('Y-m-d') }}"
+ />
</x-box>
</x-container>
-
@stop
+
@section('moar_scripts')
@include ('partials.bootstrap-table')
diff --git a/resources/views/depreciations/index.blade.php b/resources/views/depreciations/index.blade.php
index 86365b6e17..d07ec5ed6b 100755
--- a/resources/views/depreciations/index.blade.php
+++ b/resources/views/depreciations/index.blade.php
@@ -6,34 +6,22 @@
@parent
@stop
+
{{-- Page content --}}
@section('content')
<x-container>
-
- <x-page-column>
- <x-box>
- <table
- data-columns="{{ \App\Presenters\DepreciationPresenter::dataTableLayout() }}"
- data-cookie-id-table="depreciationsTable"
- data-id-table="depreciationsTable"
- data-side-pagination="server"
- data-sort-order="asc"
- id="depreciationsTable"
- data-advanced-search="false"
- data-buttons="depreciationButtons"
- class="table table-striped snipe-table"
- data-url="{{ route('api.depreciations.index') }}"
- data-export-options='{
- "fileName": "export-depreciations-{{ date('Y-m-d') }}",
- "ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
- }'>
- </table>
-
- </x-box>
- </x-page-column>
-
+ <x-box>
+ <x-table
+ show_column_search="false"
+ buttons="depreciationButtons"
+ fixed_right_number="1"
+ fixed_number="1"
+ api_url="{{ route('api.depreciations.index') }}"
+ :presenter="\App\Presenters\DepreciationPresenter::dataTableLayout()"
+ export_filename="export-depreciations-{{ date('Y-m-d') }}"
+ />
+ </x-box>
</x-container>
-
@stop
@section('moar_scripts')
diff --git a/resources/views/licenses/index.blade.php b/resources/views/licenses/index.blade.php
index 2793210d0f..919bbb9dcc 100755
--- a/resources/views/licenses/index.blade.php
+++ b/resources/views/licenses/index.blade.php
@@ -12,23 +12,17 @@
<x-container>
<x-box>
- <table
- data-columns="{{ \App\Presenters\LicensePresenter::dataTableLayout() }}"
- data-cookie-id-table="licensesTable"
- data-side-pagination="server"
- data-footer-style="footerStyle"
- data-show-footer="true"
- data-sort-order="asc"
- data-sort-name="name"
- id="licensesTable"
- data-buttons="licenseButtons"
- class="table table-striped snipe-table"
- data-url="{{ route('api.licenses.index', ['status' => e(request('status'))]) }}"
- data-export-options='{
- "fileName": "export-licenses-{{ date('Y-m-d') }}",
- "ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
- }'>
- </table>
+ <x-table
+ show_column_search="false"
+ show_advanced_search="true"
+ show_footer="true"
+ buttons="licenseButtons"
+ fixed_right_number="2"
+ fixed_number="1"
+ api_url="{{ route('api.licenses.index', ['status' => e(request('status'))]) }}"
+ :presenter="\App\Presenters\LicensePresenter::dataTableLayout()"
+ export_filename="export-licenses-{{ date('Y-m-d') }}"
+ />
</x-box>
</x-container>