adding cakes 50% working
This commit is contained in:
parent
a09cee09c8
commit
cd7c9a9d0c
8 changed files with 57 additions and 38 deletions
|
|
@ -3,8 +3,9 @@
|
|||
<button hx-get="available_cakes" hx-swap="outerHTML" hx-target="closest div">back</button>
|
||||
<button hx-get="cake_editor" hx-swap="innerHTML" hx-target="#cake_editor">New</button>
|
||||
<div id="cakes">
|
||||
{{range .Cakes}}
|
||||
<button hx-get="cake_editor/{{.ID}}" hx-swap="innerHTML" hx-target="#cake_editor">{{.Name}}</button>
|
||||
{{range $key, $value := .}}
|
||||
<button hx-get="cake_editor/{{$key}}" hx-swap="innerHTML" hx-target="#cake_editor">{{$value.Name}}
|
||||
{{$value.Price}}</button>
|
||||
{{end}}
|
||||
</div>
|
||||
<div id="cake_editor"></div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue