-
Notifications
You must be signed in to change notification settings - Fork 4
/
telephone-link.vtl
38 lines (31 loc) · 1.28 KB
/
telephone-link.vtl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#** ===========================================================================
TELEPHONE LINK
This Confluence user macro adds an HTML telephone link to your page.
Version: 1.0.1
Updated: 2022-01-09
Author/s: George Lewe
Source: https://github.com/glewe/confluence-user-macros
License: GNU LGPLv3
Macro Body processing: No macro body
*#
#** ---------------------------------------------------------------------------
* PARAMETER
*#
## @param PhoneNumber:title=PhoneNumber|type=string|required=true|desc=Enter the phone number to dial including the country code with + prefix, e.g. +491234567|default=
## @param LinkText:title=Link Text|type=string|desc=Enter the link text to be displayed. Leav empty to use the pphone number.|default=
## @param LinkType:title=Link Type|type=enum|enumValues=callto,skype,tel|default=tel
#** ---------------------------------------------------------------------------
* PROCESS INPUT
*#
#if (!$paramLinkType)
#set ($paramLinkType="tel")
#end
#if ($paramLinkText=="")
#set ($paramLinkText=$paramPhoneNumber)
#end
#** ---------------------------------------------------------------------------
* OUTPUT
*#
<!-- User Macro: Telephone Link START -->
<a href="$paramLinkType:$paramPhoneNumber">$paramLinkText</a>
<!-- User Macro: Telephone Link END -->