A free open source IT asset/license management system
Refactor show/hide info button into blade component
snipef64dfa7f928e
diff --git a/resources/views/accessories/view.blade.php b/resources/views/accessories/view.blade.phpindex 51c5df4ba9..de864994e4 100644--- a/resources/views/accessories/view.blade.php+++ b/resources/views/accessories/view.blade.php@@ -13,7 +13,7 @@@stop@section('header_right')- <i class="fa-regular fa-2x fa-square-caret-right pull-right" id="expand-info-panel-button"></i>+ <x-button.info-panel-toggle/>@endsection{{-- Page content --}}diff --git a/resources/views/blade/button/info-panel-toggle.blade.php b/resources/views/blade/button/info-panel-toggle.blade.phpindex 8cd3f4f2af..8a90fdbc43 100644--- a/resources/views/blade/button/info-panel-toggle.blade.php+++ b/resources/views/blade/button/info-panel-toggle.blade.php@@ -1 +1,19 @@-<i class="fa-regular fa-2x fa-square-caret-right pull-right hidden-xs" id="expand-info-panel-button" data-tooltip="true" title="{{ trans('button.show_hide_info') }}"></i>\ No newline at end of file+@props([+ 'hideOnXs' => false,+])++<button+ type="button"+ id="expand-info-panel-button"+ data-tooltip="true"+ title="{{ trans('button.show_hide_info') }}"+ aria-label="{{ trans('button.show_hide_info') }}"+ style="background: none; border: 0; padding: 0;"+ {{ $attributes->class([+ 'fa-regular',+ 'fa-2x',+ 'fa-square-caret-right',+ 'pull-right',+ 'hidden-xs' => $hideOnXs,+ ]) }}+></button>diff --git a/resources/views/categories/view.blade.php b/resources/views/categories/view.blade.phpindex f13f2a6b01..a4a4687d48 100644--- a/resources/views/categories/view.blade.php+++ b/resources/views/categories/view.blade.php@@ -9,7 +9,7 @@@stop@section('header_right')- <i class="fa-regular fa-2x fa-square-caret-right pull-right" id="expand-info-panel-button" data-tooltip="true" title="{{ trans('button.show_hide_info') }}"></i>+ <x-button.info-panel-toggle/>@endsection{{-- Page content --}}diff --git a/resources/views/companies/view.blade.php b/resources/views/companies/view.blade.phpindex 1043ea5076..625b7d9add 100644--- a/resources/views/companies/view.blade.php+++ b/resources/views/companies/view.blade.php@@ -7,7 +7,7 @@@stop@section('header_right')- <i class="fa-regular fa-2x fa-square-caret-right pull-right" id="expand-info-panel-button" data-tooltip="true" title="{{ trans('button.show_hide_info') }}"></i>+ <x-button.info-panel-toggle/>@endsection{{-- Page content --}}diff --git a/resources/views/components/view.blade.php b/resources/views/components/view.blade.phpindex 7629cd0fda..b061ac39b8 100644--- a/resources/views/components/view.blade.php+++ b/resources/views/components/view.blade.php@@ -8,7 +8,7 @@@stop@section('header_right')- <i class="fa-regular fa-2x fa-square-caret-right pull-right" id="expand-info-panel-button" data-tooltip="true" title="{{ trans('button.show_hide_info') }}"></i>+ <x-button.info-panel-toggle/>@endsection@section('content')diff --git a/resources/views/consumables/view.blade.php b/resources/views/consumables/view.blade.phpindex 62fad7e864..2bceb13735 100644--- a/resources/views/consumables/view.blade.php+++ b/resources/views/consumables/view.blade.php@@ -9,7 +9,7 @@@endsection@section('header_right')- <i class="fa-regular fa-2x fa-square-caret-right pull-right" id="expand-info-panel-button" data-tooltip="true" title="{{ trans('button.show_hide_info') }}"></i>+ <x-button.info-panel-toggle/>@endsection{{-- Page content --}}diff --git a/resources/views/departments/view.blade.php b/resources/views/departments/view.blade.phpindex bd630dbab7..6d7b8b4bad 100644--- a/resources/views/departments/view.blade.php+++ b/resources/views/departments/view.blade.php@@ -9,7 +9,7 @@@stop@section('header_right')- <i class="fa-regular fa-2x fa-square-caret-right pull-right" id="expand-info-panel-button" data-tooltip="true" title="{{ trans('button.show_hide_info') }}"></i>+ <x-button.info-panel-toggle/>@endsection{{-- Page content --}}diff --git a/resources/views/depreciations/view.blade.php b/resources/views/depreciations/view.blade.phpindex 220a3817bd..de9ef465cd 100644--- a/resources/views/depreciations/view.blade.php+++ b/resources/views/depreciations/view.blade.php@@ -9,7 +9,7 @@@stop@section('header_right')- <i class="fa-regular fa-2x fa-square-caret-right pull-right" id="expand-info-panel-button" data-tooltip="true" title="{{ trans('button.show_hide_info') }}"></i>+ <x-button.info-panel-toggle/>@endsection{{-- Page content --}}diff --git a/resources/views/groups/view.blade.php b/resources/views/groups/view.blade.phpindex 5319363c42..9d8811dfa8 100644--- a/resources/views/groups/view.blade.php+++ b/resources/views/groups/view.blade.php@@ -7,7 +7,7 @@@stop@section('header_right')- <i class="fa-regular fa-2x fa-square-caret-right pull-right" id="expand-info-panel-button" data-tooltip="true" title="{{ trans('button.show_hide_info') }}"></i>+ <x-button.info-panel-toggle/>@endsection{{-- Page content --}}diff --git a/resources/views/hardware/view.blade.php b/resources/views/hardware/view.blade.phpindex 6a4bf3f595..4f95e22a4c 100755--- a/resources/views/hardware/view.blade.php+++ b/resources/views/hardware/view.blade.php@@ -7,7 +7,7 @@@stop@section('header_right')- <x-button.info-panel-toggle/>+ <x-button.info-panel-toggle hide-on-xs/>@endsection{{-- Page content --}}diff --git a/resources/views/licenses/view.blade.php b/resources/views/licenses/view.blade.phpindex 54b61397ce..ee95bbc814 100755--- a/resources/views/licenses/view.blade.php+++ b/resources/views/licenses/view.blade.php@@ -8,7 +8,7 @@@stop@section('header_right')- <i class="fa-regular fa-2x fa-square-caret-right pull-right" id="expand-info-panel-button" data-tooltip="true" title="{{ trans('button.show_hide_info') }}"></i>+ <x-button.info-panel-toggle/>@endsection{{-- Page content --}}diff --git a/resources/views/locations/view.blade.php b/resources/views/locations/view.blade.phpindex bbfe3ee601..4f65c4adf4 100644--- a/resources/views/locations/view.blade.php+++ b/resources/views/locations/view.blade.php@@ -10,7 +10,7 @@@stop@section('header_right')- <i class="fa-regular fa-2x fa-square-caret-right pull-right" id="expand-info-panel-button" data-tooltip="true" title="{{ trans('button.show_hide_info') }}"></i>+ <x-button.info-panel-toggle/>@endsectiondiff --git a/resources/views/maintenances/view.blade.php b/resources/views/maintenances/view.blade.phpindex e12b8ee919..f8bbfe0510 100644--- a/resources/views/maintenances/view.blade.php+++ b/resources/views/maintenances/view.blade.php@@ -10,7 +10,7 @@ use Carbon\Carbon;@stop@section('header_right')- <i class="fa-regular fa-2x fa-square-caret-right pull-right" id="expand-info-panel-button" data-tooltip="true" title="{{ trans('button.show_hide_info') }}"></i>+ <x-button.info-panel-toggle/>@endsection{{-- Page content --}}diff --git a/resources/views/manufacturers/view.blade.php b/resources/views/manufacturers/view.blade.phpindex 5b232217cd..b28c7750d2 100644--- a/resources/views/manufacturers/view.blade.php+++ b/resources/views/manufacturers/view.blade.php@@ -9,7 +9,7 @@@stop@section('header_right')- <i class="fa-regular fa-2x fa-square-caret-right pull-right" id="expand-info-panel-button" data-tooltip="true" title="{{ trans('button.show_hide_info') }}"></i>+ <x-button.info-panel-toggle/>@endsection@section('content')diff --git a/resources/views/models/view.blade.php b/resources/views/models/view.blade.phpindex 611fc82301..83fdb6af64 100755--- a/resources/views/models/view.blade.php+++ b/resources/views/models/view.blade.php@@ -8,7 +8,7 @@@stop@section('header_right')- <i class="fa-regular fa-2x fa-square-caret-right pull-right" id="expand-info-panel-button" data-tooltip="true" title="{{ trans('button.show_hide_info') }}"></i>+ <x-button.info-panel-toggle/>@endsection{{-- Page content --}}diff --git a/resources/views/statuslabels/view.blade.php b/resources/views/statuslabels/view.blade.phpindex 37538eb531..e3f20b113a 100644--- a/resources/views/statuslabels/view.blade.php+++ b/resources/views/statuslabels/view.blade.php@@ -6,7 +6,7 @@@stop@section('header_right')- <i class="fa-regular fa-2x fa-square-caret-right pull-right" id="expand-info-panel-button" data-tooltip="true" title="{{ trans('button.show_hide_info') }}"></i>+ <x-button.info-panel-toggle/>@endsection{{-- Page content --}}diff --git a/resources/views/suppliers/view.blade.php b/resources/views/suppliers/view.blade.phpindex 7693385f22..cb4ad1f57d 100755--- a/resources/views/suppliers/view.blade.php+++ b/resources/views/suppliers/view.blade.php@@ -10,7 +10,7 @@@stop@section('header_right')- <i class="fa-regular fa-2x fa-square-caret-right pull-right" id="expand-info-panel-button" data-tooltip="true" title="{{ trans('button.show_hide_info') }}"></i>+ <x-button.info-panel-toggle/>@endsection{{-- Page content --}}diff --git a/resources/views/users/view.blade.php b/resources/views/users/view.blade.phpindex 66f9b269b5..2de1832c08 100755--- a/resources/views/users/view.blade.php+++ b/resources/views/users/view.blade.php@@ -7,7 +7,7 @@@stop@section('header_right')- <x-button.info-panel-toggle/>+ <x-button.info-panel-toggle hide-on-xs/>@endsection{{-- Page content --}}