Revision 80d3ef8f
Von Cem Aydin vor etwa 1 Jahr hinzugefügt
SL/Presenter/CustomerVendor.pm | ||
---|---|---|
3 | 3 |
use strict; |
4 | 4 |
|
5 | 5 |
use SL::Presenter::EscapedText qw(escape is_escaped); |
6 |
use SL::Presenter::Tag qw(input_tag html_tag name_to_id select_tag link_tag); |
|
6 |
use SL::Presenter::Tag qw(input_tag html_tag name_to_id select_tag link_tag img_tag);
|
|
7 | 7 |
|
8 | 8 |
use Exporter qw(import); |
9 | 9 |
our @EXPORT_OK = qw(customer_vendor customer vendor customer_vendor_picker customer_picker vendor_picker); |
... | ... | |
64 | 64 |
# do not use reserved html attribute 'type' for cv type |
65 | 65 |
$params{cv_type} = delete $params{type}; |
66 | 66 |
|
67 |
my $show_details = delete $params{show_details} // 0; |
|
68 |
|
|
67 | 69 |
my $ret = |
68 | 70 |
input_tag($name, (ref $value && $value->can('id') ? $value->id : ''), class => "@classes", type => 'hidden', id => $id, |
69 | 71 |
'data-customer-vendor-picker-data' => JSON::to_json(\%params), |
70 | 72 |
) . |
71 | 73 |
input_tag("", ref $value ? $value->displayable_name : '', id => "${id}_name", %params); |
72 | 74 |
|
75 |
if ($show_details) { |
|
76 |
$ret .= img_tag(src => 'image/detail.png', alt => $::locale->text('Show details'), |
|
77 |
title => $::locale->text('Show details'), class => "button-image info", |
|
78 |
onclick => "kivi.CustomerVendor.show_cv_details_dialog('#${id}', '$params{cv_type}')" ); |
|
79 |
|
|
80 |
$ret .= link_tag('javascript:;', $::locale->text('Edit'), |
|
81 |
title => $::locale->text('Open in new window'), |
|
82 |
onclick => "kivi.CustomerVendor.open_customervendor_tab('#${id}', '$params{cv_type}')" ); |
|
83 |
} |
|
84 |
|
|
73 | 85 |
$::request->layout->add_javascripts('kivi.CustomerVendor.js'); |
74 | 86 |
$::request->presenter->need_reinit_widgets($id); |
75 | 87 |
|
Auch abrufbar als: Unified diff
Kunden/Lieferanten Presenter: Details als Option zum picker hinzugefügt
- Option show_details zeigt Info Popup sowie Link zum bearbeiten an
- möglicher Einsatz bei Angebot, Aufträgen, Rechnungen ect., sowie Debitoren-/Kreditorenbuchung