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>
|
||||
{{end}}
|
||||
{{with .Catalogue}}
|
||||
<div >
|
||||
<div>
|
||||
<h2>Katalog</h2>
|
||||
<ul class="scrollable">
|
||||
{{range .}}
|
||||
<li>
|
||||
{{.Name}} {{.Price}}
|
||||
<button type=button onClick="addCake({{.ID}},'{{.Name}} ({{.Price}}PLN)', 1)">dodaj</button>
|
||||
</li>
|
||||
{{end}}
|
||||
</ul>
|
||||
<div class="scrollable">
|
||||
<table>
|
||||
{{range .}}
|
||||
<tr>
|
||||
<th>{{.Name}}<br><small>{{.Category}}</small></th>
|
||||
<th>{{.Price}}PLN</th>
|
||||
<th>
|
||||
<button type=button onClick="addCake({{.ID}},'{{.Name}} ({{.Price}}PLN)', 1)">
|
||||
<i class="fa-solid fa-plus"></i>
|
||||
</button>
|
||||
</th>
|
||||
</tr>
|
||||
{{end}}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
</form>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue