From: Bernd Bleßmann Date: Mon, 4 Aug 2014 16:14:01 +0000 (+0200) Subject: Benutzerdef. Variablen in Belegen als Tabelle rendern ... X-Git-Tag: release-3.2.0beta~358^2~1 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=25b855157fa65535683b458c1ca2dd0c3636b788;p=kivitendo-erp.git Benutzerdef. Variablen in Belegen als Tabelle rendern ... ... im Moment mit fester Spaltenzahl. --- diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl index 4cd882269..d3441ea4d 100644 --- a/bin/mozilla/io.pl +++ b/bin/mozilla/io.pl @@ -1865,16 +1865,18 @@ sub _render_custom_variables_inputs { foreach my $cvar (@{ $form->{CVAR_CONFIGS}->{IC} }) { $cvar->{valid} = $params{part_id} && $valid->($cvar->{id}); + my $show = 0; my $description = ''; if ($cvar->{flag_editable} && $cvar->{valid}) { $num_visible_cvars++; $description = $cvar->{description} . ' '; + $show = 1; } my $form_key = "ic_cvar_" . $cvar->{name} . "_$params{row}"; push @{ $params{ROW2} }, { - line_break => $num_visible_cvars == 1, + line_break => $show && !(($num_visible_cvars - 1) % 3), description => $description, cvar => 1, render_options => { diff --git a/css/kivitendo/main.css b/css/kivitendo/main.css index 6fa432dc0..0b701b45d 100644 --- a/css/kivitendo/main.css +++ b/css/kivitendo/main.css @@ -455,3 +455,8 @@ a.cti_call_action { background-image: url(../../image/icons/16x16/phone.png); background-repeat: no-repeat; } + +/* the cvars table in the 2. row */ +.row2-cvars-table tr {vertical-align: top;} +.row2-cvars-table th {text-align: right; padding-left: 15px; padding-right: 0;} +.row2-cvars-table td, .row2-cvars-table th {padding-top: 10px;} diff --git a/css/lx-office-erp/main.css b/css/lx-office-erp/main.css index ab71226dc..a4773abd5 100644 --- a/css/lx-office-erp/main.css +++ b/css/lx-office-erp/main.css @@ -506,3 +506,8 @@ a.cti_call_action { background-image: url(../../image/icons/16x16/phone.png); background-repeat: no-repeat; } + +/* the cvars table in the 2. row */ +.row2-cvars-table tr {vertical-align: top;} +.row2-cvars-table th {text-align: right; padding-left: 15px; padding-right: 0;} +.row2-cvars-table td, .row2-cvars-table th {padding-top: 10px;} diff --git a/templates/webpages/oe/sales_order.html b/templates/webpages/oe/sales_order.html index d96740a59..6c131c742 100644 --- a/templates/webpages/oe/sales_order.html +++ b/templates/webpages/oe/sales_order.html @@ -37,14 +37,29 @@ [%- FOREACH row2 = row.ROW2 %] - [%- IF row2.line_break %]
[%- END %] - [%- IF row2.cvar %] - [% row2.description %] - [% PROCESS cvar_inputs cvar = row2.render_options %] - [%- ELSE %] + [%- IF !row2.cvar %] [% row2.value %] [%- END %] [%- END %] + + + + [%- FOREACH row2 = row.ROW2 %] + [%- IF row2.cvar && row2.render_options.valid %] + [%- IF row2.line_break %] + + [%- END %] + + + [%- END %] + [%- END %] + +
+ [% row2.description %] + + [% PROCESS cvar_inputs cvar = row2.render_options %] +
+ [%- END %]