wireplanner/templates/model_list.html

31 lines
982 B
HTML

{{define "content"}}
<h1>Device Models</h1>
{{if .Error}}<div class="alert alert-error">{{.Error}}</div>{{end}}
<div class="toolbar">
<a href="/models/new" class="btn">Create Model</a>
</div>
<table>
<thead><tr><th>Name</th><th>Manufacturer</th><th>Rack?</th><th>U</th><th>Patch</th><th>Wall</th><th></th></tr></thead>
<tbody>
{{range .Models}}
<tr>
<td><a href="/models/{{.ID}}/edit">{{.Name}}</a></td>
<td>{{.Manufacturer}}</td>
<td>{{if .IsRackMountable}}yes{{else}}no{{end}}</td>
<td>{{if .HeightUnits}}{{.HeightUnits}}{{else}}-{{end}}</td>
<td>{{if .IsPatchPanel}}yes{{end}}</td>
<td>{{if .IsWallSocket}}yes{{end}}</td>
<td>
<a href="/models/{{.ID}}/edit" class="btn-sm">Edit</a>
<form method="POST" action="/models/{{.ID}}/delete" style="display:inline" onsubmit="return confirm('Delete model?')">
<button class="btn-sm btn-danger">Delete</button>
</form>
</td>
</tr>
{{end}}
</tbody>
</table>
{{end}}