mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Fixed markdown in expiring licenses alert
This commit is contained in:
parent
72126f7d44
commit
b12de13041
|
@ -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> </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
|
Loading…
Reference in a new issue