{{template "header.html" .S}} {{with .Book}} <div class="row"> {{if .Cover}} <div class="span4"> <img src="/cover/{{.ID}}/big/{{.Title}}.jpg" alt="{{.Title}}" class="pull-right" /> </div> {{end}} <div class="span8"> <form class="form-horizontal" method="POST" action="/save/{{.ID}}"> <fieldset> <div class="control-group"> <label class="control-label" for="title">Title</label> <div class="controls"> <input class="input-xlarge" type="text" id="title" value="{{.Title}}" name="title"> </div> </div> </fieldset> <fieldset> <div class="control-group"> <label class="control-label" for="author">Author</label> <div class="controls"> {{range .Authors}} <input class="input-xlarge" type="text" id="author" value="{{.}}" name="author"> {{end}} <input class="input-xlarge" type="text" id="author" placeholder="Add author" name="author"> </div> </div> <div class="control-group"> <label class="control-label" for="publisher">Publisher</label> <div class="controls"> <input class="input-xlarge" type="text" id="publisher" value="{{.Publisher}}" name="publisher"> </div> </div> <div class="control-group"> <label class="control-label" for="tags">Tags</label> <div class="controls"> <input class="input-xlarge" type="text" id="tags" value="{{range .Tags}}{{.}},{{end}}" name="tags" placeholder="Add tag and hit enter"> </div> </div> <div class="control-group"> <label class="control-label" for="tags">ISBN</label> <div class="controls"> <input class="input-xlarge" type="text" id="isbn" value="{{.Isbn}}" name="isbn"> </div> </div> <div class="control-group"> <label class="control-label" for="date">Date</label> <div class="controls"> <input class="input-xlarge" type="text" id="date" value="{{.Date}}" name="date"> </div> </div> <div class="control-group"> <label class="control-label" for="lang">Lang</label> <div class="controls"> <input class="input-xlarge" type="text" id="langs" value="{{.Lang}}" name="lang"> </div> </div> </fieldset> <fieldset> <div class="control-group"> <label class="control-label" for="description">Description</label> <div class="controls"> <textarea class="input-xlarge" id="description" rows="5" name="description">{{.Description}}</textarea> </div> </div> <div class="form-actions"> <button type="submit" class="btn btn-primary">Save</button> <a href="/book/{{.ID}}" class="btn">Cancel</a> </div> </fieldset> </form> </div> </div> {{end}} <script src="/js/bootstrap-tokenfield.min.js"></script> <script> $('#tags').tokenfield(); </script> {{template "footer.html"}}