A free open source IT asset/license management system
Added sr-only on non-tabbed tables
snipe90fcd8f59537
diff --git a/resources/views/accessories/index.blade.php b/resources/views/accessories/index.blade.phpindex 9de6e76c41..c53bd9f186 100755--- a/resources/views/accessories/index.blade.php+++ b/resources/views/accessories/index.blade.php@@ -10,7 +10,7 @@{{-- Page content --}}@section('content')<x-container>- <x-box name="accessory">+ <x-box name="accessories" sr_only_title><x-table.accessories name="accessories" :route="route('api.accessories.index')" fixed_right_number="3" /></x-box><x-shiftclick/>diff --git a/resources/views/blade/box/index.blade.php b/resources/views/blade/box/index.blade.phpindex f71d4972ee..8d89596cdc 100644--- a/resources/views/blade/box/index.blade.php+++ b/resources/views/blade/box/index.blade.php@@ -2,6 +2,7 @@'box_style' => 'default','header' => false,'top_submit' => false,+ 'sr_only_title' => false,])@aware(['name', 'route'])@@ -41,7 +42,9 @@<div class="box-body">@if (isset($table_header))- <h3 class="box-title{{ (!isset($bulkactions)) ? ' pull-left' : '' }}">+ <h3+ @if ($name) id="{{ $name }}-title" @endif+ class="{{ $sr_only_title ? 'sr-only' : 'box-title'.((!isset($bulkactions)) ? ' pull-left' : '') }}">{{ $table_header }}</h3>@endifdiff --git a/resources/views/blade/table/accessories.blade.php b/resources/views/blade/table/accessories.blade.phpindex f7d6112031..e4af6c0a25 100644--- a/resources/views/blade/table/accessories.blade.php+++ b/resources/views/blade/table/accessories.blade.php@@ -5,6 +5,7 @@'fixed_right_number' => 2,'fixed_number' => 2,'table_header' => trans('general.accessories'),+ 'export_name' => null,])@aware(['name'])@@ -28,7 +29,7 @@show_advanced_search="true"buttons="accessoryButtons"api_url="{{ $route }}"- export_filename="export-{{ str_slug($name) }}-accessories-{{ date('Y-m-d') }}"+ export_filename="export-{{ $export_name ? str_slug($export_name).'-' : '' }}accessories-{{ date('Y-m-d') }}"/>@endcandiff --git a/resources/views/blade/table/assets.blade.php b/resources/views/blade/table/assets.blade.phpindex 0fe283e843..ca2631bd7a 100644--- a/resources/views/blade/table/assets.blade.php+++ b/resources/views/blade/table/assets.blade.php@@ -5,6 +5,7 @@'fixed_number' => 3,'table_header' => trans('general.assets'),'status_type' => null,+ 'export_name' => null,])@aware(['name'])@@ -29,7 +30,7 @@show_advanced_search="true"buttons="assetButtons"api_url="{{ $route }}"- export_filename="export-{{ str_slug($name) }}-assets-{{ date('Y-m-d') }}"+ export_filename="export-{{ $export_name ? str_slug($export_name).'-' : '' }}assets-{{ date('Y-m-d') }}"/>@endcandiff --git a/resources/views/blade/table/bulk-accessories.blade.php b/resources/views/blade/table/bulk-accessories.blade.phpindex 0b2d3fe4c9..6a05338c11 100644--- a/resources/views/blade/table/bulk-accessories.blade.php+++ b/resources/views/blade/table/bulk-accessories.blade.php@@ -1,6 +1,6 @@@can('delete', \App\Models\Accessory::class)<x-table.bulk-actions- name="accessory"+ name="accessories":action_route="route('accessories.bulk.delete')"model_name="accessory":actions="[diff --git a/resources/views/blade/table/components.blade.php b/resources/views/blade/table/components.blade.phpindex 8f45d6a779..d752516373 100644--- a/resources/views/blade/table/components.blade.php+++ b/resources/views/blade/table/components.blade.php@@ -5,8 +5,11 @@'fixed_right_number' => 2,'fixed_number' => 1,'table_header' => trans('general.components'),+ 'export_name' => null,])+@aware(['name'])+<!-- start components tab pane -->@can('view', \App\Models\Component::class)@@ -23,7 +26,7 @@show_advanced_search="true"buttons="componentButtons"api_url="{{ $route }}"- export_filename="export-{{ str_slug($name) }}-components-{{ date('Y-m-d') }}"+ export_filename="export-{{ $export_name ? str_slug($export_name).'-' : '' }}components-{{ date('Y-m-d') }}"/>@endcandiff --git a/resources/views/blade/table/consumables.blade.php b/resources/views/blade/table/consumables.blade.phpindex 1446296bca..505d253fc1 100644--- a/resources/views/blade/table/consumables.blade.php+++ b/resources/views/blade/table/consumables.blade.php@@ -5,8 +5,11 @@'fixed_right_number' => 2,'fixed_number' => 1,'table_header' => trans('general.consumables'),+ 'export_name' => null,])+@aware(['name'])+<!-- start consumables tab pane -->@can('view', \App\Models\Consumable::class)@@ -22,7 +25,7 @@show_advanced_search="true"buttons="consumableButtons"api_url="{{ $route }}"- export_filename="export-{{ str_slug($name) }}-consumables-{{ date('Y-m-d') }}"+ export_filename="export-{{ $export_name ? str_slug($export_name).'-' : '' }}consumables-{{ date('Y-m-d') }}"/>@endcandiff --git a/resources/views/blade/table/index.blade.php b/resources/views/blade/table/index.blade.phpindex 3d4c8b6b86..c3218b71a0 100644--- a/resources/views/blade/table/index.blade.php+++ b/resources/views/blade/table/index.blade.php@@ -10,10 +10,19 @@'fixed_right_number' => null,'sort_order' => 'asc','sort_field' => 'name',+ 'aria_labelledby' => null,])@aware(['name'])+{{-- Automatically determine aria-labelledby from the enclosing box or tab-pane's+ box-title h3 id. Both containers output id="{name}-title" when name is+ set, so any table underneath can programmatically pair with it without+ us having to remember to add it. --}}+@php+ $aria_labelledby ??= ($name && $name !== 'default') ? $name.'-title' : null;+@endphp+{{-- fixed_number / fixed_right_number pin the first / last N columnsvia CSS position:sticky (snipe-table--sticky-*-N in overrides.less).The bootstrap-table fixed-columns feature that used to handle this@@ -22,6 +31,7 @@height with long-content rows. --}}<tablerole="table"+ @if ($aria_labelledby) aria-labelledby="{{ $aria_labelledby }}" @endif@class(['table', 'table-striped', 'snipe-table','snipe-table--sticky-right-' . $fixed_right_number => (bool) $fixed_right_number,diff --git a/resources/views/blade/table/licenses.blade.php b/resources/views/blade/table/licenses.blade.phpindex 3d88032e76..59c06a695c 100644--- a/resources/views/blade/table/licenses.blade.php+++ b/resources/views/blade/table/licenses.blade.php@@ -11,6 +11,8 @@'table_header' => trans('general.licenses'),])+@aware(['name'])+<!-- start licenses tab pane -->@can('view', \App\Models\License::class)@@ -28,7 +30,7 @@:$show_advanced_searchbuttons="licenseButtons"api_url="{{ $route }}"- export_filename="export-{{ str_slug($export_name ?? $name) }}-licenses-{{ date('Y-m-d') }}"+ export_filename="export-{{ $export_name ? str_slug($export_name).'-' : '' }}licenses-{{ date('Y-m-d') }}"/>diff --git a/resources/views/blade/table/locations.blade.php b/resources/views/blade/table/locations.blade.phpindex c4e25dd0be..6a8caf1d56 100644--- a/resources/views/blade/table/locations.blade.php+++ b/resources/views/blade/table/locations.blade.php@@ -4,16 +4,22 @@'presenter' => \App\Presenters\LocationPresenter::dataTableLayout(),'fixed_right_number' => 1,'table_header' => trans('general.locations'),+ 'export_name' => null,])+@aware(['name'])+<!-- start locations tab pane -->@can('view', \App\Models\Location::class)+ <x-slot:table_header>+ {{ $table_header }}+ </x-slot:table_header><x-slot:bulkactions><x-table.bulk-locations /></x-slot:bulkactions>-+<x-table:$presenter:$fixed_right_number@@ -21,7 +27,7 @@show_advanced_search="false"buttons="locationButtons"api_url="{{ $route }}"- export_filename="export-{{ str_slug($name) }}-locations-{{ date('Y-m-d') }}"+ export_filename="export-{{ $export_name ? str_slug($export_name).'-' : '' }}locations-{{ date('Y-m-d') }}"/>diff --git a/resources/views/blade/table/models.blade.php b/resources/views/blade/table/models.blade.phpindex 0056458883..12d6fbec4a 100644--- a/resources/views/blade/table/models.blade.php+++ b/resources/views/blade/table/models.blade.php@@ -7,6 +7,8 @@'table_header' => trans('general.asset_models'),])+@aware(['name'])+<!-- start assets tab pane -->@can('view', \App\Models\AssetModel::class)<x-slot:table_header>diff --git a/resources/views/blade/table/users.blade.php b/resources/views/blade/table/users.blade.phpindex e29675e468..765468c124 100644--- a/resources/views/blade/table/users.blade.php+++ b/resources/views/blade/table/users.blade.php@@ -7,6 +7,8 @@'table_header' => trans('general.users'),])+@aware(['name'])+<!-- start assets tab pane -->@can('view', \App\Models\User::class)<x-slot:table_header>diff --git a/resources/views/blade/tabs/pane.blade.php b/resources/views/blade/tabs/pane.blade.phpindex f2b751ebda..e9c795aa0f 100644--- a/resources/views/blade/tabs/pane.blade.php+++ b/resources/views/blade/tabs/pane.blade.php@@ -9,7 +9,9 @@<div class="row"><div class="col-md-12">@if (isset($table_header))- <h3 class="box-title{{ (!isset($bulkactions)) ? ' pull-left' : '' }}">+ <h3+ @if ($name) id="{{ $name }}-title" @endif+ class="box-title{{ (!isset($bulkactions)) ? ' pull-left' : '' }}">{{ $table_header }}</h3>@endifdiff --git a/resources/views/categories/index.blade.php b/resources/views/categories/index.blade.phpindex 0a09a32b88..a216dfb74b 100755--- a/resources/views/categories/index.blade.php+++ b/resources/views/categories/index.blade.php@@ -10,7 +10,9 @@{{-- Page content --}}@section('content')<x-container>- <x-box>+ <x-box name="category" sr_only_title>++ <x-slot:table_header>{{ trans('general.categories') }}</x-slot:table_header><x-slot:bulkactions><x-table.bulk-categories />diff --git a/resources/views/companies/index.blade.php b/resources/views/companies/index.blade.phpindex 0495e2db14..006d098aac 100644--- a/resources/views/companies/index.blade.php+++ b/resources/views/companies/index.blade.php@@ -9,7 +9,9 @@{{-- Page content --}}@section('content')<x-container>- <x-box>+ <x-box name="company" sr_only_title>++ <x-slot:table_header>{{ trans('general.companies') }}</x-slot:table_header><x-slot:bulkactions><x-table.bulk-companies />diff --git a/resources/views/components/index.blade.php b/resources/views/components/index.blade.phpindex b0ee70c556..d90ba97eb0 100644--- a/resources/views/components/index.blade.php+++ b/resources/views/components/index.blade.php@@ -10,7 +10,7 @@{{-- Page content --}}@section('content')<x-container>- <x-box>+ <x-box name="components" sr_only_title><x-table.components :route="route('api.components.index')" /></x-box></x-container>diff --git a/resources/views/consumables/index.blade.php b/resources/views/consumables/index.blade.phpindex bce613f17e..c9bf6f0ad0 100644--- a/resources/views/consumables/index.blade.php+++ b/resources/views/consumables/index.blade.php@@ -9,7 +9,7 @@{{-- Page content --}}@section('content')<x-container>- <x-box>+ <x-box name="consumables" sr_only_title><x-table.consumables :route="route('api.consumables.index')" /></x-box></x-container>diff --git a/resources/views/departments/index.blade.php b/resources/views/departments/index.blade.phpindex 24eab85afc..6c0bf28ee0 100644--- a/resources/views/departments/index.blade.php+++ b/resources/views/departments/index.blade.php@@ -9,7 +9,9 @@{{-- Page content --}}@section('content')<x-container>- <x-box name="department">+ <x-box name="department" sr_only_title>++ <x-slot:table_header>{{ trans('general.departments') }}</x-slot:table_header><x-slot:bulkactions><x-table.bulk-departments />diff --git a/resources/views/depreciations/index.blade.php b/resources/views/depreciations/index.blade.phpindex 9703c7f2f4..002b511c1a 100755--- a/resources/views/depreciations/index.blade.php+++ b/resources/views/depreciations/index.blade.php@@ -10,7 +10,9 @@{{-- Page content --}}@section('content')<x-container>- <x-box name="depreciation">+ <x-box name="depreciation" sr_only_title>++ <x-slot:table_header>{{ trans('general.depreciations') }}</x-slot:table_header><x-slot:bulkactions><x-table.bulk-depreciations />diff --git a/resources/views/groups/index.blade.php b/resources/views/groups/index.blade.phpindex 25a5b3cd20..94abe90933 100755--- a/resources/views/groups/index.blade.php+++ b/resources/views/groups/index.blade.php@@ -12,7 +12,9 @@{{-- Page content --}}@section('content')<x-container>- <x-box>+ <x-box name="groups" sr_only_title>++ <x-slot:table_header>{{ trans('general.groups') }}</x-slot:table_header><x-tablename="groups"diff --git a/resources/views/hardware/index.blade.php b/resources/views/hardware/index.blade.phpindex d766d612a0..0f4fd861be 100755--- a/resources/views/hardware/index.blade.php+++ b/resources/views/hardware/index.blade.php@@ -54,7 +54,7 @@{{-- Page content --}}@section('content')<x-container>- <x-box name="assets">+ <x-box name="assets" sr_only_title><x-table.assets:route="route('api.assets.index', array('status_type' => is_scalar($requestStatusType) ? $requestStatusType : null,diff --git a/resources/views/hardware/requested.blade.php b/resources/views/hardware/requested.blade.phpindex 7848cfdecc..7fe0b1e938 100644--- a/resources/views/hardware/requested.blade.php+++ b/resources/views/hardware/requested.blade.php@@ -13,7 +13,7 @@{{-- Page content --}}@section('content')<x-container>- <x-box name="checkoutRequests">+ <x-box name="checkoutRequests" sr_only_title><x-slot:table_header>{{ trans('admin/hardware/general.requested') }}</x-slot:table_header>diff --git a/resources/views/kits/index.blade.php b/resources/views/kits/index.blade.phpindex 7e0134a9b0..bcbdc4da41 100644--- a/resources/views/kits/index.blade.php+++ b/resources/views/kits/index.blade.php@@ -11,7 +11,10 @@{{-- Content --}}@section('content')<x-container>- <x-box name="kits">+ <x-box name="kits" sr_only_title>++ <x-slot:table_header>{{ trans('general.kits') }}</x-slot:table_header>+<x-table:presenter="\App\Presenters\PredefinedKitPresenter::dataTableLayout()":fixed_number="1"diff --git a/resources/views/licenses/index.blade.php b/resources/views/licenses/index.blade.phpindex 7145803f7e..205cc45768 100755--- a/resources/views/licenses/index.blade.php+++ b/resources/views/licenses/index.blade.php@@ -10,7 +10,7 @@{{-- Page content --}}@section('content')<x-container>- <x-box>+ <x-box name="licenses" sr_only_title><x-slot:bulkactions><x-table.bulk-licenses />diff --git a/resources/views/locations/index.blade.php b/resources/views/locations/index.blade.phpindex 75934a4778..0c094abe75 100755--- a/resources/views/locations/index.blade.php+++ b/resources/views/locations/index.blade.php@@ -9,7 +9,7 @@@section('content')<x-container>- <x-box name="locations">+ <x-box name="locations" sr_only_title>{{-- Convert hand-rolled <table> to the shared x-table.locationscomponent so sticky-column CSS (snipe-table--sticky-right-1)is wired the same way as every other list page. Preservesdiff --git a/resources/views/maintenance-types/index.blade.php b/resources/views/maintenance-types/index.blade.phpindex 68f466fe0e..98344f0567 100644--- a/resources/views/maintenance-types/index.blade.php+++ b/resources/views/maintenance-types/index.blade.php@@ -9,7 +9,9 @@{{-- Page content --}}@section('content')<x-container>- <x-box>+ <x-box name="maintenancetype" sr_only_title>++ <x-slot:table_header>{{ trans('admin/maintenance_types/general.maintenance_types') }}</x-slot:table_header><x-slot:bulkactions><x-table.bulk-maintenance-types />diff --git a/resources/views/maintenances/index.blade.php b/resources/views/maintenances/index.blade.phpindex 8c3a9808ba..0fa273f36a 100644--- a/resources/views/maintenances/index.blade.php+++ b/resources/views/maintenances/index.blade.php@@ -10,7 +10,7 @@{{-- Page content --}}@section('content')<x-container>- <x-box name="maintenance">+ <x-box name="maintenance" sr_only_title><x-slot:bulkactions><x-table.bulk-maintenancesdiff --git a/resources/views/manufacturers/index.blade.php b/resources/views/manufacturers/index.blade.phpindex ffaae7999e..975b04d059 100755--- a/resources/views/manufacturers/index.blade.php+++ b/resources/views/manufacturers/index.blade.php@@ -9,7 +9,7 @@{{-- Page content --}}@section('content')<x-container>- <x-box>+ <x-box name="manufacturer" sr_only_title>@if ($manufacturer_count == 0)@@ -24,6 +24,8 @@</form>@else+ <x-slot:table_header>{{ trans('admin/manufacturers/table.asset_manufacturers') }}</x-slot:table_header>+<x-slot:bulkactions><x-table.bulk-manufacturers /></x-slot:bulkactions>diff --git a/resources/views/models/index.blade.php b/resources/views/models/index.blade.phpindex 100b80459d..4041ea71ce 100755--- a/resources/views/models/index.blade.php+++ b/resources/views/models/index.blade.php@@ -15,8 +15,9 @@{{-- Page content --}}@section('content')<x-container>- <x-box name="models">+ <x-box name="models" sr_only_title>+ <x-slot:table_header>{{ trans('general.asset_models') }}</x-slot:table_header><x-slot:bulkactions><x-table.bulk-models />diff --git a/resources/views/statuslabels/index.blade.php b/resources/views/statuslabels/index.blade.phpindex 2fbe8e10ae..fb0835bf93 100755--- a/resources/views/statuslabels/index.blade.php+++ b/resources/views/statuslabels/index.blade.php@@ -11,7 +11,9 @@<x-container columns="2"><x-page-column class="col-md-9">- <x-box>+ <x-box name="statuslabel" sr_only_title>++ <x-slot:table_header>{{ trans('admin/statuslabels/table.title') }}</x-slot:table_header><x-slot:bulkactions><x-table.bulk-statuslabels />diff --git a/resources/views/suppliers/index.blade.php b/resources/views/suppliers/index.blade.phpindex 8190bd3146..5734a53c63 100755--- a/resources/views/suppliers/index.blade.php+++ b/resources/views/suppliers/index.blade.php@@ -9,7 +9,9 @@{{-- Page content --}}@section('content')<x-container>- <x-box>+ <x-box name="supplier" sr_only_title>++ <x-slot:table_header>{{ trans('admin/suppliers/table.suppliers') }}</x-slot:table_header><x-slot:bulkactions><x-table.bulk-suppliers />diff --git a/resources/views/users/index.blade.php b/resources/views/users/index.blade.phpindex d8921dc4a0..414af8fe8b 100755--- a/resources/views/users/index.blade.php+++ b/resources/views/users/index.blade.php@@ -29,7 +29,7 @@{{-- Page content --}}@section('content')<x-container>- <x-box>+ <x-box name="users" sr_only_title><x-table.users :route="route('api.users.index',['status' => is_scalar(request('status')) ? request('status') : null,