parent
26894f1438
commit
cc12981a50
12 changed files with 216 additions and 13 deletions
|
@ -19,7 +19,11 @@ function delBook(){
|
|||
|
||||
<header class="row">
|
||||
<div class="span8 offset4">
|
||||
<h1>{{.Title}}</h1>
|
||||
<h1>{{.Title}}
|
||||
{{if not .Active}}
|
||||
<span class="label label-warning">waiting for moderation</span>
|
||||
{{end}}
|
||||
</h1>
|
||||
</div>
|
||||
</header>
|
||||
<div class="row">
|
||||
|
|
|
@ -6,9 +6,13 @@
|
|||
<a href="{{.Prev}}">← Prev</a>
|
||||
</li>
|
||||
{{end}}
|
||||
{{if .Book.Active}}
|
||||
<li class="">
|
||||
<a href="{{.Back}}">Back</a>
|
||||
</li>
|
||||
{{else}}
|
||||
<span class="label label-warning">waiting for moderation</span>
|
||||
{{end}}
|
||||
{{if .Next}}
|
||||
<li class="next">
|
||||
<a href="{{.Next}}">Next →</a>
|
||||
|
|
63
templates/submission.html
Normal file
63
templates/submission.html
Normal file
|
@ -0,0 +1,63 @@
|
|||
{{template "header.html" .S}}
|
||||
|
||||
<div class="row">
|
||||
<h4>The status of your submission:</h4>
|
||||
</div>
|
||||
|
||||
{{$role := .S.Role}}
|
||||
{{range .Submissions}}
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
<div class="span9">
|
||||
<p><b>{{.Filename}}</b>
|
||||
{{if .Book.Active}}
|
||||
<span class="label label-success">
|
||||
{{else if not .Book.ID}}
|
||||
<span class="label label-important">
|
||||
{{else}}
|
||||
<span class="label label-warning">
|
||||
{{end}}
|
||||
{{.Status}}</span></p>
|
||||
</div>
|
||||
{{with .Book}}
|
||||
{{if and .ID (not .Active)}}
|
||||
<div class="span2">
|
||||
{{if eq $role "admin" "moderator"}}
|
||||
<div class="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>
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
{{if .ID}}
|
||||
<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="/book/{{.ID}}"><strong>{{.Title}}</strong></a>
|
||||
<span class="muted">{{if .Publisher}}{{.Publisher}}{{end}}</span><br />
|
||||
{{range .Authors}}{{.}}, {{end}}
|
||||
</p>
|
||||
</div>
|
||||
<div class="span3">
|
||||
<div class="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>
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
{{template "footer.html"}}
|
|
@ -1,5 +1,12 @@
|
|||
{{template "header.html" .S}}
|
||||
|
||||
{{if .SubmissionID}}
|
||||
<div class="alert alert-success">
|
||||
<button class="close" data-dismiss="alert">×</button>
|
||||
<strong>Upload successful!</strong> Thank you for your contribution (<a href="/submission/{{.SubmissionID}}">Review the status of your upload</a>)
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
<p>Upload your epubs to help the library.</p>
|
||||
|
||||
<form class="well form-inline" method="POST" enctype="multipart/form-data">
|
||||
|
|
Reference in a new issue