blob: 9e5f143d58e40f33772bf98717d595bff8c7dd4d (
plain)
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
|
<%doc>
Example:
include('/elements/init_overlib.html')
include( '/elements/popup_link-ping.html', { #hashref or a list, either way
'ip' => '10.9.8.7',
})
</%doc>
<% include('/elements/popup_link.html', $params ) %>\
<%init>
my $params = { 'closetext' => 'Close' };
if (ref($_[0]) eq 'HASH') {
$params = { %$params, %{ $_[0] } };
} else {
$params = { %$params, @_ };
}
$params->{'label'} ||= 'ping';
$params->{'actionlabel'} ||= 'Ping '. $params->{'ip'};
$params->{'width'} ||= 350;
$params->{'height'} ||= 220;
$params->{'action'} = $p. 'misc/ping.html?'. $params->{'ip'};
</%init>
|