From 4f09c6e55c427a5d0af754bf1528dcba3ff0e711 Mon Sep 17 00:00:00 2001 From: Eduard Wisch Date: Sun, 19 Apr 2026 09:48:49 +0200 Subject: [PATCH] fix: Modul-Beschreibung + Rechte-Labels via Sprachdatei [deploy] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Module500037Desc/DescLong aus eplan.lang statt hardcodierter deutscher Strings im Modul-Descriptor - Rechte-Labels via EplanRightRead/Write/Admin übersetzbar - QR-Code-Block auf Auftragstab (aus vorheriger Sitzung) Co-Authored-By: Claude Opus 4.7 (1M context) --- aufmass_order.php | 23 ++++++++++++++++++++--- core/modules/modEplan.class.php | 12 +++++++----- langs/de_DE/eplan.lang | 6 ++++++ langs/en_US/eplan.lang | 6 ++++++ 4 files changed, 39 insertions(+), 8 deletions(-) diff --git a/aufmass_order.php b/aufmass_order.php index f4aafcd..ace4c81 100644 --- a/aufmass_order.php +++ b/aufmass_order.php @@ -57,18 +57,35 @@ if (!empty($pwa_url)) { $pwa_link = $pwa_url . '/?auftrag=' . urlencode($object->ref) . '&kunde=' . urlencode($object->thirdparty->name ?? '') . '&auftrag_id=' . $object->id; print '
'; - print '
'; - print '
'; + print '
'; + print '
'; print 'Aufmaß für ' . dol_escape_htmltag($object->ref) . ''; if (!empty($object->thirdparty->name)) { print '
' . dol_escape_htmltag($object->thirdparty->name) . ''; } - print '
'; + print '
QR mit Handy scannen oder Button klicken — Auftrag wird automatisch verknüpft.'; + print '
'; print ''; print 'Aufmaß starten'; print '
'; print '
'; + // QR-Code (clientseitig generiert, kein externer Tracking-Service) + print '
'; + print '
'; + print '
'; + + // qrcode-generator (selbsthosting wäre besser, aber CDN ist akzeptabel — + // bei fehlender Internet-Verbindung bleibt zumindest der Text-Link nutzbar) + print ''; + print ''; } else { print '
'; print ' ElektroPlan PWA-URL nicht konfiguriert. '; diff --git a/core/modules/modEplan.class.php b/core/modules/modEplan.class.php index f9b76d7..ce4c6ba 100644 --- a/core/modules/modEplan.class.php +++ b/core/modules/modEplan.class.php @@ -17,8 +17,10 @@ class modEplan extends DolibarrModules $this->family = "other"; $this->module_position = '91'; $this->name = preg_replace('/^mod/i', '', get_class($this)); - $this->description = "Aufmaß-Tab auf Aufträgen und Kundenkarten — Verknüpfung zur ElektroPlan PWA."; - $this->descriptionlong = "Fügt Aufträgen und Kundenkarten einen Reiter 'Aufmaß' hinzu. Zeigt verknüpfte Grundrisse, öffnet die ElektroPlan PWA mit Auftrags-Kontext und ermöglicht PDF-Export direkt als Dolibarr-Dokument."; + // Beschreibung: Dolibarr nimmt automatisch Module500037Desc/DescLong + // aus eplan.lang wenn vorhanden — Hardcoded ist nur Fallback. + $this->description = "Module500037Desc"; + $this->descriptionlong = "Module500037DescLong"; $this->editor_name = 'Alles Watt läuft'; $this->editor_url = ''; @@ -63,21 +65,21 @@ class modEplan extends DolibarrModules $r = 0; $this->rights[$r][0] = $this->numero + 0; - $this->rights[$r][1] = 'Aufmaß einsehen'; + $this->rights[$r][1] = 'EplanRightRead'; $this->rights[$r][2] = 'r'; $this->rights[$r][3] = 1; $this->rights[$r][4] = 'read'; $r++; $this->rights[$r][0] = $this->numero + 1; - $this->rights[$r][1] = 'Aufmaß bearbeiten'; + $this->rights[$r][1] = 'EplanRightWrite'; $this->rights[$r][2] = 'w'; $this->rights[$r][3] = 1; $this->rights[$r][4] = 'write'; $r++; $this->rights[$r][0] = $this->numero + 2; - $this->rights[$r][1] = 'Eplan Einstellungen verwalten'; + $this->rights[$r][1] = 'EplanRightAdmin'; $this->rights[$r][2] = 'a'; $this->rights[$r][3] = 0; $this->rights[$r][4] = 'admin'; diff --git a/langs/de_DE/eplan.lang b/langs/de_DE/eplan.lang index bf91f4a..98ea193 100644 --- a/langs/de_DE/eplan.lang +++ b/langs/de_DE/eplan.lang @@ -1,6 +1,12 @@ # Eplan — Deutsch Module500037Name = Eplan Module500037Desc = Verknüpfung zur ElektroPlan PWA — Raumaufmaß mit Bluetooth-Laser +Module500037DescLong = Fügt Aufträgen und Kundenkarten einen Reiter "Aufmaß" hinzu. Zeigt verknüpfte Grundrisse, öffnet die ElektroPlan PWA mit Auftrags-Kontext und ermöglicht PDF-Export direkt als Dolibarr-Dokument. + +# Rechte +EplanRightRead = Aufmaß einsehen +EplanRightWrite = Aufmaß bearbeiten +EplanRightAdmin = Eplan-Einstellungen verwalten EplanSetup = Eplan Einstellungen EplanPwaUrl = PWA-URL diff --git a/langs/en_US/eplan.lang b/langs/en_US/eplan.lang index 46efbe0..cd35282 100644 --- a/langs/en_US/eplan.lang +++ b/langs/en_US/eplan.lang @@ -1,6 +1,12 @@ # Eplan — English Module500037Name = Eplan Module500037Desc = Link to ElektroPlan PWA — Room measurement with Bluetooth laser +Module500037DescLong = Adds an "Aufmass" tab to orders and customer cards. Shows linked floor plans, opens the ElektroPlan PWA with order context and allows PDF export directly as a Dolibarr document. + +# Rights +EplanRightRead = View measurement +EplanRightWrite = Edit measurement +EplanRightAdmin = Manage Eplan settings EplanSetup = Eplan Settings EplanPwaUrl = PWA URL