rushlink/assets/templates/html/pasteMeta.html.tmpl

46 lines
1.4 KiB
Cheetah
Raw Permalink Normal View History

2019-09-15 22:54:07 +02:00
{{define "title"}}
2019-12-16 05:49:17 +01:00
'{{.Paste.Key}}{{.FileExt}}' metadata - rushlink
{{end}}
{{define "head-append"}}
<script type="text/javascript" src="/js/copyclipboard.js" defer></script>
{{end}}
2019-12-16 05:49:17 +01:00
{{define "body"}}
<pre id="copyToClipboardContainer" class="hidden">
<button onclick="copyToClipboard('{{.RootURL}}/{{.Paste.Key}}{{.FileExt}}')">Copy URL to clipboard</button> <span id="copyToClipboardStatus"></span>
</pre>
<pre>
2019-12-17 11:13:32 +01:00
<a href="{{.RootURL}}/{{.Paste.Key}}{{.FileExt}}">{{.RootURL}}/{{.Paste.Key}}{{.FileExt}}</a>
2019-12-16 05:49:17 +01:00
---
{{if and (ne .Paste.State.String "deleted") .CanDeleteBool}}
2019-12-17 11:13:32 +01:00
with delete token: <a href="{{.RootURL}}/{{.Paste.Key}}{{.FileExt}}?deleteToken={{.Paste.DeleteToken}}">{{.RootURL}}/{{.Paste.Key}}{{.FileExt}}?deleteToken={{.Paste.DeleteToken}}</a>
2019-12-16 05:49:17 +01:00
{{else -}}
with delete token: &lt;unknown&gt;
{{end -}}
type: {{.Paste.Type}}
state: {{.Paste.State}}
2020-10-25 17:33:51 +01:00
{{if .Paste.CreatedAt.IsZero -}}
2019-12-16 05:49:17 +01:00
created: unknown
{{else -}}
2020-10-25 17:33:51 +01:00
created: {{.Paste.CreatedAt}}
{{end -}}
{{if .Paste.UpdatedAt.IsZero -}}
last updated: unknown
{{else -}}
last updated: {{.Paste.UpdatedAt}}
{{end -}}
{{if .Paste.DeletedAt.Valid -}}
deleted at: {{.Paste.DeletedAt.Time}}
2019-12-16 05:49:17 +01:00
{{end -}}
2020-05-11 22:32:35 +02:00
delete token: {{.CanDeleteString}}
2020-05-11 22:26:45 +02:00
<form action="delete?deleteToken={{.Paste.DeleteToken}}" method="post">
<input type="submit" name="delete" value="Delete paste"
{{- if or (eq .Paste.State.String "deleted") (not .CanDeleteBool) -}}
disabled
{{- end -}}
>
</form>
2019-12-16 05:49:17 +01:00
</pre>
{{end}}