2015-05-02 19:28:11 +00:00
|
|
|
{{define "body"}}
|
|
|
|
<h2 class="form-add-heading">Add Link</h2>
|
|
|
|
{{template "flashes" .}}
|
|
|
|
<form class="form-add" action="/add" method="post" role="form" class="container col-form">
|
|
|
|
<div class="row">
|
2015-05-03 16:31:36 +00:00
|
|
|
<div class="col-xs-2">Link:</div><div class="col-xs-10"><input type="text" class="form-control" name="link" placeholder="Link" value="{{.link}}"/></div>
|
2015-05-05 14:09:10 +00:00
|
|
|
<div class="col-xs-2">Title:</div><div class="col-xs-10"><input type="text" class="form-control" name="title" placeholder="Title" value="{{.title}}"/></div>
|
2015-05-07 15:31:18 +00:00
|
|
|
<div class="col-xs-2">Path:</div><div class="col-xs-10">
|
|
|
|
<select class="form-control" name="path" placeholder="Path">
|
|
|
|
{{range $tag := .tags}}
|
|
|
|
{{template "option-tag" $tag}}
|
|
|
|
{{end}}
|
|
|
|
</select>
|
|
|
|
</div>
|
2015-05-02 19:28:11 +00:00
|
|
|
<div class="col-xs-2">Description:</div><div class="col-xs-10"><textarea class="form-control" name="description" placeholder="Description" rows="3" cols="80">{{.task.Description}}</textarea></div>
|
|
|
|
<div class="col-xs-2"></div><div class="col-xs-10"><input class="btn btn-lg btn-primary btn-block" type="submit" value="Add Link" /></div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</form>
|
2015-05-07 15:31:18 +00:00
|
|
|
{{end}}
|
|
|
|
|
|
|
|
|
|
|
|
{{define "option-tag"}}
|
2015-05-08 07:07:30 +00:00
|
|
|
<option value="{{.Id}}">{{if .Parent.Valid}}-{{end}}{{.Name}}</option>
|
|
|
|
{{range $child := .Children}}
|
|
|
|
{{template "option-tag" $child}}
|
|
|
|
{{end}}
|
2015-05-03 16:31:36 +00:00
|
|
|
{{end}}
|