Файловый менеджер - Редактировать - /home/clickysoft/public_html/somni.clickysoft.net/resources/views/admin/properties/relationships/propertyUnits.blade.php
Назад
<div class="m-3"> @can('unit_create') <div style="margin-bottom: 10px;" class="row"> <div class="col-lg-12"> <a class="btn btn-success" href="{{ route('admin.units.create') }}"> {{ trans('global.add') }} {{ trans('cruds.unit.title_singular') }} </a> </div> </div> @endcan <div class="card"> <div class="card-header"> {{ trans('cruds.unit.title_singular') }} {{ trans('global.list') }} </div> <div class="card-body"> <div class="table-responsive"> <table class=" table table-bordered table-striped table-hover datatable datatable-propertyUnits"> <thead> <tr> <th width="10"> </th> <th> {{ trans('cruds.unit.fields.id') }} </th> <th> {{ trans('cruds.unit.fields.property') }} </th> <th> {{ trans('cruds.property.fields.name') }} </th> <th> {{ trans('cruds.unit.fields.amenity') }} </th> <th> {{ trans('cruds.unit.fields.number') }} </th> <th> {{ trans('cruds.unit.fields.lease_term') }} </th> <th> {{ trans('cruds.unit.fields.rent_due_date') }} </th> <th> {{ trans('cruds.unit.fields.monthly_rent') }} </th> <th> {{ trans('cruds.unit.fields.security_deposit') }} </th> <th> {{ trans('cruds.unit.fields.size') }} </th> <th> {{ trans('cruds.unit.fields.description') }} </th> <th> {{ trans('cruds.unit.fields.no_of_bedrooms') }} </th> <th> {{ trans('cruds.unit.fields.no_of_bathroom') }} </th> <th> {{ trans('cruds.unit.fields.available_date') }} </th> <th> {{ trans('cruds.unit.fields.images') }} </th> <th> </th> </tr> </thead> <tbody> @foreach($units as $key => $unit) <tr data-entry-id="{{ $unit->id }}"> <td> </td> <td> {{ $unit->id ?? '' }} </td> <td> {{ $unit->property->name ?? '' }} </td> <td> {{ $unit->property->name ?? '' }} </td> <td> @foreach($unit->amenities as $key => $item) <span class="badge badge-info">{{ $item->name }}</span> @endforeach </td> <td> {{ $unit->number ?? '' }} </td> <td> {{ App\Models\Unit::LEASE_TERM_SELECT[$unit->lease_term] ?? '' }} </td> <td> {{ $unit->rent_due_date ?? '' }} </td> <td> {{ $unit->monthly_rent ?? '' }} </td> <td> {{ $unit->security_deposit ?? '' }} </td> <td> {{ $unit->size ?? '' }} </td> <td> {{ $unit->description ?? '' }} </td> <td> {{ $unit->no_of_bedrooms ?? '' }} </td> <td> {{ $unit->no_of_bathroom ?? '' }} </td> <td> {{ $unit->available_date ?? '' }} </td> <td> @foreach($unit->images as $key => $media) <a href="{{ $media->getUrl() }}" target="_blank" style="display: inline-block"> <img src="{{ $media->getUrl('thumb') }}"> </a> @endforeach </td> <td> @can('unit_show') <a class="btn btn-xs btn-primary" href="{{ route('admin.units.show', $unit->id) }}"> {{ trans('global.view') }} </a> @endcan @can('unit_edit') <a class="btn btn-xs btn-info" href="{{ route('admin.units.edit', $unit->id) }}"> {{ trans('global.edit') }} </a> @endcan @can('unit_delete') <form action="{{ route('admin.units.destroy', $unit->id) }}" method="POST" onsubmit="return confirm('{{ trans('global.areYouSure') }}');" style="display: inline-block;"> <input type="hidden" name="_method" value="DELETE"> <input type="hidden" name="_token" value="{{ csrf_token() }}"> <input type="submit" class="btn btn-xs btn-danger" value="{{ trans('global.delete') }}"> </form> @endcan </td> </tr> @endforeach </tbody> </table> </div> </div> </div> </div> @section('scripts') @parent <script> $(function () { let dtButtons = $.extend(true, [], $.fn.dataTable.defaults.buttons) @can('unit_delete') let deleteButtonTrans = '{{ trans('global.datatables.delete') }}' let deleteButton = { text: deleteButtonTrans, url: "{{ route('admin.units.massDestroy') }}", className: 'btn-danger', action: function (e, dt, node, config) { var ids = $.map(dt.rows({ selected: true }).nodes(), function (entry) { return $(entry).data('entry-id') }); if (ids.length === 0) { alert('{{ trans('global.datatables.zero_selected') }}') return } if (confirm('{{ trans('global.areYouSure') }}')) { $.ajax({ headers: {'x-csrf-token': _token}, method: 'POST', url: config.url, data: { ids: ids, _method: 'DELETE' }}) .done(function () { location.reload() }) } } } dtButtons.push(deleteButton) @endcan $.extend(true, $.fn.dataTable.defaults, { orderCellsTop: true, order: [[ 1, 'desc' ]], pageLength: 100, }); let table = $('.datatable-propertyUnits:not(.ajaxTable)').DataTable({ buttons: dtButtons }) $('a[data-toggle="tab"]').on('shown.bs.tab click', function(e){ $($.fn.dataTable.tables(true)).DataTable() .columns.adjust(); }); }) </script> @endsection
| ver. 1.4 |
Github
|
.
| PHP 8.1.29 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка