]> wagnertech.de Git - kivitendo-erp.git/commitdiff
Template-Parameter "conf_xyz" durch "INSTANCE_CONF.get_xyz" ersetzt
authorMoritz Bunkus <m.bunkus@linet-services.de>
Mon, 1 Jul 2013 14:40:07 +0000 (16:40 +0200)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Mon, 1 Jul 2013 14:53:00 +0000 (16:53 +0200)
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.

SL/Form.pm
templates/webpages/ct/form_header.html
templates/webpages/do/form_header.html
templates/webpages/ic/form_header.html
templates/webpages/ic/search.html
templates/webpages/ir/form_header.html
templates/webpages/is/form_header.html
templates/webpages/oe/form_header.html
templates/webpages/webdav/_list.html

index 7bc62e8864947692560fe0f0dcc7afb6e437aae9..5c701f79201676f09a33e232aadbe7e3540e6a06 100644 (file)
@@ -614,14 +614,7 @@ sub _prepare_html_template {
     map { $additional_params->{"myconfig_${_}"} = $main::myconfig{$_}; } keys %::myconfig;
   }
 
-  $additional_params->{"conf_webdav"}                 = $::instance_conf->get_webdav;
-  $additional_params->{"conf_latex_templates"}        = $::lx_office_conf{print_templates}->{latex};
-  $additional_params->{"conf_opendocument_templates"} = $::lx_office_conf{print_templates}->{opendocument};
-  $additional_params->{"conf_vertreter"}              = $::instance_conf->get_vertreter;
-  $additional_params->{"conf_parts_image_css"}        = $::instance_conf->get_parts_image_css;
-  $additional_params->{"conf_parts_listing_image"}    = $::instance_conf->get_parts_listing_image;
-  $additional_params->{"conf_parts_show_image"}       = $::instance_conf->get_parts_show_image;
-  $additional_params->{"INSTANCE_CONF"}               = $::instance_conf;
+  $additional_params->{INSTANCE_CONF} = $::instance_conf;
 
   if (my $debug_options = $::lx_office_conf{debug}{options}) {
     map { $additional_params->{'DEBUG_' . uc($_)} = $debug_options->{$_} } keys %$debug_options;
index 294cf4769d59c10e7f0d51fa249ddba456c8901d..cd5f610212c309ecea9d7df19e1418ff3b5f7374 100644 (file)
@@ -26,7 +26,7 @@
 
     <table width="100%">
      <tr height="5"></tr>
-     [% IF conf_vertreter %]
+     [% IF INSTANCE_CONF.get_vertreter %]
       <tr>
        <th align="right">[% IF is_customer %][% 'Type of Customer' | $T8 %][%- ELSE %][% 'Type of Vendor' | $T8 %][%- END %]</th>
        <td>
      </tr>
 
      <tr>
-      [% UNLESS conf_vertreter %]
+      [% UNLESS INSTANCE_CONF.get_vertreter %]
        <th align="right">[% IF is_customer %][% 'Type of Customer' | $T8 %][% ELSE %][% 'Type of Vendor' | $T8 %][%- END %]</th>
        <td>
         [%- INCLUDE generic/multibox.html
              label_key  = 'description',
        -%]
       </td>
-      [%- IF is_customer && !conf_vertreter %]
+      [%- IF is_customer && !INSTANCE_CONF.get_vertreter %]
       <th align="right">[% 'Salesman' | $T8 %]</th>
       <td>[% L.select_tag('salesman_id', ALL_SALESMEN, default = salesman_id, with_empty = 1, title_key = 'safe_name') %]</td>
       [%- END %]
index ceed4e56491eb9dae988f7c25a44d7f360c9681c..baf7b3fee0fa6333b0aec9b0a545354717b49a3c 100644 (file)
@@ -48,7 +48,7 @@
  <div class="tabwidget">
   <ul>
    <li><a href="#ui-tabs-basic-data">[% 'Basic Data' | $T8 %]</a></li>
-[%- IF conf_webdav %]
+[%- IF INSTANCE_CONF.get_webdav %]
    <li><a href="#ui-tabs-webdav">[% 'WebDAV' | $T8 %]</a></li>
 [%- END %]
 [%- IF id %]
index 23a79331636482d252d768939de11b3d12a72582..00889195da4d56112f819ba332056489a75ea63e 100644 (file)
@@ -41,8 +41,8 @@
       <table width="100%">
        <tr valign="top">
         <td>
-[%- IF image && conf_parts_show_image %]
-         <a href="[% image | html %]" target="_blank"><img style="[% conf_parts_image_css %]" src="[% image | html %]"/></a>
+[%- IF image && INSTANCE_CONF.get_parts_show_image %]
+         <a href="[% image | html %]" target="_blank"><img style="[% INSTANCE_CONF.get_parts_image_css %]" src="[% image | html %]"/></a>
 [%- END %]
 
          <table>
index a9799a57cdbaa201af875f7143da642cf8ab05e9..ce904eb1ca2f9a40de77c4a05005abbdecc5d46b 100644 (file)
          </tr>
 
          <tr>
-          <td>[%- L.checkbox_tag('l_image', label=LxERP.t8('Image'), value='Y', checked=(conf_parts_listing_images ? 1 : 0)) %]</td>
+          <td>[%- L.checkbox_tag('l_image', label=LxERP.t8('Image'), value='Y', checked=(INSTANCE_CONF.get_parts_listing_images ? 1 : 0)) %]</td>
           <td>[%- L.checkbox_tag('l_drawing', label=LxERP.t8('Drawing'), value='Y') %]</td>
           <td>[%- L.checkbox_tag('l_microfiche', label=LxERP.t8('Microfiche'), value='Y') %]</td>
           <td>[%- L.checkbox_tag('l_partsgroup', label=LxERP.t8('Group'), value='Y') %]</td>
index 10739b6ea4c65bfff75494fe1cf1d81e244b15d1..fb9660a019b7a800ad6b5b7d7175a772d0b08572 100644 (file)
@@ -28,7 +28,7 @@
 <div class="tabwidget">
  <ul>
   <li><a href="#ui-tabs-basic-data">[% 'Basic Data' | $T8 %]</a></li>
-[%- IF conf_webdav %]
+[%- IF INSTANCE_CONF.get_webdav %]
   <li><a href="#ui-tabs-webdav">[% 'WebDAV' | $T8 %]</a></li>
 [%- END %]
 [%- IF id %]
index 89aa3fc4fccf47cd1b5df538bdacbf9b5717ea06..f0184be3a7cb98d5fa5b5e7f6fe8329f0ccfcc1f 100644 (file)
@@ -29,7 +29,7 @@
 <div class="tabwidget">
  <ul>
   <li><a href="#ui-tabs-basic-data">[% 'Basic Data' | $T8 %]</a></li>
-[%- IF conf_webdav %]
+[%- IF INSTANCE_CONF.get_webdav %]
   <li><a href="#ui-tabs-webdav">[% 'WebDAV' | $T8 %]</a></li>
 [%- END %]
 [%- IF id %]
index 50c9c46dbe4126f19126b4862aeb9079edbcbc41..8d07f73a7e6d71fb41fa46ee95fde33ceb2324ee 100644 (file)
@@ -32,7 +32,7 @@
     <div class="tabwidget">
      <ul>
       <li><a href="#ui-tabs-basic-data">[% 'Basic Data' | $T8 %]</a></li>
-[%- IF conf_webdav %]
+[%- IF INSTANCE_CONF.get_webdav %]
       <li><a href="#ui-tabs-webdav">[% 'WebDAV' | $T8 %]</a></li>
 [%- END %]
 [%- IF id %]
index 2e1d1e44e700ee8572adcfd2aa436df70f6d297e..50e92d660497ef499084fd9d533d97ca0f447747 100644 (file)
@@ -1,6 +1,6 @@
 [% USE HTML %][% USE T8 %]
 
-[%- IF conf_webdav %]
+[%- IF INSTANCE_CONF.get_webdav %]
 <div id="ui-tabs-webdav">
 
  <div class="listtop" align="left">[% 'Documents in the WebDAV repository' | $T8 %]</div>