fix: Tabs nach Stundenzettel-Pattern (mit /custom/ Prefix, ohne array-data wrap)
All checks were successful
Deploy bericht / deploy (push) Successful in 1s

Tab-URL-Pfad braucht /custom/-Prefix damit Apache ihn richtig auflöst,
und das einfache String-Array-Format (wie Stundenzettel) ist robuster
als die ['data' => ...] Variante. Ungenutzte Hook-Contexts entfernt.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
[deploy]
This commit is contained in:
Eduard Wisch 2026-04-08 15:34:31 +02:00
parent a46ac84a93
commit fab63f6806

View file

@ -43,11 +43,7 @@ class modBericht extends DolibarrModules
'theme' => 0, 'theme' => 0,
'css' => array('/bericht/css/bericht.css'), 'css' => array('/bericht/css/bericht.css'),
'js' => array(), 'js' => array(),
'hooks' => array( 'hooks' => array(),
'invoicecard',
'ordercard',
'propalcard',
),
'moduleforexternal' => 0, 'moduleforexternal' => 0,
); );
@ -84,9 +80,9 @@ class modBericht extends DolibarrModules
// dynamisch hinzugefügt, weil wir die Sichtbarkeit pro Element-Typ über Konstanten steuern wollen. // dynamisch hinzugefügt, weil wir die Sichtbarkeit pro Element-Typ über Konstanten steuern wollen.
// Statisch geht aber auch — sicherer und einfacher: // Statisch geht aber auch — sicherer und einfacher:
$this->tabs = array( $this->tabs = array(
0 => array('data' => 'invoice:+bericht:Bericht:bericht@bericht:$user->hasRight(\'bericht\', \'read\') && getDolGlobalString(\'BERICHT_TAB_ON_INVOICE\', \'1\'):/bericht/bericht_card.php?id=__ID__&element=invoice'), 'invoice:+bericht:Bericht:bericht@bericht:$user->hasRight("bericht","read"):/custom/bericht/bericht_card.php?id=__ID__&element=invoice',
1 => array('data' => 'order:+bericht:Bericht:bericht@bericht:$user->hasRight(\'bericht\', \'read\') && getDolGlobalString(\'BERICHT_TAB_ON_ORDER\', \'1\'):/bericht/bericht_card.php?id=__ID__&element=order'), 'order:+bericht:Bericht:bericht@bericht:$user->hasRight("bericht","read"):/custom/bericht/bericht_card.php?id=__ID__&element=order',
2 => array('data' => 'propal:+bericht:Bericht:bericht@bericht:$user->hasRight(\'bericht\', \'read\') && getDolGlobalString(\'BERICHT_TAB_ON_PROPAL\', \'1\'):/bericht/bericht_card.php?id=__ID__&element=propal'), 'propal:+bericht:Bericht:bericht@bericht:$user->hasRight("bericht","read"):/custom/bericht/bericht_card.php?id=__ID__&element=propal',
); );
$this->dictionaries = array(); $this->dictionaries = array();