Port the web to bootstrap5
So it is responsive in phones.
This commit is contained in:
parent
8af2ad3758
commit
6a3da59c75
40 changed files with 1131 additions and 849 deletions
|
@ -5,6 +5,7 @@
|
|||
<ul>
|
||||
<li>Check if the book is already in the library, please remove the books that are already in the library in a better or similar edition/quality. You can click on the title or the authors to search for similar books in the library.</li>
|
||||
<li>Edit if needed the title, authors, publisher, ...</li>
|
||||
<li>Take into account that your submission might be waiting to process, reload this page in few minutes to see it already processed</li>
|
||||
</ul>
|
||||
<p>Thank you for your submission.</p>
|
||||
</div>
|
||||
|
@ -13,66 +14,97 @@
|
|||
{{$submissionID := .SubmissionID}}
|
||||
{{range .Submissions}}
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
<div class="span9">
|
||||
<p><b>{{.Filename}}</b>
|
||||
{{if not .Book}}
|
||||
<span class="label label-important">
|
||||
{{else if .Book.Active}}
|
||||
<span class="label label-success">
|
||||
{{else}}
|
||||
<span class="label label-warning">
|
||||
{{end}}
|
||||
{{.Status}}</span></p>
|
||||
</div>
|
||||
</div>
|
||||
{{with .Book}}
|
||||
|
||||
{{if .}}
|
||||
<div class="span1">
|
||||
<p class="pull-right"><a href="/book/{{.ID}}">{{if .Cover}}<img class="img-rounded" src="/cover/{{.ID}}/small/{{.Title}}.jpg" alt="{{.Title}}" />{{end}}</a></p>
|
||||
</div>
|
||||
<div class="span10 well">
|
||||
<div class="row">
|
||||
<div class="span7">
|
||||
<p>
|
||||
<span class="muted">[{{if .Lang}}{{.Lang}}{{end}}]</span>
|
||||
<a href="/search/?q=title:{{.Title}}"><strong>{{.Title}}</strong></a><br />
|
||||
{{if .Authors}}<strong>Authors:</strong> {{range .Authors}}<a href="/search/?q=author:{{.}}">{{.}}</a>, {{end}}<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}}
|
||||
{{.Description}}
|
||||
</p>
|
||||
</div>
|
||||
<div class="span3">
|
||||
{{if and .ID (not .Active)}}
|
||||
<div class="row btn-group pull-right">
|
||||
{{if eq $role "admin" "moderator"}}
|
||||
<a href="/store/{{.ID}}/" class="btn btn-success"><i class="icon-ok"></i> Save</a>
|
||||
{{end}}
|
||||
<a href="/submission/{{$submissionID}}/edit/{{.ID}}" class="btn btn-primary"><i class="icon-pencil"></i> Edit</a>
|
||||
<a href="/submission/{{$submissionID}}/delete/{{.ID}}/" class="btn btn-danger"><i class="icon-remove"></i> Delete</a>
|
||||
</div>
|
||||
<div class="row"><p></p></div>
|
||||
{{end}}
|
||||
<div class="row btn-group pull-right">
|
||||
<a href="{{download_url .}}" 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>
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
<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>
|
||||
|
||||
{{if .Book}}
|
||||
<form class="row form-inline" method="POST" action="/submission/{{$submissionID}}/comment/{{.Book.ID}}">
|
||||
<textarea class="span11" 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">Send comment</button>
|
||||
</form>
|
||||
{{$comment := .Comment}}
|
||||
{{with .Book}}
|
||||
{{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>
|
||||
</div>
|
||||
<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">
|
||||
{{if .Authors}}<strong>Authors:</strong> {{range .Authors}}<a href="/search/?q=author:{{.}}">{{.}}</a>, {{end}}<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}}
|
||||
</p>
|
||||
<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}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
||||
|
|
Reference in a new issue