2018-04-09 10:39:20 +00:00
|
|
|
{{template "header.html" .S}}
|
|
|
|
|
|
|
|
{{with .List}}
|
2017-06-08 00:44:35 +00:00
|
|
|
<form method="POST" action="/list/{{.ListID}}">
|
|
|
|
<div class="mb-3">
|
|
|
|
<label class="form-label" for="title">Title</label>
|
|
|
|
<input class="form-control" type="text" id="title" value="{{.Title}}" name="title">
|
2018-04-09 10:39:20 +00:00
|
|
|
</div>
|
2017-06-08 00:44:35 +00:00
|
|
|
<div class="mb-3">
|
|
|
|
<label class="form-label" for="description">Description</label>
|
|
|
|
<textarea class="form-control" id="description" rows="5" name="description">{{range .Description}}{{.}}{{end}}</textarea>
|
2018-04-09 10:39:20 +00:00
|
|
|
</div>
|
2017-06-08 00:44:35 +00:00
|
|
|
<div class="text-end">
|
|
|
|
<button type="submit" class="btn btn-primary">Save</button>
|
|
|
|
<a href="/list/{{.ListID}}" class="btn btn-secondary">Cancel</a>
|
2018-04-09 10:39:20 +00:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
{{end}}
|
|
|
|
|
2017-06-08 00:44:35 +00:00
|
|
|
<br />
|
|
|
|
|
2018-04-09 10:39:20 +00:00
|
|
|
{{$listID := .List.ListID}}
|
|
|
|
{{range .List.Books}}
|
2017-06-08 00:44:35 +00:00
|
|
|
<div class="card mb-3">
|
|
|
|
<div class="row g-0">
|
|
|
|
<div class="col-md-1 d-flex align-items-center justify-content-center">
|
|
|
|
<a href="/book/{{.ID}}" title="{{.Description}}">
|
|
|
|
{{if .Cover}}<img class="rounded" src="/cover/{{.ID}}/small/{{.Title}}.jpg" alt="{{.Title}}" />{{end}}
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-11">
|
|
|
|
<div class="card-body">
|
|
|
|
<p class="card-title">
|
|
|
|
<span class="text-muted">[{{if .Lang}}{{.Lang}}{{end}}]</span>
|
|
|
|
<a href="/book/{{.ID}}" title="{{.Description}}"><strong>{{.Title}}</strong></a>
|
|
|
|
<span class="text-muted">{{if .Publisher}}{{.Publisher}}{{end}}</span>
|
|
|
|
</p>
|
|
|
|
<div class="card-text row">
|
2021-05-01 11:36:07 +00:00
|
|
|
<p class="col-9">{{strings_join .Authors "& "}}</p>
|
2017-06-08 00:44:35 +00:00
|
|
|
<div class="col-3">
|
|
|
|
<div class="btn-group d-flex justify-content-end">
|
|
|
|
<a href="/list/{{$listID}}/remove/{{.ID}}" class="btn btn-danger">
|
|
|
|
<svg class="bi" width="1em" height="1em" fill="currentColor">
|
|
|
|
<use xlink:href="/img/bootstrap-icons.svg#trash"/>
|
|
|
|
</svg>
|
|
|
|
remove
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2018-04-09 10:39:20 +00:00
|
|
|
</div>
|
2017-06-08 00:44:35 +00:00
|
|
|
</div>
|
2018-04-09 10:39:20 +00:00
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
|
2020-03-23 19:13:58 +00:00
|
|
|
{{template "footer.html" .S}}
|