181 |
if ($self->{section_rank} == 2 or length $opt{parent_id}) { |
if ($self->{section_rank} == 2 or length $opt{parent_id}) { |
182 |
my $st = $opt{short_title} || $opt{title}; |
my $st = $opt{short_title} || $opt{title}; |
183 |
push @{$self->{nav}}, |
push @{$self->{nav}}, |
184 |
[$id => $st => $opt{text}]; |
[$id => $st => $opt{text}] if $self->{section_rank} == 2; |
185 |
|
|
186 |
$self->start_tag ('script'); |
$self->start_tag ('script'); |
187 |
$self->html (qq[ addSectionLink ('$id', ']); |
$self->html (qq[ addSectionLink ('$id', ']); |
341 |
$self->html ('</a>'); |
$self->html ('</a>'); |
342 |
} # xref |
} # xref |
343 |
|
|
344 |
|
sub xref_text ($$%) { |
345 |
|
my ($self, $content, %opt) = @_; |
346 |
|
$self->html ('<a href="#' . $htescape->($self->input->id_prefix . $opt{target}) . '">'); |
347 |
|
$self->text ($content); |
348 |
|
$self->html ('</a>'); |
349 |
|
} # xref |
350 |
|
|
351 |
sub link_to_webhacc ($$%) { |
sub link_to_webhacc ($$%) { |
352 |
my ($self, $content, %opt) = @_; |
my ($self, $content, %opt) = @_; |
353 |
$opt{url} = './?uri=' . $self->encode_url_component ($opt{url}); |
$opt{url} = './?uri=' . $self->encode_url_component ($opt{url}); |
401 |
sub node_link ($$) { |
sub node_link ($$) { |
402 |
my ($self, $node) = @_; |
my ($self, $node) = @_; |
403 |
if ($node->isa ('Message::IF::Node')) { |
if ($node->isa ('Message::IF::Node')) { |
404 |
$self->xref ($get_node_path->($node), target => 'node-' . refaddr $node); |
$self->xref_text ($get_node_path->($node), |
405 |
|
target => 'node-' . refaddr $node); |
406 |
} else { |
} else { |
407 |
$self->html ($get_object_path->($node)); |
$self->html ($get_object_path->($node)); |
408 |
} |
} |
451 |
$msg =~ s{<var>{text}</var>}{ |
$msg =~ s{<var>{text}</var>}{ |
452 |
defined $opt{text} ? $htescape->($opt{text}) : '' |
defined $opt{text} ? $htescape->($opt{text}) : '' |
453 |
}ge; |
}ge; |
454 |
|
$msg =~ s{<var>{value}</var>}{ |
455 |
|
defined $opt{value} ? $htescape->($opt{value}) : '' |
456 |
|
}ge; |
457 |
$msg =~ s{<var>{local-name}</var>}{ |
$msg =~ s{<var>{local-name}</var>}{ |
458 |
UNIVERSAL::can ($node, 'manakai_local_name') |
UNIVERSAL::can ($node, 'manakai_local_name') |
459 |
? $htescape->($node->manakai_local_name) : '' |
? $htescape->($node->manakai_local_name) : '' |
638 |
$out->end_tag ('form'); |
$out->end_tag ('form'); |
639 |
$out->end_section; |
$out->end_section; |
640 |
|
|
|
$out->end_tag ('fieldset'); |
|
|
|
|
641 |
## TODO: File upload |
## TODO: File upload |
642 |
|
|
643 |
$out->start_section (id => 'input-text', title => 'By direct input', |
$out->start_section (id => 'input-text', title => 'By direct input', |