Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 3af76802

Von Bernd Bleßmann vor fast 9 Jahren hinzugefügt

  • ID 3af7680219b879d23022b5ab8fed353fc36b1c91
  • Vorgänger ab435052
  • Nachfolger 3e15b504

PrintOptions-Helper: Ausgabe der Header ermöglichen.

Unterschiede anzeigen:

SL/Helper/PrintOptions.pm
107 107
      if ((ref $form->{printers} eq 'ARRAY') && scalar @{ $form->{printers } });
108 108

  
109 109
  @SELECTS = map {
110
    sname => $_->[1],
111
    DATA  => $_->[0],
112
    show  => !$options->{"hide_" . $_->[1]} && scalar @{ $_->[0] }
110
    sname  => $_->[1],
111
    DATA   => $_->[0],
112
    show   => !$options->{"hide_" . $_->[1]} && scalar @{ $_->[0]},
113
    hname  => $locale->text($_->[2])
113 114
  },
114
  [ \@FORMNAME,    'formname',    ],
115
  [ \@LANGUAGE_ID, 'language_id', ],
116
  [ \@FORMAT,      'format',      ],
117
  [ \@SENDMODE,    'sendmode',    ],
118
  [ \@MEDIA,       'media',       ],
119
  [ \@PRINTER_ID,  'printer_id',  ];
115
  [ \@FORMNAME,    'formname',    'Formname' ],
116
  [ \@LANGUAGE_ID, 'language_id', 'Language' ],
117
  [ \@FORMAT,      'format',      'Format'   ],
118
  [ \@SENDMODE,    'sendmode',    'Sendmode' ],
119
  [ \@MEDIA,       'media',       'Media'    ],
120
  [ \@PRINTER_ID,  'printer_id',  'Printer'  ];
120 121

  
121 122
  my %dont_display_groupitems = (
122 123
    'dunning' => 1,
......
125 126

  
126 127
  my %template_vars = (
127 128
    name_prefix          => $prefix || '',
129
    show_headers         => $options->{show_headers},
128 130
    display_copies       => scalar @{ $form->{printers} || [] } && $::lx_office_conf{print_templates}->{latex} && $form->{media} ne 'email',
129 131
    display_remove_draft => (!$form->{id} && $form->{draft_id}),
130 132
    display_groupitems   => !$dont_display_groupitems{$form->{type}},
templates/webpages/generic/print_options.html
5 5
 <tr>
6 6
  <td>
7 7
   <table>
8
    [%- IF show_headers %]
8 9
    <tr>
10
     [%- FOREACH row = SELECTS %]
11
     [%- IF row.show %]
12
     <th align="left">[%- row.hname %]</th>
13
     [%- END %]
14
     [%- END %]
15
     [%- IF display_copies %]
16
     <th align="left">[% 'Copies' | $T8 %]</th>
17
     [%- END %]
18
     [%- IF display_groupitems %]
19
     <th align="left">[% 'Group Items' | $T8 %]</th>
20
     [%- END %]
21
     [%- IF display_remove_draft %]
22
     <th align="left">[% 'Remove Draft' | $T8 %]</th>
23
     [%- END %]
24
    </tr>
25
    [%- END %]
26
    <tr>
27
     [%- FOREACH row = SELECTS %]
28
     [%- IF row.show %]
9 29
     <td>
10
      [%- FOREACH row = SELECTS %]
11
      [%- IF row.show %]
12 30
      <select name="[%- name_prefix %][%- row.sname %]">
13 31
       [%- FOREACH data = row.DATA %]
14
       <option value="[% data.value %]" [% data.selected %]>[% data.oname %]</option>
32
        <option value="[% data.value %]" [% data.selected %]>[% data.oname %]</option>
15 33
       [%- END %]
16 34
      </select>
17
      [%- END %]
18
      [%- END %]
19 35
     </td>
36
     [%- END %]
37
     [%- END %]
20 38
     [%- IF display_copies %]
21
     <td>[% 'Copies' | $T8 %] <input name="[%- name_prefix %]copies" size="2" value="[% HTML.escape(copies) %]"></td>
39
     <td>[%- IF !show_headers %][%- 'Copies' | $T8 %][%- END %]<input name="[%- name_prefix %]copies" size="2" value="[% HTML.escape(copies) %]"></td>
22 40
     [%- END %]
23 41
     [%- IF display_groupitems %]
24
     <td>[% 'Group Items' | $T8 %]</td>
25
     <td><input name="[%- name_prefix %]groupitems" type="checkbox" class="checkbox" [% groupitems_checked %]></td>
42
     <td>[%- IF !show_headers %][% 'Group Items' | $T8 %][%- END %]
43
      <input name="[%- name_prefix %]groupitems" type="checkbox" class="checkbox" [% groupitems_checked %]>
44
     </td>
26 45
     [%- END %]
27 46
     [%- IF display_remove_draft %]
28
     <td>[% 'Remove Draft' | $T8 %]</td>
29
     <td><input name="[%- name_prefix %]remove_draft" type="checkbox" class="checkbox" [% remove_draft_checked %]></td>
47
     <td>[%- IF !show_headers %][% 'Remove Draft' | $T8 %][%- END %]
48
      <input name="[%- name_prefix %]remove_draft" type="checkbox" class="checkbox" [% remove_draft_checked %]>
49
     </td>
30 50
     [%- END %]
31 51
    </tr>
32 52
   </table>
......
36 56
  </td>
37 57
 </tr>
38 58
</table>
39

  

Auch abrufbar als: Unified diff