@@ -46,7 +46,8 @@ public function content(): Content
4646 markdown: 'mail.markdown.bulk-asset-checkout-mail ' ,
4747 with: [
4848 'introduction ' => $ this ->getIntroduction (),
49- 'requires_acceptance ' => $ this ->requiresAcceptance (),
49+ 'requires_acceptance ' => $ this ->requires_acceptance ,
50+ 'requires_acceptance_wording ' => $ this ->getRequiresAcceptanceWording (),
5051 'acceptance_url ' => $ this ->acceptanceUrl (),
5152 'eula ' => $ this ->getEula (),
5253 ],
@@ -70,7 +71,12 @@ private function getSubject(): string
7071
7172 private function getIntroduction (): string
7273 {
73- if ($ this ->target instanceof Location && $ this ->assets ->count () > 1 ) {
74+ if ($ this ->target instanceof Location) {
75+ if ($ this ->assets ->count () === 1 ) {
76+ // @todo: translate
77+ return "An asset have been checked out to {$ this ->target ->name }. " ;
78+ }
79+
7480 // @todo: translate
7581 return "Assets have been checked out to {$ this ->target ->name }. " ;
7682 }
@@ -129,4 +135,25 @@ private function requiresAcceptance(): bool
129135 fn ($ count , $ asset ) => $ count + $ asset ->requireAcceptance ()
130136 );
131137 }
138+
139+ private function getRequiresAcceptanceWording (): array
140+ {
141+ if (!$ this ->requiresAcceptance ()) {
142+ return [];
143+ }
144+
145+ if ($ this ->assets ->count () > 1 ) {
146+ return [
147+ // todo: translate
148+ 'One or more items require acceptance. ' ,
149+ "**[✔ Click here to review the terms of use and accept the items]( {$ this ->acceptanceUrl ()})** " ,
150+ ];
151+ }
152+
153+ return [
154+ // todo: translate
155+ 'The checked out item requires acceptance. ' ,
156+ "**[✔ Click here to review the terms of use and accept the item]( {$ this ->acceptanceUrl ()})** " ,
157+ ];
158+ }
132159}
0 commit comments