Kosmetik
[kivitendo-erp.git] / bin / mozilla / kopf.pl
index 47e4f9d..ed11e52 100644 (file)
@@ -9,6 +9,8 @@ use strict;
 
 sub run {
   my $session_result = shift;
+  %::myconfig = $::auth->read_user($::form->{login})  if  $::form->{login};
+  $::locale   = Locale->new($::myconfig{countrycode}) if $::myconfig{countrycode};
 
 my $form     = $main::form;
 my $locale   = $main::locale;
@@ -23,8 +25,8 @@ foreach (@felder) {
   $name = $wert;
 }
 my $login =
-    "[" . $form->{login}
-  . " - <a href=\"login.pl?action=logout\" target=\"_top\">"
+    "". $locale->text('User') . ": " . $form->{login}
+  . "  [<a href=\"login.pl?action=logout\" target=\"_top\" title=\"". $locale->text('Logout now') . "\">"
   . $locale->text('Logout')
   . "</a>] ";
 my ($Sekunden, $Minuten,   $Stunden,   $Monatstag, $Monat,
@@ -105,18 +107,22 @@ window.onload=clockon
 </script>
 |;
 
-#
 print qq|
 <body bgcolor="#ffffff" text="#ffffff" link="#ffffff" vlink="#ffffff" alink="#ffffff" topmargin="0" leftmargin="0"  marginwidth="0" marginheight="0" style="background-image: url('image/fade.png'); background-repeat:repeat-x;">
-
+<script language='JavaScript' src='js/switchmenuframe.js'></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="JavaScript:top.main_window.print();" title="| . $locale->text('Hardcopy') . qq|">| . $locale->text('Print') . qq|</a>]
-      &nbsp;[<a HREF="login.pl" target="_blank" "title="| . $locale->text('Open a further Lx-Office Window or Tab') . qq|">| . $locale->text('New Win/Tab') . qq|</a>]
-      &nbsp;[<a href="Javascript:top.main_window.history.back();" title="| . $locale->text('Go one step back') . qq|">| . $locale->text('Back') . qq|</a>]
-      <!-- is there a better solution for Back? Possibly with the callback variable? -->
-    </td>
+  <tr>|;
+   if ( !($ENV{HTTP_USER_AGENT} =~ /links/i) ) {    # do not show the the links in case of "links" in HTTP_USER_AGENT
+      print qq|
+       <td  style="color:white; font-family:verdana,arial,sans-serif; font-size: 12px;" nowrap>
+       [<a href="JavaScript:Switch_Menu();" title="| . $locale->text('Switch Menu on / off') . qq|">| . $locale->text('Menu') . qq|</a>]
+       &nbsp;[<a HREF="login.pl" target="_blank" title="| . $locale->text('Open a further Lx-Office Window or Tab') . qq|">| . $locale->text('New Win/Tab') . qq|</a>]
+       &nbsp;[<a href="JavaScript:top.main_window.print();" title="| . $locale->text('Hardcopy') . qq|">| . $locale->text('Print') . qq|</a>]
+       &nbsp;[<a href="Javascript:top.main_window.history.back();" title="| . $locale->text('Go one step back') . qq|">| . $locale->text('Back') . qq|</a>]
+       &nbsp;[<a href="Javascript:top.main_window.history.forward();" title="| . $locale->text('Go one step forward') . qq|">| . $locale->text('Fwd') . qq|</a>]
+      </td>|;
+   }
+   print qq|
     <td align="right" style="vertical-align:middle; color:white; font-family:verdana,arial,sans-serif; font-size: 12px;" nowrap>|
   . $login . $datum . qq| <script>writeclock()</script>&nbsp;
     </td>
@@ -125,7 +131,6 @@ print qq|
 </body>
 </html>
 |;
-
 }
 
 1;