Document empty page create button added permission control

This commit is contained in:
Cüneyt Şentürk 2021-02-12 13:26:10 +03:00
parent e0878c0459
commit 2c7f25f41f
2 changed files with 11 additions and 3 deletions

View File

@ -65,5 +65,7 @@
text-empty-page="{{ $textEmptyPage }}"
url-docs-path="{{ $urlDocsPath }}"
create-route="{{ $createRoute }}"
check-permission-create="{{ $checkPermissionCreate }}"
permission-create="{{ $permissionCreate }}"
/>
@endif

View File

@ -10,9 +10,15 @@
{!! trans($textEmptyPage) !!} {!! trans('general.empty.documentation', ['url' => $urlDocsPath]) !!}
</p>
<a href="{{ route($createRoute) }}" class="btn btn-success float-right mt-4">
<span class="btn-inner--text">{{ trans('general.title.create', ['type' => trans_choice($textPage, 1)]) }}</span>
</a>
@if ($checkPermissionCreate)
@can($permissionCreate)
@endif
<a href="{{ route($createRoute) }}" class="btn btn-success float-right mt-4">
<span class="btn-inner--text">{{ trans('general.title.create', ['type' => trans_choice($textPage, 1)]) }}</span>
</a>
@if ($checkPermissionCreate)
@endcan
@endif
</div>
</div>
</div>