udemy-go-web-2/cmd/web/templates/all-subscriptions.page.gohtml

42 lines
925 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 (sessionStorage.getItem("cur-page") !== null) {
curPage = sessionStorage.getItem("cur-page");
sessionStorage.removeItem("cur-page");
}
showTable({{.API}}, pageSize, curPage);
</script>
{{end}}