rushlink/assets/templates/html/pasteMeta.html.tmpl
2019-12-17 15:33:29 +05:30

29 lines
943 B
Cheetah

{{define "title"}}
'{{.Paste.Key}}{{.FileExt}}' metadata - rushlink
{{end}}
{{define "body"}}
<pre>
<a href="{{.Host}}/{{.Paste.Key}}{{.FileExt}}">{{.Host}}/{{.Paste.Key}}{{.FileExt}}</a>
---
{{if and (ne .Paste.State.String "deleted") .CanDeleteBool}}
with delete token: <a href="{{.Host}}/{{.Paste.Key}}{{.FileExt}}?deleteToken={{.Paste.DeleteToken}}">{{.Host}}/{{.Paste.Key}}{{.FileExt}}?deleteToken={{.Paste.DeleteToken}}</a>
{{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}}
{{if and (ne .Paste.State.String "deleted") .CanDeleteBool}}
```
curl --request "DELETE" "<a href="{{.Host}}/{{.Paste.Key}}{{.FileExt}}?deleteToken={{.Paste.DeleteToken}}">{{.Host}}/{{.Paste.Key}}{{.FileExt}}?deleteToken={{.Paste.DeleteToken}}"</a>
```
</pre>
{{end}}
{{end}}