Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 15e4b732

Von Moritz Bunkus vor mehr als 11 Jahren hinzugefügt

  • ID 15e4b73285e0b4901eee0737df74f32aeca2c048
  • Vorgänger 64b49f6c
  • Nachfolger a4767524

Template-Parameter "conf_xyz" durch "INSTANCE_CONF.get_xyz" ersetzt

Ansonsten haben wir ein Henne/Ei-Problem: Form::parse_html_template
will die Variablen "conf_xyz" anhand der Werte in $::instance_conf
setzen, ruft also dort die Funktionen auf. Wurde aber das dazugehörige
DB-Upgrade noch nicht eingespielt, so croakt() das.

Unterschiede anzeigen:

SL/Form.pm
614 614
    map { $additional_params->{"myconfig_${_}"} = $main::myconfig{$_}; } keys %::myconfig;
615 615
  }
616 616

  
617
  $additional_params->{"conf_webdav"}                 = $::instance_conf->get_webdav;
618
  $additional_params->{"conf_latex_templates"}        = $::lx_office_conf{print_templates}->{latex};
619
  $additional_params->{"conf_opendocument_templates"} = $::lx_office_conf{print_templates}->{opendocument};
620
  $additional_params->{"conf_vertreter"}              = $::instance_conf->get_vertreter;
621
  $additional_params->{"conf_parts_image_css"}        = $::instance_conf->get_parts_image_css;
622
  $additional_params->{"conf_parts_listing_image"}    = $::instance_conf->get_parts_listing_image;
623
  $additional_params->{"conf_parts_show_image"}       = $::instance_conf->get_parts_show_image;
624
  $additional_params->{"INSTANCE_CONF"}               = $::instance_conf;
617
  $additional_params->{INSTANCE_CONF} = $::instance_conf;
625 618

  
626 619
  if (my $debug_options = $::lx_office_conf{debug}{options}) {
627 620
    map { $additional_params->{'DEBUG_' . uc($_)} = $debug_options->{$_} } keys %$debug_options;
templates/webpages/ct/form_header.html
26 26

  
27 27
    <table width="100%">
28 28
     <tr height="5"></tr>
29
     [% IF conf_vertreter %]
29
     [% IF INSTANCE_CONF.get_vertreter %]
30 30
      <tr>
31 31
       <th align="right">[% IF is_customer %][% 'Type of Customer' | $T8 %][%- ELSE %][% 'Type of Vendor' | $T8 %][%- END %]</th>
32 32
       <td>
......
238 238
     </tr>
239 239

  
240 240
     <tr>
241
      [% UNLESS conf_vertreter %]
241
      [% UNLESS INSTANCE_CONF.get_vertreter %]
242 242
       <th align="right">[% IF is_customer %][% 'Type of Customer' | $T8 %][% ELSE %][% 'Type of Vendor' | $T8 %][%- END %]</th>
243 243
       <td>
244 244
        [%- INCLUDE generic/multibox.html
......
295 295
             label_key  = 'description',
296 296
       -%]
297 297
      </td>
298
      [%- IF is_customer && !conf_vertreter %]
298
      [%- IF is_customer && !INSTANCE_CONF.get_vertreter %]
299 299
      <th align="right">[% 'Salesman' | $T8 %]</th>
300 300
      <td>[% L.select_tag('salesman_id', ALL_SALESMEN, default = salesman_id, with_empty = 1, title_key = 'safe_name') %]</td>
301 301
      [%- END %]
templates/webpages/do/form_header.html
48 48
 <div class="tabwidget">
49 49
  <ul>
50 50
   <li><a href="#ui-tabs-basic-data">[% 'Basic Data' | $T8 %]</a></li>
51
[%- IF conf_webdav %]
51
[%- IF INSTANCE_CONF.get_webdav %]
52 52
   <li><a href="#ui-tabs-webdav">[% 'WebDAV' | $T8 %]</a></li>
53 53
[%- END %]
54 54
[%- IF id %]
templates/webpages/ic/form_header.html
41 41
      <table width="100%">
42 42
       <tr valign="top">
43 43
        <td>
44
[%- IF image && conf_parts_show_image %]
45
         <a href="[% image | html %]" target="_blank"><img style="[% conf_parts_image_css %]" src="[% image | html %]"/></a>
44
[%- IF image && INSTANCE_CONF.get_parts_show_image %]
45
         <a href="[% image | html %]" target="_blank"><img style="[% INSTANCE_CONF.get_parts_image_css %]" src="[% image | html %]"/></a>
46 46
[%- END %]
47 47

  
48 48
         <table>
templates/webpages/ic/search.html
186 186
         </tr>
187 187

  
188 188
         <tr>
189
          <td>[%- L.checkbox_tag('l_image', label=LxERP.t8('Image'), value='Y', checked=(conf_parts_listing_images ? 1 : 0)) %]</td>
189
          <td>[%- L.checkbox_tag('l_image', label=LxERP.t8('Image'), value='Y', checked=(INSTANCE_CONF.get_parts_listing_images ? 1 : 0)) %]</td>
190 190
          <td>[%- L.checkbox_tag('l_drawing', label=LxERP.t8('Drawing'), value='Y') %]</td>
191 191
          <td>[%- L.checkbox_tag('l_microfiche', label=LxERP.t8('Microfiche'), value='Y') %]</td>
192 192
          <td>[%- L.checkbox_tag('l_partsgroup', label=LxERP.t8('Group'), value='Y') %]</td>
templates/webpages/ir/form_header.html
28 28
<div class="tabwidget">
29 29
 <ul>
30 30
  <li><a href="#ui-tabs-basic-data">[% 'Basic Data' | $T8 %]</a></li>
31
[%- IF conf_webdav %]
31
[%- IF INSTANCE_CONF.get_webdav %]
32 32
  <li><a href="#ui-tabs-webdav">[% 'WebDAV' | $T8 %]</a></li>
33 33
[%- END %]
34 34
[%- IF id %]
templates/webpages/is/form_header.html
29 29
<div class="tabwidget">
30 30
 <ul>
31 31
  <li><a href="#ui-tabs-basic-data">[% 'Basic Data' | $T8 %]</a></li>
32
[%- IF conf_webdav %]
32
[%- IF INSTANCE_CONF.get_webdav %]
33 33
  <li><a href="#ui-tabs-webdav">[% 'WebDAV' | $T8 %]</a></li>
34 34
[%- END %]
35 35
[%- IF id %]
templates/webpages/oe/form_header.html
32 32
    <div class="tabwidget">
33 33
     <ul>
34 34
      <li><a href="#ui-tabs-basic-data">[% 'Basic Data' | $T8 %]</a></li>
35
[%- IF conf_webdav %]
35
[%- IF INSTANCE_CONF.get_webdav %]
36 36
      <li><a href="#ui-tabs-webdav">[% 'WebDAV' | $T8 %]</a></li>
37 37
[%- END %]
38 38
[%- IF id %]
templates/webpages/webdav/_list.html
1 1
[% USE HTML %][% USE T8 %]
2 2

  
3
[%- IF conf_webdav %]
3
[%- IF INSTANCE_CONF.get_webdav %]
4 4
<div id="ui-tabs-webdav">
5 5

  
6 6
 <div class="listtop" align="left">[% 'Documents in the WebDAV repository' | $T8 %]</div>

Auch abrufbar als: Unified diff