Redesigned admin pages
This commit is contained in:
1 parent
6163c0a04f
commit
9bdb5dd129
15 files changed
+527
-272
No files matched your search
@@ -0,0 +1,17 @@
|
||||
<dialog class="card" id="create-card">
|
||||
<h3 class="card-title">Dodaj državu</h3>
|
||||
<form method="post" action="/admin/countries">
|
||||
<section class="form-field">
|
||||
<label for="name">Iso ime:</label>
|
||||
<input required minlength="2" maxlength="2" id="iso_name" value="{{.Country.IsoName}}" name="iso_name" type="text">
|
||||
</section>
|
||||
<section class="form-field">
|
||||
<label for="name">Ime:</label>
|
||||
<input required minlength="1" maxlength="45" id="name" value="{{.Country.Name}}" name="name" type="text">
|
||||
</section>
|
||||
<section class="actions">
|
||||
<button class="primary" type="submit">Dodaj</button>
|
||||
<button class="secondary" type="button" onclick="closeDialog('#create-card')">Odustani</button>
|
||||
</section>
|
||||
</form>
|
||||
</dialog>
|
||||
@@ -1,35 +1,35 @@
|
||||
<dialog class="card" id="create-card">
|
||||
<h3 class="card-title">Create holiday</h3>
|
||||
<h3 class="card-title">Dodaj praznik</h3>
|
||||
<form method="post" action="/admin/holidays">
|
||||
<section>
|
||||
<label for="country">Country:</label>
|
||||
<section class="form-field">
|
||||
<label for="country">Država:</label>
|
||||
<select id="country" required name="country">
|
||||
{{range $entry := .Countries}}
|
||||
<option value="{{$entry.IsoName}}">{{$entry.Name}}</option>
|
||||
{{end}}
|
||||
</select>
|
||||
</section>
|
||||
<section>
|
||||
<label for="name">Name:</label>
|
||||
<section class="form-field">
|
||||
<label for="name">Ime:</label>
|
||||
<input required id="name" name="name" type="text">
|
||||
</section>
|
||||
<section>
|
||||
<label for="description">Description:</label>
|
||||
<section class="form-field">
|
||||
<label for="description">Opis:</label>
|
||||
<textarea id="description" name="description"></textarea>
|
||||
</section>
|
||||
<section>
|
||||
<label for="date">Date:</label>
|
||||
<section class="form-field">
|
||||
<label for="date">Datum:</label>
|
||||
<input required id="date" name="date" type="date">
|
||||
</section>
|
||||
<section>
|
||||
<label class="checkbox"><span>State holiday</span><input id="state_holiday" value="true" name="state_holiday" type="checkbox"></label>
|
||||
<section class="form-field">
|
||||
<label class="checkbox"><span>Državni praznik</span><input id="state_holiday" value="true" name="state_holiday" type="checkbox"></label>
|
||||
</section>
|
||||
<section>
|
||||
<label class="checkbox"><span>Religious holiday</span><input id="religious_holiday" value="true" name="religious_holiday" type="checkbox"></label>
|
||||
<section class="form-field">
|
||||
<label class="checkbox"><span>Religiozni praznik</span><input id="religious_holiday" value="true" name="religious_holiday" type="checkbox"></label>
|
||||
</section>
|
||||
<section class="actions">
|
||||
<button type="submit">Create</button>
|
||||
<button type="button" onclick="closeDialog('#create-card')">Cancel</button>
|
||||
<button class="primary" type="submit">Dodaj</button>
|
||||
<button class="secondary" type="button" onclick="closeDialog('#create-card')">Odustani</button>
|
||||
</section>
|
||||
</form>
|
||||
</dialog>
|
||||
@@ -1,11 +1,11 @@
|
||||
|
||||
<dialog class="card" id="delete-card">
|
||||
<h3 class="card-title">Delete country</h3>
|
||||
<p>Are you sure you want to delete "{{.Country.Name}}"?<br>All holidays for given country will be deleted!</p>
|
||||
<h3 class="card-title">Obriši državu</h3>
|
||||
<p>Jeste li sigurni da želite obrisati "{{.Country.Name}}"?<br>Svi uneseni praznici za danu državu će biti obrisani!</p>
|
||||
<form method="post" action="/admin/countries/{{.Country.Id}}/delete">
|
||||
<section class="actions">
|
||||
<button type="submit">Delete</button>
|
||||
<button type="button" onclick="closeDialog('#delete-card')">Cancel</button>
|
||||
<button class="primary" type="submit">Obriši</button>
|
||||
<button class="secondary" type="button" onclick="closeDialog('#delete-card')">Odustani</button>
|
||||
</section>
|
||||
</form>
|
||||
</dialog>
|
||||
@@ -1,11 +1,11 @@
|
||||
|
||||
<dialog class="card" id="delete-card">
|
||||
<h3 class="card-title">Delete holiday</h3>
|
||||
<p>Are you sure you want to delete "{{.Holiday.Name}}"?</p>
|
||||
<h3 class="card-title">Ukloni praznik</h3>
|
||||
<p>Jeste li sigurni da želite ukloniti praznik "{{.Holiday.Name}}"?</p>
|
||||
<form method="post" action="/admin/holidays/{{.Holiday.Id}}/delete">
|
||||
<section class="actions">
|
||||
<button type="submit">Delete</button>
|
||||
<button type="button" onclick="closeDialog('#delete-card')">Cancel</button>
|
||||
<button class="primary" type="submit">Obriši</button>
|
||||
<button class="secondary" type="button" onclick="closeDialog('#delete-card')">Odustani</button>
|
||||
</section>
|
||||
</form>
|
||||
</dialog>
|
||||
@@ -1,18 +1,18 @@
|
||||
<dialog class="card" id="update-card">
|
||||
<h3 class="card-title">Edit country</h3>
|
||||
<h3 class="card-title">Ažuriraj državu</h3>
|
||||
<form method="post" action="/admin/countries">
|
||||
<input type="hidden" name="id" value="{{.Country.Id}}">
|
||||
<section>
|
||||
<label for="name">Iso name:</label>
|
||||
<section class="form-field">
|
||||
<label for="name">Iso ime:</label>
|
||||
<input required minlength="2" maxlength="2" id="iso_name" value="{{.Country.IsoName}}" name="iso_name" type="text">
|
||||
</section>
|
||||
<section>
|
||||
<label for="name">Name:</label>
|
||||
<section class="form-field">
|
||||
<label for="name">Ime:</label>
|
||||
<input required minlength="1" maxlength="45" id="name" value="{{.Country.Name}}" name="name" type="text">
|
||||
</section>
|
||||
<section class="actions">
|
||||
<button type="submit">Update</button>
|
||||
<button type="button" onclick="closeDialog('#update-card')">Cancel</button>
|
||||
<button class="primary" type="submit">Ažuriraj</button>
|
||||
<button class="secondary" type="button" onclick="closeDialog('#update-card')">Odustani</button>
|
||||
</section>
|
||||
</form>
|
||||
</dialog>
|
||||
@@ -1,36 +1,36 @@
|
||||
<dialog class="card" id="update-card">
|
||||
<h3 class="card-title">Edit holiday</h3>
|
||||
<h3 class="card-title">Ažuriraj praznik</h3>
|
||||
<form method="post" action="/admin/holidays">
|
||||
<input type="hidden" name="id" value="{{.Holiday.Id}}">
|
||||
<section>
|
||||
<label for="country">Country:</label>
|
||||
<section class="form-field">
|
||||
<label for="country">Država:</label>
|
||||
<select id="country" required name="country">
|
||||
{{range $entry := .Countries}}
|
||||
<option {{if eq $.Holiday.Country $entry.IsoName}}selected{{end}} value="{{$entry.IsoName}}">{{$entry.Name}}</option>
|
||||
{{end}}
|
||||
</select>
|
||||
</section>
|
||||
<section>
|
||||
<label for="name">Name:</label>
|
||||
<section class="form-field">
|
||||
<label for="name">Ime:</label>
|
||||
<input required id="name" value="{{.Holiday.Name}}" name="name" type="text">
|
||||
</section>
|
||||
<section>
|
||||
<label for="description">Description:</label>
|
||||
<section class="form-field">
|
||||
<label for="description">Opis:</label>
|
||||
<textarea id="description" name="description">{{.Holiday.Description}}</textarea>
|
||||
</section>
|
||||
<section>
|
||||
<label for="date">Date:</label>
|
||||
<section class="form-field">
|
||||
<label for="date">Datum:</label>
|
||||
<input required id="date" value="{{.Holiday.Date.Format "2006-01-02"}}" name="date" type="date">
|
||||
</section>
|
||||
<section>
|
||||
<label class="checkbox"><span>State holiday</span><input id="state_holiday" value="true" {{if .Holiday.IsStateHoliday}}checked{{end}} name="state_holiday" type="checkbox"></label>
|
||||
<section class="form-field">
|
||||
<label class="checkbox"><span>Državni praznik</span><input id="state_holiday" value="true" {{if .Holiday.IsStateHoliday}}checked{{end}} name="state_holiday" type="checkbox"></label>
|
||||
</section>
|
||||
<section>
|
||||
<label class="checkbox"><span>Religious holiday</span><input id="religious_holiday" value="true" {{if .Holiday.IsReligiousHoliday}}checked{{end}} name="religious_holiday" type="checkbox"></label>
|
||||
<section class="form-field">
|
||||
<label class="checkbox"><span>Religiozni praznik</span><input id="religious_holiday" value="true" {{if .Holiday.IsReligiousHoliday}}checked{{end}} name="religious_holiday" type="checkbox"></label>
|
||||
</section>
|
||||
<section class="actions">
|
||||
<button type="submit">Update</button>
|
||||
<button type="button" onclick="closeDialog('#update-card')">Cancel</button>
|
||||
<button class="primary" type="submit">Ažuriraj</button>
|
||||
<button class="secondary" type="button" onclick="closeDialog('#update-card')">Odustani</button>
|
||||
</section>
|
||||
</form>
|
||||
</dialog>
|
||||
Reference in new issue
Block a user