2019-03-05 19:54:21 +00:00
{{template "header.html" .S}}
< div class = "row" >
< h4 > All your submissions:< / h4 >
< / div >
{{$role := .S.Role}}
{{range .Submissions}}
< div class = "row" >
2017-06-08 00:44:35 +00:00
< p >
< b > {{.Filename}}< / b >
{{if not .Book}}
< span class = "badge bg-danger" >
{{else if .Book.Active}}
< span class = "badge bg-success" >
{{else}}
< span class = "badge bg-warning" >
{{end}}
{{.Status}}< / span >
< / p >
< / div >
{{$comment := .Comment}}
2019-03-05 19:54:21 +00:00
{{$submissionID := .SubmissionID}}
{{with .Book}}
2017-06-08 00:44:35 +00:00
{{if .}}
< 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 >
2019-03-05 19:54:21 +00:00
< / div >
2017-06-08 00:44:35 +00:00
< div class = "col-md-11" >
< div class = "card-body" >
< p class = "card-title" >
< a href = "/search/?q=title:{{.Title}}" > < strong > {{.Title}}< / strong > < / a >
< / p >
< div class = "card-text row" >
< p class = "col-md-8" >
2021-05-01 11:36:07 +00:00
{{if .Authors}}< strong > Authors:< / strong >
{{range $i, $author := .Authors}}
{{if $i}}& {{end}}
< a href = "/search/?q=author:{{$author}}" > {{$author}}< / a >
{{end}}
< br / > {{end}}
2017-06-08 00:44:35 +00:00
{{if .Publisher}}< strong > Publisher:< / strong > < a href = "/search/?q=publisher:{{.Publisher}}" > {{.Publisher}}< / a > < br / > {{end}}
2021-05-01 11:36:07 +00:00
{{if .Tags}}< strong > Tags:< / strong >
{{range $i, $tag := .Tags}}
{{if $i}},{{end}}
< a href = "/search/?q=tag:{{$tag}}" > {{$tag}}< / a >
{{end}}
< br / > {{end}}
2017-06-08 00:44:35 +00:00
{{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}}
2019-03-05 19:54:21 +00:00
< / p >
2017-06-08 00:44:35 +00:00
< div class = "col-md-4" >
{{if and .ID (not .Active)}}
< div class = "btn-group d-flex justify-content-end" >
{{if eq $role "admin" "moderator"}}
< a href = "/store/{{.ID}}/" class = "btn btn-success" >
< svg class = "bi" width = "1em" height = "1em" fill = "currentColor" >
< use xlink:href = "/img/bootstrap-icons.svg#check" / >
< / svg >
save
< / a >
{{end}}
< a href = "/submission/{{$submissionID}}/edit/{{.ID}}" class = "btn btn-primary" >
< svg class = "bi" width = "1em" height = "1em" fill = "currentColor" >
< use xlink:href = "/img/bootstrap-icons.svg#pencil" / >
< / svg >
edit
< / a >
< a href = "/submission/{{$submissionID}}/delete/{{.ID}}/" class = "btn btn-danger" >
< svg class = "bi" width = "1em" height = "1em" fill = "currentColor" >
< use xlink:href = "/img/bootstrap-icons.svg#trash" / >
< / svg >
delete
< / a >
< / div >
{{end}}
< div class = "btn-group d-flex justify-content-end" >
< a href = "{{download_url .}}" class = "btn btn-dark btn-sm" >
< svg class = "bi" width = "1em" height = "1em" fill = "currentColor" >
< use xlink:href = "/img/bootstrap-icons.svg#file-earmark-arrow-down" / >
< / svg >
download
< / a >
< a href = "/read/{{.ID}}" class = "btn btn-warning btn-sm" >
< svg class = "bi" width = "1em" height = "1em" fill = "currentColor" >
< use xlink:href = "/img/bootstrap-icons.svg#eyeglasses" / >
< / svg >
read it!
< / a >
< / div >
< / div >
< / div >
< p > {{.Description}}< / p >
{{if not .Active}}
< form method = "POST" action = "/submission/{{$submissionID}}/comment/{{.ID}}" >
< textarea class = "form-control" id = "comment" rows = "2" name = "comment" placeholder = "Comments about this book submission. Is it a better version than an existing one in the library?" > {{$comment}}< / textarea >
< button type = "submit" class = "btn btn-primary" > Update comment< / button >
< / form >
{{end}}
2019-03-05 19:54:21 +00:00
< / div >
< / div >
2017-06-08 00:44:35 +00:00
< / div >
2019-03-05 19:54:21 +00:00
< / div >
2017-06-08 00:44:35 +00:00
{{end}}
2019-03-05 19:54:21 +00:00
{{end}}
{{end}}
2020-03-23 19:13:58 +00:00
{{template "footer.html" .S}}