From: Sven Schöling Date: Tue, 19 Apr 2011 16:17:11 +0000 (+0200) Subject: Cvar partial template auf PROCESS umgebaut. Spart bei sehr grossen masken ~5 Sekunden. X-Git-Tag: release-2.6.3~33^2~2 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=edff1af989932ed02af331de928fbf832169f156;p=kivitendo-erp.git Cvar partial template auf PROCESS umgebaut. Spart bei sehr grossen masken ~5 Sekunden. --- diff --git a/templates/webpages/amcvar/render_inputs_block.html b/templates/webpages/amcvar/render_inputs_block.html index bea36c048..996525fba 100644 --- a/templates/webpages/amcvar/render_inputs_block.html +++ b/templates/webpages/amcvar/render_inputs_block.html @@ -1,44 +1,38 @@ [%- USE T8 %] [%- USE HTML %] +[%- BLOCK cvar_name %][% HTML.escape(cvar.name_prefix) _ "cvar_" _ HTML.escape(cvar.var.name) _ HTML.escape(cvar.name_postfix) -%][% END %] [%- BLOCK cvar_inputs %] -[%- var = cvar.var %] -[%- hide_non_editable = cvar.hide_non_editable, %] -[%- name_prefix = cvar.name_prefix, %] -[%- name_postfix = cvar.name_postfix, %] -[%- valid = cvar.valid, %] -[%- value = cvar.value, %] -[%- var_name = HTML.escape(name_prefix) _ "cvar_" _ HTML.escape(var.name) _ HTML.escape(name_postfix) -%] [%- %] -[%- IF hide_non_editable && !var.flag_editable %] - -[%- ELSIF !valid %] +[%- IF cvar.hide_non_editable && !cvar.var.flag_editable %] + +[%- ELSIF !cvar.valid %] [%- IF show_disabled_message %] [% 'Element disabled' | $T8 %] [%- END %] -[%- ELSIF var.type == 'bool' %] - -[%- ELSIF var.type == 'textfield' %] - -[%- ELSIF var.type == 'date' %] - - +[%- ELSIF cvar.var.type == 'bool' %] + +[%- ELSIF cvar.var.type == 'textfield' %] + +[%- ELSIF cvar.var.type == 'date' %] + + -[%- ELSIF var.type == 'timestamp' %] - -[%- ELSIF var.type == 'select' %] - +[%- ELSIF cvar.var.type == 'select' %] + [%- ELSE %] - + [%- END %] [%- END %] diff --git a/templates/webpages/oe/sales_order.html b/templates/webpages/oe/sales_order.html index 315d1a9d2..884e4e0c7 100644 --- a/templates/webpages/oe/sales_order.html +++ b/templates/webpages/oe/sales_order.html @@ -30,7 +30,7 @@ [%- IF row2.line_break %]
[%- END %] [%- IF row2.cvar %] [% row2.description %] - [% INCLUDE cvar_inputs cvar = row2.render_options %] + [% PROCESS cvar_inputs cvar = row2.render_options %] [%- ELSE %] [% row2.value %] [%- END %]