From aba1d7be29f2caa46971b4995be9dfec5b76e2d6 Mon Sep 17 00:00:00 2001 From: snipe Date: Mon, 17 Aug 2026 14:41:48 +0100 Subject: [PATCH] Moved edit template into sidenav, moved JS into snipeit.js --- .../views/reports/custom/asset.blade.php | 246 ++++-------------- .../views/reports/custom/component.blade.php | 226 +++------------- 2 files changed, 94 insertions(+), 378 deletions(-) diff --git a/resources/views/reports/custom/asset.blade.php b/resources/views/reports/custom/asset.blade.php index 67774b1b21..e5548c6c4a 100644 --- a/resources/views/reports/custom/asset.blade.php +++ b/resources/views/reports/custom/asset.blade.php @@ -47,43 +47,13 @@
- @if (request()->routeIs('reports/custom', 'report-templates.show')) -

+

+ @if (request()->routeIs('report-templates.edit')) + {{ trans('general.customize_report') }}: {{ $template->name }} + @else {{ trans('general.customize_report') }} -

- - @endif - - @if (request()->routeIs('report-templates.edit')) -
- -
- - -
- @if ($template->created_by == auth()->id()) -
- -
- @endif -
- @endif + @endif +
@@ -92,7 +62,7 @@
@@ -431,27 +401,6 @@
- -
- - - - @if ($errors->has('purchase_start') || $errors->has('purchase_end')) -
- - -
- @endif - -
@@ -471,11 +420,34 @@
- + +
+ + + + @if ($errors->has('purchase_start') || $errors->has('purchase_end')) +
+ + +
+ @endif + +
+ + +
-
- - {{ trans('general.days_ago') }} -
+
+ + {{ trans('general.days_ago') }} +
@if ($errors->has('last_updated_before'))
@@ -740,139 +712,25 @@
- + @endunless
- @if (! request()->routeIs('report-templates.edit')) - -
-
- -
- @if($template->name) - @if($template->created_by == auth()->id()) - {!! ($template->is_shared ? ''." ".(trans('admin/reports/general.template_shared_with_others')) : ''." ".(trans('admin/reports/general.template_not_shared')) )!!} - @else - {!! ($template->is_shared ? ''." ".(trans('admin/reports/general.template_shared')) : ''." ".(trans('admin/reports/general.template_not_shared')) )!!} - @endif - @endif -
- - - @if($template->created_by == auth()->id()) - @if (request()->routeIs('report-templates.show')) - - - {{ trans('general.update') }} - - - - - {{ trans('general.delete') }} - - - @endif - @endif -
-
- @endif - @if (request()->routeIs('reports/custom')) -
-
-
- @csrf - -
- - - -
- -
-
-
-
-

{{ trans('admin/reports/message.about_templates') }}

-
-
-

{!! trans('admin/reports/message.saving_templates_description') !!}

-
-
- @endif +
@stop - -@section('moar_scripts') - -@stop diff --git a/resources/views/reports/custom/component.blade.php b/resources/views/reports/custom/component.blade.php index 74ed020f03..c0bad6252f 100644 --- a/resources/views/reports/custom/component.blade.php +++ b/resources/views/reports/custom/component.blade.php @@ -47,43 +47,13 @@
- @if (request()->routeIs('reports.custom.component', 'report-templates.show')) -

+

+ @if (request()->routeIs('report-templates.edit')) + {{ trans('general.customize_report') }}: {{ $template->name }} + @else {{ trans('general.customize_report') }} -

- - @endif - - @if (request()->routeIs('report-templates.edit')) -
- -
- - -
- @if ($template->created_by == auth()->id()) -
- -
- @endif -
- @endif + @endif +
@@ -92,7 +62,7 @@
@@ -278,27 +248,6 @@
- -
- - - - @if ($errors->has('purchase_start') || $errors->has('purchase_end')) -
- - -
- @endif -
-
@@ -350,11 +299,32 @@ @endif
+ +
+ + + + @if ($errors->has('purchase_start') || $errors->has('purchase_end')) +
+ + +
+ @endif +
+
-
+
- {{ trans('general.days_ago') }} + {{ trans('general.days_ago') }}
@if ($errors->has('last_updated_before')) @@ -447,138 +417,26 @@
- + @endunless
- @if (! request()->routeIs('report-templates.edit')) - - -
-
- -
- @if($template->name) - @if($template->created_by == auth()->id()) - {!! ($template->is_shared ? ''." ".(trans('admin/reports/general.template_shared_with_others')) : ''." ".(trans('admin/reports/general.template_not_shared')) )!!} - @else - {!! ($template->is_shared ? ''." ".(trans('admin/reports/general.template_shared')) : ''." ".(trans('admin/reports/general.template_not_shared')) )!!} - @endif - @endif -
- - - @if($template->created_by == auth()->id()) - @if (request()->routeIs('report-templates.show')) - - - {{ trans('general.update') }} - - - - - {{ trans('general.delete') }} - - - @endif - @endif -
-
- @endif - @if (request()->routeIs('reports/custom', 'reports.custom.component')) -
-
-
- @csrf - -
- - - -
- -
-
-
-
-

{{ trans('admin/reports/message.about_templates') }}

-
-
-

{!! trans('admin/reports/message.saving_templates_description') !!}

-
-
- @endif +
@stop -@section('moar_scripts') - -@stop