From: Sven Schöling Date: Fri, 11 Dec 2015 15:12:43 +0000 (+0100) Subject: Simple Übergaben von globals an templates in templates verschoben X-Git-Tag: release-3.4.1~530 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=a648b673fcb23982d6fecb0c0f97a40c0636a601;p=kivitendo-erp.git Simple Übergaben von globals an templates in templates verschoben Da jetzt in allen Templates die kanonischen globals verfügbar sind, brauchen die nicht mehr übergeben werden. --- diff --git a/bin/mozilla/bp.pl b/bin/mozilla/bp.pl index d8180a630..d448685f3 100644 --- a/bin/mozilla/bp.pl +++ b/bin/mozilla/bp.pl @@ -187,7 +187,6 @@ sub list_spool { $::form->header; print $::form->parse_html_template('bp/list_spool', { - spool => $::lx_office_conf{paths}->{spool}, href => build_std_url('bp.pl', @href_options), is_invoice => scalar ($::form->{type} =~ /^invoice$/), is_order => scalar ($::form->{type} =~ /_order$/), diff --git a/bin/mozilla/ic.pl b/bin/mozilla/ic.pl index 563ea5fb7..c928830ea 100644 --- a/bin/mozilla/ic.pl +++ b/bin/mozilla/ic.pl @@ -115,9 +115,7 @@ sub search { $form->header; $form->get_lists('partsgroup' => 'ALL_PARTSGROUPS'); - print $form->parse_html_template('ic/search', { %is_xyz, - dateformat => $myconfig{dateformat}, - limit => $myconfig{vclimit}, }); + print $form->parse_html_template('ic/search', { %is_xyz, }); $lxdebug->leave_sub(); } #end search() diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl index 3d3d94c6b..26fb98e3e 100644 --- a/bin/mozilla/io.pl +++ b/bin/mozilla/io.pl @@ -520,7 +520,6 @@ sub select_item { ITEM_LIST => \@item_list, IS_ASSEMBLY => $mode eq 'IC', IS_PURCHASE => $mode eq 'IS', - SHOW_NOTES => $::instance_conf->get_show_longdescription_select_item(), PRE_ENTERED_QTY => $pre_entered_qty, }); $main::lxdebug->leave_sub(); diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index ad4c62ea8..c9f371ef0 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -786,7 +786,6 @@ sub search { $form->header(); print $form->parse_html_template('oe/search', { - %myconfig, is_order => scalar($form->{type} =~ /_order/), }); diff --git a/bin/mozilla/rp.pl b/bin/mozilla/rp.pl index 02023f532..ae2669fe3 100644 --- a/bin/mozilla/rp.pl +++ b/bin/mozilla/rp.pl @@ -199,8 +199,6 @@ sub report { year => DateTime->today->year, today => DateTime->today, nextsub => $nextsub, - accrual => $::instance_conf->get_accounting_method ne 'cash', - cash => $::instance_conf->get_accounting_method eq 'cash', is_payments => $is_payments, is_trial_balance => $is_trial_balance, is_balance_sheet => $is_balance_sheet, @@ -1131,7 +1129,6 @@ sub e_mail { $::form->header; print $::form->parse_html_template('rp/e_mail', { - show_bcc => $::auth->assert('email_bcc', 'may fail'), print_options => print_options(inline => 1), hidden_values => \@hidden_values, }); @@ -1630,8 +1627,6 @@ sub print_options { $::form->{SM}{ $::form->{sendmode} } = "selected"; my $output = $::form->parse_html_template('rp/print_options', { - got_printer => $::myconfig{printer}, - show_latex => $::lx_office_conf{print_templates}->{latex}, is_email => $::form->{media} eq 'email', }); diff --git a/templates/webpages/am/config.html b/templates/webpages/am/config.html index 47d0fccbe..0f012a164 100644 --- a/templates/webpages/am/config.html +++ b/templates/webpages/am/config.html @@ -232,7 +232,7 @@ - [%- IF AUTH_RIGHTS_SALES_QUOTATION_EDIT %] + [%- IF AUTH.assert('sales_quotation_edit', 'may_fail') %] [% 'Show overdue sales quotations and requests for quotations...' | $T8 %] diff --git a/templates/webpages/bp/list_spool.html b/templates/webpages/bp/list_spool.html index 2ce20ffa7..ce5aff8d2 100644 --- a/templates/webpages/bp/list_spool.html +++ b/templates/webpages/bp/list_spool.html @@ -46,7 +46,7 @@ [% L.link(url(row.module _ '.pl', action='edit' ,type=type, callback=list_spool__callback, id=row.id), row.quonumber) %] [%- END %] [% row.name | html %] - [% L.link(spool _ '/' _ row.spoolfile, row.spoolfile) %][% L.hidden_tag('spoolfile_' _ loop.count, row.spoolfile) %] + [% L.link(LXCONFIG.paths.spool _ '/' _ row.spoolfile, row.spoolfile) %][% L.hidden_tag('spoolfile_' _ loop.count, row.spoolfile) %] [%- END %] diff --git a/templates/webpages/ic/search.html b/templates/webpages/ic/search.html index 8e71cb659..12cdcbbfe 100644 --- a/templates/webpages/ic/search.html +++ b/templates/webpages/ic/search.html @@ -44,7 +44,7 @@ id_key = 'id', label_key = 'partsgroup', style = 'width:250px', - limit = limit, + limit = MYCONFIG.vclimit, allow_textbox = 1 -%] diff --git a/templates/webpages/io/select_item.html b/templates/webpages/io/select_item.html index a212163fe..cbefece2a 100644 --- a/templates/webpages/io/select_item.html +++ b/templates/webpages/io/select_item.html @@ -12,7 +12,7 @@ [%- END %] [% LxERP.t8('Number') %] [% LxERP.t8('Part Description') %] - [%- IF SHOW_NOTES %] + [%- IF INSTANCE_CONF.get_show_longdescription_select_item %] [% LxERP.t8('Long Description') %] [%- END %] [% LxERP.t8('Other Matches') %] @@ -33,7 +33,7 @@ [%- END %] [% HTML.escape(item.partnumber) %] [% HTML.escape(item.description) %] - [%- IF SHOW_NOTES %] + [%- IF INSTANCE_CONF.get_show_longdescription_select_item %] [% USE P %] [% P.restricted_html(item.notes) %] [%- END %] diff --git a/templates/webpages/login/company_logo.html b/templates/webpages/login/company_logo.html index b0c0dc9fd..1bd83c062 100644 --- a/templates/webpages/login/company_logo.html +++ b/templates/webpages/login/company_logo.html @@ -32,7 +32,7 @@ [% HTML.escape(MYCONFIG.name) %] - [% IF AUTH_RIGHTS_ADMIN %][% END %][% 'Client' | $T8 %][% IF AUTH_RIGHTS_ADMIN %][% END %] + [% IF AUTH.assert('admin', 'may_fail') %][% END %][% 'Client' | $T8 %][% IF AUTH.assert('admin', 'may_fail') %][% END %] [% HTML.escape(client.name) %] diff --git a/templates/webpages/oe/search.html b/templates/webpages/oe/search.html index b7a24913a..e63f6cd1d 100644 --- a/templates/webpages/oe/search.html +++ b/templates/webpages/oe/search.html @@ -25,7 +25,7 @@ id_sub = 'vc_keys', label_key = 'name', select = vc_select, - limit = vclimit, + limit = MYCONFIG.vclimit, show_empty = 1, allow_textbox = 1, class = 'initial_focus', @@ -46,7 +46,7 @@ DATA = ALL_DEPARTMENTS, id_key = 'id', label_key = 'description', - limit = vclimit, + limit = MYCONFIG.vclimit, show_empty = 1, allow_textbox = 1, -%] @@ -87,12 +87,12 @@ [% 'Project Number' | $T8 %] [%- INCLUDE 'generic/multibox.html' - name = vclimit < ALL_PROJECTS.size ? 'projectnumber' : 'project_id', + name = MYCONFIG.vclimit < ALL_PROJECTS.size ? 'projectnumber' : 'project_id', style = "width: 250px", DATA = ALL_PROJECTS, id_key = 'id', label_key = 'projectnumber', - limit = vclimit, + limit = MYCONFIG.vclimit, show_empty = 1, allow_textbox = 1, -%] diff --git a/templates/webpages/rp/e_mail.html b/templates/webpages/rp/e_mail.html index 387769ec5..3c20bb8e5 100644 --- a/templates/webpages/rp/e_mail.html +++ b/templates/webpages/rp/e_mail.html @@ -17,7 +17,7 @@ [% 'Subject' | $T8 %] -[% IF show_bcc %] +[% IF AUTH.assert('email_bcc', 'may_fail') %] [% 'Bcc' | $T8 %] [%- END %] diff --git a/templates/webpages/rp/print_options.html b/templates/webpages/rp/print_options.html index 776a02d81..502055823 100644 --- a/templates/webpages/rp/print_options.html +++ b/templates/webpages/rp/print_options.html @@ -23,13 +23,13 @@ [%- ELSE %] - [%- IF got_printer && show_latex %] + [%- IF MYCONFIG.printer && LXCONFIG.primt_templates.latex %] [%- END %] [%- END %] -[%- IF got_printer && show_latex && !is_email %] +[%- IF MYCONFIG.printer && LXCONFIG.primt_templates.latex && !is_email %] [% 'Copies' | $T8 %] [%- END %] diff --git a/templates/webpages/rp/report.html b/templates/webpages/rp/report.html index 93ef0a9ea..2e9775a96 100644 --- a/templates/webpages/rp/report.html +++ b/templates/webpages/rp/report.html @@ -62,8 +62,8 @@ [% 'Method' | $T8 %] - [% L.radio_button_tag('method', value='accrual', checked=accrual, label=LxERP.t8('Accrual')) %] - [% L.radio_button_tag('method', value='cash', checked=cash, label=LxERP.t8('cash')) %] + [% L.radio_button_tag('method', value='accrual', checked=(INSTANCE_CONF.get_accounting_method=='accrual'), label=LxERP.t8('Accrual')) %] + [% L.radio_button_tag('method', value='cash', checked=(INSTANCE_CONF.get_accounting_method=='cash'), label=LxERP.t8('cash')) %] [%- END %]