forked from electricdusk/rushlink
1dd0d17ba5
Fixes #42.
36 lines
1.2 KiB
Cheetah
36 lines
1.2 KiB
Cheetah
{{define "title"}}
|
|
'{{.Paste.Key}}{{.FileExt}}' metadata - rushlink
|
|
{{end}}
|
|
|
|
{{define "head-append"}}
|
|
<script type="text/javascript" src="/js/copyclipboard.js" defer></script>
|
|
{{end}}
|
|
|
|
{{define "body"}}
|
|
<pre>
|
|
<button onclick="copyToClipboard('{{.RootURL}}/{{.Paste.Key}}{{.FileExt}}')">Copy URL to clipboard</button> <span id="copyToClipboardStatus"></span>
|
|
</pre>
|
|
<pre>
|
|
<a href="{{.RootURL}}/{{.Paste.Key}}{{.FileExt}}">{{.RootURL}}/{{.Paste.Key}}{{.FileExt}}</a>
|
|
---
|
|
{{if and (ne .Paste.State.String "deleted") .CanDeleteBool}}
|
|
with delete token: <a href="{{.RootURL}}/{{.Paste.Key}}{{.FileExt}}?deleteToken={{.Paste.DeleteToken}}">{{.RootURL}}/{{.Paste.Key}}{{.FileExt}}?deleteToken={{.Paste.DeleteToken}}</a>
|
|
{{else -}}
|
|
with delete token: <unknown>
|
|
{{end -}}
|
|
type: {{.Paste.Type}}
|
|
state: {{.Paste.State}}
|
|
{{if .Paste.TimeCreated.IsZero -}}
|
|
created: unknown
|
|
{{else -}}
|
|
created: {{.Paste.TimeCreated}}
|
|
{{end -}}
|
|
delete token: {{.CanDelete}}
|
|
|
|
{{if and (ne .Paste.State.String "deleted") .CanDeleteBool}}
|
|
```
|
|
curl --request "DELETE" "<a href="{{.RootURL}}/{{.Paste.Key}}{{.FileExt}}?deleteToken={{.Paste.DeleteToken}}">{{.RootURL}}/{{.Paste.Key}}{{.FileExt}}?deleteToken={{.Paste.DeleteToken}}"</a>
|
|
```
|
|
</pre>
|
|
{{end}}
|
|
{{end}} |