mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-12 06:17:28 -08:00
Include EULA/acceptance in license interfaces
This commit is contained in:
parent
0476ffecdb
commit
e56a46882d
|
@ -99,12 +99,18 @@ class CheckoutLicenseNotification extends Notification
|
||||||
public function toMail($notifiable)
|
public function toMail($notifiable)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
$eula = method_exists($this->item, 'getEula') ? $this->item->getEula() : '';
|
||||||
|
$req_accept = method_exists($this->item, 'requireAcceptance') ? $this->item->requireAcceptance() : 0;
|
||||||
|
|
||||||
return (new MailMessage)->markdown('notifications.markdown.checkout-license',
|
return (new MailMessage)->markdown('notifications.markdown.checkout-license',
|
||||||
[
|
[
|
||||||
'item' => $this->item,
|
'item' => $this->item,
|
||||||
'admin' => $this->admin,
|
'admin' => $this->admin,
|
||||||
'note' => $this->note,
|
'note' => $this->note,
|
||||||
'target' => $this->target,
|
'target' => $this->target,
|
||||||
|
'eula' => $eula,
|
||||||
|
'req_accept' => $req_accept,
|
||||||
|
'accept_url' => url('/').'/account/accept-asset/'.$this->log_id,
|
||||||
])
|
])
|
||||||
->subject(trans('mail.Confirm_license_delivery'));
|
->subject(trans('mail.Confirm_license_delivery'));
|
||||||
|
|
||||||
|
|
|
@ -45,6 +45,8 @@
|
||||||
<table
|
<table
|
||||||
data-columns="{{ \App\Presenters\LicensePresenter::dataTableLayoutSeats() }}"
|
data-columns="{{ \App\Presenters\LicensePresenter::dataTableLayoutSeats() }}"
|
||||||
data-cookie-id-table="seatsTable"
|
data-cookie-id-table="seatsTable"
|
||||||
|
data-id-table="seatsTable"
|
||||||
|
id="seatsTable"
|
||||||
data-pagination="true"
|
data-pagination="true"
|
||||||
data-search="true"
|
data-search="true"
|
||||||
data-side-pagination="server"
|
data-side-pagination="server"
|
||||||
|
@ -53,7 +55,6 @@
|
||||||
data-show-refresh="true"
|
data-show-refresh="true"
|
||||||
data-sort-order="asc"
|
data-sort-order="asc"
|
||||||
data-sort-name="name"
|
data-sort-name="name"
|
||||||
id="seatsTable"
|
|
||||||
class="table table-striped snipe-table"
|
class="table table-striped snipe-table"
|
||||||
data-url="{{ route('api.license.seats',['license_id' => $license->id]) }}"
|
data-url="{{ route('api.license.seats',['license_id' => $license->id]) }}"
|
||||||
data-export-options='{
|
data-export-options='{
|
||||||
|
@ -275,9 +276,10 @@
|
||||||
|
|
||||||
<table
|
<table
|
||||||
data-cookie-id-table="licenseUploadsTable"
|
data-cookie-id-table="licenseUploadsTable"
|
||||||
data-pagination="true"
|
data-id-table="licenseUploadsTable"
|
||||||
data-id-table="assetsListingTable"
|
id="licenseUploadsTable"
|
||||||
data-search="true"
|
data-search="true"
|
||||||
|
data-pagination="true"
|
||||||
data-side-pagination="client"
|
data-side-pagination="client"
|
||||||
data-show-columns="true"
|
data-show-columns="true"
|
||||||
data-show-export="true"
|
data-show-export="true"
|
||||||
|
@ -286,7 +288,6 @@
|
||||||
data-show-refresh="true"
|
data-show-refresh="true"
|
||||||
data-sort-order="asc"
|
data-sort-order="asc"
|
||||||
data-sort-name="name"
|
data-sort-name="name"
|
||||||
id="licenseUploadsTable"
|
|
||||||
class="table table-striped snipe-table"
|
class="table table-striped snipe-table"
|
||||||
data-export-options='{
|
data-export-options='{
|
||||||
"fileName": "export-license-uploads-{{ str_slug($license->name) }}-{{ date('Y-m-d') }}",
|
"fileName": "export-license-uploads-{{ str_slug($license->name) }}-{{ date('Y-m-d') }}",
|
||||||
|
@ -294,8 +295,8 @@
|
||||||
}'>
|
}'>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th></th>
|
<th data-visible="true"></th>
|
||||||
<th class="col-md-4" data-field="file_name" data-visible="true" data-sortable="true" data-switchable="true">{{ trans('general.file_name') }}</th>
|
<th class="col-md-4" data-field="file_name" data-visible="true" data-sortable="true" data-switchable="true">{{ trans('general.file_name') }}</th>
|
||||||
<th class="col-md-4" data-field="notes" data-visible="true" data-sortable="true" data-switchable="true">{{ trans('general.notes') }}</th>
|
<th class="col-md-4" data-field="notes" data-visible="true" data-sortable="true" data-switchable="true">{{ trans('general.notes') }}</th>
|
||||||
<th class="col-md-2" data-field="created_at" data-visible="true" data-sortable="true" data-switchable="true">{{ trans('general.created_at') }}</th>
|
<th class="col-md-2" data-field="created_at" data-visible="true" data-sortable="true" data-switchable="true">{{ trans('general.created_at') }}</th>
|
||||||
<th class="col-md-2" data-field="download" data-visible="true" data-sortable="false" data-switchable="true">Download</th>
|
<th class="col-md-2" data-field="download" data-visible="true" data-sortable="false" data-switchable="true">Download</th>
|
||||||
|
@ -303,7 +304,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@if ($license->uploads->count()> 0)
|
@if ($license->uploads->count() > 0)
|
||||||
@foreach ($license->uploads as $file)
|
@foreach ($license->uploads as $file)
|
||||||
<tr>
|
<tr>
|
||||||
<td><i class="{{ \App\Helpers\Helper::filetype_icon($file->filename) }} icon-med"></i></td>
|
<td><i class="{{ \App\Helpers\Helper::filetype_icon($file->filename) }} icon-med"></i></td>
|
||||||
|
@ -331,7 +332,7 @@
|
||||||
@endforeach
|
@endforeach
|
||||||
@else
|
@else
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="4">{{ trans('general.no_results') }}</td>
|
<td colspan="6">{{ trans('general.no_results') }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
@endif
|
@endif
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -345,7 +346,9 @@
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table
|
<table
|
||||||
class="table table-striped snipe-table"
|
class="table table-striped snipe-table"
|
||||||
id="historyTable"
|
data-cookie-id-table="dsffsdflicenseHistoryTable"
|
||||||
|
data-id-table="dsffsdflicenseHistoryTable"
|
||||||
|
id="dsffsdflicenseHistoryTable"
|
||||||
data-pagination="true"
|
data-pagination="true"
|
||||||
data-show-columns="true"
|
data-show-columns="true"
|
||||||
data-side-pagination="server"
|
data-side-pagination="server"
|
||||||
|
@ -356,8 +359,7 @@
|
||||||
"fileName": "export-{{ str_slug($license->name) }}-history-{{ date('Y-m-d') }}",
|
"fileName": "export-{{ str_slug($license->name) }}-history-{{ date('Y-m-d') }}",
|
||||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
||||||
}'
|
}'
|
||||||
data-url="{{ route('api.activity.index', ['item_id' => $license->id, 'item_type' => 'license']) }}"
|
data-url="{{ route('api.activity.index', ['item_id' => $license->id, 'item_type' => 'license']) }}">
|
||||||
data-cookie-id-table="license-history">
|
|
||||||
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -367,6 +369,9 @@
|
||||||
<th class="col-sm-2" data-sortable="true" data-visible="true" data-field="item" data-formatter="polymorphicItemFormatter">{{ trans('general.item') }}</th>
|
<th class="col-sm-2" data-sortable="true" data-visible="true" data-field="item" data-formatter="polymorphicItemFormatter">{{ trans('general.item') }}</th>
|
||||||
<th class="col-sm-2" data-visible="true" data-field="target" data-formatter="polymorphicItemFormatter">{{ trans('general.target') }}</th>
|
<th class="col-sm-2" data-visible="true" data-field="target" data-formatter="polymorphicItemFormatter">{{ trans('general.target') }}</th>
|
||||||
<th class="col-sm-2" data-sortable="true" data-visible="true" data-field="note">{{ trans('general.notes') }}</th>
|
<th class="col-sm-2" data-sortable="true" data-visible="true" data-field="note">{{ trans('general.notes') }}</th>
|
||||||
|
@if ($snipeSettings->require_accept_signature=='1')
|
||||||
|
<th class="col-md-3" data-field="signature_file" data-visible="false" data-formatter="imageFormatter">{{ trans('general.signature') }}</th>
|
||||||
|
@endif
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -28,6 +28,25 @@
|
||||||
@endcomponent
|
@endcomponent
|
||||||
|
|
||||||
|
|
||||||
|
@if (($req_accept == 1) && ($eula!=''))
|
||||||
|
{{ trans('mail.read_the_terms_and_click') }}
|
||||||
|
@elseif (($req_accept == 1) && ($eula==''))
|
||||||
|
{{ trans('mail.click_on_the_link_asset') }}
|
||||||
|
@elseif (($req_accept == 0) && ($eula!=''))
|
||||||
|
{{ trans('mail.read_the_terms') }}
|
||||||
|
@endif
|
||||||
|
|
||||||
|
@if ($eula)
|
||||||
|
@component('mail::panel')
|
||||||
|
{!! $eula !!}
|
||||||
|
@endcomponent
|
||||||
|
@endif
|
||||||
|
|
||||||
|
@if ($req_accept == 1)
|
||||||
|
**[✔ {{ trans('mail.i_have_read') }}]({{ $accept_url }})**
|
||||||
|
@endif
|
||||||
|
|
||||||
|
|
||||||
Thanks,
|
Thanks,
|
||||||
|
|
||||||
{{ $snipeSettings->site_name }}
|
{{ $snipeSettings->site_name }}
|
||||||
|
|
Loading…
Reference in a new issue