mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 21:24:13 -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)
|
||||
{
|
||||
|
||||
$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',
|
||||
[
|
||||
'item' => $this->item,
|
||||
'admin' => $this->admin,
|
||||
'note' => $this->note,
|
||||
'target' => $this->target,
|
||||
'eula' => $eula,
|
||||
'req_accept' => $req_accept,
|
||||
'accept_url' => url('/').'/account/accept-asset/'.$this->log_id,
|
||||
])
|
||||
->subject(trans('mail.Confirm_license_delivery'));
|
||||
|
||||
|
|
|
@ -45,6 +45,8 @@
|
|||
<table
|
||||
data-columns="{{ \App\Presenters\LicensePresenter::dataTableLayoutSeats() }}"
|
||||
data-cookie-id-table="seatsTable"
|
||||
data-id-table="seatsTable"
|
||||
id="seatsTable"
|
||||
data-pagination="true"
|
||||
data-search="true"
|
||||
data-side-pagination="server"
|
||||
|
@ -53,7 +55,6 @@
|
|||
data-show-refresh="true"
|
||||
data-sort-order="asc"
|
||||
data-sort-name="name"
|
||||
id="seatsTable"
|
||||
class="table table-striped snipe-table"
|
||||
data-url="{{ route('api.license.seats',['license_id' => $license->id]) }}"
|
||||
data-export-options='{
|
||||
|
@ -275,9 +276,10 @@
|
|||
|
||||
<table
|
||||
data-cookie-id-table="licenseUploadsTable"
|
||||
data-pagination="true"
|
||||
data-id-table="assetsListingTable"
|
||||
data-id-table="licenseUploadsTable"
|
||||
id="licenseUploadsTable"
|
||||
data-search="true"
|
||||
data-pagination="true"
|
||||
data-side-pagination="client"
|
||||
data-show-columns="true"
|
||||
data-show-export="true"
|
||||
|
@ -286,7 +288,6 @@
|
|||
data-show-refresh="true"
|
||||
data-sort-order="asc"
|
||||
data-sort-name="name"
|
||||
id="licenseUploadsTable"
|
||||
class="table table-striped snipe-table"
|
||||
data-export-options='{
|
||||
"fileName": "export-license-uploads-{{ str_slug($license->name) }}-{{ date('Y-m-d') }}",
|
||||
|
@ -294,8 +295,8 @@
|
|||
}'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th></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 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="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="download" data-visible="true" data-sortable="false" data-switchable="true">Download</th>
|
||||
|
@ -303,7 +304,7 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if ($license->uploads->count()> 0)
|
||||
@if ($license->uploads->count() > 0)
|
||||
@foreach ($license->uploads as $file)
|
||||
<tr>
|
||||
<td><i class="{{ \App\Helpers\Helper::filetype_icon($file->filename) }} icon-med"></i></td>
|
||||
|
@ -331,7 +332,7 @@
|
|||
@endforeach
|
||||
@else
|
||||
<tr>
|
||||
<td colspan="4">{{ trans('general.no_results') }}</td>
|
||||
<td colspan="6">{{ trans('general.no_results') }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
|
@ -345,7 +346,9 @@
|
|||
<div class="table-responsive">
|
||||
<table
|
||||
class="table table-striped snipe-table"
|
||||
id="historyTable"
|
||||
data-cookie-id-table="dsffsdflicenseHistoryTable"
|
||||
data-id-table="dsffsdflicenseHistoryTable"
|
||||
id="dsffsdflicenseHistoryTable"
|
||||
data-pagination="true"
|
||||
data-show-columns="true"
|
||||
data-side-pagination="server"
|
||||
|
@ -356,8 +359,7 @@
|
|||
"fileName": "export-{{ str_slug($license->name) }}-history-{{ date('Y-m-d') }}",
|
||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
||||
}'
|
||||
data-url="{{ route('api.activity.index', ['item_id' => $license->id, 'item_type' => 'license']) }}"
|
||||
data-cookie-id-table="license-history">
|
||||
data-url="{{ route('api.activity.index', ['item_id' => $license->id, 'item_type' => 'license']) }}">
|
||||
|
||||
<thead>
|
||||
<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-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>
|
||||
@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>
|
||||
</thead>
|
||||
</table>
|
||||
|
|
|
@ -28,6 +28,25 @@
|
|||
@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,
|
||||
|
||||
{{ $snipeSettings->site_name }}
|
||||
|
|
Loading…
Reference in a new issue