Skip to content

Commit ab8a22f

Browse files
authored
Merge pull request #15630 from marcusmoore/bug/sc-27028
Only show EULA when available on print users page
2 parents 26d7572 + 8c9132a commit ab8a22f

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

resources/views/users/print.blade.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -373,8 +373,11 @@ class="snipe-table table table-striped inventory"
373373
</table>
374374
@endif
375375

376+
@php
377+
if (!empty($eulas)) $eulas = array_unique($eulas);
378+
@endphp
376379
{{-- This may have been render at the top of the page if we're rendering more than one user... --}}
377-
@if (count($users) === 1)
380+
@if (count($users) === 1 && !empty($eulas))
378381
<p></p>
379382
<div class="pull-right">
380383
<button class="btn btn-default hidden-print" type="button" data-toggle="collapse" data-target=".eula-row" aria-expanded="false" aria-controls="eula-row" title="EULAs">
@@ -384,19 +387,16 @@ class="snipe-table table table-striped inventory"
384387
@endif
385388

386389
<table style="margin-top: 80px;">
390+
@if (!empty($eulas))
387391
<tr class="collapse eula-row">
388392
<td style="padding-right: 10px; vertical-align: top; font-weight: bold;">EULA</td>
389393
<td style="padding-right: 10px; vertical-align: top; padding-bottom: 80px;" colspan="3">
390-
@php
391-
if (!empty($eulas)) $eulas = array_unique($eulas);
392-
@endphp
393-
@if (!empty($eulas))
394-
@foreach ($eulas as $key => $eula)
395-
{!! $eula !!}
396-
@endforeach
397-
@endif
394+
@foreach ($eulas as $key => $eula)
395+
{!! $eula !!}
396+
@endforeach
398397
</td>
399398
</tr>
399+
@endif
400400
<tr>
401401
<td style="padding-right: 10px; vertical-align: top; font-weight: bold;">{{ trans('general.signed_off_by') }}:</td>
402402
<td style="padding-right: 10px; vertical-align: top;">______________________________________</td>

0 commit comments

Comments
 (0)