line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTML::Latemp::NavLinks::GenHtml::ArrowImages; |
2
|
|
|
|
|
|
|
$HTML::Latemp::NavLinks::GenHtml::ArrowImages::VERSION = '0.2.8'; |
3
|
1
|
|
|
1
|
|
72447
|
use strict; |
|
1
|
|
|
|
|
10
|
|
|
1
|
|
|
|
|
27
|
|
4
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
42
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
6
|
use vars qw($nav_buttons_html); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
43
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
369
|
use parent 'HTML::Latemp::NavLinks::GenHtml'; |
|
1
|
|
|
|
|
265
|
|
|
1
|
|
|
|
|
4
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
__PACKAGE__->mk_accessors( |
11
|
|
|
|
|
|
|
qw( |
12
|
|
|
|
|
|
|
_ext |
13
|
|
|
|
|
|
|
) |
14
|
|
|
|
|
|
|
); |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub _init |
17
|
|
|
|
|
|
|
{ |
18
|
2
|
|
|
2
|
|
4
|
my $self = shift; |
19
|
2
|
|
|
|
|
8
|
my (%args) = (@_); |
20
|
|
|
|
|
|
|
|
21
|
2
|
|
|
|
|
11
|
$self->SUPER::_init(%args); |
22
|
|
|
|
|
|
|
|
23
|
2
|
|
100
|
|
|
13
|
$self->_ext( $args{ext} || '.png' ); |
24
|
|
|
|
|
|
|
|
25
|
2
|
|
|
|
|
19
|
return; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
|
29
|
1
|
|
|
1
|
|
516
|
use Template; |
|
1
|
|
|
|
|
17363
|
|
|
1
|
|
|
|
|
28
|
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
# load Template::Stash to make method tables visible |
32
|
1
|
|
|
1
|
|
439
|
use Template::Stash; |
|
1
|
|
|
|
|
10950
|
|
|
1
|
|
|
|
|
199
|
|
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
# Define a method to return a substring. |
35
|
|
|
|
|
|
|
$Template::Stash::SCALAR_OPS->{'substr'} = sub { |
36
|
|
|
|
|
|
|
return substr( $_[0], $_[1], $_[2] ); |
37
|
|
|
|
|
|
|
}; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
sub _get_nav_buttons_html |
40
|
|
|
|
|
|
|
{ |
41
|
2
|
|
|
2
|
|
4
|
my $self = shift; |
42
|
|
|
|
|
|
|
|
43
|
2
|
|
|
|
|
5
|
my (%args) = (@_); |
44
|
|
|
|
|
|
|
|
45
|
2
|
|
|
|
|
5
|
my $with_accesskey = $args{'with_accesskey'}; |
46
|
|
|
|
|
|
|
|
47
|
2
|
|
|
|
|
6
|
my $root = $self->root(); |
48
|
|
|
|
|
|
|
|
49
|
2
|
|
|
|
|
52
|
my $template = Template->new( |
50
|
|
|
|
|
|
|
{ |
51
|
|
|
|
|
|
|
'POST_CHOMP' => 1, |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
); |
54
|
|
|
|
|
|
|
|
55
|
2
|
|
|
|
|
8078
|
my $vars = { |
56
|
|
|
|
|
|
|
'buttons' => $self->_get_buttons(), |
57
|
|
|
|
|
|
|
'root' => $root, |
58
|
|
|
|
|
|
|
'with_accesskey' => $with_accesskey, |
59
|
|
|
|
|
|
|
'image_base' => $self->get_image_base(), |
60
|
|
|
|
|
|
|
ext => $self->_ext(), |
61
|
|
|
|
|
|
|
}; |
62
|
|
|
|
|
|
|
|
63
|
2
|
|
|
|
|
24
|
my $nav_links_template = <<'EOF'; |
64
|
|
|
|
|
|
|
[% USE HTML %] |
65
|
|
|
|
|
|
|
[% FOREACH b = buttons %] |
66
|
|
|
|
|
|
|
[% SET key = b.dir.substr(0, 1) %] |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
[% IF b.exists %] |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
[% IF with_accesskey %] |
71
|
|
|
|
|
|
|
accesskey="[% key %]" |
72
|
|
|
|
|
|
|
[% END %] |
73
|
|
|
|
|
|
|
>[% END %]
|
74
|
|
|
|
|
|
|
alt="[% b.title %]" class="bless" />[% IF b.exists %] |
75
|
|
|
|
|
|
|
[% END %] |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
[% END %] |
78
|
|
|
|
|
|
|
EOF |
79
|
|
|
|
|
|
|
|
80
|
2
|
|
|
|
|
4
|
my $nav_buttons_html = ""; |
81
|
|
|
|
|
|
|
|
82
|
2
|
|
|
|
|
10
|
$template->process( \$nav_links_template, $vars, \$nav_buttons_html ); |
83
|
2
|
|
|
|
|
587
|
return $nav_buttons_html; |
84
|
|
|
|
|
|
|
} |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
sub get_image_base |
88
|
|
|
|
|
|
|
{ |
89
|
2
|
|
|
2
|
1
|
5
|
my $self = shift; |
90
|
|
|
|
|
|
|
|
91
|
2
|
|
|
|
|
8
|
return "arrow-"; |
92
|
|
|
|
|
|
|
} |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
sub get_total_html |
96
|
|
|
|
|
|
|
{ |
97
|
2
|
|
|
2
|
1
|
668
|
my $self = shift; |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
return |
100
|
2
|
|
|
|
|
9
|
" |
101
|
|
|
|
|
|
|
. $self->_get_nav_buttons_html(@_) |
102
|
|
|
|
|
|
|
. "\n"; |
103
|
|
|
|
|
|
|
} |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
1; |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
__END__ |