Removed unused methods
This commit is contained in:
1 parent
9bdb5dd129
commit
0173086939
6 files changed
+4
-500
No files matched your search
@@ -1,66 +1,3 @@
|
||||
<!--
|
||||
<!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>
|
||||
-->
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
<dialog class="card" data-closeable id="check-is-a-holiday">
|
||||
<div style="display: flex;">
|
||||
<h2 style="margin-right: 1em;">Is it a holiday?</h2>
|
||||
<button onclick="closeDialog('#check-is-a-holiday')" class="clean icon"><img class="icon" src="/assets/icons/close-x.svg"></button>
|
||||
</div>
|
||||
<form method="get" action="/search">
|
||||
<section>
|
||||
<label for="country">Country:</label>
|
||||
<select id="country" name="country">
|
||||
{{range $entry := .Countries}}
|
||||
<option value="{{$entry.IsoName}}">{{$entry.Name}}</option>
|
||||
{{end}}
|
||||
</select>
|
||||
</section>
|
||||
<section>
|
||||
<label for="date">Date:</label>
|
||||
<input id="date" name="date" type="date" required>
|
||||
</section>
|
||||
<section class="actions">
|
||||
<button style="width: 100%;" type="submit">Check is a holiday</button>
|
||||
</section>
|
||||
</form>
|
||||
</dialog>
|
||||
@@ -1,76 +0,0 @@
|
||||
<!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 | {{.Search.Date.Format "2006-01-02"}}</a></h1>
|
||||
</section>
|
||||
</header>
|
||||
<nav>
|
||||
<section class="container">
|
||||
<a href="/">Search</a>
|
||||
<a href="/documentation">Documentation</a>
|
||||
<a class="selected" href="#">For date</a>
|
||||
</section>
|
||||
</nav>
|
||||
<main>
|
||||
<section id="search">
|
||||
<article class="card">
|
||||
<h2 style="margin-right: 1em;">Is it a holiday?</h2>
|
||||
<form method="get" action="/search">
|
||||
<section>
|
||||
<label for="country">Country:</label>
|
||||
<select id="country" name="country">
|
||||
{{range $entry := .Countries}}
|
||||
<option {{if eq $.Search.Country $entry.IsoName}}selected{{end}} value="{{$entry.IsoName}}">{{$entry.Name}}</option>
|
||||
{{end}}
|
||||
</select>
|
||||
</section>
|
||||
<section>
|
||||
<label for="date">Date:</label>
|
||||
<input id="date" value="{{.Search.Date.Format "2006-01-02"}}" name="date" type="date" required>
|
||||
</section>
|
||||
<section class="actions">
|
||||
<button style="width: 100%;" type="submit">Check is a holiday</button>
|
||||
</section>
|
||||
</form>
|
||||
</article>
|
||||
</section>
|
||||
<section id="results">
|
||||
<h2 style="margin-bottom: 1em;">Results</h2>
|
||||
{{range $entry := .Holidays}}
|
||||
<article class="single-holiday">
|
||||
<table class="clean">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Name: </th>
|
||||
<td>{{$entry.Name}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Description: </th>
|
||||
<td>{{$entry.Description}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Is state holiday: </th>
|
||||
<td><img class="icon" src="{{if $entry.IsStateHoliday}}/assets/icons/done-v.svg{{else}}/assets/images/close-x.svg{{end}}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Is religious holiday: </th>
|
||||
<td><img class="icon" src="{{if $entry.IsReligiousHoliday}}/assets/icons/done-v.svg{{else}}/assets/images/close-x.svg{{end}}"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</article>
|
||||
{{end}}
|
||||
</section>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user