indiescrobble/templates/preview.tmpl

65 lines
1.6 KiB
Cheetah
Raw Normal View History

{{ define "preview.tmpl" }}
<!DOCTYPE html>
<html lang="en">
{{ template "head.tmpl" . }}
<body>
{{ template "header.tmpl" . }}
<main>
{{ $scrobbleType := .scrobbleType }}
{{ if .user }}
2022-02-13 15:49:22 +00:00
Logged in as {{.user.Me}} <a href="/logout"><button>Log Out</button></a>
{{end}}
2022-02-19 22:00:56 +00:00
<form method="POST" action="/scrobble/do">
2022-02-19 15:47:25 +00:00
<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}}"/>
2022-02-13 15:49:22 +00:00
{{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>
2022-02-19 22:00:56 +00:00
<input type="hidden" name="item" value="{{.item.GetID}}"/>
2022-02-19 15:47:25 +00:00
<input type="hidden" name="type" value="{{ .scrobbleType }}"/>
</form>
</main>
2022-02-13 15:49:22 +00:00
{{ template "footer.tmpl" . }}
</body>
</html>
{{end}}