| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package HTML::Latemp::NavLinks::GenHtml::ArrowImages; |
|
2
|
|
|
|
|
|
|
$HTML::Latemp::NavLinks::GenHtml::ArrowImages::VERSION = '0.2.9'; |
|
3
|
1
|
|
|
1
|
|
90063
|
use strict; |
|
|
1
|
|
|
|
|
13
|
|
|
|
1
|
|
|
|
|
30
|
|
|
4
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
33
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
5
|
use vars qw($nav_buttons_html); |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
61
|
|
|
7
|
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
459
|
use parent 'HTML::Latemp::NavLinks::GenHtml'; |
|
|
1
|
|
|
|
|
288
|
|
|
|
1
|
|
|
|
|
5
|
|
|
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
|
|
|
|
|
9
|
my (%args) = (@_); |
|
20
|
|
|
|
|
|
|
|
|
21
|
2
|
|
|
|
|
12
|
$self->SUPER::_init(%args); |
|
22
|
|
|
|
|
|
|
|
|
23
|
2
|
|
100
|
|
|
16
|
$self->_ext( $args{ext} || '.png' ); |
|
24
|
|
|
|
|
|
|
|
|
25
|
2
|
|
|
|
|
36
|
return; |
|
26
|
|
|
|
|
|
|
} |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
|
|
29
|
1
|
|
|
1
|
|
613
|
use Template; |
|
|
1
|
|
|
|
|
21715
|
|
|
|
1
|
|
|
|
|
37
|
|
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
# load Template::Stash to make method tables visible |
|
32
|
1
|
|
|
1
|
|
560
|
use Template::Stash; |
|
|
1
|
|
|
|
|
13740
|
|
|
|
1
|
|
|
|
|
269
|
|
|
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
|
|
6
|
my $self = shift; |
|
42
|
|
|
|
|
|
|
|
|
43
|
2
|
|
|
|
|
5
|
my (%args) = (@_); |
|
44
|
|
|
|
|
|
|
|
|
45
|
2
|
|
|
|
|
6
|
my $with_accesskey = $args{'with_accesskey'}; |
|
46
|
|
|
|
|
|
|
|
|
47
|
2
|
|
|
|
|
8
|
my $root = $self->root(); |
|
48
|
|
|
|
|
|
|
|
|
49
|
2
|
|
|
|
|
44
|
my $template = Template->new( |
|
50
|
|
|
|
|
|
|
{ |
|
51
|
|
|
|
|
|
|
'POST_CHOMP' => 1, |
|
52
|
|
|
|
|
|
|
} |
|
53
|
|
|
|
|
|
|
); |
|
54
|
|
|
|
|
|
|
|
|
55
|
2
|
|
|
|
|
9807
|
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
|
|
|
|
|
26
|
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
|
|
|
|
|
5
|
my $nav_buttons_html = ""; |
|
81
|
|
|
|
|
|
|
|
|
82
|
2
|
|
|
|
|
11
|
$template->process( \$nav_links_template, $vars, \$nav_buttons_html ); |
|
83
|
2
|
|
|
|
|
701
|
return $nav_buttons_html; |
|
84
|
|
|
|
|
|
|
} |
|
85
|
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
sub get_image_base |
|
88
|
|
|
|
|
|
|
{ |
|
89
|
2
|
|
|
2
|
1
|
5
|
my $self = shift; |
|
90
|
|
|
|
|
|
|
|
|
91
|
2
|
|
|
|
|
5
|
return "arrow-"; |
|
92
|
|
|
|
|
|
|
} |
|
93
|
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
sub get_total_html |
|
96
|
|
|
|
|
|
|
{ |
|
97
|
2
|
|
|
2
|
1
|
779
|
my $self = shift; |
|
98
|
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
return |
|
100
|
2
|
|
|
|
|
7
|
" |
|
101
|
|
|
|
|
|
|
. $self->_get_nav_buttons_html(@_) |
|
102
|
|
|
|
|
|
|
. "\n"; |
|
103
|
|
|
|
|
|
|
} |
|
104
|
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
1; |
|
106
|
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
__END__ |