Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 25b85515

Von Bernd Bleßmann vor mehr als 10 Jahren hinzugefügt

  • ID 25b855157fa65535683b458c1ca2dd0c3636b788
  • Vorgänger 86b6ff8a
  • Nachfolger 0cb6e3af

Benutzerdef. Variablen in Belegen als Tabelle rendern ...

... im Moment mit fester Spaltenzahl.

Unterschiede anzeigen:

bin/mozilla/io.pl
1865 1865
  foreach my $cvar (@{ $form->{CVAR_CONFIGS}->{IC} }) {
1866 1866
    $cvar->{valid} = $params{part_id} && $valid->($cvar->{id});
1867 1867

  
1868
    my $show = 0;
1868 1869
    my $description = '';
1869 1870
    if ($cvar->{flag_editable} && $cvar->{valid}) {
1870 1871
      $num_visible_cvars++;
1871 1872
      $description = $cvar->{description} . ' ';
1873
      $show = 1;
1872 1874
    }
1873 1875

  
1874 1876
    my $form_key = "ic_cvar_" . $cvar->{name} . "_$params{row}";
1875 1877

  
1876 1878
    push @{ $params{ROW2} }, {
1877
      line_break     => $num_visible_cvars == 1,
1879
      line_break     => $show && !(($num_visible_cvars - 1) % 3),
1878 1880
      description    => $description,
1879 1881
      cvar           => 1,
1880 1882
      render_options => {
css/kivitendo/main.css
455 455
  background-image: url(../../image/icons/16x16/phone.png);
456 456
  background-repeat: no-repeat;
457 457
}
458

  
459
/* the cvars table in the 2. row */
460
.row2-cvars-table tr {vertical-align: top;}
461
.row2-cvars-table th {text-align: right; padding-left: 15px; padding-right: 0;}
462
.row2-cvars-table td, .row2-cvars-table th {padding-top: 10px;}
css/lx-office-erp/main.css
506 506
  background-image: url(../../image/icons/16x16/phone.png);
507 507
  background-repeat: no-repeat;
508 508
}
509

  
510
/* the cvars table in the 2. row */
511
.row2-cvars-table tr {vertical-align: top;}
512
.row2-cvars-table th {text-align: right; padding-left: 15px; padding-right: 0;}
513
.row2-cvars-table td, .row2-cvars-table th {padding-top: 10px;}
templates/webpages/oe/sales_order.html
37 37
     <tr class="listrow[% loop.count % 2 %]" id="row2.[% loop.count %]" [% UNLESS show_details %]style="display:none;"[% END %]>
38 38
      <td colspan="[% row.colspan %]">
39 39
 [%- FOREACH row2 = row.ROW2 %]
40
   [%- IF row2.line_break %]<br>[%- END %]
41
   [%- IF row2.cvar %]
42
     [% row2.description %]
43
     [% PROCESS cvar_inputs cvar = row2.render_options %]
44
   [%- ELSE %]
40
   [%- IF !row2.cvar %]
45 41
     [% row2.value %]
46 42
   [%- END %]
47 43
 [%- END %]
44

  
45
 <table class='row2-cvars-table'>
46
   <tr>
47
   [%- FOREACH row2 = row.ROW2 %]
48
     [%- IF row2.cvar && row2.render_options.valid %]
49
       [%- IF row2.line_break %]
50
         </tr><tr>
51
       [%- END %]
52
     <th>
53
       [% row2.description %]
54
     </th>
55
     <td>
56
       [% PROCESS cvar_inputs cvar = row2.render_options %]
57
     </td>
58
     [%- END %]
59
   [%- END %]
60
   </tr>
61
 </table>
62

  
48 63
      </td>
49 64
     </tr>
50 65
[%- END %]

Auch abrufbar als: Unified diff