Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 9aaadfdc

Von Sven Schöling vor fast 12 Jahren hinzugefügt

  • ID 9aaadfdc06efbfb31f70c32cdf6aacf2f8a136f2
  • Vorgänger eff6af28
  • Nachfolger 7a646681

Doku, picker nach Presenter verschoben

Unterschiede anzeigen:

SL/Presenter/Part.pm
}
1;
__END__
=encoding utf-8
=head1 NAME
SL::Presenter::Part - Part lelated presenter stuff
=head1 SYNOPSIS
see L<SL::Presenter>
=head1 DESCRIPTION
see L<SL::Presenter>
=head1 FUNCTIONS
=over 4
=item C<part_picker NAME, VALUE, PARAMS>
All-in-one picker widget for parts. The name will be both id and name of the
resulting hidden C<id> input field. An additional dummy input will be generated
which is used to find parts. For a detailed description of it's behaviour, see
section C<PART PICKER SPECIFICATION>.
C<VALUE> can be an id or C<Rose::DB:Object> instance.
If C<PARAMS> contains C<type> only parts of this type will be used for autocompletion.
=back
=head1 BUGS
None yet :)
=head1 AUTHOR
Sven Schöling E<lt>s.schoeling@linet-services.deE<gt>
=cut
SL/Template/Plugin/L.pm
sub input_tag { return _call_presenter('input_tag', @_); }
sub truncate { return _call_presenter('truncate', @_); }
sub simple_format { return _call_presenter('simple_format', @_); }
sub part_picker { return _call_presenter('part_picker', @_); }
sub _set_id_attribute {
my ($attributes, $name) = @_;
......
return SL::Presenter->get->render('common/paginate', %template_params);
}
sub part_picker {
my ($self, $name, $value, %params) = _hashify(3, @_);
my $name_e = _H($name);
my $ret = $self->hidden_tag($name, (ref $value && $value->can('id') ? $value->id : ''), class => 'part_autocomplete') .
$self->hidden_tag("", delete $params{type}, id => $self->name_to_id("$name_e\_type")) .
$self->input_tag("", (ref $value && $value->can('description')) ? $value->description : '', id => $self->name_to_id("$name_e\_name"), %params) .
$self->hidden_tag("", delete $params{column}, id => $self->name_to_id("$name_e\_column"));
$self->html_tag('span', $ret, class => 'part_picker');
}
1;
__END__

Auch abrufbar als: Unified diff