bugfix hauptmenu

This commit is contained in:
Xenomporio 2022-05-23 17:55:11 +02:00
parent 3f7a031bd7
commit f1c0a10017

View File

@ -1,4 +1,5 @@
<?php <?php
/* /*
* *** COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE **** * *** COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
* *
@ -13,28 +14,24 @@
*/ */
?> ?>
<?php <?php
class Hauptmenu { class Hauptmenu {
var $app; var $app;
function __construct(&$app) { function __construct(&$app) {
//parent::GenHauptmenu($app); //parent::GenHauptmenu($app);
$this->app = &$app; $this->app = &$app;
$this->app->ActionHandlerInit($this); $this->app->ActionHandlerInit($this);
$this->app->ActionHandler("list", "HauptmenuList"); $this->app->ActionHandler("list", "HauptmenuList");
$this->app->ActionHandlerListen($app); $this->app->ActionHandlerListen($app);
$this->app->Tpl->Set('UEBERSCHRIFT', "Hauptmen&uuml;"); $this->app->Tpl->Set('UEBERSCHRIFT', "Hauptmen&uuml;");
} }
function HauptmenuList() {
function HauptmenuList()
{
//this->WFconf[menu][mitarbeiter] //this->WFconf[menu][mitarbeiter]
$menu = $this->app->Conf->WFconf['menu'][$this->app->User->GetType()]; $menu = $this->app->Conf->WFconf['menu'][$this->app->User->GetType()];
@ -43,6 +40,9 @@ class Hauptmenu {
$spalten_anzahl = 5; $spalten_anzahl = 5;
$i = 0; $i = 0;
if (!is_null($menu)) {
if (count($menu) > 0) { if (count($menu) > 0) {
foreach ($menu as $key => $value) { foreach ($menu as $key => $value) {
$i++; $i++;
@ -70,27 +70,20 @@ class Hauptmenu {
$this->app->Tpl->Parse('PAGE', 'secnav.tpl'); $this->app->Tpl->Parse('PAGE', 'secnav.tpl');
} }
$this->app->Tpl->Add('PAGE', "</td>"); $this->app->Tpl->Add('PAGE', "</td>");
if($spalten % $spalten_anzahl == 0) if ($spalten % $spalten_anzahl == 0) {
{
$this->app->Tpl->Add('PAGE', "</tr><tr valign=\"top\">"); $this->app->Tpl->Add('PAGE', "</tr><tr valign=\"top\">");
} }
} }
} }
} }
}
$restliche_td = $spalten % $spalten_anzahl; $restliche_td = $spalten % $spalten_anzahl;
for ($i = 0; $i < $restliche_td; $i++) for ($i = 0; $i < $restliche_td; $i++)
$this->app->Tpl->Add('PAGE', "<td></td>"); $this->app->Tpl->Add('PAGE', "<td></td>");
$this->app->Tpl->Add('PAGE', "</tr></table>"); $this->app->Tpl->Add('PAGE', "</tr></table>");
} }
} }
?> ?>