Skip to content

A free open source IT asset/license management system

Add asset details

Marcus Moore6ed93f4a4f89
diff --git a/app/Mail/BulkAssetCheckoutMail.php b/app/Mail/BulkAssetCheckoutMail.php
index 2d37b71c30..809dff5cfd 100644
--- a/app/Mail/BulkAssetCheckoutMail.php
+++ b/app/Mail/BulkAssetCheckoutMail.php
@@ -55,7 +55,7 @@ class BulkAssetCheckoutMail extends Mailable
private function getIntroduction(): string
{
// @todo:
- return 'The following assets have been checked out to you:';
+ return 'Assets have been checked out to you.';
}
private function requiresAcceptance(): bool
diff --git a/resources/views/mail/markdown/bulk-asset-checkout-mail.blade.php b/resources/views/mail/markdown/bulk-asset-checkout-mail.blade.php
index e8f1ad1dd9..60b008b0ca 100644
--- a/resources/views/mail/markdown/bulk-asset-checkout-mail.blade.php
+++ b/resources/views/mail/markdown/bulk-asset-checkout-mail.blade.php
@@ -1,13 +1,52 @@
<x-mail::message>
-{{ $introduction }}
-**{{ trans('general.administrator') }}**: {{ $admin->display_name }}
+<style>
+ th, td {
+ vertical-align: top;
+ }
+ hr {
+ display: block;
+ height: 1px;
+ border: 0;
+ border-top: 1px solid #ccc;
+ margin: 1em 0;
+ padding: 0;
+ }
+</style>
+
+{{ $introduction }}
-@if ($requires_acceptance == 1)
+@if ($requires_acceptance)
One or more items require acceptance.<br>
**[✔ Click here to review the terms of use and accept the items]({{ $acceptance_url }})**
@endif
+**{{ trans('general.administrator') }}**: {{ $admin->display_name }}
+
+<x-mail::table>
+| | |
+| ------------- | ------------- |
+@foreach($assets as $asset)
+| **Asset Tag** | <a href="{{ route('hardware.show', $asset->id) }}">{{ $asset->display_name }}</a><br><small>{{trans('mail.serial').': '.$asset->serial}}</small> |
+@if (isset($asset->model?->category))
+| **{{ trans('general.category') }}** | {{ $asset->model->category->name }} |
+@endif
+@if (isset($asset->manufacturer))
+| **{{ trans('general.manufacturer') }}** | {{ $asset->manufacturer->name }} |
+@endif
+@if (isset($asset->model))
+| **{{ trans('general.asset_model') }}** | {{ $asset->model->name }} |
+@endif
+@if ((isset($asset->model?->model_number)))
+| **{{ trans('general.model_no') }}** | {{ $asset->model->model_number }} |
+@endif
+@if (isset($asset->assetstatus))
+| **{{ trans('general.status') }}** | {{ $asset->assetstatus->name }} |
+@endif
+| <hr> | <hr> |
+@endforeach
+</x-mail::table>
+
{{ trans('mail.best_regards') }}<br>
{{ $snipeSettings->site_name }}