delete and select
This commit is contained in:
parent
4f023f6093
commit
3b004dbeb3
|
@ -19,9 +19,25 @@
|
|||
{{else}}
|
||||
<div class="col-xs-12 category-row">
|
||||
{{end}}
|
||||
{{.Name}}</div>
|
||||
{{.Name}} <a href="/categories/delete?id={{.Id}}">delete</a>
|
||||
|
||||
<select class="form-control category-change-parent" name="category-change-parent-{{.Id}}" >
|
||||
<option value="-1" {{if not .Parent.Valid}} selected="true"{{end}}>-- None --</option>
|
||||
{{range $category := .categories}}
|
||||
{{template "option-category" $category }}
|
||||
{{end}}
|
||||
</select>
|
||||
|
||||
</div>
|
||||
|
||||
{{range $child := .Children}}
|
||||
{{template "row-category" $child}}
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
||||
{{define "option-category"}}
|
||||
<option value="{{.Id}}">{{.ToString}}</option>
|
||||
{{range $child := .Children}}
|
||||
{{template "option-category" $child}}
|
||||
{{end}}
|
||||
{{end}}
|
Loading…
Reference in New Issue