mirror of
https://github.com/kovetskiy/mark.git
synced 2026-01-22 10:47:36 +08:00
add view-file template
This commit is contained in:
parent
5270864d7c
commit
5bb400cf51
@ -151,7 +151,7 @@ func templates(api *confluence.API) (*template.Template, error) {
|
|||||||
`<ac:structured-macro ac:name="jira">`,
|
`<ac:structured-macro ac:name="jira">`,
|
||||||
`<ac:parameter ac:name="key">{{ .Ticket }}</ac:parameter>`,
|
`<ac:parameter ac:name="key">{{ .Ticket }}</ac:parameter>`,
|
||||||
`{{ if .Server }}`,
|
`{{ if .Server }}`,
|
||||||
`<ac:parameter ac:name="server">{{ .Server }}</ac:parameter>`,
|
`<ac:parameter ac:name="server">{{ .Server }}</ac:parameter>`,
|
||||||
`{{ end }}`,
|
`{{ end }}`,
|
||||||
`</ac:structured-macro>`,
|
`</ac:structured-macro>`,
|
||||||
),
|
),
|
||||||
@ -451,6 +451,15 @@ func templates(api *confluence.API) (*template.Template, error) {
|
|||||||
`<ac:parameter ac:name="autoplay">{{ or .AutoPlay "false"}}</ac:parameter>`,
|
`<ac:parameter ac:name="autoplay">{{ or .AutoPlay "false"}}</ac:parameter>`,
|
||||||
`</ac:structured-macro>`,
|
`</ac:structured-macro>`,
|
||||||
),
|
),
|
||||||
|
/* https://confluence.atlassian.com/conf59/view-file-macro-792499226.html */
|
||||||
|
`ac:view-file`: text(
|
||||||
|
`<ac:structured-macro ac:name="view-file">`,
|
||||||
|
`<ac:parameter ac:name="name">`,
|
||||||
|
`<ri:attachment ri:filename="{{ .Name | convertAttachment }}"/>`,
|
||||||
|
`</ac:parameter>`,
|
||||||
|
`<ac:parameter ac:name="height">{{ or .Height 250 }}</ac:parameter>`,
|
||||||
|
`</ac:structured-macro>`,
|
||||||
|
),
|
||||||
|
|
||||||
// TODO(seletskiy): more templates here
|
// TODO(seletskiy): more templates here
|
||||||
} {
|
} {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user