From d0e867aba3dc711686e06a14fda31b98876770a3 Mon Sep 17 00:00:00 2001 From: data Date: Sun, 8 Feb 2026 19:10:37 +0100 Subject: [PATCH] Mobile UX: Formulare und Anzeige optimiert MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Beschreibungsfelder bei Leistung/Mehraufwand/Entfällt auf separate Zeile für Mobile (bessere Bedienbarkeit) - Grund/Beschreibung wird auf Mobile klein unter dem Produktnamen angezeigt (spart Platz) - Spalte "Beschreibung" auf Mobile ausgeblendet - Action-Buttons sticky am unteren Bildschirmrand - Tabs horizontal scrollbar statt umbruch - Verbesserte Touch-Targets und Abstände Co-Authored-By: Claude Opus 4.5 --- card.php | 69 ++++++++++++++----- css/stundenzettel-mobile.css | 125 ++++++++++++++++++++++++++++------- 2 files changed, 154 insertions(+), 40 deletions(-) diff --git a/card.php b/card.php index e72b39e..e03d1cf 100644 --- a/card.php +++ b/card.php @@ -946,7 +946,7 @@ elseif ($object->id > 0) { print ''.$langs->trans("LeistungTimeEnd").''; print ''.$langs->trans("Duration").''; print ''.$langs->trans("DefaultService").''; - print ''.$langs->trans("Description").''; + print ''.$langs->trans("Description").''; if ($object->status == Stundenzettel::STATUS_DRAFT && $permissiontoadd) { print ''; // Edit print ''; // Delete @@ -1009,8 +1009,13 @@ elseif ($object->id > 0) { } else { print ''.$langs->trans("NotSet").''; } + // Mobile: Beschreibung unter Leistungsposition anzeigen + if (!empty($leistung->description)) { + print '
'.dol_trunc(strip_tags($leistung->description), 60).'
'; + } print ''; - print ''.dol_htmlentitiesbr($leistung->description).''; + // Beschreibung (auf Mobile ausgeblendet) + print ''.dol_htmlentitiesbr($leistung->description).''; if ($object->status == Stundenzettel::STATUS_DRAFT && $permissiontoadd) { // Edit Button print ''; @@ -1081,9 +1086,9 @@ elseif ($object->id > 0) { $form->select_produits($defaultServiceId, 'fk_product', 1, 0, 0, -1, 2, '', 0, array(), 0, '1', 0, 'maxwidth200'); print ''; - // Beschreibung (Tagesbeschreibung - größeres Textarea, 5 Zeilen) - print ''; - print ''; + // Beschreibung (Desktop: in Zeile, Mobile: ausgeblendet) + print ''; + print ''; print ''; // Action (colspan=2 für beide Button-Spalten) @@ -1093,6 +1098,13 @@ elseif ($object->id > 0) { print ''; print ''; + + // Mobile: Beschreibung in separater Zeile + print ''; + print ''; + print ''; + print ''; + print ''; } // Summenzeile anzeigen @@ -1332,7 +1344,7 @@ elseif ($object->id > 0) { print ''; print ''.$langs->trans("Product").''; print ''.$langs->trans("Qty").''; - print ''.$langs->trans("Reason").''; + print ''.$langs->trans("Reason").''; print ''; // Save print ''; // Delete print ''; @@ -1365,6 +1377,10 @@ elseif ($object->id > 0) { print ''.$displayText.''; } print ' '.$langs->trans("Entfaellt").''; + // Mobile: Grund unter Produktname anzeigen + if (!empty($prod->description)) { + print '
'.dol_trunc(strip_tags($prod->description), 50).'
'; + } print ''; // Menge @@ -1377,8 +1393,8 @@ elseif ($object->id > 0) { print ''; print ''; - // Grund/Beschreibung - print ''; + // Grund/Beschreibung (auf Mobile ausgeblendet) + print ''; if (!empty($prod->description)) { print dol_htmlentitiesbr($prod->description); } else { @@ -1448,7 +1464,7 @@ elseif ($object->id > 0) { print ''; print ''; - print '
'; + print ''; print ''; print ''; @@ -1534,8 +1550,8 @@ elseif ($object->id > 0) { print ''; print ''; - // Grund - print ''; + // Grund (Desktop: in Zeile, Mobile: ausgeblendet) + print ''; print ''; print ''; @@ -1549,6 +1565,13 @@ elseif ($object->id > 0) { print '
'; print ''; + // Mobile: Grund in separater Zeile + print ''; + print ''; + print ''; + print ''; + print ''; + // JavaScript für dynamische Max-Menge print '