2021-06-05 09:26:32 +00:00
|
|
|
@extends('layouts.main')
|
|
|
|
|
|
|
|
@section('content')
|
|
|
|
<!-- CONTENT HEADER -->
|
|
|
|
<section class="content-header">
|
|
|
|
<div class="container-fluid">
|
|
|
|
<div class="row mb-2">
|
|
|
|
<div class="col-sm-6">
|
|
|
|
<h1>Products</h1>
|
|
|
|
</div>
|
|
|
|
<div class="col-sm-6">
|
|
|
|
<ol class="breadcrumb float-sm-right">
|
2021-11-29 08:24:18 +00:00
|
|
|
<li class="breadcrumb-item"><a href="{{ route('home') }}">Dashboard</a></li>
|
2021-12-13 23:38:45 +00:00
|
|
|
<li class="breadcrumb-item"><a class="text-muted" href="{{ route('admin.products.index') }}">Products</a></li>
|
2021-06-05 09:26:32 +00:00
|
|
|
</ol>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
<!-- END CONTENT HEADER -->
|
|
|
|
|
|
|
|
<!-- MAIN CONTENT -->
|
|
|
|
<section class="content">
|
|
|
|
<div class="container-fluid">
|
|
|
|
|
|
|
|
<div class="card">
|
|
|
|
|
|
|
|
<div class="card-header">
|
|
|
|
<div class="d-flex justify-content-between">
|
|
|
|
<h5 class="card-title"><i class="fas fa-sliders-h mr-2"></i>Products</h5>
|
2021-12-13 23:38:45 +00:00
|
|
|
<a href="{{ route('admin.products.create') }}" class="btn btn-sm btn-primary"><i class="fas fa-plus mr-1"></i>Create new</a>
|
2021-06-05 09:26:32 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="card-body table-responsive">
|
|
|
|
|
|
|
|
<table id="datatable" class="table table-striped">
|
|
|
|
<thead>
|
2021-12-13 23:38:45 +00:00
|
|
|
<tr>
|
|
|
|
<th>Active</th>
|
|
|
|
<th>Name</th>
|
|
|
|
<th>Price</th>
|
|
|
|
<th>Memory</th>
|
|
|
|
<th>Cpu</th>
|
|
|
|
<th>Swap</th>
|
|
|
|
<th>Disk</th>
|
|
|
|
<th>Databases</th>
|
|
|
|
<th>Backups</th>
|
|
|
|
<th>Nodes</th>
|
|
|
|
<th>Eggs</th>
|
|
|
|
<th>Servers</th>
|
|
|
|
<th>Created at</th>
|
|
|
|
<th></th>
|
|
|
|
</tr>
|
2021-06-05 09:26:32 +00:00
|
|
|
</thead>
|
2021-12-13 23:38:45 +00:00
|
|
|
<tbody></tbody>
|
2021-06-05 09:26:32 +00:00
|
|
|
</table>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<!-- END CUSTOM CONTENT -->
|
|
|
|
|
|
|
|
</section>
|
|
|
|
<!-- END CONTENT -->
|
|
|
|
|
|
|
|
<script>
|
|
|
|
function submitResult() {
|
|
|
|
return confirm("Are you sure you wish to delete?") !== false;
|
|
|
|
}
|
|
|
|
|
2021-12-13 23:38:45 +00:00
|
|
|
document.addEventListener("DOMContentLoaded", function () {
|
|
|
|
$("#datatable").DataTable({
|
2021-06-05 09:26:32 +00:00
|
|
|
processing: true,
|
|
|
|
serverSide: true,
|
|
|
|
stateSave: true,
|
2021-11-29 08:24:18 +00:00
|
|
|
order: [
|
2021-12-13 23:38:45 +00:00
|
|
|
[ 2, "asc" ]
|
2021-06-05 09:26:32 +00:00
|
|
|
],
|
2021-11-29 08:24:18 +00:00
|
|
|
ajax: "{{ route('admin.products.datatable') }}",
|
2021-12-13 23:38:45 +00:00
|
|
|
columns: [
|
|
|
|
{data: "disabled"},
|
|
|
|
{data: "name"},
|
|
|
|
{data: "price"},
|
|
|
|
{data: "memory"},
|
|
|
|
{data: "cpu"},
|
|
|
|
{data: "swap"},
|
|
|
|
{data: "disk"},
|
|
|
|
{data: "databases"},
|
|
|
|
{data: "backups"},
|
|
|
|
{data: "nodes", sortable: false},
|
|
|
|
{data: "eggs", sortable: false},
|
|
|
|
{data: "servers", sortable: false},
|
|
|
|
{data: "created_at"},
|
|
|
|
{data: "actions", sortable: false}
|
2021-11-29 08:24:18 +00:00
|
|
|
],
|
2021-12-13 23:38:45 +00:00
|
|
|
fnDrawCallback: function (oSettings) {
|
|
|
|
$("[data-toggle=\"popover\"]").popover();
|
2021-06-05 09:26:32 +00:00
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@endsection
|