2023-06-20 16:00:12 +00:00
|
|
|
<!DOCTYPE html>
|
2024-01-01 11:29:59 +00:00
|
|
|
<html>
|
2023-06-20 16:00:12 +00:00
|
|
|
<head>
|
2024-01-01 11:29:59 +00:00
|
|
|
<title>Holiday-api | Admin</title>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
|
|
2024-02-10 16:47:14 +00:00
|
|
|
<link rel="icon" href="/assets/favicon.ico" type="image/x-icon">
|
2024-01-01 11:29:59 +00:00
|
|
|
<link rel="stylesheet" href="/assets/global.css">
|
2023-08-05 15:50:40 +00:00
|
|
|
<script src="/assets/global.js"></script>
|
2023-06-20 16:00:12 +00:00
|
|
|
</head>
|
|
|
|
<body>
|
2024-01-01 11:29:59 +00:00
|
|
|
<div class="background-image" style="position: fixed">
|
|
|
|
</div>
|
2023-08-05 15:50:40 +00:00
|
|
|
<header>
|
2024-01-01 11:29:59 +00:00
|
|
|
<h1><a href="/admin?country=HR">Holiday-api | Admin</a></h1>
|
|
|
|
<div style="flex-grow: 1"></div>
|
|
|
|
<a style="all: unset;" href="/admin/countries">Države</a>
|
2023-08-05 15:50:40 +00:00
|
|
|
</header>
|
2024-01-01 11:29:59 +00:00
|
|
|
<main class="admin-dashboard">
|
2024-02-08 19:48:19 +00:00
|
|
|
<div class="filter-dialog" style="background: transparent">
|
2024-01-01 11:29:59 +00:00
|
|
|
<section class="dialog filter-dialog">
|
|
|
|
<h2 style="margin-top: 0.5em">Pretraga</h2>
|
2023-08-05 15:50:40 +00:00
|
|
|
<form action="#" method="get">
|
2024-01-01 11:29:59 +00:00
|
|
|
<section class="form-field">
|
|
|
|
<label for="country">Država:</label>
|
2023-08-05 15:50:40 +00:00
|
|
|
<select id="country" name="country">
|
2023-08-05 19:34:09 +00:00
|
|
|
{{range $entry := .Countries}}
|
|
|
|
<option {{if eq $.Search.Country $entry.IsoName}}selected{{end}} value="{{$entry.IsoName}}">{{$entry.Name}}</option>
|
|
|
|
{{end}}
|
2023-08-05 15:50:40 +00:00
|
|
|
</select>
|
|
|
|
</section>
|
2024-01-01 11:29:59 +00:00
|
|
|
<section class="form-field">
|
|
|
|
<label for="year">Za godinu:</label>
|
2023-08-05 15:50:40 +00:00
|
|
|
<select id="year" name="year">
|
2023-08-05 19:49:33 +00:00
|
|
|
{{range $entry := .Years}}
|
|
|
|
<option {{if intpeq $.Search.Year $entry}}selected{{end}} value="{{$entry}}">{{$entry}}</option>
|
|
|
|
{{end}}
|
2023-08-05 15:50:40 +00:00
|
|
|
</select>
|
|
|
|
</section>
|
2024-01-01 11:29:59 +00:00
|
|
|
<section class="radio-group" style="margin-top: 0.5em;">
|
|
|
|
<label>Državni praznik:</label>
|
2023-08-05 15:50:40 +00:00
|
|
|
<div>
|
2024-01-01 11:29:59 +00:00
|
|
|
<input type="radio" value="true" name="sh" id="sh_true"><label for="sh_true">Da
|
|
|
|
</label><input type="radio" value="false" name="sh" id="sh_false"><label for="sh_false">Ne
|
|
|
|
</label><input type="radio" value="" name="sh" id="sh_any"><label for="sh_any">Svi</label>
|
2023-08-05 15:50:40 +00:00
|
|
|
</div>
|
2024-01-01 11:29:59 +00:00
|
|
|
<input type="hidden" value="{{.Search.StateHoliday}}" id="state-holiday" name="state_holiday">
|
2023-08-05 15:50:40 +00:00
|
|
|
</section>
|
|
|
|
<section class="radio-group">
|
2024-01-01 11:29:59 +00:00
|
|
|
<label>Religiozni praznik:</label>
|
2023-08-05 15:50:40 +00:00
|
|
|
<div>
|
2024-01-01 11:29:59 +00:00
|
|
|
<input type="radio" value="true" name="rh" id="rh_true"><label for="rh_true">Da
|
|
|
|
</label><input type="radio" value="false" name="rh" id="rh_false"><label for="rh_false">Ne
|
|
|
|
</label><input type="radio" value="" name="rh" id="rh_any"><label for="rh_any">Svi</label>
|
2023-08-05 15:50:40 +00:00
|
|
|
</div>
|
2024-01-01 11:29:59 +00:00
|
|
|
<input type="hidden" value="{{.Search.ReligiousHoliday}}" id="religious-holiday" name="religious_holiday">
|
2023-08-05 15:50:40 +00:00
|
|
|
</section>
|
2024-01-01 11:29:59 +00:00
|
|
|
<div class="button-actions">
|
|
|
|
<button class="primary">Pretraži</button>
|
|
|
|
</div>
|
2023-08-05 15:50:40 +00:00
|
|
|
</form>
|
2024-01-01 11:29:59 +00:00
|
|
|
</section>
|
|
|
|
</div>
|
2023-08-05 15:50:40 +00:00
|
|
|
|
2024-02-08 19:48:19 +00:00
|
|
|
<div style="flex-grow: 1; background: transparent">
|
2024-02-08 20:30:20 +00:00
|
|
|
<div style="display: flex; flex-direction: row; flex-wrap: wrap; justify-content: end; background: transparent; gap: 0.5em">
|
|
|
|
<button data-type="dialog" data-trigger="#copy-year" data-url="/admin/dialogs/copy-year?year={{$.Search.Year}}&country={{$.Search.Country}}" class="secondary">Kopiraj godinu</button>
|
|
|
|
<button data-type="dialog" data-trigger="#create-card" data-url="/admin/dialogs/add-holiday" class="primary">Dodaj novi praznik</button>
|
|
|
|
</div>
|
|
|
|
<section class="dialog table-results" style="margin: 0; margin-top: 0.5em" id="results">
|
2024-01-01 11:29:59 +00:00
|
|
|
<table>
|
|
|
|
<thead>
|
2023-08-05 15:50:40 +00:00
|
|
|
<tr>
|
2024-01-01 11:29:59 +00:00
|
|
|
<th>Ime</th>
|
|
|
|
<th>Datum</th>
|
|
|
|
<th></th>
|
2023-08-05 15:50:40 +00:00
|
|
|
</tr>
|
2024-01-01 11:29:59 +00:00
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
|
|
{{range $entry := .Holidays.Holidays}}
|
|
|
|
<tr>
|
|
|
|
<td>{{$entry.Name}}</td>
|
|
|
|
<td>{{$entry.Date.Format "02.01.2006"}}</td>
|
|
|
|
<td>
|
2024-02-08 19:48:19 +00:00
|
|
|
<button data-type="dialog" data-trigger="#update-card" data-url="/admin/dialogs/edit-holiday?id={{$entry.Id}}" class="icon"><span class="icon edit-icon"></span></button>
|
|
|
|
<button data-type="dialog" data-trigger="#delete-card" data-url="/admin/dialogs/delete-holiday?id={{$entry.Id}}" class="icon"><span class="icon delete-icon"></span></button>
|
2024-01-01 11:29:59 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{{end}}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</section>
|
|
|
|
</div>
|
2023-08-05 15:50:40 +00:00
|
|
|
</main>
|
2023-06-20 16:00:12 +00:00
|
|
|
</body>
|
|
|
|
</html>
|