A free open source IT asset/license management system
Improve wording
Marcus Mooreaa014e3706ee
diff --git a/app/Mail/BulkAssetCheckoutMail.php b/app/Mail/BulkAssetCheckoutMail.phpindex 45644c6a2e..08a24e52d7 100644--- a/app/Mail/BulkAssetCheckoutMail.php+++ b/app/Mail/BulkAssetCheckoutMail.php@@ -46,7 +46,8 @@ class BulkAssetCheckoutMail extends Mailablemarkdown: 'mail.markdown.bulk-asset-checkout-mail',with: ['introduction' => $this->getIntroduction(),- 'requires_acceptance' => $this->requiresAcceptance(),+ 'requires_acceptance' => $this->requires_acceptance,+ 'requires_acceptance_wording' => $this->getRequiresAcceptanceWording(),'acceptance_url' => $this->acceptanceUrl(),'eula' => $this->getEula(),],@@ -70,7 +71,12 @@ class BulkAssetCheckoutMail extends Mailableprivate function getIntroduction(): string{- if ($this->target instanceof Location && $this->assets->count() > 1) {+ if ($this->target instanceof Location) {+ if ($this->assets->count() === 1) {+ // @todo: translate+ return "An asset have been checked out to {$this->target->name}.";+ }+// @todo: translatereturn "Assets have been checked out to {$this->target->name}.";}@@ -129,4 +135,25 @@ class BulkAssetCheckoutMail extends Mailablefn($count, $asset) => $count + $asset->requireAcceptance());}++ private function getRequiresAcceptanceWording(): array+ {+ if (!$this->requiresAcceptance()) {+ return [];+ }++ if ($this->assets->count() > 1) {+ return [+ // todo: translate+ 'One or more items require acceptance.',+ "**[✔ Click here to review the terms of use and accept the items]({$this->acceptanceUrl()})**",+ ];+ }++ return [+ // todo: translate+ 'The checked out item requires acceptance.',+ "**[✔ Click here to review the terms of use and accept the item]({$this->acceptanceUrl()})**",+ ];+ }}diff --git a/resources/views/mail/markdown/bulk-asset-checkout-mail.blade.php b/resources/views/mail/markdown/bulk-asset-checkout-mail.blade.phpindex ef479d8b22..97f563dc85 100644--- a/resources/views/mail/markdown/bulk-asset-checkout-mail.blade.php+++ b/resources/views/mail/markdown/bulk-asset-checkout-mail.blade.php@@ -17,8 +17,9 @@{{ $introduction }}@if ($requires_acceptance)-One or more items require acceptance.<br>-**[✔ Click here to review the terms of use and accept the items]({{ $acceptance_url }})**+@foreach($requires_acceptance_wording as $line)+{{ $line }}<br>+@endforeach@endif<hr>