Skip to content

A free open source IT asset/license management system

Fixed markdown in expiring licenses alert

snipeb12de1304187
diff --git a/resources/views/notifications/markdown/report-expiring-licenses.blade.php b/resources/views/notifications/markdown/report-expiring-licenses.blade.php
index 2df4dbb3a1..f403ef4a94 100644
--- a/resources/views/notifications/markdown/report-expiring-licenses.blade.php
+++ b/resources/views/notifications/markdown/report-expiring-licenses.blade.php
@@ -1,22 +1,17 @@
@component('mail::message')
-
- {{ trans_choice('mail.license_expiring_alert', $licenses->count(), ['count'=>$licenses->count(), 'threshold' => $threshold]) }}
-
+{{ trans_choice('mail.license_expiring_alert', $licenses->count(), ['count'=>$licenses->count(), 'threshold' => $threshold]) }}
@component('mail::table')
-| |{{ trans('mail.name') }} |{{ trans('mail.expires') }} |{{ trans('mail.Days') }}
-| |:------------- |:-------------|:-------------|
+
+<table width="100%">
+<tr><td>&nbsp;</td><td>{{ trans('mail.name') }}</td><td>{{ trans('mail.Days') }}</td><td>{{ trans('mail.expires') }}</td></tr>
@foreach ($licenses as $license)
@php
$expires = \App\Helpers\Helper::getFormattedDateObject($license->expiration_date, 'date');
$diff = round(abs(strtotime($license->expiration_date->format('Y-m-d')) - strtotime(date('Y-m-d')))/86400);
-
$icon = ($diff <= ($threshold / 2)) ? '🚨' : (($diff <= $threshold) ? '⚠️' : ' ');
-
-
@endphp
-|{{ $icon }}| [{{ $license->name }}]({{ route('licenses.show', $license->id) }}) | {{ $expires['formatted'] }} | {{ $diff }} {{ trans('mail.Days') }}
+ <tr><td>{{ $icon }} </td><td> <a href="{{ route('license.show', $license->id) }}">{{ $license->name }}</a> </td><td> {{ $diff }} {{ trans('mail.Days') }} </td><td>{{ $expires['formatted'] }}</td></tr>
@endforeach
+</table>
@endcomponent
-
-
-@endcomponent
+@endcomponent
\ No newline at end of file