parent
4903f722b5
commit
60379ba1ef
10 changed files with 143 additions and 9 deletions
|
@ -12,6 +12,7 @@
|
|||
{{end}}
|
||||
<li class="divider"></li>
|
||||
{{end}}
|
||||
<li><a href="/submission/"><i class="icon-tasks"></i> Submissions</a></li>
|
||||
<li><a href="/settings/"><i class="icon-wrench"></i> Settings</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/logout/"><i class="icon-off"></i> Log Out</a></li>
|
||||
|
|
|
@ -76,6 +76,7 @@
|
|||
{{end}}
|
||||
<li class="divider"></li>
|
||||
{{end}}
|
||||
<li><a href="/submission/"><i class="icon-tasks"></i> Submissions</a></li>
|
||||
<li><a href="/settings/"><i class="icon-wrench"></i> Settings</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/logout/"><i class="icon-off"></i> Log Out</a></li>
|
||||
|
|
|
@ -16,10 +16,10 @@
|
|||
<div class="row">
|
||||
<div class="span9">
|
||||
<p><b>{{.Filename}}</b>
|
||||
{{if .Book.Active}}
|
||||
<span class="label label-success">
|
||||
{{else if not .Book.ID}}
|
||||
{{if not .Book}}
|
||||
<span class="label label-important">
|
||||
{{else if .Book.Active}}
|
||||
<span class="label label-success">
|
||||
{{else}}
|
||||
<span class="label label-warning">
|
||||
{{end}}
|
||||
|
@ -28,7 +28,7 @@
|
|||
</div>
|
||||
{{with .Book}}
|
||||
|
||||
{{if .ID}}
|
||||
{{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>
|
||||
|
@ -68,10 +68,12 @@
|
|||
{{end}}
|
||||
</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>
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
||||
{{template "footer.html"}}
|
||||
|
|
77
templates/submissions.html
Normal file
77
templates/submissions.html
Normal file
|
@ -0,0 +1,77 @@
|
|||
{{template "header.html" .S}}
|
||||
|
||||
<div class="row">
|
||||
<h4>All your submissions:</h4>
|
||||
</div>
|
||||
|
||||
{{$role := .S.Role}}
|
||||
{{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 class="span3">
|
||||
<h6 class="pull-right"><a href="/submission/{{.SubmissionID}}">Submission {{.SubmissionID}}</a></h6>
|
||||
</div>
|
||||
</div>
|
||||
{{$submissionID := .SubmissionID}}
|
||||
{{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/{{.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>
|
||||
|
||||
{{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>
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
||||
{{template "footer.html"}}
|
Reference in a new issue