Revision 2cd62801
Von Moritz Bunkus vor fast 8 Jahren hinzugefügt
bin/mozilla/ic.pl | ||
---|---|---|
38 | 38 |
|
39 | 39 |
use SL::AM; |
40 | 40 |
use SL::CVar; |
41 |
use SL::Controller::Part; |
|
41 | 42 |
use SL::IC; |
42 | 43 |
use SL::Helper::Flash qw(flash); |
43 | 44 |
use SL::HTML::Util; |
... | ... | |
587 | 588 |
$report->add_data($row); |
588 | 589 |
} |
589 | 590 |
|
590 |
setup_ic_generate_report_action_bar(); |
|
591 |
$report->generate_with_headers(); |
|
591 |
$report->generate_with_headers(action_bar_setup_hook => sub { setup_ic_generate_report_action_bar(report_generator_actions => [ @_ ]) }); |
|
592 | 592 |
|
593 | 593 |
$lxdebug->leave_sub(); |
594 | 594 |
} #end generate_report |
... | ... | |
596 | 596 |
sub setup_ic_search_action_bar { |
597 | 597 |
my %params = @_; |
598 | 598 |
|
599 |
my $have_access = $::auth->assert('part_service_assembly_edit', 1); |
|
600 |
my $controller = SL::Controller::Part->new; |
|
601 |
|
|
599 | 602 |
for my $bar ($::request->layout->get('actionbar')) { |
600 | 603 |
$bar->add( |
601 | 604 |
action => [ |
... | ... | |
608 | 611 |
t8('TOP100'), |
609 | 612 |
submit => [ '#form', { action => 'top100' } ], |
610 | 613 |
], |
614 |
|
|
615 |
'separator', |
|
616 |
|
|
617 |
combobox => [ |
|
618 |
action => [ t8('Add') ], |
|
619 |
link => [ |
|
620 |
t8('Add Part'), |
|
621 |
link => $controller->url_for(action => 'add_part'), |
|
622 |
disabled => $have_access ? undef : t8('You do not have the permissions to access this function.'), |
|
623 |
], |
|
624 |
link => [ |
|
625 |
t8('Add Service'), |
|
626 |
link => $controller->url_for(action => 'add_service'), |
|
627 |
disabled => $have_access ? undef : t8('You do not have the permissions to access this function.'), |
|
628 |
], |
|
629 |
link => [ |
|
630 |
t8('Add Assembly'), |
|
631 |
link => $controller->url_for(action => 'add_assembly'), |
|
632 |
disabled => $have_access ? undef : t8('You do not have the permissions to access this function.'), |
|
633 |
], |
|
634 |
link => [ |
|
635 |
t8('Add Assortment'), |
|
636 |
link => $controller->url_for(action => 'add_assortment'), |
|
637 |
disabled => $have_access ? undef : t8('You do not have the permissions to access this function.'), |
|
638 |
], |
|
639 |
], # end of combobox "Add" |
|
611 | 640 |
); |
612 | 641 |
} |
613 | 642 |
} |
... | ... | |
615 | 644 |
sub setup_ic_generate_report_action_bar { |
616 | 645 |
my %params = @_; |
617 | 646 |
|
647 |
my $have_access = $::auth->assert('part_service_assembly_edit', 1); |
|
648 |
my $controller = SL::Controller::Part->new; |
|
649 |
|
|
618 | 650 |
for my $bar ($::request->layout->get('actionbar')) { |
619 | 651 |
$bar->add( |
652 |
@{ $params{report_generator_actions} }, |
|
653 |
|
|
654 |
'separator', |
|
655 |
|
|
620 | 656 |
combobox => [ |
621 |
action => [ |
|
622 |
t8('Add'), |
|
623 |
], |
|
624 |
action => [ |
|
657 |
action => [ t8('Add') ], |
|
658 |
link => [ |
|
625 | 659 |
t8('Add Part'), |
626 |
submit => [ '#new_form', { action => 'Part/add_part' } ],
|
|
627 |
accesskey => 'enter',
|
|
660 |
link => $controller->url_for(action => 'add_part'),
|
|
661 |
disabled => $have_access ? undef : t8('You do not have the permissions to access this function.'),
|
|
628 | 662 |
], |
629 |
action => [
|
|
663 |
link => [
|
|
630 | 664 |
t8('Add Service'), |
631 |
submit => [ '#new_form', { action => 'Part/add_service' } ], |
|
665 |
link => $controller->url_for(action => 'add_service'), |
|
666 |
disabled => $have_access ? undef : t8('You do not have the permissions to access this function.'), |
|
632 | 667 |
], |
633 |
action => [
|
|
668 |
link => [
|
|
634 | 669 |
t8('Add Assembly'), |
635 |
submit => [ '#new_form', { action => 'Part/add_assembly' } ], |
|
670 |
link => $controller->url_for(action => 'add_assembly'), |
|
671 |
disabled => $have_access ? undef : t8('You do not have the permissions to access this function.'), |
|
636 | 672 |
], |
637 |
action => [
|
|
673 |
link => [
|
|
638 | 674 |
t8('Add Assortment'), |
639 |
submit => [ '#new_form', { action => 'Part/add_assortment' } ], |
|
675 |
link => $controller->url_for(action => 'add_assortment'), |
|
676 |
disabled => $have_access ? undef : t8('You do not have the permissions to access this function.'), |
|
640 | 677 |
], |
641 |
], # end of combobox "Add part"
|
|
678 |
], # end of combobox "Add" |
|
642 | 679 |
); |
643 | 680 |
} |
644 | 681 |
} |
menus/user/00-erp.yaml | ||
---|---|---|
54 | 54 |
action: CustomerVendor/search_contact |
55 | 55 |
db: customer |
56 | 56 |
- parent: master_data |
57 |
id: master_data_add_part |
|
58 |
name: Add Part |
|
59 |
icon: part_add |
|
60 |
order: 300 |
|
61 |
access: part_service_assembly_edit |
|
62 |
params: |
|
63 |
action: Part/add_part |
|
64 |
- parent: master_data |
|
65 |
id: master_data_add_service |
|
66 |
name: Add Service |
|
67 |
icon: service_add |
|
57 |
id: master_data_articles |
|
58 |
name: Articles |
|
59 |
icon: part_report |
|
68 | 60 |
order: 400 |
69 |
access: part_service_assembly_edit |
|
61 |
access: part_service_assembly_details |
|
62 |
module: ic.pl |
|
70 | 63 |
params: |
71 |
action: Part/add_service |
|
64 |
action: search |
|
65 |
searchitems: article |
|
72 | 66 |
- parent: master_data |
73 |
id: master_data_add_assembly
|
|
74 |
name: Add Assembly
|
|
75 |
icon: assembly_add
|
|
67 |
id: master_data_articles
|
|
68 |
name: Articles
|
|
69 |
icon: part_report
|
|
76 | 70 |
order: 500 |
77 |
access: part_service_assembly_edit |
|
78 |
params: |
|
79 |
action: Part/add_assembly |
|
80 |
- parent: master_data |
|
81 |
id: master_data_add_assortment |
|
82 |
name: Add Assortment |
|
83 |
icon: assortment_add |
|
84 |
order: 550 |
|
85 |
access: part_service_assembly_edit |
|
71 |
access: part_service_assembly_details |
|
72 |
module: ic.pl |
|
86 | 73 |
params: |
87 |
action: Part/add_assortment |
|
74 |
action: search |
|
75 |
searchitems: article |
|
88 | 76 |
- parent: master_data |
89 | 77 |
id: master_data_add_project |
90 | 78 |
name: Add Project |
... | ... | |
122 | 110 |
name: Reports |
123 | 111 |
icon: master_data_report |
124 | 112 |
order: 1000 |
125 |
- parent: master_data_reports |
|
126 |
id: master_data_reports_articles |
|
127 |
name: Articles |
|
128 |
icon: part_report |
|
129 |
order: 500 |
|
130 |
access: part_service_assembly_details |
|
131 |
module: ic.pl |
|
132 |
params: |
|
133 |
action: search |
|
134 |
searchitems: article |
|
135 | 113 |
- parent: master_data_reports |
136 | 114 |
id: master_data_reports_projects |
137 | 115 |
name: Projects |
Auch abrufbar als: Unified diff
Menüvereinheitlichung: »Stammdaten« → »Artikel« umgestellt