... im Moment mit fester Spaltenzahl.
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 => {
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;}
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;}
<tr class="listrow[% loop.count % 2 %]" id="row2.[% loop.count %]" [% UNLESS show_details %]style="display:none;"[% END %]>
<td colspan="[% row.colspan %]">
[%- FOREACH row2 = row.ROW2 %]
- [%- IF row2.line_break %]<br>[%- END %]
- [%- IF row2.cvar %]
- [% row2.description %]
- [% PROCESS cvar_inputs cvar = row2.render_options %]
- [%- ELSE %]
+ [%- IF !row2.cvar %]
[% row2.value %]
[%- END %]
[%- END %]
+
+ <table class='row2-cvars-table'>
+ <tr>
+ [%- FOREACH row2 = row.ROW2 %]
+ [%- IF row2.cvar && row2.render_options.valid %]
+ [%- IF row2.line_break %]
+ </tr><tr>
+ [%- END %]
+ <th>
+ [% row2.description %]
+ </th>
+ <td>
+ [% PROCESS cvar_inputs cvar = row2.render_options %]
+ </td>
+ [%- END %]
+ [%- END %]
+ </tr>
+ </table>
+
</td>
</tr>
[%- END %]