90 lines
3.2 KiB
HTML
90 lines
3.2 KiB
HTML
{{template "header.html" .S}}
|
|
|
|
<form class="centered" action="/new/">
|
|
<input type="search" class="search-query span8" name="q" {{if .Search}}value="{{.Search}}"{{else}}placeholder="Search"{{end}} />
|
|
</form>
|
|
|
|
{{if .Books}}
|
|
<div class="centered btn-group">
|
|
<a href="/store/{{range .Books}}{{.B.ID}}/{{end}}" class="btn btn-large btn-success"><i class="icon-ok"></i> Save All</a>
|
|
<a href="/delete/{{range .Books}}{{.B.ID}}/{{end}}" class="btn btn-large btn-danger"><i class="icon-remove"></i> Delete All</a>
|
|
</div>
|
|
{{end}}
|
|
<p class="centered">Found {{.Found}} books.<br /></p>
|
|
<ul class="pager">
|
|
{{if .Prev}}
|
|
<li class="previous">
|
|
<a href="{{.Prev}}">← Prev</a>
|
|
</li>
|
|
{{end}}
|
|
{{if .Next}}
|
|
<li class="next">
|
|
<a href="{{.Next}}">Next →</a>
|
|
</li>
|
|
{{end}}
|
|
</ul>
|
|
|
|
{{range .Books}}
|
|
{{$titleFound := .TitleFound}}
|
|
{{$authorFound := .AuthorFound}}
|
|
{{with .B}}
|
|
<div class="row">
|
|
<div class="span1">
|
|
<p class="pull-right">{{if .Cover}}<img src="/cover/{{.ID}}/small/{{.Title}}.jpg" alt="{{.Title}}" />{{end}}</p>
|
|
</div>
|
|
<div class="span9">
|
|
<p><a href="/search/?q=title:{{.Title}}"><strong>{{.Title}}</strong></a> <small>({{$titleFound}})</small><br />
|
|
{{if .Authors}}<strong>Authors:</strong> {{range .Authors}}<a href="/search/?q=author:{{.}}">{{.}}</a>, {{end}} <small>({{$authorFound}})</small><br />{{end}}
|
|
{{if .Publisher}}<strong>Publisher:</strong> <a href="/search/?q=publisher:{{.Publisher}}">{{.Publisher}}</a><br />{{end}}
|
|
{{if .Tags}}<strong>Tags:</strong> {{range .Tags}}<a href="/search/?q=tag:{{.}}">{{.}}</a>, {{end}}<br />{{end}}
|
|
{{if .Isbn}}<strong>ISBN:</strong> {{.Isbn}}<br />{{end}}
|
|
{{if .Date}}<strong>Date:</strong> {{.Date}}<br />{{end}}
|
|
{{if .Lang}}<strong>Lang:</strong> <a href="/search/?q=lang:{{.Lang}}">{{.Lang}}</a> <br />{{end}}
|
|
{{.Description}}
|
|
</p>
|
|
</div>
|
|
<div class="span2">
|
|
<div class="row btn-group pull-right">
|
|
<a href="/store/{{.ID}}/" class="btn btn-success"><i class="icon-ok"></i> Save</a>
|
|
<a href="/edit/{{.ID}}" class="btn btn-primary"><i class="icon-pencil"></i> Edit</a>
|
|
<a href="/delete/{{.ID}}/" class="btn btn-danger"><i class="icon-remove"></i> Delete</a>
|
|
</div>
|
|
<div class="row"><p></p></div>
|
|
<div class="row btn-group pull-right">
|
|
<a href="/download/{{.ID}}/{{.Title}}.epub" class="btn btn-inverse"><i class="icon-download-alt icon-white"></i> download</a>
|
|
<a href="/read/{{.ID}}" class="btn btn-warning"><i class="icon-eye-open icon-white"></i> read it!</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{end}}
|
|
{{if .Comment}}
|
|
<div class="row">
|
|
<div class="span1">
|
|
<b>Comment:</b>
|
|
</div>
|
|
<div class="span10 well">
|
|
<p>{{.Comment}}</p>
|
|
</div>
|
|
</div>
|
|
{{end}}
|
|
{{end}}
|
|
<ul class="pager">
|
|
{{if .Prev}}
|
|
<li class="previous">
|
|
<a href="{{.Prev}}">← Prev</a>
|
|
</li>
|
|
{{end}}
|
|
{{if .Next}}
|
|
<li class="next">
|
|
<a href="{{.Next}}">Next →</a>
|
|
</li>
|
|
{{end}}
|
|
</ul>
|
|
{{if .Books}}
|
|
<div class="centered btn-group">
|
|
<a href="/store/{{range .Books}}{{.B.ID}}/{{end}}" class="btn btn-large btn-success"><i class="icon-ok"></i> Save All</a>
|
|
<a href="/delete/{{range .Books}}{{.B.ID}}/{{end}}" class="btn btn-large btn-danger"><i class="icon-remove"></i> Delete All</a>
|
|
</div>
|
|
{{end}}
|
|
|
|
{{template "footer.html"}}
|