added year duplication
This commit is contained in:
Borna Rajković committed 2024-02-08 21:30:20 +01:00
1 parent 8fbdffc965
commit 45b220c69f
6 files changed
+74 -5

No files matched your search

+5 -2
View File
@@ -64,8 +64,11 @@
</div>
<div style="flex-grow: 1; background: transparent">
<button style="float: right; margin-top: 0" data-type="dialog" data-trigger="#create-card" data-url="/admin/dialogs/add-holiday" class="primary">Dodaj novi praznik</button>
<section class="dialog table-results" style="margin: 0; margin-top: 3.5em" id="results">
<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">
<table>
<thead>
<tr>
+4 -2
View File
@@ -17,8 +17,10 @@
</header>
<main class="admin-dashboard">
<div style="width: 640px; max-width: 100%; margin: auto; background: transparent">
<button style="float: right; margin-top: 0" data-type="dialog" data-trigger="#create-card" data-url="/admin/dialogs/add-country" class="primary">Dodaj državu</button>
<section class="dialog table-results" style="margin: 0; margin-top: 3.5em" id="results">
<div style="display: flex; flex-direction: row; flex-wrap: wrap; justify-content: end; background: transparent">
<button style="float: right; margin-top: 0" data-type="dialog" data-trigger="#create-card" data-url="/admin/dialogs/add-country" class="primary">Dodaj državu</button>
</div>
<section class="dialog table-results" style="margin: 0; margin-top: 0.5em" id="results">
<table style="width: 100%">
<thead>
<tr>
+18
View File
@@ -0,0 +1,18 @@
<dialog class="card" id="copy-year">
<h3 class="card-title">Kopiraj godinu {{.Year}}</h3>
<p>Na koji godinu želite kopirati praznike iz godine {{.Year}}?</p>
<form method="post" action="/admin/holidays/copy">
<input type="hidden" name="from" value="{{.Year}}">
<input type="hidden" name="country" value="{{.Country}}">
<section class="form-field">
<label for="to">Godina:</label>
<input required id="to" name="to" type="number" step="1">
</section>
<section class="actions">
<button class="primary" type="submit">Kopiraj</button>
<button class="secondary" type="button" onclick="closeDialog('#copy-year')">Odustani</button>
</section>
</form>
</dialog>