Skip to content

Commit

Permalink
add simpleDatatables library
Browse files Browse the repository at this point in the history
  • Loading branch information
ErfiDev committed Dec 5, 2021
1 parent 9309c91 commit 145bd3a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 7 additions & 1 deletion views/admin-reservations.page.gohtml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{{define "adminsubpage"}}
<div class="admin-content-reservations">
<table class="table table-striped">
<table class="table table-striped" id="admin-reservations-table">
<thead>
<tr>
<td>Email</td>
Expand Down Expand Up @@ -30,4 +30,10 @@
</tbody>
</table>
</div>
<script>
const dataTable = new simpleDatatables.DataTable("#admin-reservations-table", {});
</script>
{{end}}

{{define "css"}}
{{end}}
2 changes: 2 additions & 0 deletions views/admin.layout.gohtml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
<script defer src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
<script src="//cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<title>{{.Data.title}}</title>
<link href="https://cdn.jsdelivr.net/npm/simple-datatables@latest/dist/style.css" rel="stylesheet" type="text/css" />
<script src="https://cdn.jsdelivr.net/npm/simple-datatables@latest" type="text/javascript"></script>
</head>
<body>
<section class="w-100 h-100 admin-section">
Expand Down

0 comments on commit 145bd3a

Please sign in to comment.