Skip to content

Commit

Permalink
HTML formatted
Browse files Browse the repository at this point in the history
  • Loading branch information
Pomog committed Dec 30, 2023
1 parent d8cd67f commit 83e7e6b
Show file tree
Hide file tree
Showing 15 changed files with 650 additions and 648 deletions.
2 changes: 1 addition & 1 deletion templates/about.page.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@



{{end}}
{{end}}
74 changes: 37 additions & 37 deletions templates/admin-all-reservations.page.tmpl
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
{{template "admin" .}}

{{define "css"}}
<link href="https://cdn.jsdelivr.net/npm/simple-datatables@latest/dist/style.css" rel="stylesheet" type="text/css">
<link href="https://cdn.jsdelivr.net/npm/simple-datatables@latest/dist/style.css" rel="stylesheet" type="text/css">
{{end}}

{{define "page-title"}}
All Reservations
All Reservations
{{end}}

{{define "content"}}
<div class="col-md-12">
<div class="col-md-12">
<h2>{{template "page-title" .}}</h2>
{{ $res := index .Data "reservations"}}
<div class="table-responsive">

<table class="table table-striped table-hover" id="all-res">
<thead>
<tr>
<table class="table table-striped table-hover" id="all-res">
<thead>
<tr>
<th>ID</th>
<th>First Name</th>
<th>Last Name</th>
Expand All @@ -29,43 +29,43 @@
<th>Updated At</th>
<th>Room ID</th>
<th>Room Name</th>
</tr>
</thead>
<tbody>
{{range $i, $reservation := $res}}
<tr>
<td>{{$reservation.ID}}</td>
<td>{{$reservation.FirstName}}</td>
<td>
</tr>
</thead>
<tbody>
{{range $i, $reservation := $res}}
<tr>
<td>{{$reservation.ID}}</td>
<td>{{$reservation.FirstName}}</td>
<td>
<a href="/admin/reservations/all/{{$reservation.ID}}">
{{$reservation.LastName}}
{{$reservation.LastName}}
</a>
</td>
<td>{{$reservation.Email}}</td>
<td>{{$reservation.Phone}}</td>
<td>{{dateformate $reservation.StartDate}}</td>
<td>{{dateformate $reservation.EndDate}}</td>
<td>{{$reservation.RoomID}}</td>
<td>{{dateformate $reservation.CreatedAt}}</td>
<td>{{dateformate $reservation.UpdatedAt}}</td>
<td>{{$reservation.Room.ID}}</td>
<td>{{$reservation.Room.RoomName}}</td>
</tr>
{{end}}
</tbody>
</table>
</div>
</td>
<td>{{$reservation.Email}}</td>
<td>{{$reservation.Phone}}</td>
<td>{{dateformate $reservation.StartDate}}</td>
<td>{{dateformate $reservation.EndDate}}</td>
<td>{{$reservation.RoomID}}</td>
<td>{{dateformate $reservation.CreatedAt}}</td>
<td>{{dateformate $reservation.UpdatedAt}}</td>
<td>{{$reservation.Room.ID}}</td>
<td>{{$reservation.Room.RoomName}}</td>
</tr>
{{end}}
</tbody>
</table>
</div>
</div>
{{end}}

{{define "js"}}
<script src="https://cdn.jsdelivr.net/npm/simple-datatables@latest" type="text/javascript"></script>
<script src="https://cdn.jsdelivr.net/npm/simple-datatables@latest" type="text/javascript"></script>

<script>
document.addEventListener("DOMContentLoaded", function(){
const dataTable = new simpleDatatables.DataTable("#all-res", {
select: 5, sort: "desc",
})
<script>
document.addEventListener("DOMContentLoaded", function () {
const dataTable = new simpleDatatables.DataTable("#all-res", {
select: 5, sort: "desc",
})
</script>
})
</script>
{{end}}
8 changes: 4 additions & 4 deletions templates/admin-dashboard.page.tmpl
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{{template "admin" .}}

{{define "page-title"}}
Dashboard
Dashboard
{{end}}

{{define "content"}}
<div class="col-md-12">
Dashboard content
</div>
<div class="col-md-12">
Dashboard content
</div>
{{end}}
74 changes: 37 additions & 37 deletions templates/admin-new-reservations.page.tmpl
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
{{template "admin" .}}

{{define "css"}}
<link href="https://cdn.jsdelivr.net/npm/simple-datatables@latest/dist/style.css" rel="stylesheet" type="text/css">
<link href="https://cdn.jsdelivr.net/npm/simple-datatables@latest/dist/style.css" rel="stylesheet" type="text/css">
{{end}}

{{define "page-title"}}
All Reservations
All Reservations
{{end}}

{{define "content"}}
<div class="col-md-12">
<div class="col-md-12">
<h2>{{template "page-title" .}}</h2>
{{ $res := index .Data "reservations"}}
<div class="table-responsive">

<table class="table table-striped table-hover" id="new-res">
<thead>
<tr>
<table class="table table-striped table-hover" id="new-res">
<thead>
<tr>
<th>ID</th>
<th>New</th>
<th>First Name</th>
Expand All @@ -30,44 +30,44 @@
<th>Updated At</th>
<th>Room ID</th>
<th>Room Name</th>
</tr>
</thead>
<tbody>
{{range $i, $reservation := $res}}
<tr>
<td>{{$reservation.ID}}</td>
<td>{{$reservation.Processed}}</td>
<td>{{$reservation.FirstName}}</td>
<td>
</tr>
</thead>
<tbody>
{{range $i, $reservation := $res}}
<tr>
<td>{{$reservation.ID}}</td>
<td>{{$reservation.Processed}}</td>
<td>{{$reservation.FirstName}}</td>
<td>
<a href="/admin/reservations/new/{{$reservation.ID}}">
{{$reservation.LastName}}
{{$reservation.LastName}}
</a>
</td>
<td>{{$reservation.Email}}</td>
<td>{{$reservation.Phone}}</td>
<td>{{dateformate $reservation.StartDate}}</td>
<td>{{dateformate $reservation.EndDate}}</td>
<td>{{$reservation.RoomID}}</td>
<td>{{dateformate $reservation.CreatedAt}}</td>
<td>{{dateformate $reservation.UpdatedAt}}</td>
<td>{{$reservation.Room.ID}}</td>
<td>{{$reservation.Room.RoomName}}</td>
</tr>
{{end}}
</tbody>
</table>
</td>
<td>{{$reservation.Email}}</td>
<td>{{$reservation.Phone}}</td>
<td>{{dateformate $reservation.StartDate}}</td>
<td>{{dateformate $reservation.EndDate}}</td>
<td>{{$reservation.RoomID}}</td>
<td>{{dateformate $reservation.CreatedAt}}</td>
<td>{{dateformate $reservation.UpdatedAt}}</td>
<td>{{$reservation.Room.ID}}</td>
<td>{{$reservation.Room.RoomName}}</td>
</tr>
{{end}}
</tbody>
</table>
</div>
</div>
{{end}}

{{define "js"}}
<script src="https://cdn.jsdelivr.net/npm/simple-datatables@latest" type="text/javascript"></script>
<script src="https://cdn.jsdelivr.net/npm/simple-datatables@latest" type="text/javascript"></script>

<script>
document.addEventListener("DOMContentLoaded", function(){
const dataTable = new simpleDatatables.DataTable("#new-res", {
select: 5, sort: "desc",
})
<script>
document.addEventListener("DOMContentLoaded", function () {
const dataTable = new simpleDatatables.DataTable("#new-res", {
select: 5, sort: "desc",
})
</script>
})
</script>
{{end}}
Loading

0 comments on commit 83e7e6b

Please sign in to comment.