60 lines
2.3 KiB
Plaintext
60 lines
2.3 KiB
Plaintext
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Holiday-api | Admin dashboard</title>
|
|
<link rel="stylesheet" href="/assets/style.css">
|
|
<script src="/assets/global.js"></script>
|
|
</head>
|
|
<body>
|
|
<div id="dialog-container"></div>
|
|
<header>
|
|
<section class="container">
|
|
<h1><a href="/">Holiday-api | Countries</a></h1>
|
|
</section>
|
|
</header>
|
|
<nav>
|
|
<section class="container">
|
|
<a href="/admin">Search</a>
|
|
<a class="selected" href="#">Countries</a>
|
|
<button data-type="dialog" data-trigger="#create-card" data-url="/admin/dialogs/add-holiday">Add new holiday</button>
|
|
</section>
|
|
</nav>
|
|
<main>
|
|
|
|
<section style="margin: 1em; flex-grow: 1">
|
|
<form action="/admin/countries" method="post">
|
|
<table style="width: 100%">
|
|
<thead>
|
|
<tr>
|
|
<th>Iso name</th>
|
|
<th>Name</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
|
|
<tr>
|
|
<td><section><input minlength="2" maxlength="2" required id="iso_name" type="text" name="iso_name"></section></td>
|
|
<td><section><input minlength="1" maxlength="45" required id="name" type="text" name="name"></section></td>
|
|
<td><button>Create country</button></td>
|
|
</tr>
|
|
|
|
{{range $entry := .Countries}}
|
|
<tr>
|
|
<td>{{$entry.IsoName}}</td>
|
|
<td>{{$entry.Name}}</td>
|
|
<td>
|
|
<button type="button" data-type="dialog" data-trigger="#update-card" data-url="/admin/dialogs/edit-country?id={{$entry.Id}}" class="clean icon"><img class="icon" src="/assets/icons/edit.svg"></button>
|
|
<button type="button" data-type="dialog" data-trigger="#delete-card" data-url="/admin/dialogs/delete-country?id={{$entry.Id}}" class="clean icon"><img class="icon" src="/assets/icons/trash-delete.svg"></button>
|
|
</td>
|
|
</tr>
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
</form>
|
|
</section>
|
|
</main>
|
|
</body>
|
|
</html> |