commit 064232d4775f547c5a571572ff48252a9bb7089d
Author: Moritz Bunkus <m.bunkus@linet.de>
Date:   Mon May 14 12:12:14 2007 +0000

    CSS-Menü aus HTML-Vorlage erzeugen lassen.

diff --git a/bin/mozilla/menuv3.pl b/bin/mozilla/menuv3.pl
index 4ad56bd5e..86cf6bb59 100644
--- a/bin/mozilla/menuv3.pl
+++ b/bin/mozilla/menuv3.pl
@@ -40,50 +40,19 @@ use SL::Menu;
 # end of main
 
 sub display {
-  $form->header(qq|<link rel="stylesheet" href="css/menuv3.css?id=| .
-                int(rand(100000)) . qq|" type="text/css">|);
+  $form->header(qq|<link rel="stylesheet" href="css/menuv3.css?id=" type="text/css">|);
 
-  print(qq|<body style="padding:0px; margin:0px;">\n|);
+  $form->{date} = clock_line();
+  $form->{menu} = acc_menu();
 
-  clock_line();
-
-  print qq|
-
-<div id="menu">
-
-| . acc_menu() . qq|
-
-</div>
-
-<div style="clear: both;"></div>
-
-<iframe id="win1" src="login.pl?login=$form->{login}&password=$form->{password}&action=company_logo" width="100%" height="94%" name="main_window" style="position: absolute; border: 0px; z-index: 99; ">
-<p>Ihr Browser kann leider keine eingebetteten Frames anzeigen. Bitte w&auml;hlen Sie ein anderes Men&uuml; in der Benutzerkonfiguration im Administrationsmen&uuml; aus.
-</p>
-</iframe>
-</body>
-</html>
-
-|;
+  print $form->parse_html_template("menu/menuv3");
 
 }
 
 sub clock_line {
-
-  $fensterlink="menuv3.pl?login=$form->{login}&password=$form->{password}&action=display";
-  $fenster = "["."<a href=\"$fensterlink\" target=\"_blank\">neues Fenster</a>]";
-
-  $login = "[".$locale->text('User') . ": "
-    . $form->{login}
-    . " - <a href=\"login.pl?password="
-    . $form->{"password"}
-    . "&action=logout\" target=\"_top\">"
-    . $locale->text('Logout')
-    . "</a>] ";
   my ($Sekunden, $Minuten,   $Stunden,   $Monatstag, $Monat,
       $Jahr,     $Wochentag, $Jahrestag, $Sommerzeit)
     = localtime(time);
-  my $CTIME_String = localtime(time);
   $Monat     += 1;
   $Jahrestag += 1;
   $Monat     = $Monat < 10     ? $Monat     = "0" . $Monat     : $Monat;
@@ -95,36 +64,11 @@ sub clock_line {
                      "April",  "Mai",       "Juni",    "Juli",
                      "August", "September", "Oktober", "November",
                      "Dezember");
-  $datum =
+  return
       $Wochentage[$Wochentag] . ", der "
     . $Monatstag . "."
     . $Monat . "."
     . $Jahr . " - ";
-
-  #$zeit="<div id='Uhr'>".$Stunden.":".$Minuten.":".$Sekunden."</div>";
-  $zeit = "<div id='Uhr'>" . $Stunden . ":" . $Minuten . "</div>";
-  print qq|
-<script type="text/javascript">
-<!--
-function clockon() {
-  var now = new Date();
-  var h = now.getHours();
-  var m = now.getMinutes();
-  document.getElementById('clock_id').innerHTML = (h<10?'0'+h:h)+":"+(m<10?'0'+m:m);
-  var timer=setTimeout("clockon()", 10000);
-}
-window.onload=clockon
-//-->
-</script>
-<table border="0" width="100%" background="image/bg_titel.gif" cellpadding="0" cellspacing="0">
-  <tr>
-    <td style="color:white; font-family:verdana,arial,sans-serif; font-size: 12px;"> &nbsp; $fenster &nbsp; [<a href="JavaScript:top.main_window.print()">drucken</a>]</td>
-    <td align="right" style="vertical-align:middle; color:white; font-family:verdana,arial,sans-serif; font-size: 12px;" nowrap>
-      $login $datum <span id='clock_id' style='position:relative'></span>&nbsp;
-    </td>
-  </tr>
-</table>
-|;
 }
 
 sub acc_menu {
diff --git a/locale/de/all b/locale/de/all
index 9fe514854..d083dc20c 100644
--- a/locale/de/all
+++ b/locale/de/all
@@ -650,6 +650,7 @@ gestartet',
   'Lx-Office 2.4.0 introduces two new concepts: tax zones and Buchungsgruppen.' => 'Lx-Office 2.4.0 f&uuml;hrt zwei neue Konzepte ein: Steuerzonen und Buchungsgruppen.',
   'Lx-Office is about to update the database <b><TMPL_VAR dbname ESCAPE=HTML></b>. You should create a backup of the database before proceeding because the backup might not be reversible.' => 'Lx-Office wird gleich die Datenbank <b><TMPL_VAR dbname ESCAPE=HTML></b> aktualisieren. Sie sollten eine Sicherungskopie der Datenbank erstellen, bevor Sie fortfahren, da die Aktualisierung unter Umst&auml;nden nicht umkehrbar ist.',
   'MAILED'                      => 'Gesendet',
+  'MSG_BROWSER_DOES_NOT_SUPPORT_IFRAMES' => 'Ihr Browser kann leider keine eingebetteten Frames anzeigen. Bitte w&auml;hlen Sie ein anderes Men&uuml; in der Benutzerkonfiguration im Administrationsmen&uuml; aus.',
   'Main Preferences'            => 'Grundeinstellungen',
   'Make'                        => 'Hersteller',
   'Manager'                     => 'Manager',
@@ -1223,7 +1224,9 @@ gestartet',
   'lead saved!'                 => 'Kundenquelle geichert',
   'list'                        => 'auflisten',
   'localhost'                   => 'lokaler Rechner',
+  'logout'                      => 'abmelden',
   'month'                       => 'Monatliche Abgabe',
+  'new Window'                  => 'neues Fenster',
   'none (pricegroup)'           => 'keine',
   'number'                      => 'Nummer',
   'packing_list'                => 'Versandliste',
@@ -1235,6 +1238,7 @@ gestartet',
   'pos_ustva'                   => 'UStVA',
   'posted!'                     => 'gebucht',
   'prices updated!'             => ' Preise aktualisiert!',
+  'print'                       => 'drucken',
   'proforma'                    => 'Proforma',
   'purchase_order'              => 'Auftrag',
   'quarter'                     => 'Viertelj�hrliche (quartalsweise) Abgabe',
diff --git a/locale/de/menuv3 b/locale/de/menuv3
index 4886d1d85..821b8ec59 100644
--- a/locale/de/menuv3
+++ b/locale/de/menuv3
@@ -1,6 +1,4 @@
 $self->{texts} = {
-  'Logout'                      => 'Abmeldung',
-  'User'                        => 'Benutzer',
 };
 
 $self->{subs} = {
diff --git a/templates/webpages/menu/menuv3_de.html b/templates/webpages/menu/menuv3_de.html
new file mode 100644
index 000000000..3f0c82d41
--- /dev/null
+++ b/templates/webpages/menu/menuv3_de.html
@@ -0,0 +1,45 @@
+<body style="padding:0px; margin:0px;">
+
+ <script type="text/javascript">
+<!--
+function clockon() {
+  var now = new Date();
+  var h = now.getHours();
+  var m = now.getMinutes();
+  document.getElementById('clock_id').innerHTML = (h<10?'0'+h:h)+":"+(m<10?'0'+m:m);
+  var timer=setTimeout("clockon()", 10000);
+}
+window.onload=clockon
+//-->
+ </script>
+
+ <table border="0" width="100%" background="image/bg_titel.gif" cellpadding="0" cellspacing="0">
+  <tr>
+   <td style="color:white; font-family:verdana,arial,sans-serif; font-size: 12px;">
+    &nbsp;
+    [<a href="menuv3.pl?action=display&login=<TMPL_VAR login ESCAPE=URL>&password=<TMPL_VAR password ESCAPE=URL>" target="_blank">neues Fenster</a>]
+    &nbsp;
+    [<a href="JavaScript:top.main_window.print()">drucken</a>]
+   </td>
+   <td align="right" style="vertical-align:middle; color:white; font-family:verdana,arial,sans-serif; font-size: 12px;" nowrap>
+    [Benutzer: <TMPL_VAR login ESCAPE=HTML> -
+    <a href="login.pl?action=logout&login=<TMPL_VAR login ESCAPE=URL>&password=<TMPL_VAR password ESCAPE=URL>" target="_top">abmelden</a>]
+    <TMPL_VAR date> <span id='clock_id' style='position:relative'></span>&nbsp;
+   </td>
+  </tr>
+ </table>
+
+
+ <div id="menu">
+
+  <TMPL_VAR menu>
+
+ </div>
+
+ <div style="clear: both;"></div>
+
+ <iframe id="win1" src="login.pl?login=$form->{login}&password=$form->{password}&action=company_logo" width="100%" height="94%" name="main_window" style="position: absolute; border: 0px; z-index: 99; ">
+  <p>Ihr Browser kann leider keine eingebetteten Frames anzeigen. Bitte w&auml;hlen Sie ein anderes Men&uuml; in der Benutzerkonfiguration im Administrationsmen&uuml; aus.</p>
+ </iframe>
+</body>
+</html>
diff --git a/templates/webpages/menu/menuv3_master.html b/templates/webpages/menu/menuv3_master.html
new file mode 100644
index 000000000..395484a0f
--- /dev/null
+++ b/templates/webpages/menu/menuv3_master.html
@@ -0,0 +1,45 @@
+<body style="padding:0px; margin:0px;">
+
+ <script type="text/javascript">
+<!--
+function clockon() {
+  var now = new Date();
+  var h = now.getHours();
+  var m = now.getMinutes();
+  document.getElementById('clock_id').innerHTML = (h<10?'0'+h:h)+":"+(m<10?'0'+m:m);
+  var timer=setTimeout("clockon()", 10000);
+}
+window.onload=clockon
+//-->
+ </script>
+
+ <table border="0" width="100%" background="image/bg_titel.gif" cellpadding="0" cellspacing="0">
+  <tr>
+   <td style="color:white; font-family:verdana,arial,sans-serif; font-size: 12px;">
+    &nbsp;
+    [<a href="menuv3.pl?action=display&login=<TMPL_VAR login ESCAPE=URL>&password=<TMPL_VAR password ESCAPE=URL>" target="_blank"><translate>new Window</translate></a>]
+    &nbsp;
+    [<a href="JavaScript:top.main_window.print()"><translate>print</translate></a>]
+   </td>
+   <td align="right" style="vertical-align:middle; color:white; font-family:verdana,arial,sans-serif; font-size: 12px;" nowrap>
+    [<translate>User</translate>: <TMPL_VAR login ESCAPE=HTML> -
+    <a href="login.pl?action=logout&login=<TMPL_VAR login ESCAPE=URL>&password=<TMPL_VAR password ESCAPE=URL>" target="_top"><translate>logout</translate></a>]
+    <TMPL_VAR date> <span id='clock_id' style='position:relative'></span>&nbsp;
+   </td>
+  </tr>
+ </table>
+
+
+ <div id="menu">
+
+  <TMPL_VAR menu>
+
+ </div>
+
+ <div style="clear: both;"></div>
+
+ <iframe id="win1" src="login.pl?login=$form->{login}&password=$form->{password}&action=company_logo" width="100%" height="94%" name="main_window" style="position: absolute; border: 0px; z-index: 99; ">
+  <p><translate>MSG_BROWSER_DOES_NOT_SUPPORT_IFRAMES</translate></p>
+ </iframe>
+</body>
+</html>
