Working on using new data model

This commit is contained in:
2025-06-04 05:33:51 +02:00
parent ff1d95edab
commit 6e72582d77
13 changed files with 734 additions and 390 deletions

View File

@@ -1,18 +1,20 @@
{{- /*gotype: main.CreateDeviceVM */}}
{{- /*gotype: pcinv.CreateDeviceVM*/ -}}
{{define "create_device_step1"}}
{{template "header" "Create Device - Choose Device Type"}}
<ul>
{{template "create_device_link" createDeviceLink "ram" "Random Access Memory" .Qr}}
{{if .Qr}}
{{range .DescriptorTree.AssetTypes}}
{{if not .Abstract}}
<li><a href="/create?type={{.Id}}&qr={{.Qr}}">{{.Name}}</a></li>
{{end}}
{{end}}
{{else}}
{{range .DescriptorTree.AssetTypes}}
{{if not .Abstract}}
<li><a href="/create?type={{.Id}}">{{.Name}}</a></li>
{{end}}
{{end}}
{{end}}
</ul>
{{template "footer"}}
{{end}}
{{define "create_device_link"}}
{{if .Qr}}
<li><a href="/create?type=ram&qr={{.Qr}}">{{"ram" | formatType}}</a></li>
<li><a href="/create?type=hdd&qr={{.Qr}}">{{"hdd" | formatType}}</a></li>
{{- else}}
<li><a href="/create?type=ram">{{"ram" | formatType}}</a></li>
<li><a href="/create?type=hdd">{{"hdd" | formatType}}</a></li>
{{- end}}
{{end}}