catalogue in a template
This commit is contained in:
parent
280c6a92ab
commit
0edd3eb9b1
1 changed files with 16 additions and 9 deletions
|
|
@ -52,16 +52,23 @@
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{with .Catalogue}}
|
{{with .Catalogue}}
|
||||||
<div >
|
<div>
|
||||||
<h2>Katalog</h2>
|
<h2>Katalog</h2>
|
||||||
<ul class="scrollable">
|
<div class="scrollable">
|
||||||
{{range .}}
|
<table>
|
||||||
<li>
|
{{range .}}
|
||||||
{{.Name}} {{.Price}}
|
<tr>
|
||||||
<button type=button onClick="addCake({{.ID}},'{{.Name}} ({{.Price}}PLN)', 1)">dodaj</button>
|
<th>{{.Name}}<br><small>{{.Category}}</small></th>
|
||||||
</li>
|
<th>{{.Price}}PLN</th>
|
||||||
{{end}}
|
<th>
|
||||||
</ul>
|
<button type=button onClick="addCake({{.ID}},'{{.Name}} ({{.Price}}PLN)', 1)">
|
||||||
|
<i class="fa-solid fa-plus"></i>
|
||||||
|
</button>
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
{{end}}
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
</form>
|
</form>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue