udemy-go-web-2/cmd/web/templates/all-subscriptions.page.gohtml
2024-08-23 10:51:20 +02:00

42 lines
919 B
Plaintext

{{template "base" .}}
{{define "title"}}
All Subscriptions
{{end}}
{{define "content"}}
<h2 class="mt-5">All Subscriptions</h2>
<hr>
<table id="subscriptions-table" class="table table-striped">
<thead>
<tr>
<th>Transaction</th>
<th>Customer</th>
<th>Product</th>
<th>Amount</th>
<th>Status</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<nav>
<ul id="paginator" class="pagination">
</ul>
</nav>
{{end}}
{{define "js"}}
<script type="module">
import {pageSize} from "/static/js/common.js"
import {showTable, currentPage} from "/static/js/all-subscriptions.js"
let curPage = currentPage;
if (localStorage.getItem("cur-page") !== null) {
curPage = localStorage.getItem("cur-page");
localStorage.removeItem("cur-page");
}
showTable({{.API}}, pageSize, curPage);
</script>
{{end}}