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

36 lines
1.2 KiB
Cheetah
Raw 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>
<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}}
{{if .Paste.TimeCreated.IsZero -}}
created: unknown
{{else -}}
created: {{.Paste.TimeCreated}}
{{end -}}
delete token: {{.CanDelete}}
2019-12-16 05:49:17 +01:00
{{if and (ne .Paste.State.String "deleted") .CanDeleteBool}}
2019-12-16 05:49:17 +01:00
```
2019-12-17 11:13:32 +01:00
curl --request "DELETE" "<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
```
</pre>
{{end}}
2019-09-15 22:54:07 +02:00
{{end}}