indiescrobble/templates/preview.tmpl

65 lines
1.6 KiB
Cheetah

{{ define "preview.tmpl" }}
<!DOCTYPE html>
<html lang="en">
{{ template "head.tmpl" . }}
<body>
{{ template "header.tmpl" . }}
<main>
{{ $scrobbleType := .scrobbleType }}
{{ if .user }}
Logged in as {{.user.Me}} <a href="/logout"><button>Log Out</button></a>
{{end}}
<form method="POST" action="/scrobble/do">
<p><a href="/">Add A Post</a> &gt; <a href="/scrobble?type={{ .scrobbleType }}">Add {{ .scrobbleTypeName }}</a> &gt; {{.item.GetDisplayName}}</p>
<h3>Preview Post: {{.item.GetDisplayName}}</h3>
<div class="float-left">
{{if .item.GetThumbnailURL}}
<img class="thumbnail" src="{{.item.GetThumbnailURL}}"/>
{{end}}
</div>
<div>
<label>When: <b>{{.when}}</b></label> <input type="hidden" name="when" value="{{.when}}" /><br/>
<label>Rating: (out of 5)</label> <b>{{.rating}}</b> <input type="hidden" name="rating" value="{{.rating}}"/> <br/>
<label>Note/Content: </label> <br>
<pre>{{.content}}</pre>
<input type="hidden" name="content" value="{{.content}}"/>
{{if .config.SyndicateTargets}}
<h3>Syndication Options</h3>
{{ range $target := .config.SyndicateTargets}}
<label><input type="checkbox" name="mp-syndicate[]" value="{{$target.Uid}}" /> {{$target.Name}}</label><br />
{{end}}
{{end}}
<br/>
<button type="submit">Submit Post &gt; &gt;</button>
</div>
<input type="hidden" name="item" value="{{.item.GetID}}"/>
<input type="hidden" name="type" value="{{ .scrobbleType }}"/>
</form>
</main>
{{ template "footer.tmpl" . }}
</body>
</html>
{{end}}