openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 784ca195a2055551218835886b7a7df231e21017
parent 9b025399c8d6a595e0e333f0c0c516b40fcb1c52
Author: dankert <devnull@localhost>
Date:   Sun, 28 Nov 2004 18:26:32 +0100

Anzeige Beschreibung pro Menuepunkt als Titel. Tastenkuerzel in Sprachdatei

Diffstat:
themes/default/pages/html/main/menu.tpl.php | 26++++++++++----------------
1 file changed, 10 insertions(+), 16 deletions(-)

diff --git a/themes/default/pages/html/main/menu.tpl.php b/themes/default/pages/html/main/menu.tpl.php @@ -6,7 +6,7 @@ <td class="menu"> <table cellpadding="0" cellspacing="0" width="100%"> <tr> - <td width="2%"><span class="mainmenu_title"><?php echo lang($type) ?>&nbsp;&nbsp;</span> + <td width="2%"><span class="mainmenu_title"><?php echo lang('GLOBAL_'.$type) ?>&nbsp;&nbsp;</span> </td> <td width="2%" nowrap> <?php @@ -26,7 +26,7 @@ </td> <?php if(isset($nr)) { ?> - <td class="mainmenu_headline" width="20"><?php echo lang('id') ?>:&nbsp; + <td class="mainmenu_headline" width="20"><?php echo lang('GLOBAL_ID') ?>:&nbsp; </td> <td class="mainmenu_val" width="50"><strong><?php echo $nr ?></strong> @@ -41,25 +41,19 @@ $i = 0; foreach( $subaction as $act=>$text ) { - switch( $act ) + $title = lang('MENU_'.$act.'_DESC' ); + + if ( hasLang('MENU_'.$act.'_KEY' ) ) { - case 'prop' : $accesskey = 'p'; break; - case 'show' : $accesskey = 'v'; break; - case 'pub' : $accesskey = 'w'; break; - case 'edit' : $accesskey = 'e'; break; - case 'el' : $accesskey = 'l'; break; - case 'rights' : $accesskey = 'a'; break; - case 'new' : $accesskey = 'n'; break; - case 'src' : $accesskey = 's'; break; - default: $accesskey = '' ; + $attrAccesskey = ' accesskey="'.lang('MENU_'.$act.'_KEY').'"'; + $title.=' ('.lang('GLOBAL_KEY').': ALT+'.lang('MENU_'.$act.'_KEY').')'; } + else + $attrAccesskey = ''; - if ( $accesskey != '') - $title = 'ALT+'.strtoupper( $accesskey ); - else $title = ''; if ( ++$i > 1 ) echo ' | '; - echo '<a href="'.Html::url(array('action'=>$action,'subaction'=>$act,$param=>$this->getSessionVar($param))).'" accesskey="'.$accesskey.'" target="cms_main_main" title="'.$title.'">'.$text.'</a>'; + echo '<a href="'.Html::url(array('action'=>$action,'subaction'=>$act,$param=>$this->getSessionVar($param))).'"'.$attrAccesskey.' target="cms_main_main" title="'.$title.'">'.$text.'</a>'; } ?></td> </tr>