Revision 2cd62801
Von Moritz Bunkus vor mehr als 8 Jahren hinzugefügt
bin/mozilla/ic.pl | ||
---|---|---|
|
||
use SL::AM;
|
||
use SL::CVar;
|
||
use SL::Controller::Part;
|
||
use SL::IC;
|
||
use SL::Helper::Flash qw(flash);
|
||
use SL::HTML::Util;
|
||
... | ... | |
$report->add_data($row);
|
||
}
|
||
|
||
setup_ic_generate_report_action_bar();
|
||
$report->generate_with_headers();
|
||
$report->generate_with_headers(action_bar_setup_hook => sub { setup_ic_generate_report_action_bar(report_generator_actions => [ @_ ]) });
|
||
|
||
$lxdebug->leave_sub();
|
||
} #end generate_report
|
||
... | ... | |
sub setup_ic_search_action_bar {
|
||
my %params = @_;
|
||
|
||
my $have_access = $::auth->assert('part_service_assembly_edit', 1);
|
||
my $controller = SL::Controller::Part->new;
|
||
|
||
for my $bar ($::request->layout->get('actionbar')) {
|
||
$bar->add(
|
||
action => [
|
||
... | ... | |
t8('TOP100'),
|
||
submit => [ '#form', { action => 'top100' } ],
|
||
],
|
||
|
||
'separator',
|
||
|
||
combobox => [
|
||
action => [ t8('Add') ],
|
||
link => [
|
||
t8('Add Part'),
|
||
link => $controller->url_for(action => 'add_part'),
|
||
disabled => $have_access ? undef : t8('You do not have the permissions to access this function.'),
|
||
],
|
||
link => [
|
||
t8('Add Service'),
|
||
link => $controller->url_for(action => 'add_service'),
|
||
disabled => $have_access ? undef : t8('You do not have the permissions to access this function.'),
|
||
],
|
||
link => [
|
||
t8('Add Assembly'),
|
||
link => $controller->url_for(action => 'add_assembly'),
|
||
disabled => $have_access ? undef : t8('You do not have the permissions to access this function.'),
|
||
],
|
||
link => [
|
||
t8('Add Assortment'),
|
||
link => $controller->url_for(action => 'add_assortment'),
|
||
disabled => $have_access ? undef : t8('You do not have the permissions to access this function.'),
|
||
],
|
||
], # end of combobox "Add"
|
||
);
|
||
}
|
||
}
|
||
... | ... | |
sub setup_ic_generate_report_action_bar {
|
||
my %params = @_;
|
||
|
||
my $have_access = $::auth->assert('part_service_assembly_edit', 1);
|
||
my $controller = SL::Controller::Part->new;
|
||
|
||
for my $bar ($::request->layout->get('actionbar')) {
|
||
$bar->add(
|
||
@{ $params{report_generator_actions} },
|
||
|
||
'separator',
|
||
|
||
combobox => [
|
||
action => [
|
||
t8('Add'),
|
||
],
|
||
action => [
|
||
action => [ t8('Add') ],
|
||
link => [
|
||
t8('Add Part'),
|
||
submit => [ '#new_form', { action => 'Part/add_part' } ],
|
||
accesskey => 'enter',
|
||
link => $controller->url_for(action => 'add_part'),
|
||
disabled => $have_access ? undef : t8('You do not have the permissions to access this function.'),
|
||
],
|
||
action => [
|
||
link => [
|
||
t8('Add Service'),
|
||
submit => [ '#new_form', { action => 'Part/add_service' } ],
|
||
link => $controller->url_for(action => 'add_service'),
|
||
disabled => $have_access ? undef : t8('You do not have the permissions to access this function.'),
|
||
],
|
||
action => [
|
||
link => [
|
||
t8('Add Assembly'),
|
||
submit => [ '#new_form', { action => 'Part/add_assembly' } ],
|
||
link => $controller->url_for(action => 'add_assembly'),
|
||
disabled => $have_access ? undef : t8('You do not have the permissions to access this function.'),
|
||
],
|
||
action => [
|
||
link => [
|
||
t8('Add Assortment'),
|
||
submit => [ '#new_form', { action => 'Part/add_assortment' } ],
|
||
link => $controller->url_for(action => 'add_assortment'),
|
||
disabled => $have_access ? undef : t8('You do not have the permissions to access this function.'),
|
||
],
|
||
], # end of combobox "Add part"
|
||
], # end of combobox "Add"
|
||
);
|
||
}
|
||
}
|
menus/user/00-erp.yaml | ||
---|---|---|
action: CustomerVendor/search_contact
|
||
db: customer
|
||
- parent: master_data
|
||
id: master_data_add_part
|
||
name: Add Part
|
||
icon: part_add
|
||
order: 300
|
||
access: part_service_assembly_edit
|
||
params:
|
||
action: Part/add_part
|
||
- parent: master_data
|
||
id: master_data_add_service
|
||
name: Add Service
|
||
icon: service_add
|
||
id: master_data_articles
|
||
name: Articles
|
||
icon: part_report
|
||
order: 400
|
||
access: part_service_assembly_edit
|
||
access: part_service_assembly_details
|
||
module: ic.pl
|
||
params:
|
||
action: Part/add_service
|
||
action: search
|
||
searchitems: article
|
||
- parent: master_data
|
||
id: master_data_add_assembly
|
||
name: Add Assembly
|
||
icon: assembly_add
|
||
id: master_data_articles
|
||
name: Articles
|
||
icon: part_report
|
||
order: 500
|
||
access: part_service_assembly_edit
|
||
params:
|
||
action: Part/add_assembly
|
||
- parent: master_data
|
||
id: master_data_add_assortment
|
||
name: Add Assortment
|
||
icon: assortment_add
|
||
order: 550
|
||
access: part_service_assembly_edit
|
||
access: part_service_assembly_details
|
||
module: ic.pl
|
||
params:
|
||
action: Part/add_assortment
|
||
action: search
|
||
searchitems: article
|
||
- parent: master_data
|
||
id: master_data_add_project
|
||
name: Add Project
|
||
... | ... | |
name: Reports
|
||
icon: master_data_report
|
||
order: 1000
|
||
- parent: master_data_reports
|
||
id: master_data_reports_articles
|
||
name: Articles
|
||
icon: part_report
|
||
order: 500
|
||
access: part_service_assembly_details
|
||
module: ic.pl
|
||
params:
|
||
action: search
|
||
searchitems: article
|
||
- parent: master_data_reports
|
||
id: master_data_reports_projects
|
||
name: Projects
|
Auch abrufbar als: Unified diff
Menüvereinheitlichung: »Stammdaten« → »Artikel« umgestellt